@charset "UTF-8";
/* ==========================================================================
   购物车页（main_page=shopping_cart）—— 黑金版式重制
   --------------------------------------------------------------------------
   只在购物车页加载（html_header_css_loader.php 注入，排在合并 CSS 之后）。

   原版问题（2026-11-12 手机实拍）：
     · 每个 td 各占一整行 → 一件商品被拉成 8~9 行，Price / Total 各带一条分隔线
     · 商品名被套上大写字距样式，和标题抢层级
     · 数量步进器孤零零一块，和金额不在同一条视线上
     · 汇总区是内联写死的 #f8f8f8 + #eee 边框，和黑金站不搭

   新版式（移动优先，两套主题通用）：
     ┌─────────────────────────────┐
     │ [img]  商品名                │  ← 图片 84px，名称两行截断
     │        Color: Multicolor     │
     │  ─────────────────────────   │
     │  [−] 4 [+]        $140.00    │  ← 数量与金额同一行
     │  🗑 Remove        $35.00 ea. │
     └─────────────────────────────┘
   颜色全部走主题令牌，浅色/深色自动适配；金色只用 --lux-gold 一处强调。
   ========================================================================== */

/* ------------------------------------------------------------------ 1. 页头 */
body#shoppingcartBody #shoppingCartDefault {
    padding: 0 16px 72px;
}

body#shoppingcartBody #shoppingCartDefault-pageHeading {
    margin: 28px 0 22px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(22px, 5.2vw, 30px);
    font-weight: 500;
    letter-spacing: .04em;
    line-height: 1.25;
    text-transform: none;
    color: var(--theme-text-primary, #17161A);
}

/* --------------------------------------------------- 2. 表单/表格：去表格化 */
body#shoppingcartBody .cartTableDisplay {
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

body#shoppingcartBody .cartTableDisplay > thead {
    display: none;
}

