/* Bypari storefront — shared base styles. Mobile-first (375px baseline).
   Plain CSS on purpose: the storefront loads no Tailwind, so it stays light
   on a mid-range Android over slow data (see CLAUDE.md's design standard).

   Everything below is driven by the token block in :root. A theme file in
   themes/*.css only redefines tokens and adds its own identity rules — it
   never restates component layout. */

/* ---------------------------------------------------------------- tokens */

:root {
    /* Surfaces. --surface is what cards sit on, --surface-alt is the page's
       quiet band used for sections that need separating from the body. */
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-alt: #f6f6f7;
    --surface-sunken: #efeff0;

    /* Ink */
    --text: #1a1a1a;
    --text-muted: #6a6a70;
    --text-faint: #8f8f97;

    /* Lines */
    --border: rgba(18, 18, 23, 0.1);
    --border-strong: rgba(18, 18, 23, 0.2);

    /* Brand. --accent-text is recomputed per store by the layout when a
       merchant picks a custom accent (Store::accentTextColor). */
    --accent: #121217;
    --accent-text: #ffffff;
    --accent-ink: #121217; /* accent used as text/underline on a light ground */

    /* Feedback */
    --sale: #b3261e;
    --success-bg: #e7f4ec;
    --success-text: #14653a;
    --warning-bg: #fdf1dd;
    --warning-text: #8a5406;
    --danger-bg: #fdeceb;
    --danger-text: #96231d;

    /* Type */
    --font-body:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hind Siliguri",
        Arial, sans-serif;
    --font-heading: var(--font-body);
    --heading-weight: 700;
    --heading-tracking: -0.02em;
    --eyebrow-tracking: 0.16em;

    /* Shape */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --card-radius: var(--radius);
    --btn-radius: var(--radius-pill);
    --media-radius: var(--radius);

    /* Depth */
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 20px 48px rgba(16, 24, 40, 0.14);

    /* Rhythm */
    --container: 1200px;
    --gutter: 16px;
    --section-gap: 36px;

    /* Motion */
    --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
    --dur: 220ms;

    /* Chrome */
    --header-bg: #ffffff;
    --header-text: #1a1a1a;
    --header-border: var(--border);
    --trust-bg: var(--surface-alt);
    --card-bg: var(--surface);
    --footer-bg: #14141a;
    --footer-text: rgba(255, 255, 255, 0.72);
    --footer-heading: #ffffff;
}

@media (min-width: 768px) {
    :root {
        --gutter: 32px;
        --section-gap: 52px;
    }
}

/* Bangla script has no case and its conjuncts break apart under wide
   letter-spacing, so the eyebrow/label treatment drops both when the page
   is rendering in Bangla. */
html[lang="bn"] {
    --eyebrow-tracking: 0.02em;
    --heading-tracking: 0;
}

html[lang="bn"] .section-eyebrow,
html[lang="bn"] .hero-eyebrow,
html[lang="bn"] .pdp-eyebrow,
html[lang="bn"] .price-tiers-heading,
html[lang="bn"] .site-footer h2,
html[lang="bn"] .nav-drawer-section,
html[lang="bn"] .orders-table th,
html[lang="bn"] .order-status-badge,
html[lang="bn"] .badge-sale,
html[lang="bn"] .badge-soldout {
    text-transform: none;
    font-size: 0.78rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Several components below set display on elements that are also toggled
   with the hidden attribute (the drawer, the tab panels), which would
   otherwise win over the UA's [hidden] rule. */
[hidden] {
    display: none !important;
}

/* ------------------------------------------------------------ base type */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-tracking);
    line-height: 1.15;
    margin: 0 0 0.4em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
}
h2 {
    font-size: clamp(1.35rem, 1.05rem + 1.3vw, 1.9rem);
}
h3 {
    font-size: 1.05rem;
}

p {
    margin: 0 0 1em;
}
p:last-child {
    margin-bottom: 0;
}

a {
    color: inherit;
}
img,
svg,
video {
    max-width: 100%;
    display: block;
}

::selection {
    background: var(--accent);
    color: var(--accent-text);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Keyboard-only escape hatch past the header and category nav. */
.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    background: var(--accent);
    color: var(--accent-text);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: top var(--dur) var(--ease);
}

.skip-link:focus {
    top: 12px;
}

/* --------------------------------------------------------------- layout */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding-block: var(--section-gap);
}
.section-tight {
    padding-block: calc(var(--section-gap) * 0.7);
}
.section-alt {
    background: var(--surface-alt);
}

/* Consecutive sections on a shared ground would otherwise stack both
   paddings into a gap twice the intended rhythm. A tinted band is the
   exception — it needs its own breathing room on both sides. */
.section + .section {
    padding-top: 0;
}
.section + .section-alt,
.section-alt + .section {
    padding-top: var(--section-gap);
}

