/* =========================================================================
   Cart page styles  —  templates/__master/cart.html + Panels/CartContent.html
   Loaded only on cart.php. Drives both the desktop two-column layout and
   the mobile stacked card layout. Server-side variable hooks are untouched;
   all visual structure is added here over the table markup.
   ========================================================================= */

/* ---------- design tokens (kept in sync with style_new.css) ------------- */
:root {
    --cjs-brand: #cd1e24;
    --cjs-brand-dark: #a8161b;
    --cjs-success: #1f9d55;
    --cjs-success-dark: #167a40;
    --cjs-text: #1a1d24;
    --cjs-text-muted: #6b7280;
    --cjs-text-soft: #9aa3af;
    --cjs-bg: #f7f8fa;
    --cjs-bg-card: #ffffff;
    --cjs-bg-soft: #fafbfc;
    --cjs-border: #e5e7eb;
    --cjs-border-soft: #eef0f3;
    --cjs-radius: 10px;
    --cjs-radius-sm: 6px;
    --cjs-shadow-sm: 0 1px 2px rgba(15,23,42,.05);
    --cjs-shadow-md: 0 4px 12px rgba(15,23,42,.06);
    --cjs-shadow-lg: 0 10px 30px rgba(15,23,42,.10);
}

/* ---------- breadcrumb ------------------------------------------------- */
.cjs-cart-breadcrumb.breadcumb_wrap {
    margin: 14px 0 18px;
}
.cjs-cart-breadcrumb .breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 0;
    background: transparent;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--cjs-text-muted);
}
.cjs-cart-breadcrumb .breadcrumb li {
    display: inline-flex;
    align-items: center;
}
.cjs-cart-breadcrumb .breadcrumb li + li::before {
    content: "/";
    color: var(--cjs-text-soft);
    margin: 0 10px;
}
.cjs-cart-breadcrumb .breadcrumb li a {
    color: var(--cjs-text-muted);
    text-decoration: none;
    transition: color .15s ease;
}
.cjs-cart-breadcrumb .breadcrumb li a:hover {
    color: var(--cjs-brand);
    text-decoration: underline;
}
.cjs-cart-breadcrumb .breadcrumb li[aria-current="page"] {
    color: var(--cjs-text);
    font-weight: 600;
}

/* ---------- cart header (page heading + trust pills) ------------------- */
.cjs-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--cjs-border-soft);
}
.cjs-cart-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: var(--cjs-text);
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.cjs-cart-subtitle {
    margin: 4px 0 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--cjs-text-muted);
    min-height: 1em;
}
.cjs-cart-subtitle:empty { display: none; }
.cjs-cart-header-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cjs-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    background: var(--cjs-bg-soft);
    border: 1px solid var(--cjs-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cjs-text);
    line-height: 1;
    white-space: nowrap;
}
.cjs-trust-pill svg { flex-shrink: 0; }
.cjs-trust-pill-secure  { color: #16794a; border-color: #cfe9d7; background: #f1fbf5; }
.cjs-trust-pill-instant { color: #b45309; border-color: #fde2bf; background: #fff7ed; }
.cjs-trust-pill-rated   { color: #b85400; border-color: #fcd9b6; background: #fff7ed; }

/* ---------- step progress indicator (Cart → Payment → Done) ----------- */
.cjs-checkout-steps {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    gap: 0;
    align-items: center;
    flex-wrap: wrap;
}
.cjs-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cjs-text-soft);
    background: transparent;
    border-radius: 999px;
    position: relative;
}
.cjs-step + .cjs-step::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--cjs-border);
    margin: 0 6px 0 -6px;
    align-self: center;
}
.cjs-step-bullet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    background: var(--cjs-bg-soft);
    color: var(--cjs-text-soft);
    border: 1px solid var(--cjs-border);
}
.cjs-step.is-current { color: var(--cjs-text); }
.cjs-step.is-current .cjs-step-bullet {
    background: var(--cjs-brand);
    color: #fff;
    border-color: var(--cjs-brand);
    box-shadow: 0 0 0 4px rgba(205,30,36,.12);
}
.cjs-step.is-done { color: var(--cjs-text-muted); }
.cjs-step.is-done .cjs-step-bullet {
    background: var(--cjs-success);
    color: #fff;
    border-color: var(--cjs-success);
}

