/* ===== Cozzi Cotton theme tokens ===== */
:root {
    --cozzicotton-primary: #B89658; /* brand */
    --cozzicotton-primary-hover: #947844;
    --cozzicotton-gold: #d4af37;
    --fi-ink: #4a4d4e; /* headings */
    --fi-text: #6b7174; /* body */
    --fi-cream: #fff7ed; /* subtle highlights */
    --fi-cloud: #f5f6f7; /* panels */
    --fi-border: #e7e7e9;
    --fi-price: #189a63; /* price/total */
    --fi-link: #1f6fb2; /* links */
}

/* ===== Base typography ===== */
html, body {
    color: var(--fi-text);
}

h1, h2, h3, h4 {
    color: var(--fi-ink);
    letter-spacing: .2px;
}

h1 {
    font-weight: 600;
}

a {
    color: var(--fi-link);
}

a:hover, a:focus {
    color: #15598f;
    text-decoration: none;
}

/* ===== Buttons (primary = Proceed) ===== */
.btn-primary {
    background: var(--cozzicotton-primary);
    border-color: var(--cozzicotton-primary);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .05);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--cozzicotton-primary-hover);
    border-color: var(--cozzicotton-primary-hover);
}

.btn-link {
    color: var(--fi-link);
}

/* ===== Cards / panels ===== */
.summary-card {
    background: var(--fi-cream);
    border: 1px solid var(--fi-border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .04);
}

.summary-title {
    font-weight: 600;
}

/* ===== Prices ===== */
.price_color {
    color: var(--cozzicotton-gold) !important;
    font-weight: 600;
}

.summary-total {
    color: var(--cozzicotton-gold) !important;
    font-weight: 700;
}

/* ===== Cart page polish ===== */
.cart-page .cart-heading {
    margin: 10px 0 18px;
}

.cart-page .trust-copy {
    color: #8d8f93;
    font-size: 12px;
    margin-top: 8px;
}

/* Quantity pill (framework-agnostic) */
.cart-page .qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--fi-border);
    border-radius: 8px;
    overflow: hidden;
    height: 34px;
    background: #fff;
}

.cart-page .qty-stepper .btn {
    border: 0;
    height: 34px;
    line-height: 34px;
    padding: 0 10px;
    margin: 0 !important;
    background: #fff;
}

.cart-page .qty-stepper .btn:first-child {
    border-right: 1px solid var(--fi-border);
}

.cart-page .qty-stepper .btn:last-child {
    border-left: 1px solid var(--fi-border);
}

.cart-page .qty-stepper .qty-input {
    width: 96px;
    text-align: center;
    height: 34px;
    line-height: 34px;
    border: 0;
    box-shadow: none;
    padding: 0 8px;
    background: #fff;
}

/* hide native spinners */
.cart-page .qty-stepper .qty-input::-webkit-outer-spin-button,
.cart-page .qty-stepper .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-page .qty-stepper .qty-input[type="number"] {
    -moz-appearance: textfield;
}

/* Row separators */
.basket-items {
    border-bottom: 1px solid var(--fi-border);
    padding: 14px 0;
}

/* --- Visual hierarchy & typography --- */
.cart-page h1, .cart-page h2, .cart-page h3 {
    letter-spacing: .2px;
}

.cart-page .basket-items h3 a {
    font-weight: 600;
    font-size: 18px;
    color: #4a4d4e;
}

.cart-page .basket-items h3 a:hover {
    text-decoration: none;
    opacity: .9;
}

/* --- Thumbnails: subtle frame & depth --- */
.cart-page .basket-items img.thumbnail {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
    border: 1px solid #e7e7e9;
}

/* --- Row spacing & separators --- */
.cart-page .basket-items {
    padding: 14px 0;
    border-bottom: 1px solid #e7e7e9;
}

.cart-page .basket-items:last-of-type {
    border-bottom: 0;
}

/* --- Quantity pill: clean + consistent --- */
.cart-page .qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e7e7e9;
    border-radius: 8px;
    overflow: hidden;
    height: 36px;
    background: #fff;
}

.cart-page .qty-stepper .btn {
    border: 0;
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    margin: 0 !important;
    background: #fff;
}