/* Heading row above a grid or rail: eyebrow, title, and an optional link
   pushed to the far end (the "View all" pattern). */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-head-text {
    min-width: 0;
}

.section-eyebrow {
    display: block;
    margin: 0 0 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
    color: var(--text-faint);
}

.section-head h2 {
    margin: 0;
}

.section-head-link {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
    transition:
        border-color var(--dur) var(--ease),
        color var(--dur) var(--ease);
}

.section-head-link:hover {
    color: var(--accent-ink);
    border-bottom-color: currentColor;
}

.section-head-center {
    text-align: center;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.section-sub {
    margin: 8px 0 0;
    color: var(--text-muted);
    max-width: 58ch;
    font-size: 0.95rem;
}

/* -------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 26px;
    border: 1px solid transparent;
    border-radius: var(--btn-radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease),
        background-color var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        color var(--dur) var(--ease);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    filter: brightness(1.06);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    border-color: var(--text);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(4px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.24);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    min-height: 54px;
    padding: 15px 34px;
    font-size: 1rem;
}

.btn[disabled],
.btn:disabled {
    background: var(--surface-sunken);
    color: var(--text-faint);
    border-color: transparent;
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
}

/* --------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--header-bg);
    color: var(--header-text);
    border-bottom: 1px solid var(--header-border);
}

.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    min-height: 60px;
    padding-block: 10px;
}

/* Mobile: hamburger | wordmark | actions. The search moves to its own row
   underneath so the wordmark never gets squeezed at 375px. */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: -8px;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.nav-toggle svg {
    width: 22px;
    height: 22px;
}

.site-header .store-name {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-tracking);
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.site-header .store-logo {
    max-height: 40px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: -6px;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    color: inherit;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease);
}

.header-icon:hover {
    background: rgba(128, 128, 128, 0.14);
}
.header-icon svg {
    width: 20px;
    height: 20px;
}

.locale-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid currentColor;
    /* Progressive: browsers without color-mix keep the solid currentColor
       border above, which is the same look this had before. */
    border-color: color-mix(in srgb, currentColor 28%, transparent);
    border-radius: var(--radius-pill);
    padding: 2px;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.locale-switch a {
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    line-height: 1.4;
    opacity: 0.6;
    transition: opacity var(--dur) var(--ease);
}

.locale-switch a:hover {
    opacity: 1;
}

.locale-switch a.active {
    background: currentColor;
    font-weight: 600;
    opacity: 1;
}

/* The active pill paints its own label by inverting the header ground. */
.locale-switch a.active span {
    color: var(--header-bg);
}

/* Search */
.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 0 100%;
    min-width: 0;
    padding: 0 0 4px;
    order: 3;
}

.site-search-field {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 8px;
    padding: 0 6px 0 14px;
    background: var(--surface-alt);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    transition:
        border-color var(--dur) var(--ease),
        background-color var(--dur) var(--ease);
}

.site-search-field:focus-within {
    background: var(--surface);
    border-color: var(--accent);
}

.site-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    padding: 11px 0;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
}

.site-search input::placeholder {
    color: var(--text-faint);
}
.site-search input:focus {
    outline: none;
}

.site-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--accent-text);
    cursor: pointer;
}

.site-search button svg {
    width: 16px;
    height: 16px;
}

/* Category nav — a scrolling strip on mobile, a centred inline row on
   desktop. The horizontal padding is negative-margined so the first item
   lines up with the container edge while the strip still bleeds. */
.category-bar {
    border-top: 1px solid var(--header-border);
}

.category-bar-inner {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-block: 11px;
    font-size: 0.8rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-bar-inner::-webkit-scrollbar {
    display: none;
}

.category-bar a {
    position: relative;
    white-space: nowrap;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.72;
    padding-block: 2px;
    transition: opacity var(--dur) var(--ease);
}

.category-bar a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease);
}

.category-bar a:hover {
    opacity: 1;
}
.category-bar a:hover::after {
    transform: scaleX(1);
}

.category-bar a[aria-current="page"] {
    opacity: 1;
    font-weight: 600;
}

.category-bar a[aria-current="page"]::after {
    transform: scaleX(1);
}

@media (min-width: 900px) {
    .site-header-inner {
        min-height: 72px;
        gap: 24px;
    }

    .nav-toggle {
        display: none;
    }

    .site-header .store-name {
        flex: 0 0 auto;
    }

    .site-header-inner {
        flex-wrap: nowrap;
    }

    .site-search {
        order: 0;
        flex: 1 1 320px;
        max-width: 380px;
        margin-left: auto;
        padding: 0;
    }

    .category-bar-inner {
        justify-content: center;
        font-size: 0.82rem;
    }
}

/* Off-canvas nav (mobile). Same pattern as the admin drawer: no framework,
   backdrop click / Escape / close button all dismiss it. */
.nav-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(10, 10, 15, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
}

.nav-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 61;
    width: min(84vw, 340px);
    background: var(--surface);
    color: var(--text);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--dur) var(--ease);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

