/* =========================================================
   site.css — Unified Solutions storefront
   The original design (navy + cyan, Outfit / Plus Jakarta Sans,
   18px cards, soft navy shadows) applied to every storefront page.
   header-footer.css is loaded first; home.css adds the home page.
   ========================================================= */

:root {
    --navy:        #0a2239;
    --navy-deep:   #061626;
    --navy-soft:   #13355a;
    --cyan:        #00B4D8;
    --cyan-bright: #48CAE4;
    --cyan-deep:   #0077B6;
    --cyan-soft:   rgba(0, 180, 216, 0.10);
    --amber:       #FFB627;
    --red-sale:    #E63946;
    --green:       #16a34a;
    --ink:         #0a2239;
    --muted:       #5b6a7e;
    --line:        #E2E8F0;
    --bg:          #F4F7FB;
    --white:       #ffffff;
    --shadow-lg:   0 18px 40px -16px rgba(10, 34, 57, 0.28);
    --shadow-sm:   0 4px 14px -6px rgba(10, 34, 57, 0.18);
    --shadow-glow: 0 10px 40px -10px rgba(0, 180, 216, 0.45);
    --radius:      18px;
    --radius-sm:   12px;

    /* Roles. Components use these; [data-theme="dark"] below swaps their values. */
    --page:        var(--bg);       /* page background */
    --surface:     #ffffff;         /* cards, panels, header, inputs */
    --surface-2:   var(--bg);       /* soft fills inside cards (spec labels, qty buttons) */
    --text:        var(--ink);      /* body text */
    --heading:     var(--navy);     /* headings, product names, prices */
    --text-muted:  var(--muted);
    --border:      var(--line);
    --link:        var(--cyan-deep);
    --fill-strong: var(--navy);     /* solid dark fills: selected option, current page, dark button */
    --on-fill:     #ffffff;         /* text on --fill-strong */
}

/* ---------- Dark theme (set on <html> by the script in the page head) ---------- */
[data-theme="dark"] {
    color-scheme: dark;
    --page:        #0b1a2b;
    --surface:     #0f2236;
    --surface-2:   #0b1a2b;
    --text:        #d6e2ec;
    --heading:     #eef4f8;
    --text-muted:  #a3b5c7;
    --border:      #1f3a55;
    --link:        #48CAE4;
    --fill-strong: #1e5a8a;
    --on-fill:     #ffffff;
    --cyan-soft:   rgba(0, 180, 216, 0.16);
    --shadow-sm:   0 4px 14px -6px rgba(0, 0, 0, 0.55);
    --shadow-lg:   0 18px 40px -16px rgba(0, 0, 0, 0.7);
}
[data-theme="light"] { color-scheme: light; }

