.category-catalog {
    --category-ink: #263846;
    --category-ink-soft: #5a6a72;
    --category-blue: #2c4a6b;
    --category-blue-deep: #20384f;
    --category-cream: #f5f1e8;
    --category-cream-light: #fbf9f4;
    --category-sage: #b8c4b4;
    --category-sage-light: #e8eee7;
    --category-sand: #e8dcc8;
    --category-rose: #d8aa99;
    --category-line: rgba(38, 56, 70, 0.14);
    --category-white: #ffffff;
    padding: clamp(20px, 3.5vw, 52px) 0 clamp(52px, 7vw, 96px);
    overflow: hidden;
    background:
        radial-gradient(circle at 94% 2%, rgba(184, 196, 180, 0.34), transparent 20%),
        linear-gradient(180deg, #fbf9f4 0%, #ffffff 26%, #fbfaf7 100%);
    color: var(--category-ink);
    font-family: "Noto Sans TC", "思源黑體 TC", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.75;
}

.category-catalog *,
.category-catalog *::before,
.category-catalog *::after {
    box-sizing: border-box;
}

.category-catalog a {
    color: inherit;
    text-decoration: none;
}

.category-catalog a:focus-visible,
.category-catalog button:focus-visible {
    outline: 3px solid #d76f4f;
    outline-offset: 4px;
}

.category-catalog__container {
    width: min(100% - 32px, 1260px);
    margin-inline: auto;
}

.category-catalog__layout {
    display: grid;
    grid-template-columns: minmax(214px, 252px) minmax(0, 1fr);
    gap: clamp(22px, 3.2vw, 46px);
    align-items: start;
}

.category-catalog__sidebar {
    position: sticky;
    top: 24px;
}

.category-catalog__sidebar-heading {
    padding: 0 10px 17px;
}

.category-catalog__sidebar-heading > span {
    display: block;
    margin-bottom: 8px;
    color: var(--category-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.category-catalog__sidebar-heading h2 {
    margin: 0;
    color: var(--category-ink);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.35;
}

.category-catalog__sidebar-heading p {
    margin: 7px 0 0;
    color: var(--category-ink-soft);
    font-size: 13px;
    line-height: 1.65;
}

.category-catalog__sidebar #shop-sidebar {
    max-width: none !important;
    border: 1px solid var(--category-line);
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.72) !important;
    box-shadow: 0 16px 36px rgba(38, 56, 70, 0.08) !important;
}

.category-catalog__sidebar #shop-sidebar .offcanvas-body {
    padding: 18px !important;
}

.category-catalog__sidebar .input-group {
    position: relative;
    margin-bottom: 16px !important;
}

.category-catalog__sidebar .widget-filter-search {
    min-height: 44px;
    padding: 9px 38px 9px 12px;
    border-color: rgba(44, 74, 107, 0.18);
    border-radius: 8px !important;
    background: #fbfaf7;
    color: var(--category-ink);
    font-size: 14px;
    font-weight: 500;
}

.category-catalog__sidebar .widget-filter-search::placeholder {
    color: #7c898e;
}

.category-catalog__sidebar #Search {
    color: var(--category-blue);
}

.category-catalog__sidebar .list-group {
    gap: 2px;
}