/* ------------------------------------------------------------ 3. 商品卡 ---- */
@media (max-width: 768px) {
    body#shoppingcartBody .cart-item-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "prod  prod"
            "qty   total"
            "foot  foot";
        column-gap: 12px;
        row-gap: 10px;
        box-sizing: border-box;
        width: 100%;
        margin: 0 0 14px;
        padding: 14px 15px 13px;
        border: 1px solid var(--theme-border-light, rgba(0, 0, 0, .10)) !important;
        border-radius: 14px;
        background: var(--theme-bg-primary, #fff);
        box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    }

    body#shoppingcartBody .cart-item-row > td {
        display: block;
        width: auto;
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
    }

    /* 3.1 商品：图 + 名 + 属性 */
    body#shoppingcartBody .cart-item-row .productsCell {
        grid-area: prod;
        margin: 0;
        padding-right: 30px !important; /* 给右上角的 X 让位 */
    }

    body#shoppingcartBody .productsCell > .d-flex {
        align-items: flex-start !important;
        gap: 12px;
    }

    body#shoppingcartBody .productsCell .product-image {
        flex: 0 0 76px;
        margin: 0 !important;
    }

    body#shoppingcartBody .productsCell .product-image img {
        display: block;
        width: 76px;
        height: 76px;
        object-fit: contain;
        border-radius: 9px;
        background: var(--theme-bg-secondary, #F5F3EF);
    }

    body#shoppingcartBody .productsCell .product-details {
        min-width: 0;
        flex: 1 1 auto;
    }

    body#shoppingcartBody .product-name-link {
        display: block;
        font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.45;
        letter-spacing: .015em;
        text-transform: none;
        color: var(--theme-text-primary, #17161A);
        text-decoration: none;
    }

    /* 属性行：Color: Multicolor */
    body#shoppingcartBody .productsCell-attributes {
        margin-top: 6px;
    }

    body#shoppingcartBody .productsCell-attributes ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    body#shoppingcartBody .productsCell-attributes li {
        font-size: 12px;
        line-height: 1.5;
        letter-spacing: .01em;
        color: var(--theme-text-muted, #77736C);
    }

    /* 3.2 数量 */
    body#shoppingcartBody .cart-item-row .qtyCell {
        grid-area: qty;
        align-self: center;
        margin: 0;
        text-align: left !important;
    }

    body#shoppingcartBody .qty-wrapper.qty-control {
        display: inline-flex;
        align-items: center;
        gap: 0;
        height: 36px;
        gap: 8px;
        height: 32px;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    body#shoppingcartBody .cart-item-row .qtyCell .qty-btn {
        width: 30px !important;
        height: 30px !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 50% !important;
        background: transparent !important;
        color: var(--theme-text-primary, #17161A) !important;
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
        transition: color .2s ease, background-color .2s ease;
    }

    body#shoppingcartBody .cart-item-row .qtyCell .qty-btn:hover {
        color: var(--lux-gold, #B8912F);
        background: rgba(0, 0, 0, .04);
    }

    body#shoppingcartBody .cart-item-row .qtyCell .qty-control input[name^="cart_quantity"],
    body#shoppingcartBody .cart-item-row .qtyCell .qty-control input[type="text"],
    body#shoppingcartBody .cart-item-row .qtyCell .qty-control input[type="number"] {
        width: 40px !important;
        height: 30px;
        padding: 0 !important;
        border: 1px solid var(--theme-border-light, rgba(0, 0, 0, .14)) !important;
        border-radius: 8px !important;
        background: transparent !important;
        box-shadow: none !important;
        font-family: Montserrat, Arial, sans-serif;
        font-size: 13.5px;
        font-weight: 600;
        line-height: 28px;
        text-align: center;
        color: var(--theme-text-primary, #17161A) !important;
        -moz-appearance: textfield;
        appearance: textfield;
    }

    body#shoppingcartBody .qty-control input::-webkit-outer-spin-button,
    body#shoppingcartBody .qty-control input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    /* 3.3 金额：行内合计靠右，金色 */
    body#shoppingcartBody .cart-item-row .totalsCell {
        grid-area: total;
        align-self: center;
        text-align: right !important;
        font-family: Montserrat, Arial, sans-serif;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: .01em;
        color: var(--lux-gold, #B8912F);
        white-space: nowrap;
    }

    /* 单价：跟在 Remove 后面，弱化成脚注 */
    body#shoppingcartBody .cart-item-row .priceCell {
        grid-area: foot;
        font-size: 11.5px;
        font-weight: 400;
        line-height: 1.4;
        text-align: right !important;
        color: var(--theme-text-muted, #8A857C);
        white-space: nowrap;
    }

    body#shoppingcartBody .cart-item-row .priceCell::after {
        content: " ea.";
    }

    body#shoppingcartBody .cart-item-row .priceCell::before,
    body#shoppingcartBody .cart-item-row .totalsCell::before {
        content: none !important;
    }

    /* 3.4 删除：底部左侧的轻量链接 */
    body#shoppingcartBody .cart-item-row .qtyCell .d-sm-none {
        margin-top: 6px !important;
    }

    body#shoppingcartBody .cart-item-row .qtyCell .d-sm-none a {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 11.5px;
        letter-spacing: .06em;
        text-transform: uppercase;
        text-decoration: none;
        color: var(--theme-text-muted, #8A857C) !important;
        transition: color .2s ease;
    }

    body#shoppingcartBody .cart-item-row .qtyCell .d-sm-none a:hover {
        color: var(--lux-gold, #B8912F) !important;
    }

    body#shoppingcartBody .cart-item-row .qtyCell .d-sm-none a svg {
        width: 13px;
        height: 13px;
        stroke: currentColor;
        fill: none;
    }

    /* 3.5 右上角的 X：做成圆形小按钮 */
    body#shoppingcartBody .cart-item-row .removeCell {
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 1px;
        padding: 0 !important;
        margin: 0;
        overflow: visible;
        border: 0;
    }

    body#shoppingcartBody .remove-icon {
        position: absolute;
        top: 8px;
        right: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: transparent;
        color: var(--theme-text-muted, #A8A29A);
        transition: color .2s ease, background-color .2s ease;
    }

    body#shoppingcartBody .remove-icon:hover {
        color: #B23A3A;
        background: rgba(178, 58, 58, .08);
    }

    body#shoppingcartBody .remove-icon svg {
        width: 11px;
        height: 11px;
        stroke: currentColor;
        fill: none;
        stroke-width: 28;
    }

    /* 行需要相对定位，X 才能贴到卡片右上角 */
    body#shoppingcartBody .cart-item-row {
        position: relative;
    }
}