body.nav-open {
    overflow: hidden;
}
body.nav-open .nav-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
}
body.nav-open .nav-drawer {
    transform: none;
}

.nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px var(--gutter);
    border-bottom: 1px solid var(--border);
}

.nav-drawer-title {
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    font-size: 1.05rem;
    letter-spacing: var(--heading-tracking);
}

.nav-drawer-links {
    display: flex;
    flex-direction: column;
    padding: 8px var(--gutter) 24px;
}

.nav-drawer-links a {
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 500;
}

.nav-drawer-links a:last-child {
    border-bottom: none;
}

.nav-drawer-section {
    margin-top: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
    color: var(--text-faint);
}

@media (min-width: 900px) {
    .nav-drawer,
    .nav-drawer-backdrop {
        display: none;
    }
}

/* ------------------------------------------------------------ trust bar */

.trust-bar {
    background: var(--trust-bg);
    border-bottom: 1px solid var(--border);
    font-size: 0.74rem;
}

.trust-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-block: 9px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.trust-bar-inner::-webkit-scrollbar {
    display: none;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 1px solid var(--border);
    white-space: nowrap;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.trust-badge-cod {
    background: var(--accent);
    color: var(--accent-text);
    border-color: transparent;
    font-weight: 600;
}

.trust-badge svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* Optional artwork slot. Official bKash/Nagad/Pathao/Steadfast marks are a
   licensing decision for the operator, so the chip renders a text label until
   a file is dropped into public/images/trust/ — see the trust-bar partial. */
.trust-logo {
    height: 14px;
    width: auto;
}

.trust-badge-group {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.trust-badge-group .trust-sep {
    opacity: 0.4;
}

@media (min-width: 768px) {
    .trust-bar-inner {
        gap: 10px;
        flex-wrap: wrap;
    }
}

/* ------------------------------------------------------- hero / banners */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--hero-bg, var(--surface-alt));
    color: var(--hero-text, var(--text));
    padding-block: clamp(48px, 9vw, 92px);
}

/* A soft radial wash so a hero with no merchant artwork still has depth
   instead of reading as one flat block of accent colour. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(
        --hero-wash,
        radial-gradient(
            120% 120% at 78% 10%,
            rgba(255, 255, 255, 0.35),
            rgba(255, 255, 255, 0) 55%
        )
    );
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
    opacity: 0.72;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem);
}

.hero-tagline {
    margin: 16px 0 0;
    max-width: 44ch;
    font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem);
    opacity: 0.82;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero .btn-primary {
    background: var(--hero-btn-bg, var(--accent));
    color: var(--hero-btn-text, var(--accent-text));
}

.hero .btn-secondary {
    background: var(--hero-btn2-bg, var(--surface));
    color: var(--hero-btn2-text, var(--text));
    border-color: var(--hero-btn2-border, var(--border-strong));
}

.hero .btn-secondary:hover {
    border-color: currentColor;
}

.banner-slider {
    position: relative;
    overflow: hidden;
    background: var(--surface-sunken);
}

.banner-slider-track {
    display: flex;
    transition: transform 520ms var(--ease);
}

.banner-slide {
    position: relative;
    flex: 0 0 100%;
}

.banner-slide img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.banner-slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 56px var(--gutter) 28px;
    background: linear-gradient(
        to top,
        rgba(8, 8, 12, 0.72),
        rgba(8, 8, 12, 0)
    );
    color: #ffffff;
}

.banner-slide-title {
    margin: 0;
    max-width: 22ch;
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-tracking);
    font-size: clamp(1.2rem, 0.9rem + 1.6vw, 2rem);
    line-height: 1.15;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.banner-slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    display: flex;
    justify-content: center;
    gap: 7px;
    z-index: 2;
}

.banner-slider-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition:
        width var(--dur) var(--ease),
        background-color var(--dur) var(--ease);
}

.banner-slider-dot.active {
    width: 22px;
    background: #ffffff;
}

@media (min-width: 768px) {
    .banner-slide img {
        aspect-ratio: 21 / 9;
    }
    .banner-slide-caption {
        padding: 72px var(--gutter) 40px;
    }
}

/* ------------------------------------------------------ collection grid */

.collection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 700px) {
    .collection-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.collection-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 132px;
    padding: 18px;
    border-radius: var(--card-radius);
    overflow: hidden;
    text-decoration: none;
    background: var(--tile-bg, var(--surface-alt));
    color: var(--tile-text, var(--text));
    transition:
        transform var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease);
}

.collection-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        90% 90% at 85% 0%,
        var(--tile-wash, rgba(255, 255, 255, 0.32)),
        transparent 68%
    );
    pointer-events: none;
}

.collection-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.collection-tile-name {
    position: relative;
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-tracking);
    font-size: 1rem;
    line-height: 1.2;
}