.category-catalog__sidebar .list-group-item {
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px !important;
    background: transparent;
    color: var(--category-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.category-catalog__sidebar .list-group-item:hover,
.category-catalog__sidebar .list-group-item:focus-visible {
    background: var(--category-sage-light);
    color: var(--category-blue-deep);
    transform: translateX(2px);
}

.category-catalog__sidebar .list-group-item.ps-sm-5 {
    padding-left: 19px !important;
    color: #42525b;
    font-weight: 500;
}

.category-catalog__sidebar .list-group-item-third {
    padding-left: 30px !important;
    color: #617078;
    font-size: 13px;
    font-weight: 400;
}

.category-catalog__browse-button {
    display: none;
}

.category-catalog__hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(44, 74, 107, 0.1);
    border-radius: 20px;
    background:
        radial-gradient(circle at 96% 8%, rgba(184, 196, 180, 0.76), transparent 24%),
        linear-gradient(132deg, #fbf8f1 0%, #f5f1e8 53%, #edf1ea 100%);
}

.category-catalog__hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image: linear-gradient(rgba(44, 74, 107, 0.032) 1px, transparent 1px), linear-gradient(90deg, rgba(44, 74, 107, 0.032) 1px, transparent 1px);
    background-position: right center;
    background-size: 28px 28px;
    content: "";
    mask-image: linear-gradient(to left, #000, transparent 66%);
}

.category-catalog__hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(245px, 0.58fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    min-height: 270px;
    padding: clamp(28px, 4vw, 52px);
}

.category-catalog__hero-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.category-catalog__eyebrow {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 0 0 12px;
    color: var(--category-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.3;
}

.category-catalog__eyebrow span {
    width: 24px;
    height: 2px;
    background: var(--category-rose);
}

.category-catalog__hero h1 {
    margin: 0;
    color: var(--category-ink);
    font-size: clamp(31px, 4.1vw, 50px);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 1.18;
}

.category-catalog__description {
    max-width: 690px;
    margin-top: 17px;
    color: var(--category-ink-soft);
    font-size: 16px;
    line-height: 1.82;
}

.category-catalog__description p {
    margin: 0;
}

.category-catalog__description p + p {
    margin-top: 10px;
}

.category-catalog__description img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 12px 0 0;
    border-radius: 10px;
}

.category-catalog__description p:has(img) {
    margin: 0;
}

.category-catalog__description--fallback {
    margin-bottom: 0;
}

.category-catalog__hero-side {
    display: grid;
    gap: 12px;
}

.category-catalog__countdown {
    display: grid;
    gap: 2px;
    padding: 8px 2px 0;
    color: #a25735;
    font-size: 12px;
    font-weight: 600;
}

.category-catalog__countdown strong {
    color: #8c4025;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.category-catalog__products {
    margin-top: clamp(42px, 6vw, 76px);
}

.category-catalog__section-heading {
    display: flex;
    gap: 20px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--category-line);
}

.category-catalog__section-heading .category-catalog__eyebrow {
    margin-bottom: 7px;
}

.category-catalog__section-heading h2 {
    margin: 0;
    color: var(--category-ink);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.25;
}

.category-catalog__result-count {
    margin: 0;
    color: var(--category-ink-soft);
    font-size: 13px;
    text-align: right;
}

.category-catalog__result-count strong {
    color: var(--category-blue);
    font-size: 17px;
}

.category-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 24px);
}

.category-product-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(38, 56, 70, 0.12);
    border-radius: 13px;
    background: var(--category-white);
    box-shadow: 0 8px 18px rgba(38, 56, 70, 0.04);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.category-product-card:hover,
.category-product-card:focus-within {
    border-color: rgba(44, 74, 107, 0.28);
    box-shadow: 0 18px 32px rgba(38, 56, 70, 0.11);
    transform: translateY(-4px);
}

.category-product-card__wishlist {
    position: absolute;
    z-index: 2;
    top: 11px;
    right: 11px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(38, 56, 70, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--category-blue);
    font-size: 17px;
    line-height: 1;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.category-product-card__wishlist:hover {
    border-color: #c87d6a;
    background: #fff4f0;
    color: #b75e52;
    transform: scale(1.06);
}

.category-product-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f7f5f0;
}

.category-product-card__media::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 62%, rgba(32, 56, 79, 0.08));
    content: "";
    pointer-events: none;
}

.category-product-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 320ms ease;
}

.category-product-card:hover .category-product-card__media img,
.category-product-card:focus-within .category-product-card__media img {
    transform: scale(1.045);
}