/* ------------------------------------------------------- 4. 汇总卡（两主题） */
body#shoppingcartBody .cart-summary-box {
    background: var(--theme-bg-secondary, #F7F5F1) !important;
    border: 1px solid var(--theme-border-light, rgba(0, 0, 0, .10)) !important;
    border-radius: 14px !important;
    padding: 18px 18px 20px !important;
    position: static !important;
    box-shadow: none !important;
}

body#shoppingcartBody .summary-heading {
    margin: 0 0 14px !important;
    padding: 0 0 12px !important;
    border-bottom: 1px solid var(--theme-border-light, rgba(0, 0, 0, .10)) !important;
    font-family: Montserrat, Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
    color: var(--theme-text-muted, #77736C) !important;
}

body#shoppingcartBody .summary-line {
    display: flex !important;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 9px !important;
    font-size: 13px !important;
    line-height: 1.5;
    color: var(--theme-text-secondary, #4E4A45) !important;
}

body#shoppingcartBody .summary-line span:last-child {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body#shoppingcartBody .summary-total {
    display: flex !important;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 16px 0 0 !important;
    padding: 14px 0 0 !important;
    border-top: 1px solid var(--theme-border-light, rgba(0, 0, 0, .12)) !important;
    font-family: Montserrat, Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: .1em !important;
    text-transform: uppercase;
    color: var(--theme-text-primary, #17161A) !important;
}

body#shoppingcartBody .summary-total span:last-child {
    font-size: 20px !important;
    font-weight: 700;
    letter-spacing: .01em !important;
    color: var(--lux-gold, #B8912F) !important;
    font-variant-numeric: tabular-nums;
}

/* 结账按钮：深黑底 + 金边 + 金字（与产品页 ADD TO CART 一致） */
body#shoppingcartBody .btn-checkout {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 50px;
    margin: 18px 0 0 !important;
    padding: 15px 22px !important;
    border: 1px solid var(--lux-gold, #B8912F) !important;
    border-radius: 11px !important;
    background: #111113 !important;
    color: var(--lux-gold, #B8912F) !important;
    font-family: Montserrat, Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    transition: background-color .28s ease, color .28s ease, border-color .28s ease;
}

body#shoppingcartBody .btn-checkout:hover {
    background: var(--lux-gold, #B8912F) !important;
    border-color: var(--lux-gold, #B8912F) !important;
    color: #111113 !important;
}

body#shoppingcartBody .btn-continue {
    display: block;
    margin: 12px 0 0;
    text-align: center;
    font-size: 11px !important;
    letter-spacing: .1em !important;
    text-transform: uppercase;
    text-decoration: none !important;
    color: var(--theme-text-muted, #8A857C) !important;
}

body#shoppingcartBody .btn-continue:hover {
    color: var(--lux-gold, #B8912F) !important;
}

/* --------------------------------------------------------- 5. 桌面端微调 --- */
@media (min-width: 769px) {
    body#shoppingcartBody .cart-item-row > td {
        padding: 16px 10px !important;
        border-bottom: 1px solid var(--theme-border-light, rgba(0, 0, 0, .08)) !important;
        vertical-align: middle;
    }

    body#shoppingcartBody .cart-item-row:last-child > td {
        border-bottom: 0 !important;
    }

    body#shoppingcartBody .product-name-link {
        font-size: 13.5px;
        font-weight: 600;
        line-height: 1.45;
        letter-spacing: .015em;
        text-transform: none;
        color: var(--theme-text-primary, #17161A);
        text-decoration: none;
    }

    body#shoppingcartBody .productsCell .product-image img {
        width: 84px;
        height: 84px;
        object-fit: contain;
        border-radius: 9px;
        background: var(--theme-bg-secondary, #F5F3EF);
    }

    body#shoppingcartBody .productsCell-attributes li {
        font-size: 12px;
        color: var(--theme-text-muted, #77736C);
    }

    body#shoppingcartBody .totalsCell {
        font-weight: 700;
        color: var(--lux-gold, #B8912F);
        white-space: nowrap;
    }

    body#shoppingcartBody .cart-summary-box {
        position: sticky !important;
        top: 20px;
    }
}