/* ---------- two-column desktop layout ---------------------------------- */
.about-page .panel-body { padding: 0; }
.about-page .panel-body .BlockContent { padding: 0; }

/* Reorder the trailing siblings of .BlockContent so the page reads:
       (form OR empty-cart message)
       Trustpilot social-proof
       Customers Also Bought
   …on both desktop and mobile. The cart form, error / success banners
   and the empty-cart card all keep the default order:0 and stack in
   source order at the top; the two carousels get explicit higher
   orders. Source order alone wasn't enough because `.cjs-empty-cart`
   sits at the bottom of CartContent.html (next to its own <style>
   block) — flex re-ordering puts it back at the top visually. */
.about-page .panel-body .BlockContent {
    display: flex;
    flex-direction: column;
}
.about-page .panel-body .BlockContent > .cjs-cart-trustpilot-section { order: 5; }
.about-page .panel-body .BlockContent > #coreyWeeklyBestsellers { order: 6; }
/* Keep the empty-cart card horizontally centred inside the flex column
   (the existing CSS uses `margin: 24px auto 32px` which works as a flex
   item, but stretches across the full column otherwise). */
.about-page .panel-body .BlockContent > .cjs-empty-cart {
    align-self: center;
    width: 100%;
}

.about-page #cartForm table.table {
    background: var(--cjs-bg-card);
    border: 1px solid var(--cjs-border) !important;
    border-radius: var(--cjs-radius);
    box-shadow: var(--cjs-shadow-sm);
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}
/* hide column header bar — we use card layout */
.about-page #cartForm table.table > thead { display: none; }
.about-page #cartForm table.table > tbody > tr > td,
.about-page #cartForm table.table > thead > tr > th {
    border: 0 !important;
    background: transparent !important;
}

/* striped rows from bootstrap clash with our cards — disable */
.about-page #cartForm table.table-striped > tbody > tr:nth-of-type(odd) { background: transparent; }

/* ---------- ITEM ROWS (each tr.cjs-cart-item is a card) ---------------- */
.about-page #cartForm tbody tr.cjs-cart-item {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) 110px 90px 100px;
    grid-template-areas: "thumb name qty unit total";
    align-items: center;
    gap: 4px 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 16px 20px;
    margin: 0;
    box-shadow: none;
    /* Horizontal divider between rows; first row inherits the panel's
       outer top border, so suppress the top border here. */
    border-bottom: 1px solid var(--cjs-border-soft);
}
.about-page #cartForm tbody tr.cjs-cart-item:last-of-type {
    border-bottom: 0;
}

.about-page #cartForm td.CartThumb {
    grid-area: thumb;
    width: 100px !important;
    padding: 0;
}
.about-page #cartForm td.CartThumb img {
    width: 100px;
    height: 100px;
    max-height: 100px;
    object-fit: contain;
    display: block;
    border: 1px solid var(--cjs-border-soft);
    border-radius: var(--cjs-radius-sm);
    background: #fafbfc;
    padding: 5px;
    box-sizing: border-box;
}

.about-page #cartForm td.ProductName {
    grid-area: name;
    padding: 0;
    color: var(--cjs-text);
    font-size: 14px;
    line-height: 1.5;
    align-self: start;
}
.about-page #cartForm td.ProductName a.cjs-cart-item-name,
.about-page #cartForm td.ProductName > a {
    display: inline-block;
    font-size: 16px;
    font-weight: 700;
    color: var(--cjs-text);
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 4px;
}
.about-page #cartForm td.ProductName a.cjs-cart-item-name:hover,
.about-page #cartForm td.ProductName > a:hover {
    color: var(--cjs-brand);
    text-decoration: underline;
}
.about-page #cartForm td.ProductName small {
    color: var(--cjs-text-muted);
    font-size: 12.5px;
    font-weight: 500;
}

