/* ===== 기획전 페이지 스타일 ===== */

.planning-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 0px;
}

/* 기획전 헤더 */
.planning-header {
    display: flex;
    gap: 40px;
    align-items: center;
}

.planning-image {
    flex: 0 0 400px;
    max-height: 500px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.planning-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.planning-info {
    flex: 1;
    padding: 20px 0;
}

.planning-info h1 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.planning-info p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.planning-date {
    padding: 15px 20px;
    background: #f5f5f5;
    border-left: 4px solid #7800FF;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.planning-date span {
    display: inline-block;
}

/* 상품 리스트 섹션 */
.planning-items {
    margin-top: 30px;
}

.planning-items h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

/* 필터 섹션 */
.store-search-filter-section {
    /* margin: 50px 0 40px 0; */
}

.store-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.store-search-count {
    font-size: 16px;
    color: #666;
    margin: 0;
    flex-shrink: 0;
}

.result-count {
    font-weight: 700;
    color: #303030;
}

.store-search-sort-list {
    display: flex;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.store-search-sort-item {
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 15px;
    font-weight: 500;
    position: relative;
}

.store-search-sort-item:not(:last-child)::after {
    content: "|";
    position: absolute;
    right: 0;
    color: #CCC;
    font-weight: 300;
}

.store-search-sort-item:hover {
    color: #303030;
}

.store-search-sort-item.active {
    color: #303030;
    font-weight: 700;
}

/* 상품 그리드 */
.store-search-product-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 34px;
    margin: 40px 0;
    /* min-height: 600px; */
}

/* 상품 카드 */
.product-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 상품 이미지 */
.product-image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, #00000000, #00000001, #000000B5);
}

.product-img {
    width: 100%;
    height: 330px;
    object-fit: cover;
    transition: transform 0.4s ease;
    will-change: transform;
    display: block;
}

.product-image:hover .product-img {
    transform: scale(1.05);
}

.product-tag {
    position: absolute;
    top: 15px;
    left: 10px;
}

.product-tag-badge {
    background: #000;
    color: #fff;
    border-radius: 20px;
    padding: 3px 13px;
    font-size: 14px;
    font-weight: 700;
    display: inline-block;
}

.product-wish-btn {
    position: absolute;
    top: 9px;
    right: 10px;
    background: #797979;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    padding: 0;
}

.product-wish-btn img {
    position: absolute;
    top: 17%;
    right: 3px;
    width: 19px;
    opacity: 0.8;
}

/* 상품 정보 */
.product-content {
    padding: 16px 0;
}