.collection-tile-count {
    position: relative;
    margin-top: 4px;
    font-size: 0.75rem;
    opacity: 0.68;
}

/* A merchant-uploaded image fills the tile; a bottom scrim keeps the name
   legible over any photo, so text goes white whatever the theme's tile
   colours are. Tiles without an image keep the theme's colour block. */
.collection-tile-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-grid .collection-tile.collection-tile--image {
    --tile-text: #ffffff;
    justify-content: flex-end;
    text-align: left;
}

.collection-grid .collection-tile.collection-tile--image::before {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0) 62%);
    z-index: 1;
}

.collection-tile--image .collection-tile-name,
.collection-tile--image .collection-tile-count {
    z-index: 2;
}

@media (min-width: 700px) {
    .collection-tile {
        min-height: 168px;
        padding: 22px;
    }
    .collection-tile-name {
        font-size: 1.1rem;
    }
}

/* ------------------------------------------------- product grid & cards */

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 14px;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 34px 22px;
    }
}

@media (min-width: 1000px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Borderless card: the photo does the framing, the way it does on a Shopify
   theme. The hairline only comes back on themes that ask for it by setting
   --card-border (see themes/*.css). */
.product-card {
    display: flex;
    flex-direction: column;
    border: var(--card-border, none);
    border-radius: var(--card-radius);
    background: var(--card-bg);
    overflow: hidden;
    padding: 16px;
    transition:
        transform var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease);
}

.product-card:hover {
    box-shadow: var(--card-hover-shadow, none);
}

.product-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.product-card-media {
    position: relative;
    overflow: hidden;
    border-radius: var(--media-radius);
    background: var(--surface-alt);
}

.product-card-media img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 600ms var(--ease);
}

.product-card:hover .product-card-media img {
    transform: scale(1.05);
}

/* Second photo cross-fades in on hover where a product has one — the
   single most recognisable product-grid affordance on a real store. */
.product-card-media .product-card-alt {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
}

.product-card:hover .product-card-alt {
    opacity: 1;
}

.product-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    z-index: 1;
}

.badge-sale,
.badge-soldout {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-sale {
    background: var(--sale);
    color: #ffffff;
}
.badge-soldout {
    background: rgba(20, 20, 26, 0.82);
    color: #ffffff;
}

.product-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 12px 4px;
}

.product-card-add-form {
    padding: 0 12px 12px;
}

.product-card-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 40px;
    padding: 9px 14px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--btn-radius);
    background: var(--surface);
    color: var(--accent-ink);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--dur) var(--ease);
}

.product-card-add:hover {
    background: var(--surface-alt);
}

.product-card-add svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.product-card .product-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.product-price {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.product-compare-price {
    font-size: 0.85rem;
    color: var(--text-faint);
    text-decoration: line-through;
}

/* Only real, merchant-entered scarcity is ever shown — there is no
   fabricated countdown or depletion anywhere in this codebase, by product
   principle. A healthy stock level says nothing, so it renders nothing. */
.stock-note {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.stock-note.low-stock {
    color: var(--warning-text);
}
.stock-note.out-of-stock {
    color: var(--text-faint);
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: var(--radius-pill);
}

.stock-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.stock-badge.in-stock {
    background: var(--success-bg);
    color: var(--success-text);
}
.stock-badge.low-stock {
    background: var(--warning-bg);
    color: var(--warning-text);
}
.stock-badge.out-of-stock {
    background: var(--danger-bg);
    color: var(--danger-text);
}

/* Placeholder shown in place of an <img> when a product has no media. */
.image-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--surface-alt);
    color: var(--text-faint);
    border-radius: var(--media-radius);
    text-align: center;
    padding: 12px;
}

.image-fallback svg {
    width: 28%;
    max-width: 54px;
    height: auto;
    opacity: 0.4;
}
.image-fallback span {
    font-size: 0.72rem;
}

/* ----------------------------------------------------------- collection */

.page-head {
    padding-block: clamp(28px, 5vw, 52px) 0;
    max-width: 62ch;
}

.page-head h1 {
    margin: 0;
}

.page-head p {
    margin: 12px 0 0;
    color: var(--text-muted);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding-top: 20px;
    font-size: 0.78rem;
    color: var(--text-faint);
}

.breadcrumb a {
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.breadcrumb a:hover {
    color: var(--text);
}
.breadcrumb .sep {
    opacity: 0.5;
}

/* ------------------------------------------------- product detail page */

.pdp {
    display: grid;
    gap: 28px;
    padding-bottom: 8px;
}

@media (min-width: 900px) {
    .pdp {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 56px;
        align-items: start;
        padding-bottom: 24px;
    }

    .pdp-gallery {
        position: sticky;
        top: 96px;
    }
}

.pdp-gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--media-radius);
    background: var(--surface-alt);
}

.pdp-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pdp-thumbs::-webkit-scrollbar {
    display: none;
}

