@charset "UTF-8";

/* ===== Shop Archive ===== */
/* Legacy shop/archive layout plus current category listing layer */

/* Legacy shop / archive layout */
.shop-page-wrap {
    padding: 0; /* 頂部與底部留白均移除 */
    background: #fff;
}

/* 分類 archive：版心/左右边距与 PDP 一致（--ulive-content-*） */
.shop-page-wrap .container {
    max-width: var(--ulive-content-max, 1280px);
    padding-left: var(--ulive-content-gutter, 50px);
    padding-right: var(--ulive-content-gutter, 50px);
    box-sizing: border-box;
}

.shop-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 40px;
    padding: 0;
    box-sizing: border-box;
    margin: 30px auto 15px;
    align-items: start;
    max-width: 100%;
}

/* Sidebar */
.shop-sidebar {
    position: sticky;
    top: 80px;
    padding: 0 15px;
    box-sizing: border-box;
}

.shop-main {
    padding: 0;
    box-sizing: border-box;
    min-width: 0; /* 防止 grid 子項內容撐列寬 */
}

.sidebar-widget {
    border: none;
    border-radius: 0;
    overflow: visible;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    padding: 12px 0;
    background: transparent;
    border: none;
    margin: 0 0 8px 0;
    font-family: var(--font-primary);
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.category-list .cat-item {
    display: block;
    margin: 0;
}

.category-list .cat-item > a {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 400;
    font-family: var(--font-primary);
    line-height: 1.4;
    text-decoration: none;
    transition: var(--transition);
}

.category-list .cat-item > a .cat-name {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.category-list .cat-item > a:hover .cat-name,
.category-list .cat-item.current-cat > a .cat-name {
    text-decoration: none;
}

.category-list .cat-item > a:hover,
.category-list .cat-item.current-cat > a {
    color: var(--primary-color);
    background: transparent;
}

.category-list .cat-item.current-cat > a {
    font-weight: 600;
    border-left: none;
    padding-left: 0;
}

.cat-count {
    flex: 0 0 auto;
    color: #999999;
    font-size: 16px;
    font-weight: 400;
    margin-left: 0;
    white-space: nowrap;
}

.sub-cat-list {
    list-style: none;
    padding: 0 0 0 18px;
    margin: 0;
}

.sub-cat-list li a {
    display: flex;
    justify-content: space-between;
    padding: 8px 18px 8px 12px;
    color: var(--text-light);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.sub-cat-list li a:hover {
    color: var(--primary-color);
}

/* Shop main */
.shop-page-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 15px 14px;
    border-bottom: none; /* 移除面包屑下方的分隔線，對齊原站 */
    box-sizing: border-box;
}

/* Category banner (large image above toolbar on category pages) */
.category-banner {
    margin: 0 0 24px;
    padding: 0 15px;
    box-sizing: border-box;
    line-height: 0;
}
.category-banner-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: cover;
}

/* Breadcrumb red 'home' link, grey current */
.shop-toolbar .shop-breadcrumb {
    display: flex;
    align-items: center;
    min-height: 36px;
    margin: 0;
    padding: 0;
}
.shop-toolbar .shop-breadcrumb .woocommerce-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 15px;
    line-height: 1;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shop-toolbar .shop-breadcrumb .woocommerce-breadcrumb > * {
    flex: 0 0 auto;
}
.shop-toolbar .shop-breadcrumb .woocommerce-breadcrumb a,
.shop-toolbar .shop-breadcrumb .woocommerce-breadcrumb a:visited {
    color: #666;
}
.shop-toolbar .shop-breadcrumb .breadcrumb-sep {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: var(--text-muted);
}

.shop-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.shop-controls form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.woocommerce-result-count {
    color: var(--text-light);
    font-size: 0.88rem;
    margin: 0;
}

.woocommerce-ordering select,
.per-page-select {
    /* 對齊原站：僅保留底部細灰下劃線，其餘邊框移除 */
    height: 34px;
    padding: 0 36px 0 4px;
    line-height: 34px;
    border: none;
    border-bottom: 1px solid #cccccc;
    border-radius: 0;
    background-color: transparent;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23333' stroke-width='1.5' d='M1 1.5 L6 6.5 L11 1.5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 10px auto;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    vertical-align: middle;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: var(--font-primary);
    transition: border-color .15s ease;
}

.woocommerce-ordering select:hover,
.per-page-select:hover {
    border-bottom-color: #999;
}

.woocommerce-ordering select:focus,
.per-page-select:focus {
    border-bottom-color: #999;
}

.per-page-form {
    display: inline-flex;
    align-items: center;
}

/* ===== Sidebar Search ===== */
.sidebar-search {
    margin-bottom: 16px;
}
.sidebar-search form {
    position: relative;
    display: block;
}
.sidebar-search-input {
    width: 100%;
    padding: 10px 42px 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 0;
    font-size: 16px;
    font-family: var(--font-primary);
    outline: none;
    box-sizing: border-box;
    background: #fff;
}
.sidebar-search-input:focus {
    border-color: var(--primary-color);
}
.sidebar-search-btn {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 40px;
    background: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 0;
}
.sidebar-search-btn:hover {
    color: var(--primary-color);
}

/* ===== Mobile Sidebar Toggle (shop page) ===== */
.sidebar-toggle-btn {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    transition: var(--transition);
}

.sidebar-toggle-btn:hover {
    background: var(--border-light);
}

.sidebar-toggle-btn .toggle-arrow {
    display: inline-block;
    transition: transform 0.25s;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.sidebar-toggle-btn.open .toggle-arrow {
    transform: rotate(180deg);
}

@media (max-width: 900px) {
    .sidebar-toggle-btn {
        display: flex;
    }

    .shop-sidebar-inner {
        display: none;
        overflow: hidden;
    }

    .shop-sidebar-inner.open {
        display: block;
    }
}

@media (max-width: 768px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: static;
    }

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

    /* 商品詳情：相關商品固定 2 列自適應（避免 180px 固定寬只露 1 卡） */
    .single-product-related .related-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        justify-content: stretch;
        gap: 12px;
    }
    .single-product-related .related-products-grid .product-card {
        width: 100% !important;
        max-width: 100%;
    }

    /* 移动端：商品图片从 PC 固定 180×180 切换为自适应列宽，
       避免窄屏（如 Galaxy Z Fold 5 344px）两列相加 360px 超出屏宽 344px 的溢出。
       关键点：让 <img> 自身的 aspect-ratio 主导高度，父容器高度随之自适应，
       不再依赖基础规则里的 height: 180px。 */
    .shop-products-grid .product-card {
        /* 关键：必须在当前列表页层内覆盖基础 width: 180px，
           否则 iPhone SE 375px 下 2×180+gap+padding=384 会溢出屏宽 9px。 */
        width: auto;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }
    .shop-products-grid .product-card .product-image {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }
    .shop-products-grid .product-card .product-image a {
        display: block;
        width: 100% !important;
        height: auto !important;
    }
    .shop-products-grid .product-card .product-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        object-fit: cover !important;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 8px !important;
    }

    .shop-toolbar {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .category-banner {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .shop-breadcrumb .woocommerce-breadcrumb,
    .shop-controls {
        font-size: 13px;
    }
}

/* ============================================================
   L2/L3 分類列表頁
   ============================================================ */

.cat-listing-wrap {
    max-width: var(--ulive-content-max, 1280px);
    margin: 0 auto;
    padding: 20px var(--ulive-content-gutter, 50px) 60px;
    box-sizing: border-box;
}

/* --- 麵包屑 --- */
.cat-breadcrumb {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
    line-height: 1.5;
}
.cat-breadcrumb a {
    color: #666;
    text-decoration: none;
}
.cat-breadcrumb a:hover {
    color: rgb(63, 167, 243);
    text-decoration: none;
}
.cat-breadcrumb-sep {
    margin: 0 8px;
    color: #ccc;
}
.cat-breadcrumb-current {
    color: rgb(63, 167, 243);
}

/* --- 分類標題 + 描述 --- */
.cat-listing-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
    line-height: 1.3;
}
.cat-listing-desc {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px;
    line-height: 1.6;
}