.cart-page .qty-stepper .btn:first-child {
    border-right: 1px solid #e7e7e9;
}

.cart-page .qty-stepper .btn:last-child {
    border-left: 1px solid #e7e7e9;
}

.cart-page .qty-stepper .qty-input {
    width: 96px;
    text-align: center;
    height: 36px;
    line-height: 36px;
    border: 0;
    box-shadow: none;
    padding: 0 8px;
}

/* hide native spinners */
.cart-page .qty-stepper .qty-input::-webkit-outer-spin-button,
.cart-page .qty-stepper .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-page .qty-stepper .qty-input[type="number"] {
    -moz-appearance: textfield;
}

/* Actions under quantity */
.cart-page .line-actions {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7174;
}

.cart-page .line-actions a {
    color: #1f6fb2;
}

.cart-page .line-actions a:hover {
    color: #15598f;
    text-decoration: none;
}

/* --- Prices & alignment --- */
.cart-page .price_color {
    color: var(--cozzicotton-gold) !important;
    font-weight: 600;
}

.cart-page .text-right {
    text-align: right;
}

/* --- Summary card: cream panel + brand accent --- */
.cart-page .summary-card {
    background: #fff7ed;
    border: 1px solid #e7e7e9;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .04);
    border-top: 4px solid var(--cozzicotton-primary);
}

.cart-page .summary-card h4, .cart-page .summary-card h3 {
    color: #4a4d4e;
    font-weight: 600;
}

.cart-page .proceed-btn {
    background: var(--cozzicotton-primary);
    border-color: var(--cozzicotton-primary);
}

.cart-page .proceed-btn:hover, .cart-page .proceed-btn:focus {
    background: var(--cozzicotton-primary-hover);
    border-color: var(--cozzicotton-primary-hover);
}

.cart-page .trust-copy {
    color: #8d8f93;
    font-size: 12px;
    margin-top: 8px;
}

/* --- Fine layout tweaks --- */
.cart-page .row > .col-sm-8 {
    padding-right: 18px;
}

.cart-page .row > .col-sm-4 {
    padding-left: 18px;
}

.cart-page .basket-items h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Right-side summary: clean white card with soft gray halo ===== */
.cart-page .summary-card {
    position: relative;
    background: #fff; /* white content card */
    border: 1px solid #e9e9ec;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.cart-page .summary-card::before { /* subtle gray surround without changing layout */
    content: "";
    position: absolute;
    inset: -10px; /* halo thickness */
    background: #f6f7f9; /* soft gray */
    border-radius: 16px;
    z-index: -1;
}

/* Headings & total emphasis */
.cart-page .summary-card h3,
.cart-page .summary-card h4 {
    margin: 0 0 8px;
    color: #4a4d4e;
    font-weight: 600;
}

.cart-page .summary-card .summary-total {
    color: #189a63 !important;
    font-weight: 700;
    font-size: 20px;
}

/* Totals table simplified (no stripes, cleaner dividers) */
.cart-page .summary-card .table {
    background: transparent;
    border: 0;
    margin-bottom: 12px;
}

.cart-page .summary-card .table > tbody > tr > th,
.cart-page .summary-card .table > tbody > tr > td {
    border-top: 0;
    padding: 8px 0;
    vertical-align: middle;
}

.cart-page .summary-card .table > tbody > tr + tr > td,
.cart-page .summary-card .table > tbody > tr + tr > th {
    border-top: 1px solid #eee; /* subtle divider between rows */
}

/* CTA stays strong on the white card */
.cart-page .proceed-btn {
    background: var(--cozzicotton-primary);
    border-color: var(--cozzicotton-primary);
}

.cart-page .proceed-btn:hover, .cart-page .proceed-btn:focus {
    background: var(--cozzicotton-primary-hover);
    border-color: var(--cozzicotton-primary-hover);
}

.cart-page .summary-card .trust-copy {
    color: #8d8f93;
    font-size: 12px;
    margin-top: 8px;
}

/* Left list—make rows feel like light cards too (but very subtle) */
.cart-page .basket-items {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
    margin: 0 0 14px;
}

.cart-page .basket-items:last-of-type {
    margin-bottom: 0;
}

