/* pages/product-list.css — Product list toolbar · sidebar filter · load more */

/* ── Layout: sidebar (PC) · collapsible filter (tablet/mobile) ── */
.product-list__layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-list__layout--with-sidebar {
    position: relative;
}

.product-list__main {
    flex: 1;
    min-width: 0;
}

.product-list__sidebar {
    flex-shrink: 0;
}

.product-list__filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.product-list__filter-title {
    margin: 0;
    font-size: var(--label-caps-font-size-md, 0.6875rem);
    font-weight: 800;
    letter-spacing: var(--label-caps-letter-spacing-md, 0.12em);
    text-transform: uppercase;
    color: var(--text-subtle);
    line-height: var(--label-caps-line-height, 1.4);
}

.product-list__filter-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: none;
    color: var(--text-subtle);
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.product-list__filter-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.product-list__filter-close:hover,
.product-list__filter-close:focus-visible {
    color: var(--gray-900);
    background-color: var(--gray-100);
}

.product-list__filter-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-list__filter-nav {
    border-left: 1px solid var(--gray-200);
    padding-left: 1rem;
}

.product-list__filter-link {
    position: relative;
    display: block;
    padding-block: 0.625rem;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: var(--tracking-ko-ui);
    line-height: var(--leading-ko-heading);
    color: var(--text-subtle);
    text-decoration: none;
    transition: color 0.2s ease;
}

@media (min-width: 768px) {
    .product-list__filter-link {
        padding-block: 0.75rem;
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .product-list__filter-link {
        font-size: 1.0625rem;
    }
}

.product-list__filter-link:hover,
.product-list__filter-link:focus-visible {
    color: var(--text-muted);
}

.product-list__filter-link.is-active {
    font-weight: 800;
    color: var(--brand-green);
}

.product-list__filter-link.is-active::before {
    content: '';
    position: absolute;
    left: calc(-1rem - 1px);
    top: 0.375rem;
    bottom: 0.375rem;
    width: 3px;
    background-color: var(--brand-green);
    z-index: 1;
}

.product-list__filter-count {
    flex-shrink: 0;
    font-size: var(--text-ui-sm);
    font-weight: 500;
    color: var(--text-subtle);
}

.product-list__filter-link.is-active .product-list__filter-count {
    color: var(--brand-green);
}

.product-list__filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--gray-300);
    border-radius: 9999px;
    background-color: var(--white);
    font-size: var(--text-ui-md);
    font-weight: 700;
    color: var(--gray-900);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.product-list__filter-trigger:hover,
.product-list__filter-trigger:focus-visible {
    border-color: var(--brand-green);
    color: var(--brand-green);
}

.product-list__filter-trigger-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.product-list__filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background-color: rgba(0, 0, 0, 0.4);
}

.product-list__filter-backdrop[hidden] {
    display: none;
}

body.product-list-filter-open {
    overflow: hidden;
}

.product-list__toolbar-start {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

@media (max-width: 1023px) {
    .product-list__filter-head {
        padding-bottom: 0.75rem;
    }

    .product-list__sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        z-index: 50;
        width: min(18rem, 88vw);
        padding: 1rem var(--space-page);
        overflow-y: auto;
        background-color: var(--white);
        box-shadow: var(--shadow-dropdown);
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        visibility: hidden;
    }

    .product-list__layout.is-filter-open .product-list__sidebar {
        transform: translateX(0);
        visibility: visible;
    }

    .product-list__layout.is-filter-open .product-list__filter-backdrop {
        display: block;
    }
}

@media (min-width: 1024px) {
    .product-list__layout--with-sidebar {
        flex-direction: row;
        align-items: flex-start;
        gap: 2.5rem;
    }

    .product-list__sidebar {
        position: sticky;
        top: calc(5rem + 1rem);
        width: 11.5rem;
        padding-top: 0.75rem;
    }

    .product-list__filter-head {
        margin-bottom: 1rem;
    }

    .product-list__filter-close,
    .product-list__filter-trigger,
    .product-list__filter-backdrop {
        display: none;
    }
}

.product-list__toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.5rem 0;
}

.product-list__toolbar--sort-only {
    justify-content: flex-end;
}

.product-list__toolbar--after-intro {
    margin-top: 1.5rem;
    padding-block: 0.75rem 0;
}