/* meta pill row under product name (instant delivery, etc.) */
.cjs-cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 0;
}
.cjs-cart-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    background: #f1fbf5;
    color: #16794a;
    border: 1px solid #cfe9d7;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
    max-width: 100%;
    word-break: normal;
}
.cjs-cart-meta-pill svg { flex-shrink: 0; }
@media (max-width: 480px) {
    /* Allow text to wrap onto a second line on small phones without
       distorting the rounded pill shape or clipping the icon. */
    .cjs-cart-meta-pill {
        border-radius: 12px;
        padding: 5px 11px 5px 9px;
        align-items: flex-start;
    }
    .cjs-cart-meta-pill svg { margin-top: 2px; }
}

/* warning panels inside the row (region / account) */
.cjs-cart-warning {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--cjs-radius-sm);
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #78350f;
}
.cjs-cart-warning .ErrorMessage {
    margin: 0;
    color: #78350f;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 12.5px;
    line-height: 1.5;
}
.cjs-cart-warning h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 8px 0 4px;
    color: #78350f;
}
.cjs-cart-warning p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
}

/* qty / unit / total cells — Remove sits inline with the qty selector
   to avoid stacking another row's worth of vertical space. */
.about-page #cartForm td.CartItemQuantity {
    grid-area: qty;
    text-align: left !important;
    padding: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
}
.about-page #cartForm td.CartItemQuantity br { display: none; }
.about-page #cartForm td.CartItemQuantity select {
    height: 32px;
    width: 64px;
    padding: 0 6px;
    border: 1px solid var(--cjs-border);
    border-radius: var(--cjs-radius-sm);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--cjs-text);
    cursor: pointer;
    appearance: auto;
}
.about-page #cartForm td.CartItemQuantity select:focus {
    outline: none;
    border-color: var(--cjs-brand);
    box-shadow: 0 0 0 3px rgba(205,30,36,.12);
}
.about-page #cartForm td.CartItemQuantity .CartRemoveLink {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--cjs-text-muted);
    text-decoration: none;
    transition: color .15s ease;
}
.about-page #cartForm td.CartItemQuantity .CartRemoveLink:hover {
    color: var(--cjs-brand);
    text-decoration: underline;
}

.about-page #cartForm td.CartItemIndividualPrice {
    grid-area: unit;
    text-align: right !important;
    padding: 0;
    color: var(--cjs-text-muted);
    font-size: 13px;
    font-weight: 500;
    min-width: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.about-page #cartForm td.CartItemIndividualPrice::before {
    content: "";
}
.about-page #cartForm td.CartItemTotalPrice {
    grid-area: total;
    text-align: right !important;
    padding: 0;
    min-width: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.about-page #cartForm td.CartItemTotalPrice em.ProductPrice {
    font-style: normal;
    font-weight: 800;
    font-size: 17px;
    color: var(--cjs-text);
    white-space: nowrap;
}

/* ---------- "Clear All" row -------------------------------------------- */
.about-page #cartForm tr.cjs-cart-clear-row {
    display: block;
    margin: 0;
    border-top: 1px solid var(--cjs-border);
    background: var(--cjs-bg-soft);
}
.about-page #cartForm tr.cjs-cart-clear-row > td {
    display: block;
    background: transparent !important;
    border: 0 !important;
    padding: 10px 20px !important;
    text-align: right !important;
}
.about-page #cartForm tr.cjs-cart-clear-row .cjs-cart-clear-btn {
    background: #fff !important;
    border: 1px solid var(--cjs-border) !important;
    border-radius: var(--cjs-radius-sm) !important;
    padding: 7px 14px !important;
    font-size: 12.5px !important;
    color: var(--cjs-text-muted) !important;
    font-weight: 600 !important;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.about-page #cartForm tr.cjs-cart-clear-row .cjs-cart-clear-btn:hover {
    color: var(--cjs-brand) !important;
    border-color: var(--cjs-brand) !important;
}

/* ---------- Money-back guarantee card (top of trust column) ---------- */
.cjs-cart-guarantee-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: var(--cjs-radius-sm);
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    margin-bottom: 10px;
}
.cjs-cart-guarantee-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(22,163,74,0.30);
}
.cjs-cart-guarantee-text { flex: 1 1 auto; min-width: 0; }
.cjs-cart-guarantee-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #14532d;
    letter-spacing: -0.005em;
    margin-bottom: 3px;
    line-height: 1.2;
}
.cjs-cart-guarantee-sub {
    font-size: 12px;
    color: #166534;
    line-height: 1.45;
}