/* Remove orange background bars inside the right summary */
.cart-page .summary-card .table .bg-warning,
.cart-page .summary-card .table .alert,
.cart-page .summary-card .table tr[class*="warning"],
.cart-page .summary-card .table td[class*="warning"],
.cart-page .summary-card .table th[class*="warning"] {
    background: transparent !important;
    color: inherit !important;
    border-color: transparent !important;
}

/* Keep rows minimal and separated by subtle dividers */
.cart-page .summary-card .table > tbody > tr > th,
.cart-page .summary-card .table > tbody > tr > td {
    background: transparent !important;
    border-top: 1px solid #eee;
    padding: 8px 0;
}

/* First row shouldn’t have a divider */
.cart-page .summary-card .table > tbody > tr:first-child > th,
.cart-page .summary-card .table > tbody > tr:first-child > td {
    border-top: 0;
}

/* Optional: make section headers (“Cart”, “Shipping”, “Order total”) stand out without blocks */
.cart-page .summary-card h4 {
    margin: 10px 0 6px;
    font-weight: 600;
    color: #4a4d4e;
}

/* === Right summary: soft-gray background + layered shadow (cart-only) === */
.cart-page .summary-card {
    background: #f7f8fa; /* soft gray */
    border: 1px solid #e8eaee;
    border-radius: 14px;
    padding: 18px;
    /* layered shadow for depth without harshness */
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04),
    0 8px 20px rgba(0, 0, 0, .06),
    0 20px 40px rgba(0, 0, 0, .05);
}

/* Optional: subtle inner white well just for the rows */
.cart-page .summary-card .table {
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

/* Minimal row separators, no colored blocks */
.cart-page .summary-card .table > tbody > tr > th,
.cart-page .summary-card .table > tbody > tr > td {
    background: transparent !important;
    border-top: 1px solid #eff1f4;
    padding: 9px 12px;
}

.cart-page .summary-card .table > tbody > tr:first-child > th,
.cart-page .summary-card .table > tbody > tr:first-child > td {
    border-top: 0;
}

/* Section headings on gray background */
.cart-page .summary-card h4 {
    margin: 10px 0 8px;
    font-weight: 600;
    color: #3f4346;
}

/* Total emphasis + keep CTA vivid on the soft-gray card */
.cart-page .summary-card .summary-total {
    color: #189a63 !important;
    font-weight: 700;
    font-size: 20px;
}

.cart-page .proceed-btn {
    background: var(--cozzicotton-primary);
    border-color: var(--cozzicotton-primary);
}

.cart-page .proceed-btn:hover, .cart-page .proceed-btn:focus {
    background: var(--cozzicotton-primary-hover);
    border-color: var(--cozzicotton-primary-hover);
}

/* Tiny caption */
.cart-page .summary-card .trust-copy {
    color: #8d9094;
    font-size: 12px;
    margin-top: 8px;
}

/* Match left item cards to the new soft-gray feel (very subtle) */
.cart-page .basket-items {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03),
    0 8px 20px rgba(0, 0, 0, .04);
    padding: 14px 12px;
    margin: 0 0 16px;
}

/* Summary ribbon: slimmer, softer */
.cart-page .summary-card {
    position: relative;
}

.cart-page .summary-card::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    top: 0;
    height: 2px;
    background: var(--cozzicotton-primary);
    border-radius: 2px;
}

/* Card crispness */
.cart-page .summary-card {
    border: 1px solid #eceff3;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
    border-radius: 12px;
}

.cart-page .summary-card h4 {
    margin: 12px 0 6px;
    font-weight: 600;
    color: #3f4346;
}

.cart-page .summary-card .table > tbody > tr > th,
.cart-page .summary-card .table > tbody > tr > td {
    padding: 8px 0;
}

.cart-page .summary-card .table > tbody > tr + tr > * {
    border-top: 1px solid #edf0f3;
}

.cart-page .text-right {
    text-align: right;
}

.cart-page .price_color {
    color: #189a63 !important;
    font-weight: 600;
}

.cart-page .summary-total {
    font-size: 20px;
    font-weight: 700;
}

.cart-page .basket-items {
    border: 1px solid #eef1f4;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .04);
    padding: 14px 12px;
}

.cart-page .qty-stepper {
    height: 38px;
    border-radius: 10px;
}