/* ------------------------------------------------- 6. 深色主题：补齐对比度 --- */
html[data-theme="dark"] body#shoppingcartBody .cart-item-row,
html[data-theme="dark"] body#shoppingcartBody .cart-summary-box {
    border-color: rgba(255, 255, 255, .14) !important;
}

html[data-theme="dark"] body#shoppingcartBody .cart-item-row .qtyCell .qty-btn {
    color: #F3F0EA !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) !important;
}

html[data-theme="dark"] body#shoppingcartBody .cart-item-row .qtyCell .qty-btn:hover {
    color: #D4AF37 !important;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, .65) !important;
}

html[data-theme="dark"] body#shoppingcartBody .cart-item-row .qtyCell .qty-control input {
    border-color: rgba(255, 255, 255, .22) !important;
    color: #F3F0EA !important;
}

html[data-theme="dark"] body#shoppingcartBody .summary-line {
    color: rgba(243, 240, 234, .72) !important;
}

html[data-theme="dark"] body#shoppingcartBody .summary-total {
    color: #F3F0EA !important;
    border-top-color: rgba(255, 255, 255, .18) !important;
}

html[data-theme="dark"] body#shoppingcartBody .summary-heading {
    color: rgba(243, 240, 234, .66) !important;
    border-bottom-color: rgba(255, 255, 255, .16) !important;
}

html[data-theme="dark"] body#shoppingcartBody .cart-item-row .priceCell {
    color: rgba(243, 240, 234, .6) !important;
}

html[data-theme="dark"] body#shoppingcartBody .productsCell-attributes li {
    color: rgba(243, 240, 234, .66) !important;
}

/* 7. 汇总区里的 Bootstrap .text-muted / 旧 span 规则会把字压灰，逐个改回来 */
body#shoppingcartBody .cart-summary-box .summary-line span,
body#shoppingcartBody .cart-summary-box .summary-line .text-muted {
    color: var(--theme-text-secondary, #6B6660) !important;
}

body#shoppingcartBody .cart-summary-box .summary-total span:first-child {
    color: var(--theme-text-primary, #17161A) !important;
}

body#shoppingcartBody .cart-summary-box .text-muted {
    color: var(--theme-text-muted, #8A857C) !important;
}

html[data-theme="dark"] body#shoppingcartBody .cart-summary-box .summary-line span,
html[data-theme="dark"] body#shoppingcartBody .cart-summary-box .summary-line .text-muted {
    color: rgba(243, 240, 234, .74) !important;
}

html[data-theme="dark"] body#shoppingcartBody .cart-summary-box .summary-total span:first-child {
    color: #F3F0EA !important;
}

html[data-theme="dark"] body#shoppingcartBody .cart-summary-box .text-muted {
    color: rgba(243, 240, 234, .55) !important;
}