/* ---------- Payment methods card (middle of trust column) ----------- */
.cjs-cart-payment-card {
    padding: 12px 16px 14px;
    background: var(--cjs-bg-card);
    border: 1px solid var(--cjs-border-soft);
    border-radius: var(--cjs-radius-sm);
    box-shadow: 0 1px 1px rgba(15,23,42,.03);
    margin-bottom: 10px;
}
.cjs-cart-payment-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--cjs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.cjs-cart-payment-icons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.cjs-cart-payment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #1a1d24;
    min-width: 36px;
    box-shadow: 0 1px 1px rgba(15,23,42,.04);
}
/* Brand-tinted variants — using only colour, not actual logo
   trademarks, so we stay safe legally while still feeling "real". */
.cjs-cart-payment-icon[data-method="visa"]       { color: #1a1f71; letter-spacing: 0.10em; font-style: italic; }
.cjs-cart-payment-icon[data-method="amex"]       { color: #006fcf; }
.cjs-cart-payment-icon[data-method="paypal"]     { color: #003087; font-style: italic; letter-spacing: 0.01em; }
.cjs-cart-payment-icon[data-method="apple"]      { color: #1a1d24; }
.cjs-cart-payment-icon[data-method="crypto"]     { color: #f7931a; }
/* Mastercard — two interlocking circles instead of text */
.cjs-cart-payment-icon[data-method="mastercard"] { padding: 0 6px; gap: 0; }
.cjs-mc-dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
}
.cjs-mc-dot-l { background: #eb001b; }
.cjs-mc-dot-r { background: #f79e1b; margin-left: -4px; mix-blend-mode: multiply; }

/* ---------- Mini trustpilot card (bottom of trust column) ------------ */
.cjs-cart-tp-mini-card {
    padding: 14px 16px;
    background: var(--cjs-bg-card);
    border: 1px solid var(--cjs-border-soft);
    border-radius: var(--cjs-radius-sm);
    box-shadow: 0 1px 1px rgba(15,23,42,.03);
}
.cjs-cart-tp-mini-headline {
    font-size: 12px;
    font-weight: 700;
    color: var(--cjs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
}
/* Hide whole trust column on narrow viewports — the wide trustpilot
   section below the cart form is the canonical mobile spot. */
@media (max-width: 1023px) {
    .about-page #cartForm tbody tr.cjs-cart-tp-mini-row {
        display: none;
    }
}

/* ---------- Trustpilot social-proof section (full-width, below cart) -- */
/* Mirrors the "What our customers say on Trustpilot" panel on the about
   page (templates/__custom/about-page.html). */
.cjs-cart-trustpilot-section {
    max-width: 1200px;
    margin: 28px auto 0;
    padding: 26px 28px 22px;
    background: var(--cjs-bg-card);
    border: 1px solid var(--cjs-border);
    border-radius: var(--cjs-radius);
    box-shadow: var(--cjs-shadow-sm);
    text-align: center;
}
.cjs-cart-tp-heading {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: var(--cjs-text);
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: -0.01em;
}
.cjs-cart-tp-icn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #00b67a;
}
.cjs-cart-tp-icn svg { width: 24px; height: 24px; }
.cjs-cart-tp-sub {
    margin: 0 auto 18px;
    max-width: 720px;
    font-size: 14px;
    color: var(--cjs-text-muted);
    line-height: 1.5;
}
.cjs-cart-trustpilot-section .trustpilot-widget {
    margin: 0 auto;
    max-width: 1100px;
}

/* ---------- Order summary card ---------------------------------------- */
/* The SubTotal rows + Proceed-to-Payment row are visually grouped into a
   single "summary card" via a wrapper drawn with ::before on the first
   SubTotal. We use container queries via flex/grid since the markup is
   a single table. Approach: bind the SubTotal rows together with a shared
   visual container by giving each a card-style background and removing
   spacing between them. The last (proceed) tr gets the bold CTA styling. */

.about-page #cartForm tbody tr.SubTotal {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    background: transparent;
    border: 0;
    margin: 0;
    padding: 6px 20px;
    font-size: 14px;
}
.about-page #cartForm tbody tr.SubTotal td {
    display: block;
    padding: 0;
    background: transparent !important;
    text-align: left !important;
    color: var(--cjs-text-muted);
    font-size: 14px;
    font-weight: 500;
}
.about-page #cartForm tbody tr.SubTotal td:first-child {
    text-align: left !important;
}
.about-page #cartForm tbody tr.SubTotal td:last-child {
    text-align: right !important;
    color: var(--cjs-text);
    font-weight: 700;
    font-size: 14px;
}
.about-page #cartForm tbody tr.SubTotal td em.ProductPrice {
    font-style: normal;
    font-weight: 700;
    color: var(--cjs-text);
}