.category-product-card__tag {
    position: absolute;
    z-index: 1;
    right: 10px;
    bottom: 10px;
    left: 10px;
    overflow: hidden;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 6px;
    background: rgba(32, 56, 79, 0.79);
    color: var(--category-white);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-product-card__content {
    display: flex;
    min-height: 174px;
    flex: 1;
    flex-direction: column;
    padding: 16px 16px 14px;
}

.category-product-card__content h3 {
    margin: 0;
    color: var(--category-ink);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.5;
}

.category-product-card__content h3 a {
    transition: color 160ms ease;
}

.category-product-card__content h3 a:hover {
    color: var(--category-blue);
}

.category-product-card__summary {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    color: var(--category-ink-soft);
    font-size: 13px;
    line-height: 1.62;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.category-product-card__summary p {
    margin: 0;
}

.category-product-card__footer {
    display: flex;
    gap: 8px;
    align-items: end;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
}

.category-product-card__price {
    color: #af5748;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.category-product-card__detail-link {
    color: var(--category-blue) !important;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.category-product-card__detail-link span {
    display: inline-block;
    margin-left: 2px;
    transition: transform 160ms ease;
}

.category-product-card__detail-link:hover span {
    transform: translateX(3px);
}

.category-catalog__empty-state {
    display: grid;
    justify-items: center;
    padding: clamp(42px, 7vw, 84px) 24px;
    border: 1px dashed rgba(44, 74, 107, 0.3);
    border-radius: 14px;
    background: #faf9f5;
    color: var(--category-ink-soft);
    text-align: center;
}

.category-catalog__empty-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 15px;
    place-items: center;
    border-radius: 50%;
    background: var(--category-sage-light);
    color: var(--category-blue);
    font-size: 20px;
}

.category-catalog__empty-state h3 {
    margin: 0;
    color: var(--category-ink);
    font-size: 21px;
    font-weight: 700;
}

.category-catalog__empty-state p {
    max-width: 430px;
    margin: 8px 0 20px;
    font-size: 14px;
}

.category-catalog__empty-state a {
    display: inline-flex;
    min-height: 44px;
    padding: 10px 16px;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    background: var(--category-blue);
    color: var(--category-white) !important;
    font-size: 14px;
    font-weight: 700;
}

.category-catalog__guide-panel {
    position: relative;
    display: flex;
    gap: clamp(24px, 4vw, 68px);
    align-items: center;
    justify-content: space-between;
    margin-top: clamp(42px, 6vw, 76px);
    padding: clamp(26px, 4.5vw, 48px);
    overflow: hidden;
    border-radius: 18px;
    background: var(--category-blue-deep);
    box-shadow: 0 24px 52px rgba(32, 56, 79, 0.19);
    color: var(--category-white);
}

.category-catalog__guide-panel::before,
.category-catalog__guide-panel::after {
    position: absolute;
    border: 1px solid rgba(184, 196, 180, 0.26);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.category-catalog__guide-panel::before {
    top: -162px;
    right: -80px;
    width: 342px;
    height: 342px;
}

.category-catalog__guide-panel::after {
    right: 80px;
    bottom: -188px;
    width: 278px;
    height: 278px;
}

.category-catalog__guide-panel-copy {
    position: relative;
    z-index: 1;
    max-width: 650px;
}

.category-catalog__guide-panel .category-catalog__eyebrow {
    color: #d8e3d5;
}

.category-catalog__guide-panel .category-catalog__eyebrow span {
    background: var(--category-rose);
}

.category-catalog__guide-panel h2 {
    margin: 0;
    color: var(--category-white);
    font-size: clamp(25px, 3.2vw, 38px);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.3;
}

.category-catalog__guide-panel-copy > p:not(.category-catalog__eyebrow) {
    max-width: 590px;
    margin: 15px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 1.8;
}

.category-catalog__guide-panel ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 18px 0 0;
    padding: 0;
    color: #dce6db;
    font-size: 13px;
    list-style: none;
}

.category-catalog__guide-panel li::before {
    margin-right: 7px;
    color: #b8cfae;
    content: "✓";
    font-weight: 700;
}

.category-catalog__guide-button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    min-width: 185px;
    min-height: 54px;
    padding: 12px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-radius: 9px;
    background: var(--category-white);
    color: var(--category-blue-deep) !important;
    font-size: 15px;
    font-weight: 700;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.category-catalog__guide-button:hover {
    background: #e6eee4;
    color: var(--category-blue-deep) !important;
    transform: translateY(-2px);
}

.category-catalog__guide-button span {
    transition: transform 160ms ease;
}

.category-catalog__guide-button:hover span {
    transform: translateX(3px);
}

@media (max-width: 991.98px) {
    .category-catalog {
        padding-top: 16px;
    }

    .category-catalog__layout {
        display: block;
    }

    .category-catalog__sidebar {
        position: static;
    }

    .category-catalog__sidebar-heading {
        display: none;
    }

    .category-catalog__sidebar #shop-sidebar {
        position: fixed;
        z-index: 1045;
        top: 0;
        bottom: 0;
        left: 0;
        display: flex;
        width: min(86vw, 336px) !important;
        max-width: min(86vw, 336px) !important;
        height: 100%;
        padding: 10px 0;
        overflow-y: auto;
        border: 0;
        border-right: 1px solid var(--category-line);
        border-radius: 0 14px 14px 0 !important;
        background: var(--category-white) !important;
        box-shadow: 12px 0 34px rgba(38, 56, 70, 0.16) !important;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 300ms ease-in-out, visibility 300ms ease-in-out;
    }

    .category-catalog__sidebar #shop-sidebar.show,
    .category-catalog__sidebar #shop-sidebar.showing {
        transform: none;
        visibility: visible;
    }

    .category-catalog__sidebar #shop-sidebar.hiding {
        transform: translateX(-100%);
    }

    .category-catalog__browse-button {
        display: inline-flex;
        min-height: 44px;
        margin-bottom: 14px;
        padding: 9px 13px;
        align-items: center;
        gap: 8px;
        border: 1px solid rgba(44, 74, 107, 0.2);
        border-radius: 8px;
        background: var(--category-white);
        color: var(--category-blue);
        font-size: 14px;
        font-weight: 700;
    }

    .category-catalog__hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        min-height: auto;
    }

    .category-catalog__hero-side {
        grid-template-columns: 1fr;
    }

    .category-catalog__countdown {
        grid-column: 1 / -1;
        padding-top: 2px;
    }

    .category-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-catalog__guide-panel {
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    .category-catalog__container {
        width: min(100% - 24px, 720px);
    }

    .category-catalog__hero {
        border-radius: 15px;
    }

    .category-catalog__hero-grid {
        padding: 25px 20px 21px;
    }

    .category-catalog__hero h1 {
        font-size: clamp(29px, 9vw, 40px);
    }

    .category-catalog__description {
        margin-top: 13px;
        font-size: 15px;
    }

    .category-catalog__hero-side {
        grid-template-columns: 1fr;
    }

    .category-catalog__section-heading {
        display: block;
        margin-bottom: 17px;
        padding-bottom: 13px;
    }

    .category-catalog__result-count {
        margin-top: 7px;
        text-align: left;
    }

    .category-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-product-card {
        border-radius: 10px;
    }

    .category-product-card__wishlist {
        top: 8px;
        right: 8px;
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .category-product-card__tag {
        right: 7px;
        bottom: 7px;
        left: 7px;
        padding: 4px 5px;
        font-size: 10px;
    }

    .category-product-card__content {
        min-height: 162px;
        padding: 12px 11px 11px;
    }

    .category-product-card__content h3 {
        font-size: 14px;
        line-height: 1.47;
    }

    .category-product-card__summary {
        margin-top: 6px;
        font-size: 12px;
    }

    .category-product-card__footer {
        display: block;
        padding-top: 9px;
    }

    .category-product-card__price,
    .category-product-card__detail-link {
        display: block;
    }

    .category-product-card__price {
        font-size: 14px;
    }

    .category-product-card__detail-link {
        margin-top: 3px;
        font-size: 11px;
    }

    .category-catalog__guide-panel {
        display: block;
        margin-top: 44px;
        padding: 27px 21px;
        border-radius: 14px;
    }

    .category-catalog__guide-panel h2 {
        font-size: 26px;
    }

    .category-catalog__guide-panel-copy > p:not(.category-catalog__eyebrow) {
        font-size: 14px;
    }

    .category-catalog__guide-button {
        width: 100%;
        margin-top: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-catalog *,
    .category-catalog *::before,
    .category-catalog *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