.cat-listing-title + .cat-alcohol-legal-notice {
    margin-top: 15px;
}

.cat-listing-desc:has(+ .cat-alcohol-legal-notice) {
    margin-bottom: 15px;
}

.cat-alcohol-legal-notice {
    margin: 0 0 24px;
    padding: 16px 18px;
    background: #e8e8e8;
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
}

.cat-alcohol-legal-notice__zh,
.cat-alcohol-legal-notice__en {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #333;
}

.cat-alcohol-legal-notice__zh + .cat-alcohol-legal-notice__en {
    margin-top: 10px;
}

.cat-alcohol-legal-notice__en {
    font-weight: 600;
}

/* --- 移動端子分類橫滑（分類列表頁） --- */
.cat-mobile-subcats {
    display: none;
}

@media (max-width: 768px) {
    .cat-mobile-subcats {
        display: block;
        margin: 0 0 16px;
    }

    .cat-mobile-subcats__track {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        padding: 2px 0 10px;
        margin: 0;
    }

    .cat-mobile-subcats__track::-webkit-scrollbar {
        display: none;
    }

    .cat-mobile-subcats__card {
        flex: 0 0 88px;
        width: 88px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 10px 6px 8px;
        background: #fff;
        border: 1px solid #f0f0f0;
        border-radius: 8px;
        text-decoration: none;
        color: inherit;
        scroll-snap-align: start;
        box-sizing: border-box;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .cat-mobile-subcats__card.is-current {
        border-color: #3fa7f3;
        box-shadow: 0 0 0 1px #3fa7f3;
    }

    .cat-mobile-subcats__media {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 72px;
        height: 72px;
        flex-shrink: 0;
    }

    .cat-mobile-subcats__img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    .cat-mobile-subcats__name {
        display: block;
        width: 100%;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.35;
        text-align: center;
        color: rgb(49, 80, 171);
        word-break: break-word;
    }
}

/* --- 篩選 Tab 欄 --- */
.cat-filter-bar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

/* 篩選抽屉 - 桌面端隐藏移动端元素 */
.cat-filter-trigger-row { display: none; }
.cat-filter-overlay { display: none; }
.cat-filter-drawer-header { display: none; }
.cat-filter-section-title { display: none; }

body.filter-drawer-open {
    overflow: hidden;
}

/* 分類列表頁：移動端篩選抽屜僅品牌、價格（子分類用頂部橫滑） */
@media (max-width: 768px) {
    .cat-listing-wrap .cat-filter-panel--mobile-hidden,
    .cat-listing-wrap .cat-filter-tab--mobile-hidden,
    .cat-listing-wrap--ajax-filters #panel-subcats,
    .cat-listing-wrap--ajax-filters .cat-filter-tab[data-panel="subcats"] {
        display: none !important;
    }
}

.cat-filter-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 0 20px;
}
.cat-filter-tab {
    background: none;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.cat-filter-tab:hover {
    color: #1E388C;
}
.cat-filter-tab.active {
    color: #1E388C;
    font-weight: 600;
}
/* --- 篩選摘要（移動端標題行 + 已選條件） --- */
.cat-filter-summary {
    margin: 0 0 16px;
}
.cat-filter-summary__head {
    display: none;
}

/* --- 已選篩選條件 --- */
.cat-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin: 0 0 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.cat-active-filters[hidden] {
    display: none !important;
}
.cat-active-filters-label {
    flex-shrink: 0;
    font-size: 14px;
    color: #999;
}
.cat-active-filters-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}
.cat-active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #c5dff5;
    border-radius: 999px;
    background: #edf5fb;
    color: #333;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.cat-active-filter-tag:hover {
    background: #dceefb;
    border-color: #9fcbf5;
}
.cat-active-filter-tag__text {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cat-active-filter-tag__remove {
    font-size: 16px;
    line-height: 1;
    color: #666;
}
.cat-active-filters-reset {
    flex-shrink: 0;
    margin-left: auto;
    padding: 0;
    border: none;
    background: transparent;
    color: #3fa7f3;
    font-size: 14px;
    cursor: pointer;
}
.cat-active-filters-reset:hover {
    text-decoration: underline;
}

.cat-filter-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: #1E388C;
    border-radius: 0;
}