html { -webkit-text-size-adjust: 100%; }
/* Nothing may widen the page sideways (clip, not hidden, so the sticky header keeps working) */
html, body { overflow-x: clip; }
.header .main-menu > li.menu-item > a { white-space: nowrap; }
body {
    background: var(--page);
    color: var(--text);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
/* Headings inherit their colour (navy from body), so they turn white inside dark sections like the hero */
h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; margin-bottom: 12px; }
h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
p { margin-bottom: 12px; }
ul, ol { margin: 0 0 12px 20px; }
a { color: var(--link); }
a:hover { color: var(--cyan); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 2000; background: var(--fill-strong); color: #fff; padding: 10px 16px; }
.skip:focus { left: 0; }
.site-main { padding: 36px 0 70px; min-height: 55vh; }
.site-main.flush { padding: 0; }
.site-main.flush > .wrap:last-child { padding-bottom: 70px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.note, .help { color: var(--text-muted); font-size: 13px; }
.trap { position: absolute; left: -9999px; }

/* ---------- Header additions (search and cart badge) ---------- */
.header .container { width: 100%; max-width: 1240px; padding: 0 24px; }
/* The logo keeps its shape: the menu beside it may not squeeze it narrower */
.header .header-left, .header .nav__logo { flex-shrink: 0; }
.header .nav__logo-img { flex-shrink: 0; max-width: none; object-fit: contain; }
/* The full menu (logo + nine items) needs about 1200px. header-footer.css switches to it at
   768px, which pushed the logo and the cart off screen on tablets and small laptops, so the
   hamburger menu is kept up to 1199px. */
@media (max-width: 1199.98px) {
    .header .header-row .header-right .main-menu { display: none !important; }
    .header .mobile-toggler { display: inline-block !important; }
    .header .container { max-width: 100% !important; }
}
@media (min-width: 1200px) {
    .header .mobile-toggler, .header .header-row .mobile-menu { display: none !important; }
}
/* Inside the hamburger menu, sections open on tap only. header-footer.css opened them on
   :hover as well, which fought the tap toggle on touch screens and closed them as the
   pointer moved away. */
.header .header-row .mobile-menu ul li.mega-menu:hover .mega-menu-wrapper { display: none; }
.header .header-row .mobile-menu ul li.mega-menu.open .mega-menu-wrapper {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    padding: 14px 8px; background: rgba(255, 255, 255, 0.04); border-radius: 10px; margin-top: 4px;
}
.header .header-row .mobile-menu ul li.mega-menu > a { display: flex; justify-content: space-between; align-items: center; }
.header .header-row .mobile-menu ul li.mega-menu.open > a { color: var(--cyan-bright); }
.header .header-row .mobile-menu ul li:hover { background-color: transparent; }
.header .header-row .mobile-menu ul li > a:hover { background-color: rgba(0, 180, 216, 0.12); border-radius: 8px; }
/* Account dropdown inside the hamburger menu, at every width it's used (old CSS stopped at 768px) */
.header .mobile-menu .menu-item.dropdown .dropdown-menu {
    display: none; position: static; list-style: none; margin: 4px 0 0; padding: 0;
    background: var(--navy-deep); border-top: 3px solid var(--cyan); border-radius: 8px; overflow: hidden; box-shadow: none;
}
.header .mobile-menu .menu-item.dropdown.show .dropdown-menu { display: block; }
.header .mobile-menu .menu-item.dropdown .dropdown-menu a,
.header .mobile-menu .menu-item.dropdown .dropdown-menu .link-like { color: #fff; padding: 10px 15px; display: block; font-size: 14px; }
.header .mobile-menu .menu-item.dropdown .dropdown-menu a:hover,
.header .mobile-menu .menu-item.dropdown .dropdown-menu .link-like:hover { background: rgba(0, 180, 216, 0.18); color: var(--cyan-bright); }

/* Desktop dropdowns with hover intent (nav.js adds .js-menu and .is-open). Plain CSS hover
   closed the dropdown when the pointer moved diagonally from the link to a lower item and
   crossed the next menu item on the way. The rules below are header-footer.css's own hover
   rules, applied to .is-open instead. Without JavaScript the original hover still works. */
@media (min-width: 1200px) {
    .js-menu .header .header-row .header-right .main-menu li.mega-menu:hover .mega-menu-wrapper { display: none; }
    .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open .mega-menu-wrapper {
        display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    }
    .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open .mega-menu-wrapper .mega-menu-col h5 {
        text-transform: uppercase; margin-bottom: 12px; padding-left: 8px; color: var(--heading); font-size: 12px; letter-spacing: 0.08em;
    }
    .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open .mega-menu-wrapper .mega-menu-col ul {
        list-style: none; margin-left: 0; margin-right: 12px;
    }
    .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open .mega-menu-wrapper .mega-menu-col ul li a {
        text-decoration: none; padding: 7px 10px; display: block; font-size: 14px; color: var(--text-muted);
        border-radius: 6px; transition: background-color .15s ease, color .15s ease;
    }
    .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open .mega-menu-wrapper .mega-menu-col ul li:hover a,
    .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open .mega-menu-wrapper .mega-menu-col ul li a:focus-visible {
        background-color: var(--surface-2); color: var(--link);
    }
    /* the underline under the menu item follows the open dropdown, not just the pointer */
    .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open > a { color: var(--link); }
    .js-menu .header .header-row .header-right .main-menu li.mega-menu.is-open > a::after { transform: scaleX(1); }
}

/* The header is capped at the page width (1240px), so the menu has the same room at every
   desktop size; keep its spacing a little tighter than the original so it always fits */
@media (min-width: 1200px) {
    .header .header-row .header-right .main-menu li.menu-item > a { padding-left: 9px; padding-right: 9px; letter-spacing: 0.02em; }
    .header .header-row .header-right .main-menu li.menu-item:not(:last-child) { margin-right: 2px; }
    .header .header-row .header-right .main-menu li.menu-item > a::after { left: 9px; right: 9px; }
}
.nav-search-toggle, .nav-cart { position: relative; }
.cart-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
    border-radius: 999px; background: var(--cyan); color: var(--navy-deep);
    font-size: 11px; font-weight: 800; line-height: 1; vertical-align: middle;
}
.cart-badge[data-count="0"] { background: var(--border); color: #475569; }
.nav-search {
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px -16px rgba(10, 34, 57, 0.3);
    position: sticky; top: 72px; z-index: 999;
}
.nav-search[hidden] { display: none; }
.nav-search form { max-width: 760px; margin: 0 auto; padding: 16px 24px; display: flex; gap: 10px; }
.nav-search input { flex: 1; }
/* Logout is a form button inside the account dropdown; styled like the links next to it */
.dropdown-menu .link-like {
    background: none; border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer;
}
.header .header-row .header-right .main-menu li.menu-item.dropdown .dropdown-menu .link-like {
    color: var(--heading); padding: 10px 16px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500;
}
.header .header-row .header-right .main-menu li.menu-item.dropdown .dropdown-menu .link-like:hover { color: var(--link); background: var(--surface-2); }

/* ---------- Page banner (navy, grid pattern) ---------- */
.page-banner {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(700px 300px at 88% 20%, rgba(0, 180, 216, 0.22), transparent 60%),
        radial-gradient(500px 280px at 5% 80%, rgba(72, 202, 228, 0.14), transparent 65%),
        linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
    padding: 52px 0 46px;
}
.page-banner::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 180, 216, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 180, 216, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.page-banner .wrap { position: relative; z-index: 1; }
.page-banner h1 { color: #fff; margin-bottom: 8px; }
.page-banner p { color: rgba(255,255,255,0.78); max-width: 640px; margin: 0; font-size: 16px; }
.banner-crumb { font-size: 13px; margin-bottom: 14px; color: rgba(255,255,255,0.6); }
.banner-crumb a { color: var(--cyan-bright); text-decoration: none; }
.banner-crumb a:hover { color: #fff; }
.banner-crumb span { margin: 0 8px; opacity: 0.5; }
.crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.crumbs a { color: var(--link); text-decoration: none; }
.crumbs span { margin: 0 8px; opacity: 0.6; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px 22px; border-radius: var(--radius-sm); border: none; cursor: pointer;
    font-family: inherit; font-weight: 700; font-size: 15px; text-decoration: none; line-height: 1.2;
    background: var(--surface); color: var(--heading); box-shadow: inset 0 0 0 1px var(--border);
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--cyan-deep); color: var(--heading); }
.btn-primary { background: var(--cyan); color: var(--navy-deep); box-shadow: var(--shadow-glow); }
.btn-primary:hover { background: var(--cyan-bright); color: var(--navy-deep); box-shadow: var(--shadow-glow); }
.btn-dark { background: var(--fill-strong); color: #fff; box-shadow: none; }
.btn-dark:hover { background: var(--navy-soft); color: #fff; box-shadow: none; }
.btn-light { background: var(--surface); color: var(--heading); }
.btn-small { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[disabled]:hover { opacity: .5; cursor: not-allowed; transform: none; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }

/* ---------- Flash ---------- */
.flash { margin: 0 0 18px; padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 500; border: 1px solid transparent; }
.flash-success { background: #eaf7ef; color: #166534; border-color: #c4e7d0; }
.flash-error   { background: #fdecee; color: #b42330; border-color: #f6c7cc; }
.flash-info    { background: var(--cyan-soft); color: #005f92; border-color: rgba(0, 180, 216, 0.3); }
.flash ul { margin: 6px 0 0 18px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--heading); }
.field .help { margin-top: 5px; }
.field-error { margin-top: 5px; color: var(--red-sale); font-size: 13px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=search], input[type=url], select, textarea {
    width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.15); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red-sale); }
textarea { min-height: 90px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--cyan-deep); width: 16px; height: 16px; }

/* ---------- Panels ---------- */
.panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 20px; }
.narrow { max-width: 460px; margin: 0 auto; }
.empty-state { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 48px 24px; text-align: center; color: var(--text-muted); }
.empty-state h2 { color: var(--heading); }

/* ---------- Stock and price ---------- */
.stock { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.stock::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
.stock.is-in { color: #15803d; }
.stock.is-low { color: #8a5a00; }
.stock.is-low::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 182, 39, 0.2); }
.stock.is-out { color: #c62833; }
.stock.is-out::before { background: var(--red-sale); box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15); }
.price { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 20px; color: var(--heading); }
.price .was { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500; font-size: 0.7em; color: var(--text-muted); text-decoration: line-through; margin-left: 8px; }
.price .from { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: 0.62em; color: var(--text-muted); margin-right: 4px; }
.price .vat { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500; font-size: 12px; color: var(--text-muted); }
.price.on-sale [data-price], .price-now.sale { color: var(--red-sale); }

/* ---------- Product card (same card as the home page sliders) ---------- */
.prod-card {
    display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; position: relative;
    transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease; height: 100%;
}
.prod-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; color: inherit; }
.prod-card .prod-image-wrap { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.prod-card .prod-image-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 18px; transition: transform .4s ease; }
.prod-card:hover .prod-image-wrap img { transform: scale(1.06); }
.prod-card .no-image { color: var(--border); font-size: 48px; }
.sale-badge, .sale-tag {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    background: var(--red-sale); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
    padding: 4px 9px; border-radius: 6px; text-transform: uppercase; box-shadow: 0 4px 10px -2px rgba(230, 57, 70, 0.5);
}
.oos-badge { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--fill-strong); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 4px 9px; border-radius: 6px; text-transform: uppercase; }
.prod-card .prod-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; border-top: 1px solid var(--border); }
.prod-card .prod-brand { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
.prod-card .prod-name { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--heading); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.prod-card .prod-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.prod-card .price-now { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 19px; color: var(--heading); }
.prod-card .price-from { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.prod-card .price-was { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
/* A discount group member's own price */
.prod-card .price-yours, .price-yours { display: inline-block; margin-left: 6px; padding: 1px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--link); vertical-align: middle; }
.prod-card .prod-cta { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; color: var(--link); }
.prod-card .prod-cta i { transition: transform .2s ease; }
.prod-card:hover .prod-cta i { transform: translateX(4px); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }

/* ---------- Listing: sticky filter bar ---------- */
.filter-section { background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 0; position: sticky; top: 72px; z-index: 50; }
.filter-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filter-inner .search-box { flex: 1 1 260px; position: relative; }
.filter-inner .search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.filter-inner .search-box input { padding-left: 40px; }
.filter-inner select { width: auto; min-width: 170px; }
.filter-inner .check { white-space: nowrap; font-size: 14px; }
.filter-more { position: relative; }
.filter-more > summary { list-style: none; }
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more[open] > summary { box-shadow: inset 0 0 0 1px var(--cyan-deep); }
.filter-panel {
    position: absolute; right: 0; top: calc(100% + 8px); width: min(560px, 92vw); z-index: 60;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px;
}
.filter-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 8px; }
.filter-group .check { font-size: 14px; margin-bottom: 6px; }
.filter-group .check small { color: var(--text-muted); }
.filter-panel .actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result-count { color: var(--text-muted); font-size: 14px; margin-left: auto; white-space: nowrap; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.subcats a { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; color: var(--heading); text-decoration: none; font-size: 14px; font-weight: 600; }
.subcats a:hover { border-color: var(--cyan); color: var(--link); background: var(--cyan-soft); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.active-filters a { background: var(--cyan-soft); color: var(--link); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; text-decoration: none; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; padding: 9px 14px; border-radius: 10px; text-align: center; text-decoration: none; background: var(--surface); border: 1px solid var(--border); color: var(--heading); font-weight: 600; }
.pagination a:hover { border-color: var(--cyan); color: var(--link); }
.pagination .current { background: var(--fill-strong); color: #fff; border-color: var(--fill-strong); }
.pagination .total { display: none; }

/* ---------- Product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.gallery-main { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 28px; }
.gallery-main .sale-badge { top: 16px; left: 16px; font-size: 12px; padding: 6px 12px; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button { width: 76px; height: 76px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s ease; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.18); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.buy .brand-line { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.buy .brand-line a { color: var(--link); text-decoration: none; }
.buy h1 { font-size: clamp(26px, 3vw, 36px); }
.buy .sku-line { color: var(--text-muted); font-size: 13px; margin-bottom: 14px; }
.buy .lead { font-size: 16px; color: var(--text-muted); }
.buy-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 18px; box-shadow: var(--shadow-sm); }
.buy-box .price { font-size: 32px; }
.buy-box .stock { font-size: 14px; margin: 10px 0 18px; }
.buy-box h2 { font-size: 18px; }
.savings { display: inline-block; background: rgba(230, 57, 70, 0.1); color: #b42330; font-size: 12px; font-weight: 800; border-radius: 6px; padding: 3px 8px; margin-left: 8px; vertical-align: middle; font-family: 'Plus Jakarta Sans', sans-serif; }
/* The price box toggles these with the hidden attribute; display: inline-block above would otherwise keep them showing (an empty red pill, and "Your price" for everyone) */
.savings[hidden], .price-yours[hidden], .price .was[hidden], .sale-badge[hidden] { display: none; }
.option-group { border: 0; padding: 0; margin: 0 0 16px; }
.option-group legend { font-weight: 700; font-size: 13px; margin-bottom: 8px; color: var(--heading); }
.option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.option-values label { position: relative; }
.option-values input { position: absolute; opacity: 0; pointer-events: none; }
.option-values span { display: block; padding: 9px 16px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 600; background: var(--surface); transition: all .15s ease; }
.option-values span:hover { border-color: var(--cyan); }
.option-values input:checked + span { background: var(--fill-strong); color: #fff; border-color: var(--fill-strong); }
.option-values input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.option-values input.unavailable + span { color: var(--text-muted); text-decoration: line-through; }
.buy-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.qty { display: grid; grid-template-columns: 38px 1fr 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.qty button { border: 0; background: var(--surface-2); font: inherit; font-size: 18px; cursor: pointer; color: var(--heading); }
.qty button:hover { background: var(--cyan-soft); }
.qty input { border: 0; border-radius: 0; text-align: center; padding: 10px 0; min-width: 0; box-shadow: none; }
.buy-note { margin: 14px 0 0; font-size: 13px; color: var(--text-muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.buy-note img { height: 22px; width: auto; border-radius: 4px; }
.detail { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; }
.detail .text p { white-space: pre-line; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.info-card + .info-card { margin-top: 18px; }
.specs { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.specs th, .specs td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 14px; }
.specs th { width: 42%; font-weight: 600; color: var(--text-muted); background: var(--surface-2); }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.features { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.features li { position: relative; padding-left: 30px; }
.features li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px; background: var(--cyan-soft); color: var(--link); font-size: 11px; display: flex; align-items: center; justify-content: center; }
.features strong { display: block; color: var(--heading); }

/* ---------- Section headings inside pages ---------- */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; }
.section-head a { font-weight: 700; text-decoration: none; }
.related { margin-top: 56px; }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.review { background: var(--surface); border-radius: var(--radius); padding: 28px 24px 22px; box-shadow: var(--shadow-sm); border-top: 4px solid var(--cyan); position: relative; }
.review .stars { color: var(--amber); letter-spacing: 2px; font-size: 16px; }
.review .stars span { color: var(--border); }
.review h3 { margin: 6px 0 6px; font-size: 16px; }
.review p { color: var(--text); }
.review .by { color: var(--text-muted); font-size: 13px; font-weight: 600; margin: 0; }
.review-photos { display: flex; gap: 8px; margin: 6px 0 12px; }
.review-photos img { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.rating-pick { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; border: 0; padding: 0; margin: 0 0 14px; }
.rating-pick input { position: absolute; opacity: 0; pointer-events: none; }
.rating-pick label { font-size: 34px; color: var(--border); cursor: pointer; line-height: 1; }
.rating-pick input:checked ~ label, .rating-pick label:hover, .rating-pick label:hover ~ label { color: var(--amber); }
.rating-pick input:focus-visible + label { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* ---------- Cart and checkout ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 90px 1fr auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.cart-line:first-child { padding-top: 0; }
.cart-line:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-line img, .cart-line .no-image { width: 90px; height: 90px; object-fit: contain; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.cart-line .name { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 17px; color: var(--heading); text-decoration: none; }
.cart-line .meta { color: var(--text-muted); font-size: 13px; }
.cart-line .line-total { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 18px; text-align: right; }
.cart-line .controls { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.cart-line .controls form { display: flex; gap: 8px; align-items: center; margin: 0; }
.cart-line .controls input { width: 80px; padding: 8px 10px; }
.line-problem { color: var(--red-sale); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
.summary { position: sticky; top: 96px; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 0; margin: 0 0 14px; }
.summary dd { padding-left: 16px; }
.summary dt { color: var(--text-muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .grand { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 800; color: var(--heading); padding-top: 12px; border-top: 1px solid var(--border); }
.summary .note { margin-bottom: 14px; }
.summary details summary { cursor: pointer; font-weight: 700; color: var(--link); }
.summary-items { list-style: none; margin: 0 0 14px; padding: 0 0 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.summary-items li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.methods { display: grid; gap: 10px; margin-bottom: 16px; }
.method { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.method:hover { border-color: var(--cyan); }
.method:has(input:checked) { border-color: var(--cyan-deep); box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15); }
.method input { accent-color: var(--cyan-deep); width: 18px; height: 18px; }
.method small { display: block; color: var(--text-muted); font-weight: 400; }
.method .fee { font-weight: 800; white-space: nowrap; color: var(--heading); }
.method .pay-logo { height: 26px; width: auto; border-radius: 4px; margin-bottom: 4px; }
.method > * { min-width: 0; }
/* Pay-for-order rows: name and note, then the button. The button drops under the text on phones. */
.method-pay { grid-template-columns: minmax(0, 1fr) auto; cursor: default; }
.method-pay .method-text { overflow-wrap: anywhere; }
.method-pay .method-text strong { display: block; color: var(--heading); }
.method-pay .btn { white-space: nowrap; box-sizing: border-box; }
/* Submit button while the next page loads (forms with data-busy, see shop.js) */
.btn.is-busy, .btn.is-busy:disabled { cursor: progress; opacity: .85; transform: none; }
.btn.is-busy::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: btn-spin .7s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ---------- Orders and account ---------- */
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.status { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; background: var(--surface-2); color: var(--heading); }
.status-awaiting_payment, .status-pending_verification { background: rgba(255, 182, 39, 0.18); color: #8a5a00; }
.status-paid, .status-processing, .status-ready, .status-dispatched, .status-completed { background: #eaf7ef; color: #166534; }
.status-cancelled, .status-expired, .status-refunded { background: #fdecee; color: #b42330; }
.hold { background: var(--cyan-soft); border: 1px solid rgba(0, 180, 216, 0.3); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 18px; color: var(--heading); }
table.lines, table.orders { width: 100%; border-collapse: collapse; }
table.lines th, table.lines td, table.orders th, table.orders td { padding: 12px 8px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
table.lines th, table.orders th { color: var(--text-muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
table.lines .num, table.orders .num { text-align: right; }
.bank { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 10px 0 16px; padding: 16px; background: var(--surface-2); border-radius: var(--radius-sm); }
.bank dt { color: var(--text-muted); }
.bank dd { margin: 0; font-weight: 700; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }

/* ---------- Content pages ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 28px; }
.prose ul { margin-left: 0; padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.prose li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; color: var(--link); font-size: 13px; top: 2px; }
.page-image { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin-bottom: 26px; box-shadow: var(--shadow-sm); }
.service-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.service-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .25s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.service-card img { aspect-ratio: 16 / 9; object-fit: cover; }
.service-card .body { padding: 20px 22px; }
.service-card h2 { font-size: 19px; margin-bottom: 6px; }
.service-card p { color: var(--text-muted); margin: 0; }
.service-card .icon { width: 48px; height: 48px; border-radius: 12px; background: var(--cyan-soft); color: var(--link); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list i { width: 40px; height: 40px; border-radius: 10px; background: var(--cyan-soft); color: var(--link); display: flex; align-items: center; justify-content: center; flex: none; }
.contact-map { margin-top: 18px; height: 240px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.contact-map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
    .product, .detail, .cart-layout, .account-grid { grid-template-columns: minmax(0, 1fr); }
    .summary { position: static; }
    .filter-section { position: static; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .row-2 { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .prod-card .prod-body { padding: 12px; }
    .prod-card .prod-name { font-size: 14px; }
    .filter-inner select { width: 100%; }
    .result-count { margin-left: 0; }
    .cart-line { grid-template-columns: 70px 1fr; }
    .cart-line img, .cart-line .no-image { width: 70px; height: 70px; }
    .cart-line .line-total { grid-column: 2; text-align: left; }
    .panel { padding: 20px; }
    .method { padding: 14px; gap: 12px; }
    .method-pay { grid-template-columns: minmax(0, 1fr); }
    .method-pay .btn { width: 100%; padding-top: 12px; padding-bottom: 12px; font-size: 14px; }
    .bank { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .bank dd { margin-bottom: 10px; overflow-wrap: anywhere; }
    table.lines th, table.lines td { padding: 10px 6px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
.info-card h2 { margin-top: 26px; }
.info-card h2:first-child { margin-top: 0; }
/* A long first name in "Hi, ..." can't push the menu onto two lines */
.header .header-row .header-right .main-menu .account-toggle { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }