/* V13.0.0-RC1.25-p4 — “经典横风格”.
 * Layout classes intentionally mirror the production KPHyper storefront.
 * This file only maps the new settings service to the production color hooks
 * and supplies narrow compatibility rules for the Laravel 13 shell.
 */
body.xq-storefront-style-classic{
    background-color:var(--xq-classic-page-bg,#305157)!important;
}
body.xq-storefront-style-classic .xq-p2-main.xq-classic-main{
    padding-top:0;
    padding-bottom:14px;
}
body.xq-storefront-style-classic .toggle-category.btn-info{background-color:var(--xq-classic-primary,#3688fc)!important;border-color:var(--xq-classic-primary,#3688fc)!important;color:var(--xq-classic-filter-text,#fff)!important}
body.xq-storefront-style-classic .toggle-category.btn-outline-info{color:var(--xq-classic-primary,#3688fc)!important;border-color:var(--xq-classic-primary,#3688fc)!important}
body.xq-storefront-style-classic .toggle-category.btn-outline-info:hover,
body.xq-storefront-style-classic .toggle-category.btn-outline-info.active,
body.xq-storefront-style-classic .toggle-category.btn-outline-info[aria-selected="true"]{background-color:var(--xq-classic-primary,#3688fc)!important;border-color:var(--xq-classic-primary,#3688fc)!important;color:var(--xq-classic-filter-text,#fff)!important}
body.xq-storefront-style-classic .badge-info,
body.xq-storefront-style-classic .classic-category-page .xq-classic-category-title{background-color:var(--xq-classic-category-tag,#4f7a7a)!important;border-color:var(--xq-classic-category-tag,#4f7a7a)!important;color:#fff!important}
body.xq-storefront-style-classic .badge-outline-primary,
body.xq-storefront-style-classic .xq-classic-mobile-badge--auto,
body.xq-storefront-style-classic .mobile-badge--auto{background-color:var(--xq-classic-badge-auto,#42d29d)!important;border-color:var(--xq-classic-badge-auto,#42d29d)!important;color:#fff!important}
body.xq-storefront-style-classic .badge-outline-danger,
body.xq-storefront-style-classic .xq-classic-mobile-badge--manual,
body.xq-storefront-style-classic .mobile-badge--manual{background-color:var(--xq-classic-badge-manual,#de6d09)!important;border-color:var(--xq-classic-badge-manual,#de6d09)!important;color:#fff!important}
body.xq-storefront-style-classic .btn-outline-buy,
body.xq-storefront-style-classic a.btn.xq-list-buy{background-color:var(--xq-classic-buy,#3688fc)!important;border-color:var(--xq-classic-buy,#3688fc)!important;color:#fff!important}
body.xq-storefront-style-classic .btn.xq-list-out-of-stock,
body.xq-storefront-style-classic .btn.xq-list-out-of-stock:hover,
body.xq-storefront-style-classic .btn.xq-list-out-of-stock:focus{background-color:var(--xq-classic-out,#919ca7)!important;border-color:var(--xq-classic-out,#919ca7)!important;color:#fff!important;opacity:1}
body.xq-storefront-style-classic .xq-classic-mobile-badge--promo:not(.xq-classic-mobile-badge--placeholder),
body.xq-storefront-style-classic .mobile-badge--promo:not(.mobile-badge--placeholder){background-color:var(--xq-classic-discount,#f4b400)!important;border-color:var(--xq-classic-discount,#f4b400)!important;color:#fff!important}
body.xq-storefront-style-classic .xq-classic-mobile-badge--price,
body.xq-storefront-style-classic .mobile-badge--price{background-color:var(--xq-classic-price,#ff6b6b)!important}
body.xq-storefront-style-classic .xq-classic-mobile-badge--stock,
body.xq-storefront-style-classic .mobile-badge--stock,
body.xq-storefront-style-classic .mobile-badge--stock-unlimited{background-color:var(--xq-classic-stock,#3b82f6)!important}
body.xq-storefront-style-classic .xq-classic-mobile-badge--stock-empty,
body.xq-storefront-style-classic .mobile-badge--stock-empty{background-color:var(--xq-classic-out,#919ca7)!important}

/* Legacy production-header selectors are retained only for source compatibility.
 * RC1.25-p3 renders frontend.partials.header for both storefront styles, so none
 * of these rules can alter the shared Next header. */
.xq-classic-production-header .xq-mobile-brand{display:none}
.xq-classic-production-header .xq-classic-desktop-title{display:inline-flex;align-items:center;min-height:38px}
.xq-classic-topbar-button{border:0;background:transparent;padding:0;cursor:pointer;font:inherit}
.xq-classic-production-header .xq-mobile-menu-wrap{display:none}
.xq-classic-production-header .xq-search-submit-btn{border:0;cursor:pointer}
.xq-classic-production-header .xq-category-option{width:100%;border:0;background:#fff;text-align:left;cursor:pointer}
.xq-classic-production-header .xq-category-option:hover,
.xq-classic-production-header .xq-category-option:focus{background:#1677ff;color:#fff;outline:none}

/* Dismissible announcement keeps the original one-row production marquee. */
.xq-classic-notice-container{position:relative}
.xq-classic-production-header .xq-marquee-bar{position:relative;padding-right:40px}
.xq-classic-production-header .xq-classic-notice-close{position:absolute;right:7px;top:50%;z-index:4;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:27px;height:27px;padding:0;border:0;border-radius:50%;background:rgba(0,0,0,.10);color:#35391a;font-size:21px;line-height:1;cursor:pointer}
.xq-classic-production-header .xq-classic-notice-close:hover,
.xq-classic-production-header .xq-classic-notice-close:focus{background:rgba(0,0,0,.18);outline:none}
[data-dismissible-site-notice][hidden]{display:none!important}

/* Responsive aliases: production rendered one branch server-side; Next renders both safely. */
@media(max-width:767.98px){
    body.xq-storefront-style-classic .xq-p2-main.xq-classic-main{padding-top:0;padding-bottom:10px}
    .xq-classic-production-header .xq-classic-desktop-title{display:none}
    .xq-classic-production-header .xq-mobile-brand{display:inline-flex}
    .xq-classic-production-header .xq-mobile-menu-wrap{display:block}
    .xq-classic-production-header .mobile-nav{display:none}
    .xq-classic-production-header .xq-mobile-menu-wrap.is-open .mobile-nav{display:block}
    .xq-classic-production-header .xq-topbar-cart-text{display:none}
    .xq-classic-production-header .xq-marquee-bar{padding-right:34px}
}

/* V13.0.0-RC1.25-p3 — 经典横风格 production viewport/mobile parity. */
.xq-classic-production-header .xq-toolbar-wrap .category-box{
    width:var(--category-width-px,180px);
    flex:0 0 var(--category-width-px,180px);
    max-width:min(100%,420px);
}
.xq-classic-production-header .xq-category-dropdown{
    width:100%;
    max-width:100%;
}
.xq-classic-production-header .xq-category-menu{
    width:100%;
    min-width:100%;
    max-width:100%;
    box-sizing:border-box;
}
/* P3: 首页最后一个商品分组不再保留 Bootstrap mb-4，底部间距与 Next 门户风格一致。 */
body.xq-storefront-style-classic .kphyper-home-page .group-section:last-child,
body.xq-storefront-style-classic .kphyper-home-page .kphyper-group-card:last-child{margin-bottom:0!important}

/* 生产站交互：商品行经过时变灰；移动端卡片经过/触摸时使用更深灰并加阴影。 */
body.xq-storefront-style-classic .kphyper-home-page .kphyper-goods-table tbody tr:hover,
body.xq-storefront-style-classic .classic-category-page .xq-classic-category-row:hover{
    background-color:var(--xq-classic-row-hover,#b0acac)!important;
    transition:background-color .2s ease;
}
@media(max-width:767.98px){
    body.xq-storefront-style-classic .kphyper-home-page .product-item.mobile-product:hover,
    body.xq-storefront-style-classic .kphyper-home-page .product-item.mobile-product:active,
    body.xq-storefront-style-classic .classic-category-page .xq-classic-mobile-card:hover,
    body.xq-storefront-style-classic .classic-category-page .xq-classic-mobile-card:active{
        background-color:var(--xq-classic-mobile-hover,#b7b9ba)!important;
        box-shadow:0 2px 10px #9fa0a3!important;
        transition:background-color .2s ease,box-shadow .2s ease;
    }
}

/* 生产站标题按钮的 hover/focus 视觉：Info 蓝、白字。 */
body.xq-storefront-style-classic .kphyper-group-title:hover,
body.xq-storefront-style-classic .kphyper-group-title:focus,
body.xq-storefront-style-classic .classic-category-page .xq-classic-category-title:hover,
body.xq-storefront-style-classic .classic-category-page .xq-classic-category-title:focus{
    background-color:var(--xq-classic-title-hover-bg,#27acd2)!important;
    border-color:var(--xq-classic-title-hover-border,#25a3c8)!important;
    color:var(--xq-classic-title-text,#fff)!important;
}

/* 首页 PC 库存严格按生产站：透明背景、黑色正文，不再继承自动发货 badge 配色。 */
body.xq-storefront-style-classic .kphyper-home-page .kphyper-stock-badge{
    background:transparent!important;
    background-color:transparent!important;
    color:var(--xq-classic-stock-text,#000)!important;
    border-color:transparent!important;
    box-shadow:none!important;
}
/* 分类页 PC 商品图标与首页统一。 */
@media(min-width:768px){
    body.xq-storefront-style-classic .classic-category-page .xq-classic-table-thumb{
        width:3.91rem!important;
        height:2.2rem!important;
        max-width:3.91rem!important;
        flex:0 0 3.91rem!important;
        aspect-ratio:auto!important;
        object-fit:cover!important;
        object-position:center center!important;
        border-radius:6px!important;
        background:#f8f9fa!important;
    }
}
/* 生产站移动端首页：卡片、缩略图、标题与四列徽章完全按当前 KPHyper 规则。 */
@media(max-width:767.98px){
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-group-card{margin-bottom:12px!important}
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-mobile-card{
        border:1px solid #e9ecef;
        border-radius:12px!important;
        box-shadow:0 2px 10px rgba(15,23,42,.06)!important;
        margin-bottom:10px!important;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-mobile-link{
        display:flex;align-items:center;gap:10px;width:100%;min-width:0;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-mobile-thumb{
        flex:0 0 96px;width:96px;max-width:96px;display:block;overflow:hidden;line-height:0;border-radius:8px;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-mobile-img{
        display:block;width:100%!important;max-width:100%;height:auto!important;aspect-ratio:533/300;object-fit:cover;object-position:center center;border-radius:8px;background:#f8f9fa;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-mobile-main{
        flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:8px;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-mobile-name{
        display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--xq-classic-product-title,#3688fc);font-size:15px;line-height:1.35;word-break:break-word;min-height:40px;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-mobile-badges{
        display:grid;
        grid-template-columns:var(--mobile-badge-type-width,1fr) var(--mobile-badge-price-width,1fr) var(--mobile-badge-stock-width,1fr) var(--mobile-badge-promo-width,1fr);
        gap:6px;align-items:center;width:100%;min-width:0;
    }
    body.xq-storefront-style-classic .kphyper-home-page .mobile-badge-slot{min-width:0}
    body.xq-storefront-style-classic .kphyper-home-page .mobile-badge{
        display:flex;align-items:center;justify-content:center;width:100%;min-width:0;height:24px;padding:0 6px;border-radius:4px;color:#fff;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:clip;box-sizing:border-box;
    }
}
@media(max-width:575.98px){
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-mobile-thumb{flex-basis:88px;width:88px;max-width:88px}
}
@media(max-width:991.98px){
    .xq-classic-production-header .xq-toolbar-wrap .category-box{
        width:100%;
        max-width:100%;
        flex:1 1 100%;
    }
    .xq-classic-production-header .xq-category-dropdown,
    .xq-classic-production-header .xq-category-menu{
        width:100%;
        min-width:100%;
        max-width:100%;
    }
}

/* RC1.25-p8.7: classic-home performance path.
 * One responsive product DOM replaces the duplicated desktop table + mobile card DOM.
 * Off-screen category groups use content-visibility so the browser does not paint the
 * entire catalogue before the first viewport becomes interactive. */
body.xq-storefront-style-classic .kphyper-home-page .xq-classic-home-group:not(.xq-classic-home-group--first){
    content-visibility:auto;
    contain-intrinsic-size:auto 620px;
}
body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-list{
    width:100%;
    min-width:0;
    overflow:hidden;
    background:#fff;
}
@media(min-width:768px){
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-head,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-row{
        display:grid;
        grid-template-columns:minmax(0,50%) repeat(4,minmax(0,12.5%));
        width:100%;
        min-width:0;
        align-items:stretch;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-head{
        min-height:48px;
        border-top:0;
        border-bottom:1px solid #dee2e6;
        font-weight:700;
        color:var(--xq-classic-table-header-text,#1f2937);
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-head>span,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-product,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-status,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-action{
        min-width:0;
        display:flex;
        align-items:center;
        justify-content:center;
        padding:.75rem;
        border-right:1px solid #dee2e6;
        box-sizing:border-box;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-head>span:first-child{
        justify-content:center;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-head>span:last-child,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-action{
        border-right:0;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-row{
        min-height:64px;
        border-bottom:1px solid #dee2e6;
        color:var(--xq-classic-table-text,#000);
        transition:background-color .2s ease;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-row:hover{
        background-color:var(--xq-classic-row-hover,#b0acac);
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-product{
        justify-content:flex-start;
        gap:8px;
        color:var(--xq-classic-product-title,#3688fc);
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-thumb{
        flex:0 0 62.56px;
        width:62.56px;
        max-width:62.56px;
        overflow:hidden;
        line-height:0;
        border-radius:5px;
        background:#f8f9fa;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-img{
        display:block;
        width:100%;
        height:35.2px;
        object-fit:cover;
        object-position:center;
        border-radius:5px;
        background:#f8f9fa;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-name{
        min-width:0;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-statuses{
        display:contents;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-status{
        text-align:center;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-type .mobile-badge{
        display:inline-flex;
        width:auto;
        height:auto;
        min-height:24px;
        padding:4px 8px;
        border-radius:5px;
        align-items:center;
        justify-content:center;
        white-space:nowrap;
        font-size:14px;
        line-height:1.1;
        color:var(--xq-content-badge-text,#fff);
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-stock-desktop{
        display:inline;
        color:var(--xq-classic-desktop-stock-text,#000);
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-price-desktop{
        display:inline;
        color:var(--xq-classic-desktop-price-text,#e712a4);
        font-weight:700;
        white-space:nowrap;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-stock-mobile,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-price-mobile,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-promo{
        display:none!important;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-empty{
        border-bottom:1px solid #dee2e6;
    }
}
@media(max-width:767.98px){
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-head{
        display:none;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-row{
        display:block;
        width:100%;
        min-width:0;
        margin:0 0 5px;
        padding:10px;
        border:1px solid #e9ecef;
        border-radius:5px;
        background:#fff;
        box-shadow:0 2px 10px rgba(15,23,42,.06);
        box-sizing:border-box;
        overflow:hidden;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-row:hover,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-row:active{
        background-color:var(--xq-classic-mobile-hover,#b7b9ba);
        box-shadow:0 2px 10px #9fa0a3;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-product{
        display:flex;
        align-items:center;
        gap:10px;
        width:100%;
        min-width:0;
        color:var(--xq-classic-product-title,#3688fc);
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-thumb{
        flex:0 0 88px;
        width:88px;
        max-width:88px;
        overflow:hidden;
        line-height:0;
        border-radius:5px;
        background:#f8f9fa;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-img{
        display:block;
        width:100%;
        height:auto;
        aspect-ratio:533/300;
        object-fit:cover;
        object-position:center;
        border-radius:5px;
        background:#f8f9fa;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-name{
        flex:1 1 auto;
        min-width:0;
        min-height:40px;
        display:-webkit-box;
        -webkit-line-clamp:2;
        -webkit-box-orient:vertical;
        overflow:hidden;
        font-size:15px;
        line-height:1.35;
        word-break:break-word;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-statuses{
        display:grid;
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:5px;
        width:auto;
        min-width:0;
        margin:8px 0 0 98px;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-status{
        display:block;
        min-width:0;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-status .mobile-badge{
        display:flex;
        align-items:center;
        justify-content:center;
        width:100%;
        min-width:0;
        height:24px;
        padding:0 4px;
        border-radius:5px;
        color:#fff;
        font-size:12px;
        font-weight:600;
        line-height:1;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:clip;
        box-sizing:border-box;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-stock-desktop,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-price-desktop,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-action{
        display:none!important;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-stock-mobile,
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-price-mobile{
        display:flex;
    }
    body.xq-storefront-style-classic .kphyper-home-page .kphyper-unified-promo{
        display:block;
    }
}