/* --- 篩選面板 --- */
.cat-filter-panel {
    display: none;
    padding: 16px 20px 20px;
}
#panel-subcats.cat-filter-panel {
    padding-top: 12px;
}
.cat-filter-panel.active {
    display: block;
}
.cat-filter-placeholder {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

/* --- 子分類網格（原站：無間隙網格線、hover/選中米色底） --- */
.cat-filter-subcats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    max-height: 152px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid #e8e8e8;
    border-left: 1px solid #e8e8e8;
    background: #fff;
}
.cat-filter-subcats-grid.expanded {
    max-height: none;
}
.cat-subcat-card {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 10px 12px;
    border: none;
    border-right: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: background 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
}
.cat-subcat-card:hover,
.cat-subcat-card.active {
    background: #FCF6E4;
    box-shadow: none;
}
.cat-subcat-card.active .cat-subcat-name {
    color: #1E388C;
}
.cat-subcat-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin-right: 10px;
    flex-shrink: 0;
}
.cat-subcat-info {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.cat-subcat-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1E388C;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.cat-subcat-card:hover .cat-subcat-name {
    color: #3FA7F3;
}
.cat-subcat-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 12px;
    color: #999;
    line-height: 1.35;
    word-break: break-all;
}
.cat-subcat-count {
    font-size: 11px;
    color: #3FA7F3;
    font-weight: 500;
    margin-left: 8px;
    flex-shrink: 0;
    background: #EDF5FB;
    border-radius: 10px;
    padding: 2px 8px;
    min-width: 28px;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}