.pdp-thumb {
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: none;
    cursor: pointer;
    line-height: 0;
    overflow: hidden;
    transition: border-color var(--dur) var(--ease);
}

.pdp-thumb[aria-current="true"] {
    border-color: var(--text);
}

.pdp-thumbs img {
    width: 66px;
    height: 66px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: 0;
}

/* Right-hand column. Everything that used to be a direct child of .pdp —
   which made each one its own grid cell on desktop and scattered the page. */
.pdp-info {
    min-width: 0;
}

.pdp-eyebrow {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
    color: var(--text-faint);
}

.pdp-eyebrow a {
    text-decoration: none;
}
.pdp-eyebrow a:hover {
    color: var(--text);
}

.pdp-title {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.2rem);
}

.pdp-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 12px;
}

.pdp-price {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pdp-price-row .product-compare-price {
    font-size: 1rem;
}

.pdp-save {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--danger-bg);
    color: var(--sale);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pdp-description {
    margin: 16px 0 0;
    color: var(--text-muted);
    max-width: 62ch;
}

.pdp-divider {
    height: 1px;
    margin: 22px 0;
    background: var(--border);
    border: none;
}

/* Three short reassurance lines under the price — COD, delivery, contact. */
.pdp-assurances {
    display: grid;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.pdp-assurances li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.pdp-assurances svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent-ink);
}

.spec-callouts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 0;
}

.spec-chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: var(--surface-alt);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.delivery-note {
    margin: 20px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: var(--surface-alt);
    font-size: 0.86rem;
}

.delivery-note-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
}

.delivery-note-head svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.delivery-zone-rates {
    list-style: none;
    margin: 0;
    padding: 0;
}

.delivery-zone-rates li {
    padding: 4px 0;
    color: var(--text-muted);
}

.price-tiers-wrap {
    margin: 18px 0 0;
}

.price-tiers-heading {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
    color: var(--text-faint);
}

.price-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.price-tiers li {
    padding: 5px 13px;
    border-radius: var(--radius-pill);
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 0.78rem;
    font-weight: 600;
}

/* ----------------------------------------------------------- order form */

.order-form {
    margin-top: 26px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.order-form h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.order-form-sub {
    margin: 0 0 20px;
    font-size: 0.83rem;
    color: var(--text-muted);
}

.order-form .field {
    margin-bottom: 16px;
}

.order-form label,
.order-fieldset legend {
    display: block;
    margin-bottom: 7px;
    padding: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.order-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 18px;
    min-width: 0;
}

/* Everything except the radios, which get the chip treatment below. The
   customer login/register forms reuse .order-form and carry password and
   email inputs, which an explicit text/tel list used to miss. */
.order-form
    input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]),
.order-form textarea,
.order-form select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition:
        border-color var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease);
}

.order-form input::placeholder,
.order-form textarea::placeholder {
    color: var(--text-faint);
}

.order-form input:not([type="radio"]):focus,
.order-form textarea:focus,
.order-form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(18, 18, 23, 0.1);
}

.order-form textarea {
    resize: vertical;
    min-height: 84px;
}

/* Radio groups render as tappable chips rather than bare radios — a 32px
   text label next to a 13px dot is the weakest touch target on the page. */
.order-form .variant-options label,
.order-form .delivery-zone-options label,
.order-form .payment-method-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        border-color var(--dur) var(--ease),
        background-color var(--dur) var(--ease);
}

.order-form .variant-options label:hover,
.order-form .delivery-zone-options label:hover,
.order-form .payment-method-options label:hover {
    border-color: var(--border-strong);
}

.order-form .variant-options label:has(input:checked),
.order-form .delivery-zone-options label:has(input:checked),
.order-form .payment-method-options label:has(input:checked) {
    border-color: var(--accent);
    background: var(--surface-alt);
}

.order-form input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--accent);
    margin: 0;
}

.order-form .variant-options,
.order-form .delivery-zone-options,
.order-form .payment-method-options {
    display: block;
}

.order-form #pdp-delivery-estimate {
    margin: 10px 0 0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    font-size: 0.84rem;
    font-weight: 600;
}

.order-form #pdp-delivery-estimate:empty {
    display: none;
}

