/* WithLoveNRegards — cart & checkout visual refresh.
   Simple, modern, brand #CC2121. CSS-only; no markup/field-name changes.
   Scoped under .checkout-page-wrapper / .cart-main-wrapper so nothing else is affected. */
/* Playfair import removed — site standardised on Roboto to match withlovenregards.com. */

/* ---- page canvas: light grey so white cards lift off it ---- */
.checkout-page-wrapper,
.cart-main-wrapper{ background:#f6f7f9; }
.checkout-page-wrapper .section-bg-color,
.cart-main-wrapper .section-bg-color{ background:transparent; padding:0; }

/* ===================== CHECKOUT ===================== */

/* numbered section headers — replace the solid red bars with a clean header + red accent */
.checkout-page-wrapper .checkout-billing-details-wrap h2{
    background:transparent !important;
    color:#1f1f1f !important;
    font-family:'Roboto',Arial,Helvetica,sans-serif;
    font-size:20px !important;
    font-weight:600 !important;
    padding:0 0 12px 0 !important;
    margin:0 0 18px 0 !important;
    border:0 !important;
    border-bottom:1px solid #ececec !important;
    border-radius:0 !important;
    display:flex; align-items:center; gap:10px;
}
.checkout-page-wrapper .checkout-billing-details-wrap h2::before{
    content:''; flex:0 0 6px; width:6px; height:22px;
    background:#CC2121; border-radius:3px;
}

/* wrap each form section as a soft card */
.checkout-page-wrapper .billing-form-wrap{
    background:#fff;
    border:1px solid #ededed;
    border-radius:14px;
    box-shadow:0 4px 22px rgba(0,0,0,.05);
    padding:24px 22px 8px;
    margin-bottom:24px;
}

/* inputs */
.checkout-page-wrapper .single-input-item{ margin-bottom:20px; }
.checkout-page-wrapper .single-input-item input,
.checkout-page-wrapper .single-input-item textarea,
.checkout-page-wrapper .single-input-item .nice-select{
    width:100% !important;
    border:1px solid #dcdce1 !important;
    border-radius:10px !important;
    padding:12px 14px !important;
    font-size:14px;
    background:#fff !important;
    transition:border-color .15s, box-shadow .15s;
}
.checkout-page-wrapper .single-input-item input:focus,
.checkout-page-wrapper .single-input-item textarea:focus{
    border-color:#CC2121 !important;
    box-shadow:0 0 0 3px rgba(204,33,33,.12);
    outline:none;
}
.checkout-page-wrapper .single-input-item .nice-select{
    height:auto !important; line-height:1.4; display:flex; align-items:center;
}
.checkout-page-wrapper .labeld{
    font-size:12px; font-weight:600; color:#777; margin-left:12px;
}

/* order summary card */
.checkout-page-wrapper .wlr-summary-card{
    border:1px solid #ededed !important;
    border-radius:16px !important;
    box-shadow:0 8px 30px rgba(0,0,0,.07) !important;
    padding:24px !important;
}
.checkout-page-wrapper .wlr-sec-title{
    background:transparent !important;
    color:#1f1f1f !important;
    font-family:'Roboto',Arial,Helvetica,sans-serif;
    font-size:19px !important; font-weight:600 !important;
    padding:0 0 14px 0 !important; margin:0 0 16px 0 !important;
    border:0 !important; border-bottom:1px solid #ececec !important; border-radius:0 !important;
}
.checkout-page-wrapper .wlr-totals .wlr-grand td{ color:#CC2121; }
.checkout-page-wrapper .wlr-coupon-box input{ border-radius:10px; padding:11px 12px; }
.checkout-page-wrapper .wlr-coupon-box button{ border-radius:10px; }

/* ===================== CART ===================== */

.cart-main-wrapper .cart-table table{
    border:0 !important;
    border-radius:14px; overflow:hidden;
    box-shadow:0 4px 22px rgba(0,0,0,.05);
    background:#fff; margin-bottom:0;
}
.cart-main-wrapper .cart-table table thead tr{ background:#fafafb; }
.cart-main-wrapper .cart-table table thead th{
    border:0 !important; border-bottom:1px solid #eee !important;
    color:#888 !important; text-transform:uppercase;
    font-size:11px; letter-spacing:.6px; font-weight:600; padding:15px 14px;
}
.cart-main-wrapper .cart-table table tbody td{
    border:0 !important; border-bottom:1px solid #f2f2f2 !important;
    vertical-align:middle; padding:16px 14px;
}
.cart-main-wrapper .cart-table table tbody tr:hover{ background:#fcfcfd; }
.cart-main-wrapper .cart-table img{ width:72px; border-radius:10px; }
.cart-main-wrapper .pro-title a{ color:#222; font-weight:600; }
.cart-main-wrapper .pro-remove a{ color:#CC2121; font-size:16px; }

/* totals card */
.cart-main-wrapper .cart-calculator-wrapper{
    background:#fff; border:1px solid #ededed; border-radius:16px;
    box-shadow:0 8px 30px rgba(0,0,0,.07); padding:24px;
}
.cart-main-wrapper .cart-calculate-items h3{
    font-family:'Roboto',Arial,Helvetica,sans-serif;
    font-size:19px; font-weight:600; color:#1f1f1f;
    padding-bottom:12px; border-bottom:1px solid #ececec; margin-bottom:6px;
}
.cart-main-wrapper .cart-calculate-items .table td{ border:0; padding:9px 0; font-size:14px; color:#555; }
.cart-main-wrapper .cart-calculate-items .table .total td{
    font-size:18px; font-weight:700; color:#CC2121;
    border-top:2px solid #eee; padding-top:13px;
}

/* coupon + update row */
.cart-main-wrapper #coupon{ border:1px solid #dcdce1; border-radius:10px; padding:12px 14px; }
.cart-main-wrapper .cart-update-option{ margin-top:20px; }

/* ===================== shared buttons ===================== */
.checkout-page-wrapper .btn__bg,
.cart-main-wrapper .btn__bg{
    background:#CC2121 !important; color:#fff !important; border:0 !important;
    border-radius:8px !important; font-weight:600 !important; letter-spacing:.3px;
    padding:13px 20px !important;
    box-shadow:none !important;
    transform:none !important;
}
/* "Continue shopping" (href="/") is a quiet outline button */
.cart-main-wrapper a.btn__bg[href="/"]{
    background:#fff !important; color:#CC2121 !important;
    border:1px solid #CC2121 !important; box-shadow:none !important;
}

/* ===================================================================
   Phone layout (2026-09-20)
   The cart's item list is a 5-column <table> with white-space:nowrap
   inside .table-responsive, so on a phone it could only be read by
   scrolling it sideways. Below 768px each row becomes a stacked card
   instead. (cart/index.php also carries a .mobilecart block for this,
   but it is inline style="display:none" at every width — dead code, so
   the real table is what gets fixed here rather than resurrecting it.)
   =================================================================== */
@media (max-width: 767.98px) {

    /* Kill the sideways scroll container itself. */
    .cart-main-wrapper .cart-table.table-responsive,
    .cart-main-wrapper .cart-calculate-items .table-responsive {
        overflow-x: visible;
        width: 100%;
    }

    .cart-main-wrapper .cart-table .table {
        white-space: normal;   /* theme sets nowrap, which forces the overflow */
        border: 0;
        margin: 0;
    }

    /* Column headings mean nothing once rows are cards. Kept in the
       accessibility tree rather than display:none for screen readers. */
    .cart-main-wrapper .cart-table .table thead {
        position: absolute;
        width: 1px; height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .cart-main-wrapper .cart-table .table tbody,
    .cart-main-wrapper .cart-table .table tr,
    .cart-main-wrapper .cart-table .table td { display: block; width: auto; }

    .cart-main-wrapper .cart-table .table tr {
        display: grid;
        grid-template-columns: 86px 1fr auto;
        grid-template-areas:
            "img title title"
            "img qty   total"
            "img del   del";
        gap: 6px 12px;
        align-items: center;
        margin: 0 0 12px;
        padding: 12px;
        border: 1px solid #e8e8e8;
        border-radius: 10px;
        background: #fff;
    }

    .cart-main-wrapper .cart-table .table td {
        border: 0 !important;
        padding: 0;
        text-align: left;
        vertical-align: middle;
    }

    .cart-main-wrapper .cart-table .table td.pro-thumbnail { grid-area: img; }
    .cart-main-wrapper .cart-table .table td.pro-thumbnail img {
        width: 86px; height: 86px;
        object-fit: cover;
        border-radius: 8px;
    }
    .cart-main-wrapper .cart-table .table td.pro-title { grid-area: title; }
    .cart-main-wrapper .cart-table .table td.pro-title a {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.35;
        /* long product names must wrap, not widen the grid */
        overflow-wrap: anywhere;
    }
    .cart-main-wrapper .cart-table .table td.pro-quantity { grid-area: qty; }
    .cart-main-wrapper .cart-table .table td.pro-subtotal {
        grid-area: total;
        justify-self: end;
        font-weight: 700;
        white-space: nowrap;
    }
    .cart-main-wrapper .cart-table .table td.pro-remove { grid-area: del; }

    /* Cart totals: two plain columns, label left / value right. */
    .cart-main-wrapper .cart-calculate-items .table { width: 100%; table-layout: fixed; }
    .cart-main-wrapper .cart-calculate-items .table td { overflow-wrap: anywhere; }
    .cart-main-wrapper .cart-calculate-items .table td + td { text-align: right; white-space: nowrap; }

    /* --- Cart actions stack full width -------------------------------
       Both buttons now live in .cart-calculator-wrapper (cart/index.php),
       primary first: Proceed to Checkout, then Continue shopping. Both
       become full-width 48px targets; the solid red primary vs. the
       outline secondary (set further up this file) is what separates
       them. */
    .cart-main-wrapper .cart-update-option { display: block; }
    .cart-main-wrapper .cart-calculator-wrapper a.btn__bg {
        display: block;
        width: 100%;
        text-align: center;
        min-height: 48px;
        line-height: 32px;
    }

    /* --- Checkout order summary --------------------------------------
       .wlr-sum-meta is flex:1 with no min-width, so a long product name
       next to a white-space:nowrap price could push the row wider than
       the card. min-width:0 lets it shrink and wrap instead. */
    .checkout-page-wrapper .wlr-sum-item { flex-wrap: wrap; }
    .checkout-page-wrapper .wlr-sum-item .wlr-sum-meta {
        min-width: 0;
        flex: 1 1 auto;
        overflow-wrap: anywhere;
    }
    .checkout-page-wrapper .wlr-sum-item .wlr-sum-price {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .checkout-page-wrapper .wlr-totals { width: 100%; table-layout: fixed; }
    .checkout-page-wrapper .wlr-totals td { overflow-wrap: anywhere; }
    .checkout-page-wrapper .wlr-totals td + td { text-align: right; white-space: nowrap; }

    /* Any remaining checkout table reads top-to-bottom, never sideways. */
    .checkout-page-wrapper .order-summary-table .table { width: 100%; table-layout: fixed; }
    .checkout-page-wrapper .table-responsive { overflow-x: visible; }
}

/* Continue shopping now sits directly under Proceed to Checkout inside
   .cart-calculator-wrapper (all breakpoints), so it needs its own breathing
   room — it used to get spacing from .cart-update-option in the left column. */
.cart-main-wrapper .cart-calculator-wrapper .cart-update { margin-top: 10px; }

/* ===================================================================
   "Your Cart" block above the checkout form (2026-09-20)
   =================================================================== */
.checkout-page-wrapper .wlr-cart-top{
    background:#fff;
    border:1px solid #ededed;
    border-radius:14px;
    box-shadow:0 4px 22px rgba(0,0,0,.05);
    padding:18px 20px;
    margin-bottom:24px;
}
.checkout-page-wrapper .wlr-cart-top-head{
    display:flex; align-items:center; gap:10px;
    padding-bottom:12px; margin-bottom:6px;
    border-bottom:1px solid #ececec;
}
.checkout-page-wrapper .wlr-cart-top-head h2{
    background:transparent !important; color:#1f1f1f !important;
    font-size:19px !important; font-weight:600 !important;
    margin:0 !important; padding:0 !important; border:0 !important;
    display:flex; align-items:center; gap:10px;
}
.checkout-page-wrapper .wlr-cart-top-head h2::before{
    content:''; flex:0 0 6px; width:6px; height:20px;
    background:#CC2121; border-radius:3px;
}
.checkout-page-wrapper .wlr-cart-count{
    font-size:12.5px; color:#8a8a8a; font-weight:500;
}
.checkout-page-wrapper .wlr-cart-edit{
    margin-left:auto; font-size:13px; font-weight:600; color:#CC2121;
}
.checkout-page-wrapper .wlr-cart-top-foot{
    display:flex; align-items:center; gap:8px;
    padding-top:12px; margin-top:6px;
    border-top:1px solid #ececec;
    font-size:14px;
}
.checkout-page-wrapper .wlr-cart-top-foot strong{ margin-left:auto; font-size:16px; }

/* ===================================================================
   Phone type scale for checkout (2026-09-20)
   The page read as a desktop layout shrunk down: 20px section headers,
   24px card padding and 14px inputs. The inputs were the worst of it —
   anything under 16px makes iOS Safari zoom the viewport on focus, so
   every tap on a field jumped the page. Inputs are therefore pinned at
   16px (NOT reduced) while the surrounding chrome shrinks.
   =================================================================== */
@media (max-width: 767.98px) {
    .checkout-page-wrapper .wlr-cart-top{ padding:14px 14px; border-radius:12px; margin-bottom:16px; }
    .checkout-page-wrapper .wlr-cart-top-head h2{ font-size:16px !important; }
    .checkout-page-wrapper .wlr-cart-top-head h2::before{ height:17px; }
    .checkout-page-wrapper .wlr-cart-count{ font-size:11.5px; }
    .checkout-page-wrapper .wlr-cart-top-foot{ font-size:13px; }
    .checkout-page-wrapper .wlr-cart-top-foot strong{ font-size:15px; }

    /* section headers + cards */
    .checkout-page-wrapper .checkout-billing-details-wrap h2,
    .checkout-page-wrapper .wlr-sec-title{
        font-size:16px !important;
        padding-bottom:10px !important;
        margin-bottom:14px !important;
    }
    .checkout-page-wrapper .checkout-billing-details-wrap h2::before{ height:18px; }
    .checkout-page-wrapper .billing-form-wrap{
        padding:16px 14px 4px !important;
        border-radius:12px !important;
        margin-bottom:16px !important;
    }
    .checkout-page-wrapper .wlr-summary-card{ padding:16px 14px !important; border-radius:12px !important; }

    /* fields: 16px is load-bearing (iOS focus zoom), only the box shrinks */
    .checkout-page-wrapper .single-input-item{ margin-bottom:14px; }
    .checkout-page-wrapper .single-input-item input,
    .checkout-page-wrapper .single-input-item textarea,
    .checkout-page-wrapper .single-input-item select,
    .checkout-page-wrapper .single-input-item .nice-select{
        font-size:16px !important;
        padding:11px 12px !important;
    }
    .checkout-page-wrapper .labeld{ font-size:11px; margin-left:10px; }

    /* delivery option rows */
    .checkout-page-wrapper .wlr-delivery-opts{ margin:14px 0; }
    .checkout-page-wrapper .wlr-delivery-opt{ padding:11px 12px; gap:10px; }
    .checkout-page-wrapper .wlr-do-name{ font-size:13.5px; }
    .checkout-page-wrapper .wlr-do-desc{ font-size:11px; }
    .checkout-page-wrapper .wlr-do-price{ font-size:13.5px; }
    .checkout-page-wrapper .wlr-do-time{ padding-left:42px; }

    /* totals + pay */
    .checkout-page-wrapper .wlr-totals td{ font-size:13.5px; }
    .checkout-page-wrapper .wlr-totals .wlr-grand{ font-size:16px; }
    .checkout-page-wrapper .summary-footer-area label{ font-size:12.5px; line-height:1.4; }
    .checkout-page-wrapper .payment-method-name label{ font-size:12.5px; line-height:1.4; }
    .checkout-page-wrapper .summary-footer-area .btn__bg{
        width:100%; min-height:50px; font-size:15px !important;
    }
}

/* Cart-block item rows: keep image | details | price on one line and give the
   product name the site's ink colour instead of the browser's default link
   blue (the generic .wlr-sum-item wrap rule above is for the old right-hand
   card, where the price genuinely needed to drop to its own line). */
.checkout-page-wrapper .wlr-cart-top .wlr-sum-meta a{
    color:#222; font-weight:600; text-decoration:none;
}
.checkout-page-wrapper .wlr-cart-top .wlr-sum-meta a:hover{ color:#CC2121; }
@media (max-width: 767.98px) {
    .checkout-page-wrapper .wlr-cart-top .wlr-sum-item{
        flex-wrap:nowrap;
        align-items:flex-start;
        gap:10px;
        padding:10px 0;
    }
    .checkout-page-wrapper .wlr-cart-top .wlr-sum-item img{
        width:48px; height:48px; flex:0 0 48px;
    }
    .checkout-page-wrapper .wlr-cart-top .wlr-sum-meta{
        min-width:0; font-size:12.5px; line-height:1.35;
    }
    .checkout-page-wrapper .wlr-cart-top .wlr-sum-price{
        flex:0 0 auto; margin-left:0; align-self:center; font-size:13px;
    }
    .checkout-page-wrapper .wlr-cart-top .wlr-date{ font-size:10.5px; margin-top:2px; }
}

/* Cart-page text fields also need >=16px on touch: the coupon box and the
   quantity field both computed to 14px, so tapping either zoomed the viewport
   in on iOS and left the page scrolled sideways. (The checkout radio/checkbox
   inputs sit at 14px too but are deliberately left alone — iOS only zooms for
   text-entry controls, never for radios or checkboxes.) */
@media (max-width: 767.98px) {
    .cart-main-wrapper #coupon,
    .cart-main-wrapper input[type="text"],
    .cart-main-wrapper .cart-qty {
        font-size: 16px !important;
    }
    .cart-main-wrapper #coupon { padding: 11px 12px !important; }
}

/* ===================================================================
   Cart page header + phone type scale (2026-09-20)
   The cart page had no heading at all — it opened straight into the
   item table. This mirrors the "Your Cart" card added to the checkout
   so the two pages read as one flow rather than two different sites.
   =================================================================== */
.cart-main-wrapper .wlr-cart-head{
    display:flex;
    align-items:center;
    gap:10px;
    margin:0 0 20px;
    padding-bottom:14px;
    border-bottom:1px solid #e6e6e6;
}
.cart-main-wrapper .wlr-cart-head h2{
    display:flex;
    align-items:center;
    gap:10px;
    margin:0;
    font-size:22px;
    font-weight:600;
    color:#1f1f1f;
}
.cart-main-wrapper .wlr-cart-head h2::before{
    content:'';
    flex:0 0 6px;
    width:6px; height:24px;
    background:#CC2121;
    border-radius:3px;
}
.cart-main-wrapper .wlr-cart-count{
    font-size:13px; color:#8a8a8a; font-weight:500;
}

@media (max-width: 767.98px) {
    .cart-main-wrapper .wlr-cart-head{ margin-bottom:14px; padding-bottom:10px; }
    .cart-main-wrapper .wlr-cart-head h2{ font-size:17px; }
    .cart-main-wrapper .wlr-cart-head h2::before{ height:18px; }
    .cart-main-wrapper .wlr-cart-count{ font-size:11.5px; }

    /* Match the checkout's card padding/type scale so the two pages feel
       like one flow instead of a desktop layout shrunk down. */
    .cart-main-wrapper .cart-calculator-wrapper{
        padding:16px 14px !important;
        border-radius:12px !important;
        margin-top:16px;
    }
    .cart-main-wrapper .cart-calculate-items h3{
        font-size:16px !important;
        padding-bottom:10px !important;
        margin-bottom:8px !important;
    }
    .cart-main-wrapper .cart-calculate-items .table td{ font-size:13.5px !important; padding:8px 0 !important; }
    .cart-main-wrapper .cart-calculate-items .table .total td{ font-size:16px !important; }
    .cart-main-wrapper .cart-update-option{ margin-top:14px !important; }
    .cart-main-wrapper .apply-coupon-wrapper p{ font-size:12.5px; line-height:1.45; }

    /* Item cards: tighten to match the checkout summary rows. */
    .cart-main-wrapper .cart-table .table tr{ padding:10px !important; margin-bottom:10px !important; }
    .cart-main-wrapper .cart-table .table td.pro-title a{ font-size:13.5px !important; }
    .cart-main-wrapper .cart-table .table td.pro-subtotal{ font-size:14px; }
}