.product-title {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.product-title h3 {
    font-size: 22px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    color: #000;
}

.product-title a {
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* 상품 가격 */
.product-price {
    font-size: 22px;
    font-weight: 700;
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-discount {
    color: #7800FF;
    font-size: 22px;
}

.price-current {
    color: #000;
    font-weight: 700;
}

.price-original {
    color: #999;
    text-decoration: line-through;
    font-size: 18px;
    font-weight: 600;
}

/* 등록된 상품이 없는 경우 */
.no-items {
    padding: 80px 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
}

.no-items p {
    font-size: 16px;
    color: #999;
}

/* ===== 페이지네이션 ===== */
.store-search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 80px 0 150px;
    padding: 40px 0;
    border-top: 1px solid #E0E0E0;
    position: relative;
}

.page-info {
    font-size: 16px;
    color: #666;
    font-weight: 500;
    position: absolute;
    right: 0;
}

.page-number-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-number-wrapper i {
    font-size: 24px;
    color: #AFAFAF;
}

.page-current {
    color: #000;
    padding: 6px 33px;
    font-size: 18px;
    border: 1px solid #AFAFAF;
    border-radius: 5px;
    width: 78px;
    text-align: center;
    background: #fff;
}

.page-current:focus {
    outline: none;
    border-color: #7800FF;
}

.page-separator {
    color: #000;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-total {
    color: #000;
}

.page-btn {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    background: #fff;
    color: #303030;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn.page-next {
    font-size: 20px;
    color: #fff;
    background: #303030;
    border-radius: 30px;
    padding: 20px 108px;
    border: none;
}

.page-btn:hover:not(.disabled) {
    background: #7800FF;
    color: #fff;
    border-color: #7800FF;
}

.page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-input {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* =========================================
   [반응형] 기획전 상세 페이지 (store.planning.css)
========================================= */

@media (max-width: 1300px) {
    body.sub-body {
        margin-top: 0 !important;
    }
}
@media (max-width: 768px) {
    body.sub-body {
        padding-top: 90px;
    }
}
/* 1024px 이하 (태블릿) */
@media (max-width: 1024px) {
    .planning-container { padding: 40px 20px; }
    .planning-image { flex: 0 0 300px; } /* 상단 이미지 크기 축소 */
    .planning-info h1 { font-size: 30px; }

    /* 상품 4열 -> 3열 */
    .store-search-product-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .product-img { height: 280px; }
}

/* 768px 이하 (모바일 기본) */
@media (max-width: 768px) {
    .planning-container { padding: 30px 16px; }

    /* 1. 기획전 상단 헤더: 가로 -> 세로 배치 */
    .planning-header { flex-direction: column; gap: 20px; align-items: flex-start; }
    .planning-image { width: 100%; flex: auto; max-height: 300px; }
    .planning-info { padding: 10px 0; }
    .planning-info h1 { font-size: 26px; margin-bottom: 12px; word-break: keep-all; }
    .planning-info p { font-size: 14px; margin-bottom: 0; }

    /* 2. 필터 및 정렬 옵션: 두 줄로 나누어 공간 확보 */
    .store-search-header { flex-direction: column; align-items: flex-start; gap: 15px; padding-bottom: 15px; }
    .store-search-sort-list { width: 100%; justify-content: flex-start; gap: 0; }

    /* 3. 상품 그리드 3열 -> 2열 */
    .store-search-product-list { grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 30px 0; }
    .product-img { height: 220px; } /* 이미지 높이 조절 */

    /* 상품 텍스트 및 가격 축소 */
    .product-title h3 { font-size: 16px; }
    .product-price { font-size: 16px; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
    .price-discount { font-size: 16px; }
    .price-original { font-size: 14px; }
    .product-tag-badge { font-size: 12px; padding: 3px 10px; }

    /* 4. 하단 페이징 영역 모바일 최적화 (가장 중요) */
    .store-search-pagination {
        flex-direction: column; /* 세로 배치 */
        gap: 20px;
        margin: 40px 0 80px;
        padding: 30px 0;
    }
    
    /* 우측 끝에 붙어있던 페이지 정보를 중앙으로 */
    .page-info { position: static; text-align: center; font-size: 14px; order: -1; } 
    .pagination-input { width: 100%; justify-content: center; }
    
    /* 화면을 뚫고 나가던 다음페이지 버튼을 가로 100% 꽉 차게 수정 */
    .page-controls { width: 100%; }
    .page-btn.page-next {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        box-sizing: border-box;
        text-align: center;
    }
}

/* 480px 이하 (작은 모바일) */
@media (max-width: 480px) {
    .planning-info h1 { font-size: 22px; }
    
    .store-search-product-list { gap: 12px; }
    .product-img { height: 180px; } /* 카드 크기가 작아지므로 이미지 높이도 더 축소 */

    .product-title h3 { font-size: 15px; }
    
    /* 가격이 길어서 겹치는 것 방지 (할인가와 원가를 위아래로 분리) */
    .product-price { flex-direction: column; align-items: flex-start; gap: 4px; }
    .price-discount { font-size: 15px; }
    .price-current { font-size: 16px; }
    .price-original { font-size: 13px; }

    .store-search-sort-item { font-size: 14px; padding: 0 10px; }
}

/* 345px 이하 (초소형 모바일) */
@media (max-width: 345px) {
    .product-img { height: 150px; }
    .product-title h3 { font-size: 13px; }
    .price-current { font-size: 14px; }
    .store-search-sort-item { padding: 0 8px; font-size: 13px; }
}