/* First subtotal — divider line above (separates totals from items) and
   an "Order Summary" eyebrow label. */
.about-page #cartForm tbody tr.SubTotal.cjs-summary-first {
    border-top: 1px solid var(--cjs-border);
    border-radius: 0;
    padding-top: 14px;
    margin-top: 4px;
    background: transparent;
}

/* Grand total row — bold, slight separator above. */
.about-page #cartForm tbody tr.SubTotal.cjs-summary-grand {
    border-top: 1px solid var(--cjs-border-soft);
    margin-top: 4px;
    padding-top: 12px;
    padding-bottom: 14px;
}
.about-page #cartForm tbody tr.SubTotal.cjs-summary-grand td,
.about-page #cartForm tbody tr.SubTotal.cjs-summary-grand td:last-child {
    font-size: 17px;
    font-weight: 800;
    color: var(--cjs-text);
}
.about-page #cartForm tbody tr.SubTotal.cjs-summary-grand td:first-child {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 12.5px;
}
.about-page #cartForm tbody tr.SubTotal.cjs-summary-grand td em.ProductPrice {
    font-size: 20px;
    color: var(--cjs-brand);
}

/* ---------- final row: proceed to payment + paypal message ------------ */
.about-page #cartForm tbody tr.cjs-cart-checkout-row {
    display: block;
    background: var(--cjs-bg-soft);
    border: 0;
    border-top: 1px solid var(--cjs-border);
    border-radius: 0;
    padding: 18px 20px;
    box-shadow: none;
}
.about-page #cartForm tbody tr.cjs-cart-checkout-row td {
    display: block;
    width: 100%;
    padding: 0 !important;
    background: transparent !important;
    text-align: center !important;
}
.about-page #cartForm tbody tr.cjs-cart-checkout-row td[style*="display:none"],
.about-page #cartForm tbody tr.cjs-cart-checkout-row td[style*="display: none"] {
    display: none !important;
}
.about-page #cartForm tbody tr.cjs-cart-checkout-row .btn-success {
    display: block;
    width: 100% !important;
    padding: 16px 22px !important;
    background: var(--cjs-success) !important;
    background-image: linear-gradient(180deg, #25b262, var(--cjs-success)) !important;
    border: 0 !important;
    border-radius: var(--cjs-radius) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(31,157,85,.28);
    transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
    cursor: pointer;
}
.about-page #cartForm tbody tr.cjs-cart-checkout-row .btn-success::after {
    content: " →";
    display: inline-block;
    margin-left: 6px;
    font-weight: 700;
}
.about-page #cartForm tbody tr.cjs-cart-checkout-row .btn-success:hover {
    background-image: linear-gradient(180deg, var(--cjs-success), var(--cjs-success-dark)) !important;
    box-shadow: 0 6px 18px rgba(31,157,85,.35);
    transform: translateY(-1px);
}
.about-page #cartForm tbody tr.cjs-cart-checkout-row .btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(31,157,85,.25);
}

/* PayPal pay-later message under the CTA */
.about-page #cartForm tbody tr.cjs-cart-checkout-row [data-pp-message] {
    margin-top: 10px;
    text-align: left;
}

/* small reassurance line under the CTA, drawn via ::after on the row */
.about-page #cartForm tbody tr.cjs-cart-checkout-row::after {
    content: "🔒  Secure payment  ·  Instant key delivery  ·  100% guaranteed";
    display: block;
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--cjs-text-muted);
    text-align: center;
    letter-spacing: 0.02em;
}