.order-form .field-hint {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.field-error,
.checkout-error {
    display: block;
    margin-top: 6px;
    color: var(--danger-text);
    font-size: 0.8rem;
    font-weight: 500;
}

.checkout-error {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
}

.order-form button[type="submit"] {
    width: 100%;
    min-height: 54px;
    margin-top: 6px;
    padding: 15px;
    border: none;
    border-radius: var(--btn-radius);
    background: var(--accent);
    color: var(--accent-text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition:
        filter var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease);
}

.order-form button[type="submit"]:hover {
    filter: brightness(1.08);
    box-shadow: var(--shadow-md);
}

.order-form button[type="submit"][disabled] {
    background: var(--surface-sunken);
    color: var(--text-faint);
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
}

.order-form-footnote {
    margin: 12px 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.order-form .out-of-stock-notice {
    margin: 0;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
    color: var(--danger-text);
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
}

.order-form .preview-note {
    margin: 10px 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------- fabs */

.whatsapp-button {
    position: fixed;
    right: 16px;
    bottom: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.42);
    transition: transform var(--dur) var(--ease);
}

.whatsapp-button:hover {
    transform: scale(1.06);
}
.whatsapp-button svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Lift the FAB above the sticky bar on a product page. */
.has-sticky-bar .whatsapp-button {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

/* --------------------------------------------------------- empty state */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}

.empty-state-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    color: var(--text-faint);
    opacity: 0.6;
}

.empty-state-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: var(--heading-weight);
}

.empty-state-text {
    margin: 8px 0 0;
    max-width: 46ch;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.empty-state-action {
    margin-top: 20px;
}

.empty-state-action a {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 12px 26px;
    border-radius: var(--btn-radius);
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

/* ---------------------------------------------------- tabs / story rail */

.product-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 26px;
}

.product-tabs a {
    padding: 9px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--dur) var(--ease);
}

.product-tabs a:hover {
    border-color: var(--border-strong);
}

.product-tabs a.active {
    background: var(--accent);
    color: var(--accent-text);
    border-color: transparent;
}

.storytelling {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 760px) {
    .storytelling {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.storytelling .story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 26px 16px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: var(--surface);
    text-align: center;
    font-size: 0.86rem;
    font-weight: 600;
}

.storytelling .story-icon {
    font-size: 1.7rem;
    line-height: 1;
}

/* --------------------------------------------------------- static pages */

.static-page {
    max-width: 68ch;
    padding-block: clamp(32px, 6vw, 64px);
}

.static-page h1 {
    margin-bottom: 0.6em;
}
.static-page p {
    color: var(--text-muted);
}

/* ------------------------------------------- receipts / orders / status */

.order-confirmation,
.payment-failed {
    max-width: 680px;
    padding-block: clamp(32px, 6vw, 64px);
}

.order-confirmation h2 {
    margin: 32px 0 10px;
    font-size: 1.1rem;
}

.confirmation-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success-text);
}

.confirmation-mark svg {
    width: 24px;
    height: 24px;
}

.confirmation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

/* .btn already carries its own colour; the generic link treatment on this
   page would otherwise underline them. */
.confirmation-actions .btn {
    border-bottom: 1px solid transparent;
}

.order-confirmation table:not(.receipt-table) {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 16px;
}

/* :not() keeps this off .receipt-table — a bare descendant selector would
   outrank .receipt-table's own padding/border rules below. */
.order-confirmation table:not(.receipt-table) td {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 16px;
}

.receipt-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: top;
}

.receipt-table .receipt-qty,
.receipt-table .receipt-amount {
    width: 1%;
    white-space: nowrap;
    padding-left: 12px;
}

.receipt-table .receipt-qty {
    color: var(--text-muted);
    text-align: center;
}
.receipt-table .receipt-amount {
    text-align: right;
    font-weight: 600;
}

@media (max-width: 420px) {
    .receipt-table,
    .receipt-table tbody,
    .receipt-table tr,
    .receipt-table td {
        display: block;
    }

    .receipt-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 2px 12px;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    .receipt-table td {
        border: none;
        padding: 0;
    }
    .receipt-table .receipt-name {
        grid-column: 1 / -1;
    }
    .receipt-table .receipt-qty {
        text-align: left;
        padding-left: 0;
    }
}

.receipt-totals {
    margin: 0 0 24px;
}

.receipt-totals .receipt-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin: 0;
    padding: 7px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.receipt-totals .receipt-total-row span:last-child {
    white-space: nowrap;
    color: var(--text);
}

.receipt-totals .receipt-grand-total {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.manual-payment-instructions {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: var(--surface-alt);
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 16px;
}

.orders-table th,
.orders-table td {
    padding: 13px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.orders-table th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
}

.orders-table .orders-table-total {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}
.orders-table .orders-table-action {
    text-align: right;
}

@media (max-width: 480px) {
    .orders-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .orders-table,
    .orders-table tbody,
    .orders-table tr,
    .orders-table td {
        display: block;
        width: auto;
    }

    .orders-table tr {
        border: 1px solid var(--border);
        border-radius: var(--card-radius);
        padding: 14px 16px;
        margin-bottom: 12px;
    }

    .orders-table td {
        border: none;
        padding: 3px 0;
    }

    .orders-table .orders-table-order-number {
        font-weight: 700;
        font-size: 1rem;
        padding-bottom: 6px;
    }

    .orders-table .orders-table-total,
    .orders-table .orders-table-action {
        text-align: left;
    }
    .orders-table .orders-table-action {
        margin-top: 6px;
    }

    .orders-table td[data-label]::before {
        content: attr(data-label);
        display: inline-block;
        min-width: 88px;
        color: var(--text-faint);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
}

/* Same statuses/colours as the admin's Order::statusBadgeClass(), rebuilt in
   plain CSS since the storefront loads none of admin's Tailwind tokens. */
.order-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--surface-sunken);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.order-status-badge.status-delivered {
    background: var(--success-bg);
    color: var(--success-text);
}
.order-status-badge.status-shipped,
.order-status-badge.status-confirmed {
    background: #e6eaff;
    color: #2b3a94;
}
.order-status-badge.status-cancelled {
    background: var(--danger-bg);
    color: var(--danger-text);
}
.order-status-badge.status-pending {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.receipt-table .reorder-link {
    font-size: 0.8rem;
}

.order-confirmation a,
.payment-failed a {
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--border-strong);
}

.order-confirmation a:hover,
.payment-failed a:hover {
    border-bottom-color: currentColor;
}

.status-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 18px 0 28px;
}

