/* product_list — 상품 목록 전용 */

.item-list-page {
    background: #f7f8fa;
}

.item-list-page .item-list-section {
    padding: 24px 0 48px;
}

.item-list-page .item-list-layout {
    align-items: flex-start;
    gap: 24px;
    max-width: 1280px;
}

/* ── 사이드바 카테고리 (sticky) ── */
@media (min-width: 992px) {
    .item-list-page .item-list-category {
        position: sticky;
        top: 30px;
        align-self: flex-start;
        max-height: calc(100vh - 30px);
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #d1d5db transparent;
    }

    .item-list-page .item-list-category::-webkit-scrollbar {
        width: 4px;
    }

    .item-list-page .item-list-category::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }
}

.item-list-page .item-list-category {
    width: 220px;
    min-width: 220px;
    margin-bottom: 0;
    padding: 20px 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.item-list-page .item-list-category .first-category {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eceef2;
    color: #1a1d26;
    letter-spacing: -0.02em;
    width: 100%;
}

.item-list-page .item-list-category .second-category li a {
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    display: block;
}

.item-list-page .item-list-category .second-category li.active > a,
.item-list-page .item-list-category .second-category li:hover > a {
    background: var(--color-main-bg-white);
}

.item-list-page .item-list-category .third-category.pc {
    margin-top: 4px;
    margin-bottom: 8px;
    background: #f7f8fa;
    border-radius: 10px;
    padding: 4px 0;
}

.item-list-page .item-list-category .third-category.pc li a {
    padding: 8px 16px;
    font-size: 13px;
}

.item-list-page .item-list-category .third-category.pc li.active > a {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* ── 메인 콘텐츠 ── */
.item-list-page .item-list-main {
    min-width: 0;
    flex: 1;
}

.item-list-page .location-box {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    margin: 0 0 20px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.item-list-page .location-box .category-name h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #1a1d26;
    line-height: 1.3;
    margin: 0;
}

.item-list-page .location-box ul {
    justify-content: flex-end;
}

.item-list-page .location-box ul li > * {
    font-size: 13px;
    color: #6b7280;
}

.item-list-page .location-box ul li:last-child > * {
    color: #1a1d26;
    font-weight: 600;
}

/* ── 추천 상품 ── */
.item-list-page .recommend-product {
    margin-bottom: 20px;
    padding: 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.item-list-page .recommend-product .recomment-title h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1d26;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.item-list-page .recommend-product .item-list-box .five-swiper {
    padding: 0 8px;
}

/* ── 정렬·개수 ── */
.item-list-page .list-top-box {
    margin: 0 0 20px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.item-list-page .list-top-box p {
    font-size: 14px;
    color: #6b7280;
}

.item-list-page .list-top-box p b {
    color: #1a1d26;
    font-weight: 700;
}

.item-list-page .container:has(> div > .recommend-product) > div > .list-top-box {
    border-top: none;
    padding-top: 16px;
}

/* ── 상품 그리드 ── */
.item-list-page #product-list.item-list-box,
.item-list-page #product-list.item-list-box ul {
    margin: 0;
}

.item-list-page #product-list.item-list-box ul {
    margin: 0 -6px -28px;
}

.item-list-page #product-list.item-list-box ul li {
    width: calc(20% - 12px);
    margin: 0 6px 28px;
}

.item-list-page .list-none-box {
    padding: 48px 24px;
    background: #fff;
    border-radius: 14px;
    border: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.item-list-page .list-none-box p {
    color: #6b7280;
    font-size: 15px;
}

/* ── 추천 스와이퍼 화살표 (PC, 섹션 가장자리 반쯤 걸침) ── */
@media (min-width: 992px) {
    .item-list-page .recommend-product {
        overflow: visible;
    }

    .item-list-page .recommend-product .item-list-box,
    .item-list-page .recommend-product .item-list-box .wrapper {
        overflow: visible;
    }

    .item-list-page .recommend-product .item-list-box .swiper-button-prev,
    .item-list-page .recommend-product .item-list-box .swiper-button-next {
        top: 50% !important;
        margin-top: 0 !important;
        width: 44px !important;
        height: 44px !important;
        background-color: #fff !important;
        box-shadow: 0 2px 12px rgba(15, 23, 42, 0.14);
        border-radius: 50%;
        z-index: 20;
    }

    .item-list-page .recommend-product .item-list-box .swiper-button-prev {
        left: 0 !important;
        right: auto !important;
        transform: translate(-50%, -50%);
    }

    .item-list-page .recommend-product .item-list-box .swiper-button-next {
        right: 0 !important;
        left: auto !important;
        transform: translate(50%, -50%);
    }
}

/* ── 반응형 ── */
@media (max-width: 991px) {
    .item-list-page {
        background: #fff;
    }

    .item-list-page .item-list-section {
        padding: 0 0 32px;
    }

    .item-list-page .item-list-category {
        width: 100%;
        min-width: 0;
        padding: 16px 12px;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid #eceef2;
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
    }

    .item-list-page .item-list-category .first-category {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .item-list-page .recommend-product {
        margin-bottom: 0;
        padding: 20px 0;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 8px solid #f7f8fa;
    }

    .item-list-page .list-top-box {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid #eceef2;
    }

    .item-list-page #product-list.item-list-box ul {
        margin: 0 -3px -18px;
    }

    .item-list-page #product-list.item-list-box ul li {
        width: calc(33.33% - 6px);
        margin: 0 3px 18px;
    }
}

@media (max-width: 570px) {
    .item-list-page #product-list.item-list-box ul li {
        width: calc(50% - 6px);
    }
}