/* ---------- KeepShopping / Trustpilot panel below ---------------------- */
.about-page .KeepShopping {
    float: none !important;
    margin: 22px 0 0;
    text-align: center;
}
.about-page .KeepShopping .trustpilot-widget {
    margin: 0 auto;
}

/* alternative checkout link (multiple addresses) */
.about-page .AlternativeCheckout {
    margin: 18px 0;
    text-align: center;
    color: var(--cjs-text-muted);
    font-size: 13px;
}
.about-page .AlternativeCheckout a {
    color: var(--cjs-text-muted);
    text-decoration: underline;
}
.about-page .AlternativeCheckout a:hover { color: var(--cjs-brand); }

/* empty cart state */
.about-page .InfoMessage {
    background: var(--cjs-bg-card);
    border: 1px dashed var(--cjs-border);
    border-radius: var(--cjs-radius);
    padding: 28px;
    text-align: center;
    font-size: 16px;
    color: var(--cjs-text);
    margin: 16px 0;
}

/* ---------- DESKTOP: side-by-side cart items + summary ---------------- */
@media (min-width: 1024px) {
    /* Keep header + breadcrumb + step strip + form table all within
       the same column boundary so nothing looks orphaned. */
    .about-page > .cjs-cart-breadcrumb,
    .about-page > .cjs-cart-header,
    .about-page > .cjs-checkout-steps,
    .about-page .col-md-12 > .cjs-cart-breadcrumb,
    .about-page .col-md-12 > .cjs-cart-header,
    .about-page .col-md-12 > .cjs-checkout-steps,
    .about-page .panel.panel-info,
    .about-page .cjs-cart-breadcrumb,
    .about-page .cjs-cart-header,
    .about-page .cjs-checkout-steps {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    .about-page #cartForm table.table {
        max-width: 1200px;
        margin: 0 auto;
    }
    /* Single-column desktop layout — items + totals + pay button all live
       inside one unified panel (the table itself). The trustpilot section
       is a separate full-width panel below the form.
       The mini trustpilot card sits absolutely-positioned at the LEFT of
       the totals strip; SubTotal rows are right-aligned to make room. */
    .about-page #cartForm table.table > tbody {
        display: block;
        position: relative;
    }

    /* Right-align summary rows so the LEFT half of the totals strip is free
       for the absolutely-positioned mini trustpilot card. */
    .about-page #cartForm tbody tr.SubTotal {
        max-width: 420px;
        margin-left: auto;
        margin-right: 20px;
    }

    /* Trust column — absolutely positioned at the LEFT of the order
       summary, top-aligned with the upsell card on the right via JS
       (see CartContent.html — the alignTrustColumn() function sets
       inline `top:` to match the upsell row's offset, so they line
       up regardless of how many items are in the cart). The CSS
       starts the column at top:0 as a fallback for non-JS users. */
    .about-page #cartForm tbody tr.cjs-cart-tp-mini-row {
        position: absolute;
        left: 20px;
        top: 0;
        width: calc(50% - 40px);
        max-width: 420px;
        display: block;
        margin: 0;
        padding: 0;
    }
    .about-page #cartForm tbody tr.cjs-cart-tp-mini-row > td {
        display: block;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
    }

    /* Edge case: when the mystery-key upsell row is hidden (visitor
       already has a Random key in cart), the tbody is shorter, and
       the trustpilot's `bottom:180px` lands on top of cart items in
       small carts. Hide the trustpilot mini to match — the wide
       trustpilot section below the cart form still provides social
       proof. */
    .about-page #cartForm tbody:has(tr.cjs-mystery-upsell-row[style*="display: none"]) tr.cjs-cart-tp-mini-row,
    .about-page #cartForm tbody:has(tr.cjs-mystery-upsell-row[style*="display:none"])  tr.cjs-cart-tp-mini-row {
        display: none !important;
    }

    /* "Order Summary" eyebrow above the first SubTotal — now part of the
       unified panel, sitting on its own line above the totals strip. */
    .about-page #cartForm tbody tr.SubTotal.cjs-summary-first {
        position: relative;
        padding-top: 36px;
    }
    .about-page #cartForm tbody tr.SubTotal.cjs-summary-first::before {
        content: "Order Summary";
        position: absolute;
        top: 14px;
        left: 20px;
        right: 20px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--cjs-text-muted);
    }
}