.status-timeline li {
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    background: var(--surface-alt);
    color: var(--text-faint);
    font-size: 0.82rem;
    font-weight: 600;
}

.status-timeline li.done {
    background: var(--accent);
    color: var(--accent-text);
}
.status-timeline li.cancelled {
    background: var(--danger-bg);
    color: var(--danger-text);
}

/* -------------------------------------------------------- landing pages */

.lp-hero {
    text-align: center;
    padding-block: clamp(28px, 5vw, 56px) 8px;
}
.lp-hero h1 {
    margin: 0;
}

.lp-subheadline {
    max-width: 52ch;
    margin: 12px auto 0;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.lp-hero-image {
    width: 100%;
    max-width: 660px;
    margin: 26px auto 0;
    border-radius: var(--media-radius);
}

.lp-section {
    max-width: 660px;
    margin: 0 auto;
    padding: 28px var(--gutter);
}

.lp-section h2 {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 18px;
}

.lp-why-choose-us ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lp-why-choose-us li {
    display: flex;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.lp-why-choose-us li::before {
    content: "✓";
    color: var(--accent-ink);
    font-weight: 700;
}

.lp-testimonial {
    margin: 0 0 14px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: var(--surface-alt);
}

.lp-testimonial p {
    margin: 0 0 10px;
    font-style: italic;
}

.lp-testimonial cite {
    font-style: normal;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------- footer */

.site-footer {
    margin-top: var(--section-gap);
    background: var(--footer-bg);
    color: var(--footer-text);
    font-size: 0.88rem;
}

.site-footer-grid {
    display: grid;
    gap: 32px;
    padding-block: 48px;
}

@media (min-width: 700px) {
    .site-footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 48px;
        padding-block: 64px;
    }
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
    color: var(--footer-heading);
    opacity: 0.6;
}

.footer-brand-name {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-tracking);
    color: var(--footer-heading);
}

.footer-blurb {
    margin: 0;
    max-width: 40ch;
}

.footer-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius-pill);
    color: var(--footer-heading);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color var(--dur) var(--ease);
}

.footer-contact:hover {
    background: rgba(255, 255, 255, 0.1);
}
.footer-contact svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.footer-links a:hover {
    color: var(--footer-heading);
}

.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-block: 20px;
    font-size: 0.78rem;
    opacity: 0.75;
}

.site-footer-bottom p {
    margin: 0;
}

/* The FAB is fixed bottom-right and would otherwise sit on the footer. */
.has-whatsapp-fab .site-footer-bottom-inner {
    padding-bottom: 82px;
}

@media (min-width: 560px) {
    .has-whatsapp-fab .site-footer-bottom-inner {
        padding-bottom: 20px;
    }
}

/* ----------------------------------------------------------- pagination */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-block: 36px 8px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    text-decoration: none;
    transition:
        border-color var(--dur) var(--ease),
        background-color var(--dur) var(--ease);
}

.pagination-link:hover {
    border-color: var(--text);
}

.pagination-link.is-current {
    background: var(--accent);
    border-color: transparent;
    color: var(--accent-text);
    font-weight: 600;
}

.pagination-link.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}
.pagination-gap {
    padding: 0 4px;
    color: var(--text-faint);
}

/* ---------------------------------------------------------------- misc */

.link-button {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------- cart & checkout */

/* The cart is the second road to an order; the express single-page form on
   the product page remains the first. Everything here is token-driven, so
   all four themes pick it up without their own rules. */

.header-cart {
    position: relative;
}

.header-icon-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--accent-text);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

/* Secondary to Buy Now: same footprint, outlined rather than filled, so the
   express path stays the visually primary one. */
.order-form button[type="submit"].add-to-cart-button {
    margin-top: 0;
    margin-bottom: 14px;
    background: transparent;
    color: var(--accent-ink);
    border: 1.5px solid var(--border-strong);
}

.order-form button[type="submit"].add-to-cart-button:hover {
    background: var(--surface-alt);
    box-shadow: none;
}

.order-form button[type="submit"].add-to-cart-button[disabled] {
    background: transparent;
    border-color: var(--border);
    color: var(--text-faint);
}

.cart-status {
    margin: 0 0 16px;
    padding: 11px 14px;
    border-radius: var(--radius);
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 0.9rem;
}

.cart-empty {
    padding: 28px 0 40px;
    text-align: center;
}

.cart-empty p {
    margin: 0 0 18px;
    color: var(--text-muted);
}

.cart-empty .buy-now-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 28px;
    border-radius: var(--btn-radius);
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 700;
    text-decoration: none;
}

.cart-lines {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.cart-line-product {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: inherit;
    text-decoration: none;
}

.cart-line-name {
    font-weight: 600;
}
.cart-line-variant {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cart-line-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.cart-line-unit {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cart-line-stock {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    font-weight: 600;
}

.cart-line-stock.low {
    color: var(--warning-text);
}
.cart-line-stock.out {
    color: var(--danger-text);
}

.cart-line-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* One grouped control: the input keeps its own name for the no-JS submit,
   the buttons only move its value. 44px touch targets throughout. */
.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-step {
    width: 44px;
    min-height: 44px;
    border: none;
    background: var(--surface-alt);
    color: var(--text);
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease);
}

.qty-step:hover:not([disabled]) {
    background: var(--surface-sunken);
}

.qty-step[disabled] {
    color: var(--text-faint);
    cursor: not-allowed;
}

.cart-line-qty input {
    width: 52px;
    min-height: 44px;
    padding: 8px 4px;
    border: none;
    border-left: 1px solid var(--border-strong);
    border-right: 1px solid var(--border-strong);
    border-radius: 0;
    background: var(--surface);
    color: inherit;
    font-family: inherit;
    font-size: 0.95rem;
    text-align: center;
}

.cart-line-qty button,
.cart-line-remove button {
    min-height: 40px;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.cart-line-remove {
    justify-self: end;
}
.cart-line-remove button {
    color: var(--danger-text);
}

.cart-summary {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: var(--surface-alt);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.cart-delivery-note {
    margin: 0 0 18px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.cart-checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 15px;
    border-radius: var(--btn-radius);
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 700;
    text-decoration: none;
}

.cart-continue-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 40px;
}

.checkout-review {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: var(--surface-alt);
}

.checkout-review h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.checkout-lines {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.checkout-lines li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.checkout-line-variant {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.checkout-line-qty {
    color: var(--text-muted);
}
.checkout-line-total {
    font-weight: 600;
}

.checkout-totals {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    margin: 0;
    font-size: 0.92rem;
}

.checkout-totals dd {
    margin: 0;
    text-align: right;
}
.checkout-totals dt {
    color: var(--text-muted);
}

.checkout-total-label,
.checkout-total-value {
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 1.05rem;
    font-weight: 700;
}

.checkout-total-label {
    color: var(--text) !important;
}

@media (min-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr 1.15fr;
        align-items: start;
    }

    /* Summary first on mobile (buyers want to confirm what they're buying
       before typing an address), form first on desktop where both are
       visible at once. */
    .checkout-review {
        order: 2;
        position: sticky;
        top: 88px;
    }
    .checkout-form {
        order: 1;
    }
}

/* ---------- Product reviews (optional, stores.reviews_enabled) ---------- */
.reviews {
    margin: 40px 0 24px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.reviews-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    margin-bottom: 16px;
}

.reviews-title {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-tracking);
    font-size: 1.3rem;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.review-stars {
    color: #c98a00;
    letter-spacing: 1px;
}

.reviews-empty {
    color: var(--text-muted);
}

.review-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.review {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.review-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin: 0 0 6px;
    font-size: 0.9rem;
}

.review-meta time {
    color: var(--text-faint);
    font-size: 0.8rem;
}

.review-verified {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 0.75rem;
    font-weight: 600;
}

.review-comment {
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.review-form-wrap {
    max-width: 560px;
}

.review-form-wrap summary {
    display: inline-block;
    cursor: pointer;
    padding: 10px 18px;
    border: 1px solid var(--border-strong);
    border-radius: var(--btn-radius);
    font-weight: 600;
}

.review-form {
    margin-top: 16px;
}

.review-form input,
.review-form textarea {
    margin-bottom: 12px;
}

.review-rating-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-rating-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: #c98a00;
    cursor: pointer;
}

.review-rating-options input[type="radio"] {
    margin: 0 !important;
}

.review-hint {
    margin: -6px 0 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.review-form button[type="submit"] + .review-hint {
    margin-top: 10px;
}

.review-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.review-flash {
    margin: 24px 0 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--success-bg);
    color: var(--success-text);
}

/* Merchant-defined homepage sections: optional line under the heading. */
.section-subtitle {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}
