/* ==========================================================================
   ByteLink client theme (loaded last, after store.css and bytelink.css).

   Client-approved palette — every value below is an admin setting (Settings > Theme & Colours),
   printed as CSS variables in layouts/app.blade.php. Nothing here hard-codes a palette colour
   except as a fallback, so one change in the admin re-themes the whole storefront.

     --division-isp-networking       Midnight Blue     #172A46   ISP & Networking identity
     --division-electronics-gadgets  Burnt Terracotta  #B65E3C   Electronics & Gadgets identity
     --bg                            Warm Ivory        #F6F1E8   page background
     --card                          Soft Ivory        #FFFCF6   cards, panels, product surfaces
     --cta                           Deep Graphite     #252B33   primary buttons (ivory text)
     --highlight                     Champagne Bronze  #C6A77A   borders, hover accents, light effects

   Feature switches are body classes set from Settings (logo-card, img-shape-*, fx-cta, fx-cart,
   fx-checkout, fx-hover). All motion is removed for visitors who prefer reduced motion.
   ========================================================================== */

:root {
    --bg: #F6F1E8;
    --card: #FFFCF6;
    --cta: #252B33;
    --cta-rgb: 37, 43, 51;
    --highlight: #C6A77A;
    --highlight-rgb: 198, 167, 122;
    --ivory-text: #FFFCF6;

    /* Warm neutrals that sit with ivory (replace the cool greys of bytelink.css). */
    --section: #EFE7DA;
    --cream: var(--card);
    --surface: #F1EADF;
    --text: #2A2F37;
    --muted: #66625A;             /* 5.3:1 on Warm Ivory */
    --border: #E7DCCB;
    --border-strong: #D9CAB2;
    --shadow-sm: 0 1px 2px rgba(37, 43, 51, .05), 0 2px 6px rgba(37, 43, 51, .05);
    --shadow: 0 18px 40px -24px rgba(37, 43, 51, .30);
    --shadow-lg: 0 32px 64px -30px rgba(37, 43, 51, .36);
    --shadow-brand: 0 16px 30px -16px rgba(var(--cta-rgb), .55);
    --grad-warm: linear-gradient(135deg, var(--card) 0%, var(--bg) 100%);

    --bs-body-bg: var(--bg);
    --bs-border-color: var(--border);
}
@supports (color: color-mix(in srgb, red, blue)) {
    :root {
        --section: color-mix(in srgb, var(--bg) 88%, var(--highlight));
        --surface: color-mix(in srgb, var(--bg) 94%, var(--highlight));
        --border: color-mix(in srgb, var(--highlight) 30%, var(--card));
        --border-strong: color-mix(in srgb, var(--highlight) 48%, var(--card));
        --cta-hover: color-mix(in srgb, var(--cta) 78%, #000);
    }
}

body { background: var(--bg); color: var(--text); }
.bg-surface, .bg-soft { background: var(--section); }

/* ---------- Primary CTA: Deep Graphite with ivory text (no blue/orange gradients) ---------- */
.btn-primary, .btn-brand, .btn-cta {
    --bs-btn-bg: var(--cta); --bs-btn-hover-bg: var(--cta-hover, #15191e); --bs-btn-active-bg: var(--cta-hover, #15191e); --bs-btn-disabled-bg: var(--cta);
    --bs-btn-color: var(--ivory-text); --bs-btn-hover-color: var(--ivory-text); --bs-btn-active-color: var(--ivory-text); --bs-btn-disabled-color: var(--ivory-text);
    --bs-btn-focus-shadow-rgb: var(--highlight-rgb);
    background-image: none; text-shadow: none;
    box-shadow: 0 10px 22px -14px rgba(var(--cta-rgb), .9);
}
.btn-primary:hover, .btn-brand:hover, .btn-cta:hover { box-shadow: 0 0 0 1px rgba(var(--highlight-rgb), .55), 0 14px 26px -14px rgba(var(--cta-rgb), .9); }
.header-search .search-btn { background: var(--cta); color: var(--ivory-text); }
.header-search .search-btn:hover { background: var(--cta-hover, #15191e); }
.product-card .btn-add { color: var(--cta); border-color: var(--cta); background: transparent; }
.product-card .btn-add:hover { background: var(--cta); color: var(--ivory-text); }
.product-card .btn-buy { background: var(--cta); border-color: var(--cta); color: var(--ivory-text); box-shadow: 0 8px 16px -12px rgba(var(--cta-rgb), .9); }
.product-card .btn-buy:hover { background: var(--cta-hover, #15191e); border-color: var(--cta-hover, #15191e); color: var(--ivory-text); }
.back-to-top, .back-to-top:hover { background: var(--cta); box-shadow: var(--shadow-brand); }
.cart-action > i { background: var(--cta); color: var(--ivory-text); box-shadow: 0 10px 20px -12px rgba(var(--cta-rgb), .9); }
.header-action .count { border-color: var(--card); }
.cart-action .count { background: var(--division-electronics-gadgets, #B65E3C); }
:focus-visible { outline-color: var(--highlight); }

/* Bronze replaces the blue→orange gradient rules used as decorative accents. */
.category-nav .nav-link::after, .category-card::after { background: var(--highlight); }
.site-footer::before { background: linear-gradient(90deg, var(--division-isp-networking, #172A46) 0 50%, var(--division-electronics-gadgets, #B65E3C) 50% 100%); height: 3px; }
.site-footer { background: var(--section); }
.mega-panel { border-top-color: var(--highlight); }
.category-nav .deals-link { background: var(--division-electronics-gadgets, #B65E3C); box-shadow: none; }

/* ---------- Header surfaces ---------- */
.site-header, .category-nav { background: var(--card); }
.site-header.scrolled { box-shadow: 0 14px 30px -24px rgba(var(--cta-rgb), .45); }
.header-search .form-control { background: var(--bg); border-color: var(--border); }
.announcement { background: var(--cta); }

/* ---------- ByteLink logo presentation (reference: clean card, soft offset shadow) ----------
   The genuine logo file is never recoloured, stretched or cropped: object-fit keeps its proportions. */
.brand-logo img { object-fit: contain; }
.logo-card .brand-logo {
    background: #fff; border-radius: 14px; padding: .45rem .85rem;
    border: 1px solid rgba(var(--highlight-rgb), .28);
    box-shadow: 3px 4px 10px -2px rgba(23, 42, 70, .18), 0 1px 2px rgba(23, 42, 70, .06);
    transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.logo-card .brand-logo:hover { transform: translate(-1px, -1px); box-shadow: 5px 6px 14px -2px rgba(23, 42, 70, .22), 0 1px 2px rgba(23, 42, 70, .06); }
.logo-card .brand-logo img { height: 42px; }
.logo-card .offcanvas-menu .offcanvas-header .brand-logo img { height: 34px; }
.logo-card .site-footer .brand-logo { display: inline-flex; }
.logo-card .site-footer .brand-logo img { height: 48px; }
@media (max-width: 575.98px) {
    .logo-card .brand-logo { padding: .32rem .6rem; border-radius: 11px; }
    .logo-card .site-header .brand-logo img { height: 30px; }
}

/* ---------- Desktop navigation ---------- */
.division-nav > .nav-link { color: var(--div); }
.division-nav > .nav-link::after { background: var(--div) !important; }
.category-nav .more-nav > .dropdown-menu { left: auto; right: 0; }
.mega-menu .dropdown-item.active, .mega-menu .dropdown-item:active { background: rgba(var(--highlight-rgb), .18); color: var(--text); }
.mega-menu .dropdown-item:hover, .mega-menu .dropdown-item:focus { background: rgba(var(--highlight-rgb), .14); color: var(--text); }
.mega-division__head { border-bottom: 2px solid color-mix(in srgb, var(--div) 22%, transparent); margin-bottom: .75rem; }
.mega-title { font-size: .95rem; font-weight: 800; }
.mega-title i { background: color-mix(in srgb, var(--div, var(--brand)) 10%, transparent); color: var(--div, var(--brand-ink)); }
.mega-link { font-size: .82rem; color: var(--muted); padding-left: 2.6rem; }
.mega-division .mega-title:hover, .mega-division .mega-link:hover { color: var(--div); }

/* ---------- Mobile menu ----------
   The offcanvas header (logo + close) stays fixed; only .offcanvas-body scrolls. */
.offcanvas-menu { background: var(--card); width: min(360px, 88vw); }
.offcanvas-menu .offcanvas-header { flex-shrink: 0; background: var(--card); padding: .75rem 1rem; }
.offcanvas-menu .offcanvas-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.offcanvas-menu .menu-link:hover, .offcanvas-menu .menu-link[aria-expanded="true"], .offcanvas-menu .menu-link.is-active { background: var(--section); }
.m-division { --div: var(--brand); margin-top: .75rem; }
.m-division__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .9rem; margin: 0 .25rem .25rem;
    border-radius: 10px; background: var(--div); color: var(--ivory-text); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.m-division__head a { color: var(--ivory-text); opacity: .85; font-size: .72rem; letter-spacing: .02em; text-transform: none; font-weight: 600; text-decoration: none; }
.m-division__head a:hover { opacity: 1; color: var(--ivory-text); }
.offcanvas-menu .m-parent { font-size: 1rem; font-weight: 700; color: var(--text); }
.offcanvas-menu .m-parent .m-icon { color: var(--div); }
.offcanvas-menu .sub-links { border-left: 2px solid color-mix(in srgb, var(--div) 35%, transparent); margin: .1rem 0 .4rem 1.75rem; padding-left: .25rem; }
.offcanvas-menu .sub-links a { display: block; padding: .5rem .85rem; font-size: .86rem; font-weight: 500; color: var(--muted); min-height: 40px; }
.offcanvas-menu .sub-links a.fw-600 { color: var(--div); font-weight: 600; }
.offcanvas-menu .sub-links a:hover { color: var(--div); }
.offcanvas-menu .collapsing { transition: height .28s var(--ease-out); }

/* Mobile header row: hamburger | logo | actions aligned on one line. */
@media (max-width: 991.98px) {
    .header-main { gap: .5rem; }
    .header-main .brand-logo { margin-right: auto; }
}
.mobile-bottom-nav { background: var(--card); }

/* ---------- Image presentation ----------
   Shapes come from Settings > Theme > Product image shape. Product photos are shown in full
   (object-fit: contain) inside the shape; multiply blending melts white photo backgrounds into the
   ivory surface, so there are no white boxes or halos around products. */
body { --shape-r: 18px; --shape-ratio: 1; --shape-fit: contain; }
.img-shape-rounded-rect { --shape-r: 16px; --shape-ratio: 4 / 3; }
.img-shape-rect { --shape-r: 4px; --shape-ratio: 1; }
/* Circle/oval fill the shape (centred) so the frame never shows an empty square inside a circle. */
.img-shape-circle { --shape-r: 50%; --shape-ratio: 1; --shape-fit: cover; }
.img-shape-oval { --shape-r: 50%; --shape-ratio: 4 / 3; --shape-fit: cover; }

.product-card { background: var(--card); border-color: var(--border); }
.product-card .media { aspect-ratio: var(--shape-ratio); border-radius: var(--shape-r); margin: .6rem .6rem 0; isolation: isolate;
    background: radial-gradient(ellipse at 50% 40%, #fff 0%, color-mix(in srgb, var(--card) 70%, var(--section)) 100%); }
.product-card .media-link { mix-blend-mode: multiply; }
.product-card .media img { object-fit: var(--shape-fit); }
.product-card .badges, .product-card .actions { z-index: 2; }

.category-card .thumb { border-radius: var(--shape-r); aspect-ratio: var(--shape-ratio); isolation: isolate;
    background: radial-gradient(ellipse at 50% 40%, #fff 0%, var(--section) 100%); }
.category-card .thumb img { object-fit: var(--shape-fit); mix-blend-mode: multiply; }
.category-card .thumb.no-image { background: radial-gradient(ellipse at 50% 40%, #fff 0%, var(--section) 100%); }
.category-card .thumb.no-image i { color: var(--text); }
.division-cat__img { border-radius: var(--shape-r); background: var(--section); }
.division-cat__img img { object-fit: contain; mix-blend-mode: multiply; }

/* Hover lift can be switched off (Settings > Animations). */
body:not(.fx-hover) .product-card:hover, body:not(.fx-hover) .category-card:hover, body:not(.fx-hover) .division-card:hover { transform: none !important; }

/* ---------- Homepage: "Two stores. One trusted ByteLink." division cards ---------- */
.division-card { --div: var(--brand); --div-rgb: var(--brand-rgb); position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    height: 100%; min-height: 330px; border-radius: 24px; overflow: hidden; background: var(--card);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s; }
.division-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--div); }
.division-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(var(--highlight-rgb), .7); }
.division-card__body { display: flex; flex-direction: column; gap: .7rem; padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.5vw, 2rem) clamp(1.5rem, 3vw, 2.25rem) clamp(1.6rem, 3vw, 2.4rem); min-width: 0; }
.division-card__eyebrow { display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--div); padding: .32rem .75rem; border-radius: 999px; background: rgba(var(--div-rgb), .08); border: 1px solid rgba(var(--div-rgb), .16); }
.division-card__title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.15; margin: .1rem 0 0; overflow-wrap: break-word; }
.division-card__title a { color: var(--div); text-decoration: none; }
.division-card__text { margin: 0; color: var(--muted); font-size: .95rem; max-width: 38ch; }
.division-card__cats { list-style: none; padding: 0; margin: .25rem 0 .5rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.division-card__cats a { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 500; color: var(--text); text-decoration: none;
    padding: .34rem .7rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); transition: border-color .2s, color .2s, background .2s; }
.division-card__cats a i { color: var(--div); }
.division-card__cats a:hover { border-color: var(--div); color: var(--div); background: var(--card); }
.division-card__cta { align-self: flex-start; margin-top: auto; display: inline-flex; white-space: nowrap; max-width: 100%; align-items: center; gap: .55rem; padding: .72rem 1.3rem; border-radius: 999px;
    background: var(--div); color: var(--ivory-text); font-weight: 700; border: 0; box-shadow: 0 12px 22px -14px rgba(var(--div-rgb), .9); }
.division-card__cta:hover, .division-card__cta:focus-visible { background: var(--div); color: var(--ivory-text); box-shadow: 0 0 0 2px rgba(var(--highlight-rgb), .65), 0 14px 24px -14px rgba(var(--div-rgb), .9); }
.division-card__cta i { transition: transform .3s var(--ease-out); }
.division-card__cta:hover i { transform: translateX(3px); }

/* Product stage: soft division tint with the photos in clean shaped frames (Settings > Theme > image shape).
   Photos are clipped by the frame (no white borders/halos) and carry one natural shadow. */
.division-card__media { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: .9rem; align-content: center; align-items: center;
    padding: clamp(1.1rem, 2.5vw, 1.75rem); min-width: 0;
    background: radial-gradient(ellipse 90% 80% at 55% 45%, color-mix(in srgb, var(--div) 4%, var(--card)) 0%, color-mix(in srgb, var(--div) 11%, var(--card)) 100%); }
.division-card__item { position: relative; display: block; aspect-ratio: var(--shape-ratio); border-radius: var(--shape-r); overflow: hidden; background: #fff;
    box-shadow: 0 16px 28px -20px rgba(var(--cta-rgb), .6), 0 2px 6px -3px rgba(var(--cta-rgb), .18); transition: transform .5s var(--ease-out); }
.division-card__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.division-card__item.i-0 { grid-row: span 2; }
.division-card:hover .division-card__item.i-0 { transform: translateY(-4px); }
@media (max-width: 575.98px) {
    .division-card { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .division-card__media { order: -1; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); padding: 1rem 1rem 1rem 1.35rem; }
    .division-card__cta { align-self: stretch; justify-content: center; }
}
/* Division tabs / hero / banner use the palette. */
.division-tabs .nav-link { background: var(--card); }
.division-hero { background: radial-gradient(90% 120% at 100% 0%, rgba(var(--div-rgb), .55) 0%, transparent 60%), linear-gradient(135deg, var(--cta) 0%, color-mix(in srgb, var(--cta) 80%, var(--div)) 100%); }
.division-hero__cta { background: var(--card); color: var(--cta); }
.division-hero__cta:hover { background: var(--highlight); color: var(--cta); }
.division-hero__points i { color: var(--highlight); filter: none; }

/* Homepage section backgrounds (Admin > Homepage Sections). */
.home-bg--ivory { background: var(--bg); }
.home-bg--surface { background: var(--card); }
.home-bg--bronze { background: color-mix(in srgb, var(--highlight) 14%, var(--bg)); }
.home-bg--isp { background: color-mix(in srgb, var(--division-isp-networking, #172A46) 6%, var(--bg)); }
.home-bg--electronics { background: color-mix(in srgb, var(--division-electronics-gadgets, #B65E3C) 7%, var(--bg)); }
.home-bg > .section.bg-surface { background: transparent; }


/* ---------- CTA light-flash (Settings > Animations): one smooth sweep per hover ---------- */
.fx-cta .btn-flash, .fx-cta .division-card__cta, .fx-cta .hero-cta, .fx-cta .btn-checkout { position: relative; overflow: hidden; isolation: isolate; }
.fx-cta .btn-flash::after, .fx-cta .division-card__cta::after, .fx-cta .hero-cta::after {
    content: ""; position: absolute; top: -10%; bottom: -10%; left: -75%; width: 45%; pointer-events: none; z-index: 1;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 250, 238, .12) 30%, rgba(255, 246, 225, .55) 50%, rgba(255, 250, 238, .12) 70%, transparent 100%);
    transform: skewX(-20deg); transition: left 0s;
}
.fx-cta .btn-flash:hover::after, .fx-cta .btn-flash:focus-visible::after,
.fx-cta .division-card__cta:hover::after, .fx-cta .division-card__cta:focus-visible::after,
.fx-cta .hero-cta:hover::after, .fx-cta .hero-cta:focus-visible::after { left: 135%; transition: left .85s var(--ease); }
body:not(.fx-cta) .hero-cta::after { display: none; }

/* ---------- Cart flare after a confirmed Add to Cart ---------- */
@keyframes cartFlareRing {
    0% { box-shadow: 0 0 0 0 rgba(var(--highlight-rgb), .75), 0 10px 20px -12px rgba(var(--cta-rgb), .9); }
    70% { box-shadow: 0 0 0 12px rgba(var(--highlight-rgb), 0), 0 10px 20px -12px rgba(var(--cta-rgb), .9); }
    100% { box-shadow: 0 0 0 0 rgba(var(--highlight-rgb), 0), 0 10px 20px -12px rgba(var(--cta-rgb), .9); }
}
@keyframes cartFlareBump { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.14) rotate(-6deg); } 60% { transform: scale(.97); } }
@keyframes cartFlareGlint { from { background-position: -140% 0; } to { background-position: 240% 0; } }
.fx-cart .cart-action.is-flaring > i {
    animation: cartFlareRing 1.1s var(--ease-out) 1, cartFlareBump .6s var(--spring) 1;
    background-image: linear-gradient(105deg, transparent 35%, rgba(255, 244, 220, .65) 50%, transparent 65%);
    background-size: 220% 100%; background-repeat: no-repeat; animation-name: cartFlareRing, cartFlareBump, cartFlareGlint; animation-duration: 1.1s, .6s, .8s;
}
.fx-cart .mobile-bottom-nav [data-cart-link].is-flaring > i { display: inline-block; animation: cartFlareBump .6s var(--spring) 1; color: var(--highlight); }

/* ---------- Checkout accent: a light that travels around the button's border ---------- */
@property --checkout-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes checkoutOrbit { to { --checkout-angle: 360deg; } }
.fx-checkout .btn-checkout.is-accent {
    border: 2px solid transparent;
    background: linear-gradient(var(--cta), var(--cta)) padding-box,
                conic-gradient(from var(--checkout-angle), transparent 0 62%, rgba(var(--highlight-rgb), .35) 74%, var(--highlight) 86%, #fff5e0 90%, transparent 100%) border-box;
    animation: checkoutOrbit 2.6s linear 3;
}
.fx-checkout .btn-checkout.is-accent:hover { background: linear-gradient(var(--cta-hover, #15191e), var(--cta-hover, #15191e)) padding-box, linear-gradient(var(--highlight), var(--highlight)) border-box; }

/* ---------- Floating "Chat with us" widget ---------- */
.back-to-top { right: auto; left: 1.25rem; }
.chat-widget { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1035; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.chat-fab { display: inline-flex; align-items: center; gap: .55rem; height: 52px; padding: 0 1.15rem 0 .95rem; border: 0; border-radius: 999px;
    background: var(--cta); color: var(--ivory-text); font-weight: 700; font-size: .92rem;
    box-shadow: 0 0 0 1px rgba(var(--highlight-rgb), .45), 0 14px 30px -12px rgba(var(--cta-rgb), .75); transition: transform .25s var(--ease-out), box-shadow .25s; }
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px rgba(var(--highlight-rgb), .7), 0 18px 34px -12px rgba(var(--cta-rgb), .8); }
.chat-fab i { font-size: 1.25rem; line-height: 1; color: var(--highlight); }
.chat-fab__close { display: none; }
.chat-widget.is-open .chat-fab__open { display: none; }
.chat-widget.is-open .chat-fab__close { display: inline; }
.chat-panel { width: min(330px, calc(100vw - 2rem)); background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
    overflow: hidden; opacity: 0; transform: translateY(10px) scale(.98); transform-origin: bottom right; transition: opacity .2s ease, transform .25s var(--ease-out); }
.chat-panel.show { opacity: 1; transform: none; }
.chat-panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: 1rem 1.1rem .9rem; background: var(--cta); color: var(--ivory-text);
    border-bottom: 2px solid var(--highlight); }
.chat-panel__head strong { font-family: var(--font-head); font-size: 1.02rem; }
.chat-panel__head p { margin: .2rem 0 0; font-size: .8rem; opacity: .8; }
.chat-panel__close { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: var(--ivory-text); display: grid; place-items: center; }
.chat-panel__close:hover { background: rgba(255, 255, 255, .2); }
.chat-panel__list { list-style: none; margin: 0; padding: .5rem; }
.chat-opt { display: flex; align-items: center; gap: .8rem; padding: .7rem .75rem; border-radius: 14px; color: var(--text); text-decoration: none; min-height: 56px; transition: background .2s; }
.chat-opt:hover, .chat-opt:focus-visible { background: var(--section); color: var(--text); }
.chat-opt__icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; color: #fff; background: var(--cta); }
.chat-opt--agent .chat-opt__icon { background: var(--division-isp-networking, #172A46); }
.chat-opt--whatsapp .chat-opt__icon { background: #1f9d55; }
.chat-opt--call .chat-opt__icon { background: var(--division-electronics-gadgets, #B65E3C); }
.chat-opt--email .chat-opt__icon { background: #8a6d43; }
.chat-opt__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.chat-opt__text b { font-size: .92rem; }
.chat-opt__text small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-opt__go { margin-left: auto; color: var(--muted); }
@media (max-width: 991.98px) {
    /* Sit above the mobile bottom navigation and the sticky buy bar. */
    .chat-widget { right: .85rem; bottom: calc(72px + env(safe-area-inset-bottom)); }
    .back-to-top { left: .85rem; bottom: calc(72px + env(safe-area-inset-bottom)); }
    .chat-fab { height: 48px; width: 48px; padding: 0; justify-content: center; }
    .chat-fab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    body:has(.sticky-buy) .chat-widget { bottom: calc(140px + env(safe-area-inset-bottom)); }
}

/* ---------- Featured Offers page ---------- */
.offer-group__title { font-size: 1.25rem; display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.offer-group__title i { color: var(--highlight); }
.offer-card { --div: var(--cta); display: flex; height: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); }
.offer-card__value { flex: 0 0 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem .5rem;
    background: var(--div); color: var(--ivory-text); font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; line-height: 1.1;
    border-right: 2px dashed rgba(var(--highlight-rgb), .8); }
.offer-card__value small { font-size: .75rem; font-weight: 600; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.offer-card__body { padding: 1rem 1.1rem; min-width: 0; flex: 1; }
.offer-card__body h3 { font-size: 1rem; margin: 0 0 .45rem; }
.offer-card__terms { list-style: none; margin: 0 0 .75rem; padding: 0; font-size: .8rem; color: var(--muted); }
.offer-card__terms li + li { margin-top: .15rem; }
.offer-card__code { display: flex; align-items: center; gap: .5rem; }
.offer-card__code code { font-size: .95rem; font-weight: 700; color: var(--text); background: var(--bg); border: 1px dashed var(--border-strong); border-radius: 8px; padding: .3rem .6rem; }

/* ---------- Reduced motion: no decorative animation at all ---------- */
@media (prefers-reduced-motion: reduce) {
    .fx-cta .btn-flash::after, .fx-cta .division-card__cta::after, .fx-cta .hero-cta::after { display: none; }
    .cart-action.is-flaring > i, [data-cart-link].is-flaring > i, .btn-checkout.is-accent { animation: none !important; }
    .division-card, .division-card__item, .chat-panel, .chat-fab, .logo-card .brand-logo { transition: none !important; }
}

/* ---------- Sticky header on phones/tablets ----------
   The base theme let the header scroll away on small screens. Now the compact row (menu · logo · cart)
   stays pinned; the search field folds away once the page is scrolled to keep the screen free. */
@media (max-width: 991.98px) {
    .site-header { position: sticky; top: 0; }
    .site-header .mobile-search { max-height: 80px; overflow: visible; transition: max-height .3s var(--ease-out), padding .3s var(--ease-out), opacity .2s; }
    .site-header.scrolled .mobile-search:not(:focus-within) { max-height: 0; padding-bottom: 0; opacity: 0; overflow: hidden; pointer-events: none; }
    .site-header.scrolled .header-main { height: 60px; }
}
.site-header.scrolled { background: rgba(var(--card-rgb), .92); }
@media (prefers-reduced-motion: reduce) { .site-header .mobile-search { transition: none; } }

@media (max-width: 991.98px) {
    .logo-card .site-header .brand-logo img { height: 34px; }
    .logo-card .site-header.scrolled .brand-logo { padding: .3rem .6rem; }
    .logo-card .site-header.scrolled .brand-logo img { height: 28px; }
}

/* ==========================================================================
   Typography system — Inter only (variable 100–900, self-hosted).
   One scale for the whole storefront: tight tracking on large headings, comfortable body leading,
   tabular figures for prices/counters so numbers don't jitter.
   ========================================================================== */
:root {
    --fs-display: clamp(2.2rem, 1.35rem + 3.1vw, 3.6rem);
    --fs-h1: clamp(1.9rem, 1.3rem + 2.1vw, 2.75rem);
    --fs-h2: clamp(1.45rem, 1.1rem + 1.25vw, 2.1rem);
    --fs-h3: clamp(1.2rem, 1.05rem + .55vw, 1.45rem);
    --fs-h4: 1.15rem;
    --lh-tight: 1.08;
    --lh-heading: 1.2;
    --lh-body: 1.6;
}
body { font-family: var(--font-body); font-size: 1rem; line-height: var(--lh-body); font-optical-sizing: auto; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--font-body); color: var(--text-strong, var(--dark)); line-height: var(--lh-heading); text-wrap: balance; }
h1, .h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -.032em; line-height: 1.12; }
h2, .h2 { font-size: var(--fs-h2); font-weight: 750; letter-spacing: -.026em; }
h3, .h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.018em; }
h4, .h4 { font-size: var(--fs-h4); font-weight: 650; letter-spacing: -.012em; }
h5, .h5, h6, .h6 { font-weight: 650; letter-spacing: -.005em; }
p { text-wrap: pretty; }
.section-head h2 { font-size: var(--fs-h2); font-weight: 750; letter-spacing: -.026em; line-height: 1.15; }
.section-head p { font-size: .98rem; line-height: 1.55; }
.price, .product-price, .stat-tile .value, .countdown .unit b, .cart-count, [data-cart-count] { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.product-card .title { font-weight: 550; letter-spacing: -.005em; line-height: 1.4; }
.btn { font-weight: 600; letter-spacing: -.005em; }
small, .small { line-height: 1.5; }
@media (max-width: 575.98px) { body { font-size: .97rem; } }