@media (min-width: 768px) {
    .product-list__toolbar--after-intro {
        margin-top: 2rem;
        padding-block: 1rem 0;
    }
}

@media (min-width: 768px) {
    .product-list__toolbar {
        padding-block: 0.75rem 0;
    }
}

.product-list__count {
    margin: 0;
    font-size: var(--text-ui-md);
    font-weight: 500;
    color: var(--text-subtle);
    line-height: 1.5;
}

.product-list__count strong {
    font-weight: 800;
    color: var(--brand-green);
}

.product-list__sort-wrap {
    position: relative;
    flex-shrink: 0;
    --nav-link-base: var(--gray-900);
}

.product-list__sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0;
    border: 0;
    background: none;
    font-size: var(--text-ui-md);
    font-weight: 800;
    color: var(--brand-green);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.product-list__sort-trigger:hover,
.product-list__sort-trigger:focus-visible {
    color: var(--brand-green);
}

.product-list__sort-trigger-icon {
    display: block;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: var(--text-subtle);
    transition: transform 0.2s ease, color 0.2s ease;
}

.product-list__sort-wrap.is-open .product-list__sort-trigger-icon {
    transform: rotate(180deg);
    color: var(--brand-green);
}

.product-list__sort {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

@media (max-width: 767px) {
    .product-list__sort {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 0;
        z-index: 20;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 0.375rem;
        min-width: 9rem;
        padding: 0.625rem 0.75rem;
        border: 1px solid var(--gray-300);
        border-radius: var(--radius-card);
        background-color: var(--white);
        box-shadow: var(--shadow-dropdown);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-0.25rem);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }

    .product-list__sort-wrap.is-open .product-list__sort {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .product-list__sort-btn {
        width: 100%;
        padding: 0.5rem 0.625rem;
        text-align: left;
    }
}

@media (min-width: 768px) {
    .product-list__sort-trigger {
        display: none;
    }

    .product-list__sort {
        gap: 1.5rem;
    }
}

.product-list__sort-btn {
    padding: 0;
    border: 0;
    background: none;
    font-size: var(--text-ui-md);
    font-weight: 500;
    color: var(--text-subtle);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.product-list__sort-btn:hover,
.product-list__sort-btn:focus-visible {
    color: var(--text-muted);
}

.product-list__sort-btn.is-active {
    font-weight: 800;
    color: var(--brand-green);
}

@media (max-width: 767px) {
    .product-list__sort-btn {
        color: var(--text-subtle);
    }

    .product-list__sort-btn:hover,
    .product-list__sort-btn:focus-visible {
        color: var(--text-muted);
    }

    .product-list__sort-btn.is-active {
        color: var(--brand-green);
    }
}

.product-list__grid {
    margin-top: 1.5rem;
}

/* page-intro 탭 → 사이드바 이동 후 목록 구간 간격 (v3 탭 높이 보정) — padding 은 layout/page-intro.css */

@media (min-width: 1024px) {
    .product-list__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── 상품 카드 텍스트 — v3 product-list.html · type-* 토큰 ── */
#product-list .product-list__item .type-caption {
    font-size: var(--text-ui-sm);
}

#product-list .product-list__item .type-product-name {
    font-size: 1.125rem;
}

#product-list .product-list__item > div > a > div span,
#product-list .product-list__item > div > span > div span {
    font-size: 1.0625rem;
}

#product-list .product-list__item .type-caption.line-through {
    font-size: var(--text-ui-sm);
}

@media (min-width: 768px) {
    #product-list .product-list__item .type-caption {
        font-size: 0.8125rem;
    }

    #product-list .product-list__item .type-product-name {
        font-size: 1.25rem;
    }

    #product-list .product-list__item > div > a > div span,
    #product-list .product-list__item > div > span > div span {
        font-size: 1rem;
    }

    #product-list .product-list__item .type-caption.line-through {
        font-size: 0.8125rem;
    }
}

@media (max-width: 360px) {
    .product-list__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 768px) {
    .product-list__grid {
        margin-top: 2rem;
    }
}

/* #product-list 하단 여백 — .board-section--compact 가 --page-end-padding 처리 (별도 #product-list 규칙 불필요) */