.cat-filter-show-all {
    display: block;
    margin: 16px auto 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 28px;
    font-size: 14px;
    color: #3FA7F3;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.cat-filter-show-all:hover {
    border-color: #3FA7F3;
    color: #3FA7F3;
    background: #fff;
}

/* --- 熱門品牌 --- */
.cat-popular-brands {
    margin-bottom: 30px;
}
.cat-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px;
}
.brand-logos-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
}
.brand-logo-card {
    flex: 0 0 auto;
    width: 180px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    transition: box-shadow 0.2s;
}
.brand-logo-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.brand-logo-card img {
    max-width: 140px;
    max-height: 70px;
    object-fit: contain;
}
.brand-logo-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* --- 工具欄（商品數 + 排序） --- */
.cat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 4px;
}
.cat-product-count {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}
.cat-sort-tabs {
    display: flex;
    gap: 8px;
}
.sort-tab {
    padding: 6px 16px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.2s;
    cursor: pointer;
}
.sort-tab:hover {
    color: #444;
}
.sort-tab.active {
    color: #3FA7F3;
    font-weight: 600;
    position: relative;
}
.sort-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #3FA7F3;
}

/* --- 移动端排序下拉 --- */
.cat-sort-dropdown {
    display: none;
}
.sort-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #3FA7F3;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}
.sort-dropdown-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}
.cat-sort-dropdown.open .sort-dropdown-arrow {
    transform: rotate(180deg);
}
.sort-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 100;
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.cat-sort-dropdown.open .sort-dropdown-menu {
    display: block;
}
.sort-option {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
}
.sort-option:hover {
    background: #f5f5f5;
}
.sort-option.active {
    color: #3FA7F3;
    font-weight: 600;
}

