/* ==========================================================================
   Zaree — regal minimalism for Eastern & ethnic fashion.

   Ported from the Stitch "Zaree — Modern Heritage" design (the Regal
   Minimalism design system lives at docs/templates/Zaree_e_commerce_atelier/
   …/DESIGN.md): ivory paper canvas, deep emerald actions, antique-gold
   keylines and eyebrows, Playfair Display (400) headlines over Inter UI,
   STRICTLY sharp corners and ZERO shadows — depth comes from tonal layers
   and 1px gold lines only.

   This theme OWNS its header + the featured / new-arrivals / lookbook /
   newsletter home sections (zr-* markup) and INHERITS Modern Retail's
   functional pages and the hero / trust / promo / brands / journal home
   partials. This stylesheet therefore has two jobs:

     (a) style the NEW `zr-*` markup into the Stitch design; and
     (b) restyle the INHERITED `mr-*` surfaces — chiefly by re-pointing the
         base neutral tokens at the ivory palette, flattening every radius
         and shadow, and drawing the gold keyline structure.

   Everything is scoped under `body.zr-theme` and reads the 5 customizer
   tokens (--bs-primary, --bs-primary-rgb, --ll-accent, --ll-font-headings,
   --ll-font-body, --ll-btn-radius) with theme.json-default fallbacks, so the
   customizer + live preview keep working: change the primary colour and
   every emerald surface follows.
   ========================================================================== */