/* ── 상품 목록 더보기 ── */
.product-list__load-more {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    padding-top: 0;
}

@media (min-width: 768px) {
    .product-list__load-more {
        margin-top: 3.5rem;
    }
}

.product-list__load-more[hidden] {
    display: none;
}

.product-list__load-more-btn {
    font-size: var(--text-ui-md);
}

.product-list__load-more-btn .hero-cta__label-text {
    text-transform: none;
    letter-spacing: 0;
}

.product-list__load-more-icon {
    width: 0.875rem;
    height: 0.875rem;
}

.product-list__load-more-icon svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* ── Category intro: daunee-bread (ca_skin=daunee-bread) ── */
.category-daunee-bread {
    --cafe-panel: #e6d0b0;
    --cafe-panel-text: #5a3e2b;
    --cafe-panel-muted: color-mix(in srgb, var(--cafe-panel-text) 78%, transparent);
    --cafe-media-bg: #fff;
    --cafe-media-plate: #faf8f4;
    --cafe-frame: color-mix(in srgb, var(--cafe-panel-text) 16%, #e8e0d6);
    margin: 0;
    overflow: hidden;
    background: var(--cafe-media-bg);
    border: 1px solid var(--cafe-frame);
    border-radius: var(--radius-card-md, 1rem);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--cafe-panel-text) 6%, transparent);
}

.category-daunee-bread__media {
    background: var(--cafe-media-bg);
    padding: 0;
}

.category-daunee-bread__media-frame {
    position: relative;
    display: block;
    min-height: 0;
    padding: 0;
    background: var(--cafe-media-bg);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.category-daunee-bread__image {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 1200 / 481;
    object-fit: contain;
    object-position: center;
    margin: 0;
    border-radius: 0;
    vertical-align: top;
}

.category-daunee-bread__panel {
    margin: 0;
    padding: 1.5rem 1.75rem 2rem;
    background: var(--cafe-panel);
    color: var(--cafe-panel-text);
    border-top: 1px solid color-mix(in srgb, var(--cafe-panel-text) 12%, var(--cafe-panel));
}

.category-daunee-bread__headline {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem 1.5rem;
    align-items: center;
}

.category-daunee-bread__col--lead {
    text-align: left;
}

.category-daunee-bread__col--trail {
    text-align: right;
}

.category-daunee-bread__title {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 2rem); /* ~32px */
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--cafe-panel-text);
}

.category-daunee-bread__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-daunee-bread__badge-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 9999px;
    background: #fff;
    color: var(--cafe-panel-text);
    border: 2px solid #fff;
    box-shadow:
        0 0 0 3px var(--cafe-panel),
        0 0 0 5px #fff;
}

.category-daunee-bread__badge-text {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

.category-daunee-bread__divider {
    height: 1px;
    margin: 1.1rem 0 0;
    background: color-mix(in srgb, var(--cafe-panel-text) 22%, transparent);
}

.category-daunee-bread__features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.category-daunee-bread__features-title {
    margin: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem); /* 20–28px */
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--cafe-panel-text);
}

.category-daunee-bread__feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.category-daunee-bread__feature-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
}

.category-daunee-bread__feature-name {
    font-size: clamp(1.0625rem, 1.8vw, 1.375rem); /* 17–22px */
    font-weight: 800;
    line-height: 1.45;
    color: var(--cafe-panel-text);
}

.category-daunee-bread__feature-body {
    font-size: clamp(1rem, 1.5vw, 1.1875rem); /* 16–19px */
    font-weight: 600;
    line-height: 1.55;
    color: var(--cafe-panel-muted);
}

/* PC: 좌측 제목 · 우측 내용 */
@media (min-width: 992px) {
    .category-daunee-bread__features {
        gap: 1.4rem;
    }

    .category-daunee-bread__feature-list {
        gap: 1.15rem;
    }

    .category-daunee-bread__feature-item {
        display: grid;
        grid-template-columns: minmax(14rem, 0.95fr) minmax(0, 1.35fr);
        column-gap: 2rem;
        row-gap: 0.35rem;
        align-items: baseline;
    }

    .category-daunee-bread__feature-name {
        font-size: 1.25rem;
    }

    .category-daunee-bread__feature-body {
        font-size: 1.125rem;
    }
}

