/* ========== 店铺外壳：公告 / 导航 / 页脚 ========== */

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #fff;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

html {
    scrollbar-gutter: stable;
}

/* Bootstrap 弹窗打开时会给 body / fixed 元素加 padding-right 补偿滚动条；
   与 scrollbar-gutter: stable 叠加会导致整页（含商品详情）横向跳动 */
@supports (scrollbar-gutter: stable) {
    body.modal-open {
        padding-right: 0 !important;
    }

    body.modal-open .storefront-header-shell,
    body.modal-open .zjz-fab-root,
    body.modal-open .fixed-top,
    body.modal-open .fixed-bottom,
    body.modal-open .sticky-top,
    body.modal-open .is-fixed {
        padding-right: 0 !important;
        margin-right: 0 !important;
    }
}

.top-announce {
    background-color: var(--sf-bulletin-bg, #b93a26);
    color: var(--sf-bulletin-text, #ffffff);
    font-size: 13px;
    padding: 8px 0;
    text-align: center;
    letter-spacing: 0.5px;
}

.storefront-header-shell {
    overflow: visible;
}

@media (min-width: 992px) {
    .storefront-header-shell {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1030;
        background-color: var(--sf-nav-bg, #ffffff);
    }

    body.storefront-header-fixed {
        padding-top: var(--sf-header-offset, 80px);
    }

    .storefront-header-shell .navbar.storefront-nav.sticky-top {
        position: relative;
        top: auto;
    }
}

.top-announce a {
    color: inherit;
}

.navbar.storefront-nav {
    background-color: var(--sf-nav-bg, #ffffff) !important;
    --bs-navbar-color: var(--sf-nav-link, #333333);
    overflow: visible;
}

.navbar {
    padding: 15px 0;
}

.storefront-nav-row {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}

.navbar .container-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex: 0 1 1200px;
    min-width: 0;
}

.storefront-nav-end {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    position: relative;
}

.nav-locale-rail {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .storefront-nav-row {
        padding-left: max(12px, calc((100% - 1200px) / 2));
        padding-right: max(12px, calc((100% - 1200px) / 2));
        box-sizing: border-box;
        justify-content: center;
    }

    .navbar .container-inner {
        overflow: visible;
        flex: 0 1 1200px;
        max-width: 1200px;
        width: 100%;
    }

    /* 切换器紧挨购物车，挂在 1200px 右缘外侧，不占内容区宽度 */
    .storefront-nav-end .nav-locale-rail {
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 12px;
        white-space: nowrap;
    }

    .storefront-nav-mobile-panel,
    #navContentMobile {
        display: none !important;
    }
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar.storefront-nav .nav-link {
    color: var(--sf-nav-link, #333333) !important;
    font-weight: 600;
    font-size: 16px;
}

.navbar.storefront-nav .storefront-nav-end a,
.navbar.storefront-nav .storefront-nav-end .bi {
    color: var(--sf-nav-link, #333333) !important;
}

/* 语言 / 货币切换（PC 在 1200px 内容区外侧；移动端在展开菜单内同一行等宽） */
.zjz-locale-toolbar {
    margin-left: 0;
}

.nav-locale-menu {
    width: 100%;
    max-width: 100%;
    padding: 0 12px;
    border-top: 1px solid #eee;
    box-sizing: border-box;
}

.nav-locale-menu-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 0;
}

.nav-locale-menu-row .zjz-locale-pill {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    height: 1.85rem;
    padding: 0 0.35rem 0 0.45rem;
}

.nav-locale-menu-row .zjz-locale-pill.d-none {
    display: none;
}

.nav-locale-menu-row .zjz-locale-select {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: none;
    font-size: 11px;
    text-align: left;
    padding: 0 1rem 0 0.1rem;
}

.nav-cart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: var(--sf-nav-link, #333333) !important;
    text-decoration: none;
}

.nav-cart-badge {
    font-size: 10px;
    min-width: 1.1rem;
}

.zjz-locale-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    height: 2rem;
    padding: 0 0.45rem 0 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.zjz-locale-pill:hover {
    border-color: rgba(0, 0, 0, 0.22);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.zjz-locale-icon {
    font-size: 0.95rem;
    line-height: 1;
    opacity: 0.72;
    flex-shrink: 0;
}

.zjz-locale-select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: var(--sf-nav-link, #333333);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 0 1rem 0 0.1rem;
    max-width: 6.75rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 10px;
}

.zjz-locale-select:focus {
    outline: none;
}

.nav-locale-menu:not(:has(.zjz-locale-pill:not(.d-none))) {
    display: none;
}

.nav-locale-rail:not(:has(.zjz-locale-pill:not(.d-none))) {
    display: none !important;
}

@media (max-width: 991.98px) {
    body {
        touch-action: pan-y pinch-zoom;
    }

    .navbar.storefront-nav {
        overflow-x: clip;
        overflow-y: visible;
        width: 100%;
        max-width: 100%;
    }

    .storefront-nav-row {
        position: relative;
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        overflow-x: clip;
    }

    .navbar .container-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    .storefront-nav-end {
        grid-column: 3;
        justify-self: end;
        gap: 18px;
        min-width: 0;
    }

    .mobile-left {
        justify-self: start;
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .navbar-brand {
        justify-self: center;
        margin: 0 !important;
        max-width: 100%;
        min-width: 0;
    }

    .navbar-brand img {
        max-width: 100%;
    }

    .navbar-toggler {
        border: none;
        padding: 0;
        outline: none !important;
        box-shadow: none !important;
    }

    /* 手机端仅用 #navContentMobile，隐藏 PC 导航折叠容器避免占位 */
    #navContent {
        display: none !important;
    }

    .storefront-nav-mobile-panel {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        transform: none;
        background: var(--sf-nav-bg, #ffffff);
        z-index: 1000;
        border-top: 1px solid #eee;
        padding: 10px 0 0;
        box-sizing: border-box;
        overflow-x: hidden;
        box-shadow: 0 8px 12px -6px rgba(0, 0, 0, 0.12);
    }

    .storefront-nav-mobile-panel.collapsing {
        overflow: hidden;
    }

    .navbar-nav {
        padding: 0 12px !important;
        align-items: flex-start !important;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .nav-locale-menu {
        padding: 0 12px;
    }

    .nav-locale-menu-row {
        max-width: 100%;
        min-width: 0;
    }

    .nav-item {
        width: 100%;
        text-align: left !important;
        padding: 12px 0;
        border-bottom: 1px solid #f8f8f8;
        box-sizing: border-box;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .navbar.storefront-nav .nav-link {
        padding: 0 !important;
        display: block;
        font-size: 16px;
        font-weight: 600;
    }

    .storefront-nav-end .nav-cart-badge {
        top: -2px;
        right: -2px;
        left: auto !important;
        transform: none !important;
    }

    #heroCarousel,
    #heroCarousel .carousel-inner,
    #heroCarousel .carousel-item {
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (min-width: 992px) {
    #navContent .nav-desktop-split .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    #navContent .nav-desktop-split .nav-item {
        flex-shrink: 0;
    }
}

.site-footer {
    background-color: var(--footer-bg, var(--sf-footer-bg, #a88d79));
    padding: 70px 0 32px;
    font-size: 14px;
    color: var(--sf-footer-text, #ffffff);
}

.site-footer a,
.site-footer .footer-heading,
.site-footer .list-unstyled a {
    color: var(--sf-footer-text, #ffffff);
}

.site-footer ul.list-unstyled.small a {
    font-size: 15px;
}

.site-footer .footer-newsletter-desc {
    font-size: 15px !important;
}

.site-footer .text-muted {
    color: var(--sf-footer-text, #ffffff) !important;
    opacity: 0.82;
}

.footer-heading {
    font-weight: bold;
    margin-bottom: 25px;
    font-size: 16px;
}

.site-footer .email-input-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.site-footer .email-input-group input {
    background: transparent;
    border: none;
    padding: 10px 0;
    font-size: 12px;
    color: var(--sf-footer-text, #ffffff);
}

.site-footer .email-input-group input::placeholder {
    color: var(--sf-footer-text, #ffffff);
    opacity: 0.5;
}

.email-input-group input:focus {
    box-shadow: none;
    background: transparent;
}

.footer-bottom-bar {
    margin-top: 3rem;
}

.footer-social {
    gap: 1.75rem !important;
}

.footer-social-link {
    color: var(--sf-footer-text, #ffffff);
    font-size: 16px;
    line-height: 1;
    opacity: 0.92;
    text-decoration: none;
}

.footer-social-link:hover {
    opacity: 1;
    color: var(--sf-footer-text, #ffffff);
}

.footer-copyright {
    margin-top: 1.1rem;
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.9;
}

/* ========== 商品详情页 ========== */

/* 手机端轮播 */
.product-mob-carousel {
    position: relative;
    background: #f8f8f8;
    border: 1px solid #eee;
}

.product-mob-carousel .carousel-inner {
    aspect-ratio: 1 / 1;
}

.product-mob-carousel .carousel-item {
    height: 100%;
}

.product-mob-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f8f8;
}

/* 手机端箭头 */
.mob-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.mob-arrow:hover { opacity: 1; }
.mob-arrow-prev { left: 8px; }
.mob-arrow-next { right: 8px; }

/* 手机端指示点 */
.mob-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.mob-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background-color 0.2s;
}
.mob-dot.active { background-color: #333; }

/* ===== 桌面端图片区域 ===== */
.product-desktop-gallery {
    display: flex;
    gap: 12px;
}

.thumb-scroll-wrapper {
    width: 80px;
    flex-shrink: 0;
    height: 480px;
    overflow: hidden;
}

.thumb-scroll-inner {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.thumb-scroll-inner::-webkit-scrollbar { display: none; }

.thumb-item {
    border: 1px solid #eee;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 5px;
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.thumb-item:last-child { margin-bottom: 0; }
.thumb-item:hover { border-color: #bbb; }
.thumb-item.active { border-color: #333; }
.thumb-item img { display: block; width: 100%; }

/* 桌面端主图轮播 */
.desktop-main-carousel {
    position: relative;
    flex-grow: 1;
    border: 1px solid #eee;
    background: #fff;
    overflow: hidden;
}

.desktop-main-carousel .carousel-inner {
    aspect-ratio: 1 / 1;
}

.desktop-main-carousel .carousel-item {
    height: 100%;
}

.desktop-main-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f8f8;
}

/* 桌面端箭头 */
.desktop-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.desktop-arrow:hover { opacity: 1; }
.desktop-arrow-prev { left: 8px; }
.desktop-arrow-next { right: 8px; }

.breadcrumb-wrapper {
    max-width: 1200px;
    margin: 15px auto;
    padding: 0 15px;
    font-size: 13px;
    color: #888;
}

.breadcrumb-wrapper a {
    color: #888;
    text-decoration: none;
}

.product-main {
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 15px;
}

.product-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.3;
}

.inventory-status {
    font-size: 13px;
    margin-bottom: 15px;
}

.progress-bar-custom {
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    width: 15%;
    height: 100%;
    background-color: var(--discount-red, #b32a2a);
}

.visitors-count {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
}

.price-group .price-now {
    color: var(--discount-red, #b32a2a);
    font-size: 28px;
    font-weight: bold;
}

.selected-spec-summary {
    color: #555;
}

.price-group .price-was {
    color: #bbb;
    text-decoration: line-through;
    margin-left: 10px;
}

.option-label {
    font-size: 13px;
    margin: 20px 0 10px;
    color: #666;
    font-weight: bold;
}

.option-btn {
    border: 1px solid #ddd;
    padding: 6px 18px;
    margin-right: 8px;
    font-size: 13px;
    background: none;
    transition: 0.2s;
    cursor: pointer;
    border-radius: 0;
}

.option-btn:hover {
    border-color: #999;
    background: #f8f8f8;
}

.option-btn.active {
    border-color: #000;
    background: #f8f8f8;
    font-weight: bold;
}

.option-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-wrapper {
    width: 120px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qty-wrapper button {
    background: none;
    border: none;
    padding: 5px 15px;
    font-size: 18px;
    cursor: pointer;
}

.qty-wrapper button:hover {
    background: #f5f5f5;
}

/* PC: 一行两个按钮，各占50%，中间有间隙；手机: 各占一行 */
.btn-buy-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 767.98px) {
    .btn-buy-group {
        grid-template-columns: 1fr;
    }
}

.btn-buy-group .btn {
    border-radius: 0;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.btn-buy-group .btn-add {
    border: 1px solid #333;
    background: #fff;
    color: #333;
}

.btn-buy-group .btn-add:hover {
    background: #f8f8f8;
}

.btn-buy-group .btn-buy {
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

.btn-buy-group .btn-buy:hover {
    background: #333;
    border-color: #333;
}

.detail-tab {
    border-top: 1px solid #eee;
    border-bottom: none;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    margin-top: 40px;
}

.detail-tab[aria-expanded="false"] {
    border-bottom: 1px solid #eee;
}

.detail-tab .bi-chevron-down {
    transition: transform 0.3s ease;
}

.feature-block {
    margin-top: 0px;
}

.feature-item {
    margin-bottom: 0;
}

.feature-text {
    padding: 40px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-text h4 {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 20px;
}

.feature-img img {
    width: 100%;
    height: auto;
    display: block;
}

.trust-section {
    background: #fff;
    padding: 60px 0;
    border-top: 1px solid #eee;
    margin-top: 50px;
}

.trust-item {
    margin-bottom: 30px;
}

.trust-item h5 {
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* 商品详情富文本描述 */
.goods-description img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
}

.goods-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.goods-description table th,
.goods-description table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.goods-description table th {
    background: #f8f8f8;
    font-weight: bold;
}

/* ========== 导航内搜索（桌面展开） ========== */

.nav-search-slot {
    min-width: 1.5rem;
}

.nav-search-anchor {
    z-index: 1060;
}

.nav-search-flyout:not(.show):not(.collapsing) {
    pointer-events: none;
}

.nav-search-flyout.show,
.nav-search-flyout.collapsing {
    pointer-events: auto;
}

.nav-search-inner {
    width: min(72vw, 300px);
}

.navbar.storefront-nav .storefront-nav-end .nav-search-inner .btn.nav-search-submit,
.navbar.storefront-nav .storefront-nav-end .nav-search-inner .btn.nav-search-submit .bi {
    color: #fff !important;
}

/* ========== 首页广告：图片位 ========== */

.home-ads-banner {
    max-width: 1200px;
    margin: 0 auto 48px;
    padding-left: 0;
    padding-right: 0;
}

.home-ads-banner__link {
    display: block;
    line-height: 0;
}

.home-ads-banner__img {
    display: block;
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto;
    border-radius: 4px;
}

/* ========== 商品网格 ========== */

.product-grid {
    max-width: 1200px;
    margin: 0 auto 80px;
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: center;
}

.product-card {
    border: none;
    transition: 0.3s;
    text-align: center;
    margin-bottom: 20px;
}

.img-wrapper {
    position: relative;
    background: #fdfdfd;
    padding: 15px;
    border: 1px solid #f5f5f5;
}

.img-wrapper img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.badge-discount {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--discount-red, #b32a2a);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 5px 10px;
    line-height: 1.2;
    z-index: 99;
}

.badge-discount::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    border-width: 10px 20px 0 0;
    border-color: var(--discount-red, #b32a2a) transparent transparent transparent;
}

.product-info h3 {
    font-size: 13px;
    color: #444;
    margin: 15px 0 10px;
    height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price-now {
    color: var(--discount-red, #b32a2a);
    font-weight: 700;
    font-size: 17px;
}

.price-was {
    color: #bbb;
    text-decoration: line-through;
    font-size: 13px;
    margin-left: 8px;
}

.btn.btn-view-more {
    box-sizing: border-box;
    background: #000;
    color: #fff;
    padding: 12px 50px;
    border: 1px solid #000 !important;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: bold;
    border-radius: 0;
}

.btn.btn-view-more:hover,
.btn.btn-view-more:focus {
    color: #000 !important;
    background-color: #fff !important;
    border: 1px solid #000 !important;
}

/* ========== 首页：轮播 + 数据条 ========== */

.carousel-item {
    height: 650px;
    background-color: #333;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.carousel-caption {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    text-align: center;
    width: 100%;
    left: 0;
    right: 0;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    color: white;
}

.hero-content p {
    font-size: 1.4rem;
    font-weight: 300;
    color: white;
}

.stats-container {
    max-width: 1200px;
    margin: -60px auto 60px;
    background: white;
    padding: 40px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    position: relative;
    z-index: 10;
}

.stat-item {
    border-right: 1px solid #eee;
}

.stat-item:last-child {
    border-right: none;
}

.stat-item h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0;
}

.stat-item p {
    color: #888;
    font-size: 12px;
    margin-top: 5px;
    line-height: 1.2;
}

/* ========== 搜索页 ========== */

.search-header {
    max-width: 1200px;
    margin: 40px auto 20px;
    padding: 0 15px;
    text-align: center;
}

.search-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
}

.search-main-wrapper {
    max-width: 600px;
    margin: 0 auto 50px;
    position: relative;
}

.search-main-input {
    border: none;
    border-bottom: 2px solid #333;
    border-radius: 0;
    padding: 12px 40px 12px 0;
    font-size: 18px;
    box-shadow: none !important;
}

.search-main-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
}

.search-result-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    text-align: left;
}

/* ========== 分类列表页 ========== */

.collection-header {
    max-width: 1200px;
    margin: 20px auto 10px;
    padding: 0 15px;
}

.collection-header .breadcrumb {
    font-size: 13px;
    margin-bottom: 15px;
}

.collection-header .breadcrumb a {
    color: #888;
    text-decoration: none;
}

.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 12px;
}

.product-count {
    font-size: 14px;
    color: #666;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-wrapper label {
    font-size: 14px;
    white-space: nowrap;
}

#sort_by_select {
    font-size: 14px;
    border-radius: 0;
    padding: 5px 35px 5px 10px;
    border: 1px solid #ddd;
    width: auto;
    box-shadow: none;
}

/* ========== 分页（搜索 / 分类） ========== */

.pagination .page-link {
    color: #333;
    background-color: #fff;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    font-size: 14px;
    box-shadow: none;
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
    color: #000;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #000;
    border-color: #000;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #ccc;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* ========== 右下角：回到顶部 + 客服（公共页，需与本站 default.css 一并加载） ========== */

.zjz-fab-root {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 1040;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
}

.zjz-support-panel {
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-width 0.38s ease, opacity 0.28s ease;
    flex-shrink: 0;
}

.zjz-support-panel.is-open {
    max-width: min(92vw, 320px);
    opacity: 1;
    pointer-events: auto;
}

.zjz-support-panel-inner {
    width: min(92vw, 320px);
    padding: 16px 18px 18px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.zjz-support-head {
    margin-bottom: 0.125rem;
}

.zjz-support-title {
    font-weight: 700;
}

.zjz-support-close {
    line-height: 1;
    min-width: 2rem;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.zjz-fab-stack {
    flex-shrink: 0;
    position: relative;
    z-index: 1061;
    width: 48px;
    min-height: 48px;
}

/* 有客服时预留「回到顶部」槽位，客服位置不随回到顶部显隐上下移动 */
.zjz-fab-root[data-customer-service-form-id] .zjz-fab-stack {
    height: 108px;
    min-height: 108px;
}

.zjz-fab-btn {
    width: 48px;
    height: 48px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.zjz-fab-btn--top {
    position: absolute;
    right: 0;
    bottom: 0;
}

.zjz-fab-btn--support {
    position: absolute;
    right: 0;
    bottom: 60px;
}

.zjz-fab-btn:hover {
    transform: translateY(-2px);
}

.zjz-fab-btn:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

/* 回到顶部 / 客服：同款黑圆 + 白图标，尺寸一致 */
.zjz-fab-btn--top,
.zjz-fab-btn--support {
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.zjz-fab-btn--top:hover,
.zjz-fab-btn--support:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.zjz-fab-btn[hidden] {
    display: none !important;
}

/* 手机：客服展开为全屏半透明遮罩 + 表单卡片居中 */
@media (max-width: 767.98px) {
    .zjz-support-panel.is-open {
        position: fixed;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        width: 100%;
        max-width: none !important;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px 16px;
        background: rgba(0, 0, 0, 0.48);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transition: opacity 0.28s ease;
    }

    .zjz-support-panel-inner {
        width: 100%;
        max-width: 400px;
        margin: auto;
        flex-shrink: 0;
    }
}

/* ==================== Cart Page ==================== */
.cart-container { max-width: 1200px; margin: 50px auto; padding: 0 20px; }
.cart-title { font-size: 32px; font-weight: bold; margin-bottom: 40px; }

.cart-items-list { border-top: 1px solid #eee; }
.product-row { display: flex; padding: 30px 0; border-bottom: 1px solid #eee; position: relative; }
.p-image { width: 120px; flex-shrink: 0; margin-right: 25px; }
.p-image img { width: 100%; border: 1px solid #f0f0f0; padding: 5px; }

.p-info { flex-grow: 1; }
.p-name { font-size: 16px; font-weight: bold; color: #1a1a1a; text-decoration: none; display: block; margin-bottom: 10px; line-height: 1.4; }
.p-variant { font-size: 13px; color: #666; margin-bottom: 15px; }

.p-price-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.p-price-qty { display: flex; align-items: center; gap: 20px; }
.p-current-price { font-size: 16px; font-weight: bold; color: #000; }
.p-old-price { font-size: 14px; color: #bbb; text-decoration: line-through; margin-left: 5px; }

.qty-box { display: flex; align-items: center; border: 1px solid #ddd; height: 34px; }
.qty-box button { background: none; border: none; padding: 0 12px; font-size: 18px; line-height: 1; }
.qty-box span { width: 30px; text-align: center; font-size: 14px; }

.remove-icon { color: #999; cursor: pointer; transition: 0.2s; background: none; border: none; }
.remove-icon:hover { color: #000; }

.summary-card { background: #fff; border: 1px solid #eee; padding: 25px; position: sticky; top: 100px; }
.summary-card h5 { font-weight: bold; margin-bottom: 25px; }

.coupon-wrapper { display: flex; gap: 8px; margin-bottom: 25px; }
.coupon-wrapper input { border: 1px solid #ddd; padding: 10px; font-size: 14px; flex-grow: 1; border-radius: 0; outline: none; }
.btn-coupon { background: #dcdcdc; color: #333; border: none; padding: 0 15px; font-size: 13px; font-weight: bold; transition: 0.2s; }
.btn-coupon:hover { background: #ccc; }

.summary-item { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 15px; }
.summary-total { border-top: 1px solid #eee; padding-top: 15px; margin-top: 15px; font-size: 18px; font-weight: bold; }

.btn-checkout { background: #000; color: #fff; border: none; width: 100%; padding: 16px; font-weight: bold; border-radius: 0; margin-top: 20px; transition: 0.3s; }
.btn-checkout:hover { opacity: 0.8; }

.continue-shopping-desktop { margin-bottom: 20px; }
.continue-shopping-mobile { display: none; }

@media (max-width: 768px) {
    .cart-container { margin: 20px auto; padding: 0 12px; }
    .cart-title { font-size: 24px; margin-bottom: 20px; }

    .continue-shopping-desktop { display: none; }
    .continue-shopping-mobile { display: block; }

    .product-row {
        flex-direction: row;
        align-items: stretch;
        padding: 15px 0;
    }
    .p-image {
        width: 100px;
        height: 100px;
        margin-right: 12px;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fafafa;
        flex-shrink: 0;
    }
    .p-image img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        border: none;
        padding: 0;
        object-fit: contain;
    }
    .p-info {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .p-name {
        font-size: 13px;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
        height: 2.6em;
    }
    .p-variant {
        margin-bottom: 4px;
        font-size: 12px;
    }
    .p-price-row {
        margin-bottom: 4px;
    }
    .p-price-qty {
        gap: 10px;
        margin-top: auto;
    }
    .p-current-price {
        font-size: 14px;
    }
    .p-old-price {
        font-size: 12px;
    }
    .qty-box {
        height: 28px;
    }
    .qty-box button {
        padding: 0 8px;
        font-size: 16px;
    }
    .qty-box span {
        width: 24px;
        font-size: 13px;
    }
    .remove-icon {
        font-size: 16px;
        padding: 4px;
    }

    .summary-card {
        margin-top: 20px;
        position: static;
    }
    .continue-shopping-mobile {
        margin-top: 15px;
        text-align: center;
        padding-bottom: 20px;
    }
}