@media (max-width: 768px) {
    .cat-sort-tabs {
        display: none !important;
    }
    .cat-sort-dropdown {
        display: block;
        position: relative;
    }
    /* 隱藏四個列表頁（分類、活動、搜尋、品牌）的面包屑 */
    .cat-listing-wrap .cat-breadcrumb {
        display: none;
    }

    /* === 篩選摘要（條件標籤 + 篩選按鈕 + 已選 chips） === */
    .cat-filter-summary {
        margin: 12px 0 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid #eee;
    }
    .cat-filter-summary__head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        margin-bottom: 0;
    }
    .cat-filter-summary__head .cat-active-filters-label--mobile {
        flex-shrink: 0;
        font-size: 14px;
        color: #999;
    }
    .cat-filter-trigger-row {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .cat-active-filters-label--desktop {
        display: none !important;
    }
    .cat-active-filters {
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: nowrap;
        gap: 10px;
        margin: 0;
        padding: 10px 0 0;
        border-bottom: none;
    }
    .cat-active-filters.is-empty {
        display: none !important;
        padding: 0;
    }
    .cat-active-filters:not(.is-empty) {
        display: flex !important;
    }
    .cat-active-filters-tags {
        width: 100%;
    }
    .cat-active-filters-reset {
        margin-left: 0;
        align-self: flex-start;
    }
    .cat-filter-trigger-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        background: none;
        border: none;
        color: #666;
        font-size: 15px;
        cursor: pointer;
        padding: 8px 4px;
        min-width: 44px;
        min-height: 44px;
    }
    .cat-filter-trigger-btn svg {
        color: #666;
    }

    /* === 遮罩层（全屏，防止穿透滚动） === */
    .cat-filter-overlay {
        display: none;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        background: rgba(0, 0, 0, 0.6);
        z-index: 10040;
        touch-action: none;
        overscroll-behavior: none;
    }
    .cat-filter-overlay.active {
        display: block;
    }

    body.filter-drawer-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        left: 0;
        right: 0;
        touch-action: none;
    }

    /* === 篩選抽屉（全寬底部彈層，頂部留白） === */
    .cat-filter-bar {
        position: fixed !important;
        top: 12px;
        right: 0;
        left: 0;
        width: 100%;
        max-width: none;
        height: calc(100dvh - 12px);
        height: calc(100vh - 12px);
        padding-top: 0;
        padding-right: env(safe-area-inset-right, 0);
        padding-left: env(safe-area-inset-left, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
        z-index: 10050;
        transform: translateY(calc(100% + 12px));
        transition: transform 0.3s ease;
        overflow: hidden;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: none !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column;
        box-sizing: border-box;
    }

    .cat-filter-bar__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .cat-filter-bar.drawer-open {
        transform: translateY(0);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12) !important;
    }

    /* === 抽屉Header === */
    .cat-filter-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 20px 16px;
        border-bottom: 1px solid #eee;
        flex-shrink: 0;
    }
    .cat-filter-drawer-title {
        font-size: 20px;
        font-weight: 700;
        color: #333;
        margin: 0;
    }
    .cat-filter-drawer-close {
        background: none;
        border: none;
        font-size: 28px;
        color: #999;
        cursor: pointer;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* === 隐藏Tab栏，显示所有面板 === */
    .cat-filter-tabs {
        display: none !important;
    }
    .cat-filter-panel {
        display: block !important;
        border-bottom: 1px dashed #ddd;
        padding: 16px 20px;
    }
    .cat-filter-panel:last-child {
        border-bottom: none;
    }

    /* === 面板标题 === */
    .cat-filter-section-title {
        display: block;
        font-size: 16px;
        font-weight: 700;
        color: #333;
        margin: 0 0 12px 0;
        padding: 0;
    }

    /* === 移动端面板内布局调整 === */
    /* 分类网格改为2列（抽屜內沿用網格線樣式） */
    .cat-filter-subcats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        border-top: 1px solid #e8e8e8;
        border-left: 1px solid #e8e8e8;
    }
    .cat-filter-subcats-grid .cat-subcat-card {
        border-right: 1px solid #e8e8e8;
        border-bottom: 1px solid #e8e8e8;
        border-radius: 0;
    }
    /* 但默认仍限高，顯示全部才展开 */
    .cat-filter-subcats-grid:not(.expanded) {
        max-height: 200px !important;
        overflow: hidden !important;
    }

    /* 品牌网格改为2列 */
    .cat-filter-brands-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .cat-filter-brands-grid:not(.expanded),
    .cat-filter-cats-grid:not(.expanded) {
        max-height: 200px !important;
        overflow: hidden !important;
    }

    /* 推廣優惠网格改为2列 */
    .cat-filter-promo-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .cat-filter-promo-grid:not(.expanded) {
        max-height: 200px !important;
        overflow: hidden !important;
    }

    /* 價格篩選：區間一行、按鈕一行 */
    .cat-filter-bar .cat-price-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 0;
    }
    .cat-filter-bar .cat-price-inputs-row,
    .cat-filter-bar .cat-price-actions-row {
        width: 100%;
        box-sizing: border-box;
    }
    .cat-filter-bar .cat-price-inputs-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .cat-filter-bar .cat-price-inputs-row .cat-price-input-wrap {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }
    .cat-filter-bar .cat-price-actions-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .cat-filter-bar .cat-price-actions-row .cat-price-reset,
    .cat-filter-bar .cat-price-actions-row .cat-price-apply {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* --- 商品網格（6列） --- */
.cat-products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.cat-products-grid .product-card {
    width: auto;
}
.cat-no-products {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-size: 16px;
    padding: 60px 0;
}

/* --- 骨架屏 --- */
.cat-load-skeleton {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.skeleton-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.skeleton-img {
    width: 100%;
    padding-top: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}
.skeleton-text {
    height: 14px;
    margin: 12px 12px 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}
.skeleton-text.short {
    width: 60%;
    margin-top: 8px;
}
.skeleton-btn {
    height: 32px;
    margin: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* --- 響應式 --- */
@media (max-width: 1024px) {
    .cat-products-grid,
    .cat-load-skeleton {
        grid-template-columns: repeat(4, 1fr);
    }
    .cat-filter-subcats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
    }
}
@media (max-width: 768px) {
    .cat-listing-title {
        font-size: 24px;
    }
    /* 641–768px：3 列；≤640px 见下方专用断点 */
    .cat-products-grid,
    .cat-load-skeleton {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .cat-filter-tabs {
        overflow-x: auto;
        padding: 0 12px;
    }
    .cat-filter-tab {
        padding: 12px 16px;
        font-size: 14px;
    }
    .cat-filter-subcats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }
    .brand-logo-card {
        width: 140px;
        height: 80px;
    }
    .cat-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
/* 大手機 / Surface Duo 等（≤640px）：列表 2 列 */
@media (max-width: 640px) {
    .cat-products-grid,
    .cat-load-skeleton {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .cat-products-grid,
    .cat-load-skeleton {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .cat-filter-subcats-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --- 品牌篩選網格 --- */
.cat-filter-brands-grid,
.cat-filter-cats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    max-height: 160px; /* 2行 checkbox 項高度 */
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.cat-filter-brands-grid.expanded,
.cat-filter-cats-grid.expanded {
    max-height: none;
}
.cat-brand-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}
.cat-brand-item:hover {
    background: #f8f9fa;
}
.cat-brand-item.is-selected {
    background: #edf5fb;
}
.cat-brand-item.is-selected .cat-brand-checkbox {
    border-color: #3fa7f3;
    background: #3fa7f3;
    box-shadow: inset 0 0 0 2px #fff;
}
.cat-brand-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
}
.cat-brand-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cat-brand-count {
    font-size: 10px;
    color: #3FA7F3;
    font-weight: 400;
    background: #EDF5FB;
    border-radius: 6px;
    padding: 0;
    width: 30px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: 8px;
    flex-shrink: 0;
}

/* 品牌面板響應式 */
@media (max-width: 1024px) {
    .cat-filter-brands-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 768px) {
    .cat-filter-brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 480px) {
    .cat-filter-brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- 價格篩選 --- */
.cat-price-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
}
.cat-price-inputs-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
}
.cat-price-inputs-row .cat-price-input-wrap {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}
.cat-price-actions-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.cat-price-actions-row .cat-price-reset,
.cat-price-actions-row .cat-price-apply {
    flex: 0 0 auto;
}
.cat-price-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 300px;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 10px 20px;
    background: #fff;
}
.cat-price-symbol {
    font-size: 15px;
    color: #333;
    margin-right: 6px;
    flex-shrink: 0;
}
.cat-price-input {
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    width: 100%;
    background: transparent;
    -moz-appearance: textfield;
}
.cat-price-input::-webkit-outer-spin-button,
.cat-price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cat-price-separator {
    font-size: 18px;
    color: #999;
    flex-shrink: 0;
}
.cat-price-reset {
    flex-shrink: 0;
    padding: 10px 32px;
    border: 1px solid #ddd;
    border-radius: 24px;
    background: #fff;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.cat-price-reset:hover {
    border-color: #999;
    color: #333;
}
.cat-price-apply {
    flex-shrink: 0;
    padding: 10px 40px;
    border: none;
    border-radius: 24px;
    background: rgb(49, 80, 171);
    font-size: 15px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.cat-price-apply:hover {
    background: rgb(39, 68, 150);
}

/* --- 推廣優惠網格 --- */
.cat-filter-promo-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    max-height: 94px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.cat-filter-promo-grid.expanded {
    max-height: none;
}
.cat-promo-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}
.cat-promo-item:hover {
    background: #f8f9fa;
}

/* 推廣優惠面板響應式 */
@media (max-width: 1024px) {
    .cat-filter-promo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 768px) {
    .cat-filter-promo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 480px) {
    .cat-filter-promo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 品牌頁頭部（總高度 155px）；面包屑間距與分類/活動/搜尋列表頁共用 .cat-listing-wrap / .cat-breadcrumb */
.brand-header {
    display: flex;
    align-items: center;
    gap: 24px;
    box-sizing: border-box;
    height: 155px;
    min-height: 155px;
    max-height: 155px;
    margin: 0 0 20px;
    padding: 12px 40px;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
}
.brand-header-logo {
    width: 131px;
    height: 131px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.brand-header-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.brand-header-name {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #333;
}

/* 品牌頁頭部響應式（總高度 72px，Logo 盡量撐滿高度） */
@media (max-width: 768px) {
    .brand-header {
        flex-direction: row;
        text-align: left;
        height: 72px;
        min-height: 72px;
        max-height: 72px;
        padding: 0 12px 0 0;
        gap: 12px;
    }
    .brand-header-logo {
        width: 72px;
        min-width: 72px;
        height: 72px;
        padding: 6px;
        border-radius: 0;
        box-sizing: border-box;
    }
    .brand-header-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    .brand-header-name {
        font-size: 17px;
        line-height: 1.25;
    }
}