body.zr-theme {
    /* Customizer-driven brand tokens (fallbacks match theme.json defaults) */
    --zr-emerald: var(--bs-primary, #0e4c3a);
    --zr-emerald-rgb: var(--bs-primary-rgb, 14, 76, 58);
    --zr-gold: var(--ll-accent, #c9a24b);
    --zr-font-head: var(--ll-font-headings, "Playfair Display"), Georgia, serif;
    --zr-font-body: var(--ll-font-body, "Inter"), system-ui, -apple-system, sans-serif;

    /* Regal Minimalism palette (DESIGN.md) */
    --zr-ivory: #f7f3ec;
    --zr-white: #ffffff;
    --zr-champagne: #efe6d8;
    --zr-ink: #2a2723;
    --zr-muted: #5d574e;
    --zr-soft: #8a8378;
    --zr-line: #e6ddd0;

    /* Re-point the inherited base neutrals at the ivory palette so every
       inherited mr-* surface (bands, borders, fills, muted text) follows. */
    --mr-ink: var(--zr-ink);
    --mr-muted: var(--zr-muted);
    --mr-soft: var(--zr-soft);
    --mr-surface: var(--zr-ivory);
    --mr-band: var(--zr-champagne);
    --mr-band-alt: var(--zr-champagne);
    --mr-fill: var(--zr-champagne);
    --mr-border: var(--zr-line);
    --mr-border-strong: var(--zr-gold);
    --mr-radius: 0;
    --mr-gold: var(--zr-gold);
    --mr-shadow: none;

    background-color: var(--zr-ivory);
    color: var(--zr-ink);
    font-family: var(--zr-font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Shape discipline — sharp corners and zero shadows, everywhere. The
   customizer button_radius default is 0; hard-flatten the rest.
   -------------------------------------------------------------------------- */
body.zr-theme .mr-card,
body.zr-theme .mr-card__media,
body.zr-theme .mr-promo,
body.zr-theme .mr-promo__img,
body.zr-theme .mr-article__media img,
body.zr-theme .form-control,
body.zr-theme .form-select,
body.zr-theme .mr-btn,
body.zr-theme .dropdown-menu,
body.zr-theme .offcanvas {
    border-radius: 0 !important;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Typography — Playfair 400 authority, gold tracked eyebrows.
   -------------------------------------------------------------------------- */
body.zr-theme h1, body.zr-theme h2, body.zr-theme h3,
body.zr-theme h4, body.zr-theme h5, body.zr-theme h6,
body.zr-theme .mr-display {
    font-family: var(--zr-font-head);
    color: var(--zr-ink);
    font-weight: 400;
    letter-spacing: -0.02em;
}

body.zr-theme .mr-eyebrow,
body.zr-theme .zr-eyebrow {
    font-family: var(--zr-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--zr-gold);
}

body.zr-theme .zr-eyebrow--gold { color: var(--zr-gold); }

/* --------------------------------------------------------------------------
   Buttons — sharp, formal, uppercase-tracked. Emerald primary; gold-keyline
   ghost secondary. Hover darkens, never rounds or lifts.
   -------------------------------------------------------------------------- */
body.zr-theme .mr-btn {
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.zr-theme .mr-btn--primary {
    background: var(--zr-emerald);
    border-color: var(--zr-emerald);
    color: #fff;
}

body.zr-theme .mr-btn--primary:hover { filter: brightness(0.88); }

body.zr-theme .mr-btn--outline,
body.zr-theme .zr-btn {
    border: 1px solid var(--zr-gold);
    color: var(--zr-ink);
    background: transparent;
}

body.zr-theme .mr-btn--outline:hover,
body.zr-theme .zr-btn:hover {
    background: var(--zr-emerald);
    border-color: var(--zr-emerald);
    color: #fff;
}

body.zr-theme .zr-keyline-link {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--zr-ink);
    text-decoration: none;
    border-bottom: 1px solid var(--zr-gold);
    padding-bottom: 0.35rem;
}

body.zr-theme .zr-keyline-link:hover { color: var(--zr-emerald); }

/* Inputs — the design prefers underline fields over boxes */
body.zr-theme .form-control,
body.zr-theme .form-select {
    background-color: var(--zr-white);
    border-color: var(--zr-line);
}

body.zr-theme .form-control:focus,
body.zr-theme .form-select:focus {
    border-color: var(--zr-emerald);
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Announcement + header — emerald band, ivory glass, wide-tracked serif
   wordmark, centered nav over the signature gold keyline.
   -------------------------------------------------------------------------- */
body.zr-theme .zr-announce {
    background: var(--zr-emerald);
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.2em;
    font-size: 0.7rem;
}

body.zr-theme .zr-header {
    background: rgba(247, 243, 236, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--zr-gold);
}

body.zr-theme .zr-header__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

body.zr-theme .zr-header__side--start { justify-self: start; display: flex; align-items: center; gap: 0.5rem; }
body.zr-theme .zr-header__side--end { justify-self: end; }

body.zr-theme .zr-logo {
    font-family: var(--zr-font-head);
    font-size: 1.7rem;
    font-weight: 400;
    letter-spacing: 0.42em;
    text-indent: 0.42em; /* balances the tracked wordmark optically */
    text-transform: uppercase;
    color: var(--zr-ink);
}

body.zr-theme .zr-logo img { max-height: 44px; }

body.zr-theme .zr-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-bottom: 0.9rem;
}

body.zr-theme .mr-nav-link {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--zr-muted);
}

body.zr-theme .mr-nav-link:hover,
body.zr-theme .mr-nav-link.is-active { color: var(--zr-emerald); }

body.zr-theme .zr-search input {
    border: none;
    border-bottom: 1px solid var(--zr-line);
    border-radius: 0;
    background: transparent;
}

body.zr-theme .zr-search input:focus { border-bottom-color: var(--zr-emerald); }

body.zr-theme .mr-icon-btn { color: var(--zr-ink); }
body.zr-theme .mr-icon-btn:hover { color: var(--zr-emerald); }

/* --------------------------------------------------------------------------
   Inherited hero — full-bleed campaign with left copy: soften the overlay,
   gold eyebrow, ivory primary button (the template's hero buttons invert).
   -------------------------------------------------------------------------- */
body.zr-theme .mr-hero__overlay {
    background: linear-gradient(90deg, rgba(20, 16, 12, 0.55) 0%, rgba(20, 16, 12, 0.12) 65%);
}

body.zr-theme .mr-hero__copy .mr-eyebrow { color: var(--zr-gold); }

body.zr-theme .mr-hero .mr-btn--primary {
    background: var(--zr-ivory);
    border-color: var(--zr-ivory);
    color: var(--zr-ink);
}

body.zr-theme .mr-hero .mr-btn--primary:hover { filter: none; background: #fff; }

body.zr-theme .mr-btn--on-dark {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 0;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Product cards (inherited mr-card) — gallery-frame minimalism: full-bleed
   media, serif titles, champagne media well, no chrome.
   -------------------------------------------------------------------------- */
body.zr-theme .mr-card { background: transparent; }

body.zr-theme .mr-card__media { background: var(--zr-champagne); }

body.zr-theme .mr-card__title,
body.zr-theme .mr-card__title a {
    font-family: var(--zr-font-head);
    font-weight: 400;
    color: var(--zr-ink);
}

body.zr-theme .mr-card__title a:hover { color: var(--zr-emerald); }

body.zr-theme .mr-card__eyebrow {
    color: var(--zr-gold);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.68rem;
}

body.zr-theme .mr-card__price { color: var(--zr-ink); font-weight: 500; }

body.zr-theme .mr-card__badge {
    border-radius: 0;
    background: var(--zr-gold);
    color: var(--zr-ink);
    letter-spacing: 0.08em;
}

body.zr-theme .mr-card__wish { border-radius: 0; background: rgba(247, 243, 236, 0.9); color: var(--zr-emerald); }

body.zr-theme .mr-card__quick {
    background: var(--zr-emerald);
    border-radius: 0;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

/* --------------------------------------------------------------------------
   Inherited promo tiles — the template's collection tiles: sharp, captioned,
   gold keyline on hover.
   -------------------------------------------------------------------------- */
body.zr-theme .mr-promo { border: 1px solid transparent; transition: border-color 0.3s ease; }
body.zr-theme .mr-promo:hover { border-color: var(--zr-gold); }
body.zr-theme .mr-promo__title { font-weight: 400; }
body.zr-theme .mr-promo__cta {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.7rem;
    border-bottom: 1px solid var(--zr-gold);
}

/* --------------------------------------------------------------------------
   Lookbook — full-width campaign band with the serif italic quote.
   -------------------------------------------------------------------------- */
body.zr-theme .zr-lookbook {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zr-emerald);
    overflow: hidden;
}

body.zr-theme .zr-lookbook__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.zr-theme .zr-lookbook__scrim {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 12, 0.45);
}

body.zr-theme .zr-lookbook__quote {
    position: relative;
    max-width: 34ch;
    margin: 0;
    padding: 4rem 1.5rem;
    text-align: center;
    font-family: var(--zr-font-head);
    font-style: italic;
    font-size: clamp(1.5rem, 3.2vw, 2.3rem);
    line-height: 1.4;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Newsletter — the emerald "Join the Atelier" band with the underline input.
   -------------------------------------------------------------------------- */
body.zr-theme .zr-cta {
    background: var(--zr-emerald);
    padding: clamp(4rem, 8vw, 6.5rem) 0;
}

body.zr-theme .zr-cta__title { color: #fff; }

body.zr-theme .zr-cta__body {
    color: rgba(255, 255, 255, 0.75);
    max-width: 56ch;
    line-height: 1.7;
}

body.zr-theme .zr-cta__form {
    display: flex;
    gap: 1.25rem;
    max-width: 520px;
    border-bottom: 1px solid var(--zr-gold);
    padding-bottom: 0.6rem;
}

body.zr-theme .zr-cta__form input {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body.zr-theme .zr-cta__form input::placeholder { color: rgba(255, 255, 255, 0.45); }
body.zr-theme .zr-cta__form input:focus { outline: none; }

body.zr-theme .zr-cta__btn {
    border: none;
    background: transparent;
    color: var(--zr-gold);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

body.zr-theme .zr-cta__note {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Inherited chrome — footer + brands + journal on the ivory system, quiet
   gold structure.
   -------------------------------------------------------------------------- */
body.zr-theme .mr-footer {
    background: var(--zr-ivory);
    border-top: 1px solid var(--zr-gold);
}

body.zr-theme .mr-footer__brand {
    font-family: var(--zr-font-head);
    letter-spacing: 0.32em;
    text-indent: 0.32em;
    text-transform: uppercase;
    color: var(--zr-ink);
}

body.zr-theme .mr-social { border-radius: 0; background: var(--zr-champagne); color: var(--zr-emerald); }
body.zr-theme .mr-social:hover { background: var(--zr-emerald); color: #fff; }

body.zr-theme .mr-brands__mark,
body.zr-theme .mr-brand { font-family: var(--zr-font-head); color: var(--zr-soft); }

body.zr-theme .mr-ulink { color: var(--zr-emerald); }
body.zr-theme .mr-ulink:hover { color: var(--zr-gold); }

body.zr-theme .mr-divider { border-color: var(--zr-line); opacity: 1; }

/* Respect reduced-motion — transitions here are decorative. */
@media (prefers-reduced-motion: reduce) {
    body.zr-theme .mr-btn,
    body.zr-theme .mr-promo {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Mobile (from the Stitch mobile frames): 20px margins, tracked logo shrinks,
   lookbook tightens.
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    body.zr-theme .zr-header__bar { grid-template-columns: auto 1fr auto; }
    body.zr-theme .zr-logo { font-size: 1.25rem; letter-spacing: 0.3em; text-indent: 0.3em; }
    body.zr-theme .zr-lookbook { min-height: 320px; }
}