@media (max-width: 767.98px) {
    .category-daunee-bread {
        margin-bottom: 0;
    }

    .category-daunee-bread__media {
        padding: 0;
    }

    .category-daunee-bread__media-frame {
        min-height: 0;
        padding: 0;
    }

    .category-daunee-bread__panel {
        padding: 1.2rem 1rem 1.75rem;
    }

    .category-daunee-bread__headline {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0.85rem;
        text-align: center;
    }

    .category-daunee-bread__col--lead,
    .category-daunee-bread__col--trail {
        text-align: center;
    }

    .category-daunee-bread__badge {
        order: -1;
    }

    .category-daunee-bread__badge-ring {
        width: 3.5rem;
        height: 3.5rem;
    }

    .category-daunee-bread__badge-text {
        font-size: 1.0625rem;
    }

    .category-daunee-bread__title {
        font-size: 1.25rem;
    }

    .category-daunee-bread__divider {
        margin: 0.9rem 0 0;
    }

    .category-daunee-bread__features {
        gap: 1.1rem;
        margin-top: 1.25rem;
    }

    .category-daunee-bread__features-title {
        text-align: center;
        font-size: 1.25rem;
    }

    .category-daunee-bread__feature-list {
        gap: 1rem;
    }

    .category-daunee-bread__feature-name {
        font-size: 1.125rem;
    }

    .category-daunee-bread__feature-body {
        font-size: 1rem;
    }
}

/* ── Category intro: daunee-tteok (ca_skin=daunee-tteok) ── */
.category-daunee-tteok {
    --tteok-panel: #f3e59a;
    --tteok-text: #5f7d4b;
    --tteok-muted: color-mix(in srgb, var(--tteok-text) 82%, transparent);
    --tteok-media-bg: #fff;
    --tteok-media-plate: #fafaf7;
    --tteok-frame: color-mix(in srgb, var(--tteok-text) 18%, #e7e4d8);
    margin: 0;
    overflow: hidden;
    background: var(--tteok-media-bg);
    border: 1px solid var(--tteok-frame);
    border-radius: var(--radius-card-md, 1rem);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--tteok-text) 6%, transparent);
}

.category-daunee-tteok__media {
    background: var(--tteok-media-bg);
    padding: 0;
}

.category-daunee-tteok__media-frame {
    position: relative;
    display: block;
    min-height: 0;
    padding: 0;
    background: var(--tteok-media-plate);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.category-daunee-tteok__image {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 1200 / 481;
    object-fit: contain;
    object-position: center;
    margin: 0;
    border-radius: 0;
    vertical-align: top;
}

.category-daunee-tteok__panel {
    margin: 0;
    padding: 1.5rem 1.75rem 1.6rem;
    background: var(--tteok-panel);
    color: var(--tteok-text);
    border-top: 1px solid color-mix(in srgb, var(--tteok-text) 14%, var(--tteok-panel));
}

.category-daunee-tteok__title {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--tteok-text);
}

.category-daunee-tteok__divider {
    height: 1px;
    margin: 1.1rem auto 1rem;
    max-width: 42rem;
    background: color-mix(in srgb, var(--tteok-text) 24%, transparent);
}

.category-daunee-tteok__points {
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.75rem 1.5rem;
    max-width: 48rem;
}

@media (min-width: 768px) {
    .category-daunee-tteok__points {
        grid-template-columns: 1fr 1fr;
        gap: 0.85rem 2rem;
    }
}

.category-daunee-tteok__point {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0;
}

.category-daunee-tteok__point-label {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    font-weight: 800;
    line-height: 1.35;
    color: var(--tteok-text);
}

.category-daunee-tteok__point-text {
    font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
    font-weight: 600;
    line-height: 1.5;
    color: var(--tteok-muted);
}

@media (max-width: 767.98px) {
    .category-daunee-tteok__media {
        padding: 0;
    }

    .category-daunee-tteok__media-frame {
        min-height: 0;
        padding: 0;
    }

    .category-daunee-tteok__panel {
        padding: 1.2rem 1rem 1.3rem;
    }

    .category-daunee-tteok__title {
        font-size: 1.25rem;
    }

    .category-daunee-tteok__points {
        text-align: center;
    }

    .category-daunee-tteok__point {
        align-items: center;
    }
}