.cart-page .qty-stepper .btn {
    height: 38px;
    line-height: 38px;
    padding: 0 12px;
}

.cart-page .qty-stepper .qty-input {
    height: 38px;
    line-height: 38px;
    width: 92px;
}

@media (max-width: 991px) {
    .cart-sticky-bar {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
        border-top: 1px solid #eceff3;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, .05);
        padding: 10px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .cart-sticky-bar .total {
        font-weight: 700;
        color: #189a63;
    }

    .cart-sticky-bar .btn {
        flex: 1;
    }
}

/* === Right summary: minimal, no ribbon, soft-gray card === */
.cart-page .summary-card {
    background: #f4f5f7; /* soft gray */
    border: 1px solid #e6e8ec;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
    position: relative;
}

/* kill the orange ribbon if it exists */
.cart-page .summary-card::before,
.cart-page .summary-card::after {
    content: none !important;
}

/* Section titles: simple and spaced, no bars */
.cart-page .summary-card h4 {
    margin: 10px 0 8px;
    font-weight: 600;
    color: #3f4346;
    border: 0; /* ensure no underlines from previous rules */
}

/* Table: remove almost all lines */
.cart-page .summary-card .table {
    background: transparent;
    border: 0;
    margin: 0 0 12px;
}

.cart-page .summary-card .table > tbody > tr > th,
.cart-page .summary-card .table > tbody > tr > td {
    background: transparent !important;
    border-top: 0 !important; /* no row lines */
    padding: 8px 0;
}

/* Keep ONE subtle divider only before the final total row */
.cart-page .summary-card .table > tbody > tr:last-child > th,
.cart-page .summary-card .table > tbody > tr:last-child > td {
    border-top: 1px solid #e9ecef !important;
    padding-top: 12px;
}

/* Emphasis for the total */
.cart-page .summary-card .summary-total {
    color: #189a63 !important;
    font-weight: 700;
    font-size: 20px;
}

/* Button looks good on gray */
.cart-page .proceed-btn {
    background: var(--cozzicotton-primary);
    border-color: var(--cozzicotton-primary);
}

.cart-page .proceed-btn:hover, .cart-page .proceed-btn:focus {
    background: var(--cozzicotton-primary-hover);
    border-color: var(--cozzicotton-primary-hover);
}

/* ===== Softer, airier summary card ===== */
.cart-page .summary-card {
    /* much softer gray */
    background: #fbfcfd;
    border: 1px solid #eef1f4;
    border-radius: 14px;
    padding: 18px;
    /* lighter, wider shadow for a floating feel */
    box-shadow: 0 1px 3px rgba(0, 0, 0, .03),
    0 12px 28px rgba(0, 0, 0, .05);
}

/* ultra-subtle inner well (barely there) */
.cart-page .summary-card .table {
    background: #fff;
    border: 1px solid #f3f5f7;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

/* minimal separators only */
.cart-page .summary-card .table > tbody > tr > * {
    background: transparent !important;
    border-top: 0 !important;
    padding: 9px 12px;
}

.cart-page .summary-card .table > tbody > tr + tr > * {
    border-top: 1px solid #f1f3f6 !important;
}

/* keep a single divider before total */
.cart-page .summary-card .table > tbody > tr:last-child > * {
    border-top: 1px solid #e9edf1 !important;
    padding-top: 12px;
}

/* headings + total */
.cart-page .summary-card h4 {
    margin: 10px 0 6px;
    font-weight: 600;
    color: #3f4346;
}

.cart-page .summary-card .summary-total {
    color: #189a63 !important;
    font-weight: 700;
    font-size: 20px;
}

/* CTA unchanged */
.cart-page .proceed-btn {
    background: var(--cozzicotton-primary);
    border-color: var(--cozzicotton-primary);
}

.cart-page .proceed-btn:hover, .cart-page .proceed-btn:focus {
    background: var(--cozzicotton-primary-hover);
    border-color: var(--cozzicotton-primary-hover);
}

/* Trust strip: three tiny badges in a soft row */
.cart-page .trust-strip {
    display: flex;
    gap: 14px;
    align-items: center;
    color: #8d9094;
    font-size: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.cart-page .trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cart-page .trust-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #eef1f4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #7b7f83;
}

/* === Make the right summary look exactly like the left item cards === */

/* kill any previous ribbons/halos */
.cart-page .summary-card::before,
.cart-page .summary-card::after {
    content: none !important;
}

/* match the left card: background, border, radius, shadow, padding */
.cart-page .summary-card {
    background: #fff;
    border: 1px solid #eef1f4; /* same as .basket-items */
    border-radius: 12px; /* same corner radius */
    box-shadow: 0 3px 12px rgba(0, 0, 0, .04); /* same depth */
    padding: 14px 12px; /* same inner spacing */
}

/* headings to match left side tone */
.cart-page .summary-card h4 {
    margin: 0 0 6px;
    font-weight: 600;
    color: #4a4d4e;
}

/* simplify the rows inside so it feels like the same card content */
.cart-page .summary-card .table {
    background: transparent;
    border: 0;
    margin: 6px 0 10px;
}

.cart-page .summary-card .table > tbody > tr > th,
.cart-page .summary-card .table > tbody > tr > td {
    background: transparent !important;
    border-top: 0 !important;
    padding: 6px 0;
}

/* single subtle divider before total, like a “footer” of the card */
.cart-page .summary-card .table > tbody > tr:last-child > th,
.cart-page .summary-card .table > tbody > tr:last-child > td {
    border-top: 1px solid #eef1f4 !important;
    padding-top: 10px;
}

/* CTA aligns with the card look */
.cart-page .proceed-btn {
    width: 100%;
    margin-top: 8px;
}

.cart-page .summary-card .trust-copy,
.cart-page .summary-card .trust-strip {
    margin-top: 8px;
}

.cart-page .cc-stock-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.cart-page .qty-stepper .btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
}


/* =========================================================
   Cart mobile polish (<= 767px)
   Goal: centered, clean vertical hierarchy per item card
   ========================================================= */
@media (max-width: 767px) {
    /* Make each line feel like a proper “card” */
    .cart-page .basket-items.cart-line {
        padding: 14px 12px;
        border: 1px solid #e7e7e9;
        border-radius: 14px;
        background: #fff;
        margin-bottom: 12px;
    }

    /* Remove the “floating fragments” feeling */
    .cart-page .basket-items.cart-line .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    /* Image + title should feel intentionally centered */
    .cart-page .basket-items.cart-line .col-sm-2 {
        text-align: center;
        margin-bottom: 10px;
    }

    .cart-page .basket-items.cart-line .title-col {
        text-align: center;
        margin-bottom: 10px;
    }

    /* Slightly tighten title/variant spacing on mobile */
    .cart-page .basket-items.cart-line .title-col h3 {
        margin: 0 0 4px;
    }

    .cart-page .basket-items.cart-line .cart-variant {
        margin: 0;
    }

    /* Quantity area: stack vertically and center */
    .cart-page .basket-items.cart-line .checkout-quantity {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
    }

    /* IMPORTANT: badge must NOT sit beside the stepper on mobile */
    .cart-page .basket-items.cart-line .checkout-quantity .cc-stock-badge {
        display: inline-block;
        margin: 0 auto;
        line-height: 1;
        padding: 6px 10px;
        border-radius: 999px;
        font-size: 12px;
    }

    /* Remove link: make it visually part of the quantity cluster */
    .cart-page .basket-items.cart-line a[data-behaviours="remove"] {
        display: inline-block;
        margin-top: 2px;
    }

    /* Price area: center and group old/new together */
    .cart-page .basket-items.cart-line .col-sm-3.align-center {
        text-align: center;
    }

    /* Optional: hide the “Price:” label on mobile (cleaner) */
    .cart-page .basket-items.cart-line .visible-xs {
        display: none !important;
    }

    /* If discounted pricing exists, force a nice centered group */
    .cart-page .basket-items.cart-line .cc-price {
        display: inline-flex;
        align-items: baseline;
        justify-content: center;
        gap: 10px;
        margin: 0 auto;
    }

    .cart-page .basket-items.cart-line .cc-price-old {
        font-size: 12px;
        opacity: 0.65;
        text-decoration: line-through;
    }

    .cart-page .basket-items.cart-line .cc-price-new {
        font-size: 16px;
        font-weight: 700;
    }
}