/* ---------- MOBILE: stacked card layout (<=768px) --------------------- */
@media (max-width: 768px) {
    .cjs-cart-title { font-size: 22px; }
    .cjs-cart-header-trust { width: 100%; }
    .cjs-trust-pill { font-size: 11px; padding: 5px 9px; }

    .about-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* (the BlockContent flex-order rule that puts Trustpilot above
       "Customers Also Bought" now lives at the top of this file so it
       applies on desktop too.) */

    /* hide noisy bits on phones */
    .about-page .AlternativeCheckout,
    .about-page .WrappingOptions,
    .about-page .EstimateShippingLink,
    .about-page .EstimateShipping {
        display: none !important;
    }

    /* item rows: thumb top-left, name top-right; qty/remove right under
       name; unit price bottom-left; total bottom-right. Qty is on the
       right so the most-tappable controls sit by the user's thumb. */
    .about-page #cartForm tbody tr.cjs-cart-item {
        grid-template-columns: 80px minmax(0, 1fr);
        grid-template-areas:
            "thumb name"
            "thumb qty"
            "unit  total";
        align-items: start;
        gap: 6px 12px;
        padding: 10px;
    }
    .about-page #cartForm td.CartThumb { width: 80px !important; }
    .about-page #cartForm td.CartThumb img { width: 80px; height: 80px; max-height: 80px; }
    .about-page #cartForm td.ProductName { grid-area: name; }
    .about-page #cartForm td.ProductName a.cjs-cart-item-name,
    .about-page #cartForm td.ProductName > a { font-size: 14.5px; }

    .about-page #cartForm td.CartItemQuantity {
        grid-area: qty;
        text-align: right !important;
        padding: 4px 0 0;
        min-width: 0;
        border-top: 0;
        margin-top: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }
    .about-page #cartForm td.CartItemQuantity::before { content: none; }
    .about-page #cartForm td.CartItemQuantity select { height: 34px; width: 60px; }
    .about-page #cartForm td.CartItemQuantity .CartRemoveLink { margin-top: 0; }

    .about-page #cartForm td.CartItemIndividualPrice {
        grid-area: unit;
        text-align: left !important;
        padding: 8px 0 0;
        font-size: 12.5px;
        min-width: 0;
        border-top: 1px solid var(--cjs-border-soft);
        margin-top: 6px;
    }
    .about-page #cartForm td.CartItemTotalPrice {
        grid-area: total;
        text-align: right !important;
        padding: 8px 0 0;
        min-width: 0;
        align-self: end;
        border-top: 1px solid var(--cjs-border-soft);
        margin-top: 6px;
    }
    .about-page #cartForm td.CartItemTotalPrice em.ProductPrice { font-size: 17px; }

    /* summary becomes full-width below */
    .about-page #cartForm tbody tr.SubTotal { padding: 9px 14px; }
    .about-page #cartForm tbody tr:last-child { padding: 14px; }
    .about-page #cartForm tbody tr:last-child .btn-success {
        font-size: 15px !important;
        padding: 14px 18px !important;
    }
}

/* ---------- Very small phones (<=380px) ------------------------------- */
@media (max-width: 380px) {
    .about-page #cartForm tbody tr.cjs-cart-item {
        grid-template-columns: 64px minmax(0, 1fr);
        padding: 10px;
    }
    .about-page #cartForm td.CartThumb { width: 64px !important; }
    .about-page #cartForm td.CartThumb img { width: 64px; height: 64px; max-height: 64px; }
    .cjs-cart-title { font-size: 20px; }
}

/* ---------- coupon code form (kept hidden by default in CartContent) --- */
.about-page .CouponCode input[type="text"],
.about-page .CouponCode input[type="submit"] {
    height: 38px;
    border: 1px solid var(--cjs-border);
    border-radius: var(--cjs-radius-sm);
    padding: 0 12px;
    font-size: 14px;
}

/* ---------- screen-reader helper -------------------------------------- */
.cjs-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
