/* ==========================================================================
   Lumière — soft clinical elegance for skincare & beauty.

   Ported from the Stitch "Lumière Skincare & Beauty" design (the design
   system lives at docs/templates/Lumière_Skincare_&_Beauty/…/DESIGN.md):
   porcelain whitespace, deep plum authority, dusty rose highlights, soft
   sand grounding, Playfair Display headlines over Source Sans 3 body, 24px
   cards, fully pill-shaped buttons and hazy plum-tinted ambient shadows.

   This theme OWNS its header + the hero / concern-tiles / featured /
   new-arrivals / newsletter home sections (lm-* markup) and INHERITS Modern
   Retail's functional pages (product, category, cart, checkout, account,
   search, blog…). This stylesheet therefore has two jobs:

     (a) style the NEW `lm-*` markup into the Stitch design; and
     (b) restyle the INHERITED `mr-*` base pages — chiefly by re-pointing the
         base neutral tokens at the porcelain palette and softening cards,
         buttons and forms to the 24px/pill shape language.

   Everything is scoped under `body.lm-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 plum surface follows.
   ========================================================================== */

body.lm-theme {
    /* Customizer-driven brand tokens (fallbacks match theme.json defaults) */
    --lm-plum: var(--bs-primary, #3e2434);
    --lm-plum-rgb: var(--bs-primary-rgb, 62, 36, 52);
    --lm-rose: var(--ll-accent, #c97b84);
    --lm-radius: var(--ll-btn-radius, 2rem);
    --lm-font-head: var(--ll-font-headings, "Playfair Display"), Georgia, serif;
    --lm-font-body: var(--ll-font-body, "Source Sans 3"), system-ui, -apple-system, sans-serif;

    /* Porcelain palette (DESIGN.md) */
    --lm-porcelain: #faf7f4;
    --lm-white: #ffffff;
    --lm-sand: #ebe0d6;
    --lm-sand-soft: #f6f0e9;
    --lm-ink: #1c1c1a;
    --lm-muted: #6e6259;
    --lm-soft: #9a8f86;
    --lm-line: #eee5dc;

    /* Shape + depth — 24px organic cards, hazy plum-tinted ambient shadows */
    --lm-card-radius: 1.5rem;
    --lm-tile-radius: 1.5rem;
    --lm-pill: 999px;
    --lm-shadow-sm: 0 6px 20px -12px rgba(var(--lm-plum-rgb), 0.18);
    --lm-shadow: 0 18px 40px -22px rgba(var(--lm-plum-rgb), 0.28);
    --lm-shadow-lg: 0 30px 60px -28px rgba(var(--lm-plum-rgb), 0.35);

    /* Re-point the inherited base neutrals at the porcelain palette so every
       inherited mr-* surface (bands, borders, fills, muted text) softens. */
    --mr-ink: var(--lm-ink);
    --mr-muted: var(--lm-muted);
    --mr-soft: var(--lm-soft);
    --mr-surface: var(--lm-porcelain);
    --mr-band: var(--lm-sand-soft);
    --mr-band-alt: var(--lm-sand-soft);
    --mr-fill: var(--lm-sand);
    --mr-border: var(--lm-line);
    --mr-border-strong: #ded2c5;
    --mr-radius: var(--lm-card-radius);
    --mr-gold: var(--lm-rose);
    --mr-shadow: var(--lm-shadow);

    background-color: var(--lm-porcelain);
    color: var(--lm-ink);
    font-family: var(--lm-font-body);
    font-size: 16.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Typography — Playfair authority with generous, airy leading.
   -------------------------------------------------------------------------- */
body.lm-theme h1, body.lm-theme h2, body.lm-theme h3,
body.lm-theme h4, body.lm-theme h5, body.lm-theme h6,
body.lm-theme .mr-display {
    font-family: var(--lm-font-head);
    color: var(--lm-ink);
    font-weight: 600;
    letter-spacing: -0.02em;
}

body.lm-theme .mr-eyebrow,
body.lm-theme .lm-eyebrow {
    font-family: var(--lm-font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lm-rose);
}

body.lm-theme .lm-eyebrow--on-dark { color: rgba(255, 255, 255, 0.75); }

/* --------------------------------------------------------------------------
   Buttons — everything is a pill; hover lifts, never hard colour flips.
   -------------------------------------------------------------------------- */
body.lm-theme .mr-btn,
body.lm-theme .lm-btn-pill {
    border-radius: var(--lm-pill);
    letter-spacing: 0.08em;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

body.lm-theme .mr-btn--primary {
    background: var(--lm-plum);
    border-color: var(--lm-plum);
    box-shadow: var(--lm-shadow-sm);
}

body.lm-theme .mr-btn--primary:hover {
    transform: scale(1.02);
    box-shadow: var(--lm-shadow);
}

body.lm-theme .mr-btn--outline {
    border: 1px solid var(--lm-plum);
    color: var(--lm-plum);
    background: transparent;
}

body.lm-theme .mr-btn--outline:hover {
    background: var(--lm-plum);
    color: #fff;
    transform: scale(1.02);
}

body.lm-theme .lm-ghost-link {
    color: var(--lm-rose);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.55rem 0.25rem;
}

body.lm-theme .lm-ghost-link:hover { color: var(--lm-plum); }

/* Inputs follow the pill/card shape language */
body.lm-theme .form-control,
body.lm-theme .form-select {
    background-color: var(--lm-white);
    border-color: var(--lm-line);
    border-radius: 1rem;
}

body.lm-theme .form-control:focus,
body.lm-theme .form-select:focus {
    border-color: var(--lm-rose);
    box-shadow: 0 0 0 0.25rem rgba(var(--lm-plum-rgb), 0.08);
}

/* --------------------------------------------------------------------------
   Announcement + header — plum band, then a glassy two-row header with the
   centered serif logo and a quiet centered nav.
   -------------------------------------------------------------------------- */
body.lm-theme .lm-announce {
    background: var(--lm-plum);
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.16em;
    font-size: 0.72rem;
}

body.lm-theme .lm-header {
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--lm-line);
}

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

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

body.lm-theme .lm-logo {
    font-family: var(--lm-font-head);
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--lm-ink);
}

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

body.lm-theme .lm-nav {
    display: flex;
    justify-content: center;
    gap: 1.75rem;
    padding-bottom: 0.8rem;
}

body.lm-theme .mr-nav-link {
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    color: var(--lm-muted);
}

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

body.lm-theme .lm-search input {
    border-radius: var(--lm-pill);
    background: var(--lm-sand-soft);
    border-color: transparent;
}

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

/* --------------------------------------------------------------------------
   Hero — porcelain split with the signature arched image frame.
   -------------------------------------------------------------------------- */
body.lm-theme .lm-hero { padding: 4.5rem 0 5rem; }

body.lm-theme .lm-hero__title {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

/* The Stitch headline sets its second line in italic — echo that on the
   first em/i inside the merchant's title-free markup via the lead instead:
   keep it structural-only (no content assumptions). */
body.lm-theme .lm-hero__lead {
    color: var(--lm-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 44ch;
    margin-bottom: 2rem;
}

body.lm-theme .lm-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

body.lm-theme .lm-hero__figure { position: relative; text-align: center; }

body.lm-theme .lm-arched {
    width: min(100%, 460px);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-top-left-radius: 50% 30%;
    border-top-right-radius: 50% 30%;
    border-bottom-left-radius: var(--lm-card-radius);
    border-bottom-right-radius: var(--lm-card-radius);
    box-shadow: var(--lm-shadow-lg);
}

/* --------------------------------------------------------------------------
   Shop by Concern — tall 24px tiles with a soft gradient + SHOP NOW chip.
   -------------------------------------------------------------------------- */
body.lm-theme .lm-section-title { font-size: clamp(1.7rem, 3vw, 2.1rem); }

body.lm-theme .lm-concern__tile {
    position: relative;
    display: block;
    height: 420px;
    border-radius: var(--lm-tile-radius);
    overflow: hidden;
    box-shadow: var(--lm-shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.lm-theme .lm-concern__tile:hover {
    transform: scale(1.02);
    box-shadow: var(--lm-shadow);
}

body.lm-theme .lm-concern__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.lm-theme .lm-concern__img--placeholder {
    background:
        radial-gradient(120% 90% at 80% 10%, rgba(var(--lm-plum-rgb), 0.16), transparent 60%),
        linear-gradient(160deg, var(--lm-sand-soft), var(--lm-sand));
}

body.lm-theme .lm-concern__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 20, 25, 0.55), rgba(28, 20, 25, 0.05) 55%);
}

body.lm-theme .lm-concern__body {
    position: absolute;
    left: 1.75rem;
    right: 1.75rem;
    bottom: 1.75rem;
    display: grid;
    gap: 0.75rem;
    justify-items: start;
}

body.lm-theme .lm-concern__title {
    font-family: var(--lm-font-head);
    font-size: 1.7rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
}

body.lm-theme .lm-concern__chip {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lm-ink);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.45rem 1rem;
    border-radius: var(--lm-pill);
}

/* --------------------------------------------------------------------------
   Product cards (inherited mr-card) — white 24px cards, sand media well,
   pill badges, soft hover glow. Applies to home grids AND shop / search /
   related rails since the card partial is shared.
   -------------------------------------------------------------------------- */
body.lm-theme .mr-card {
    background: var(--lm-white);
    border-radius: var(--lm-card-radius);
    padding: 0.9rem 0.9rem 1.2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.lm-theme .mr-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--lm-shadow);
}

body.lm-theme .mr-card__media {
    border-radius: 1rem;
    overflow: hidden;
    background: var(--lm-sand-soft);
}

body.lm-theme .mr-card__badge {
    border-radius: var(--lm-pill);
    background: var(--lm-sand);
    color: var(--lm-muted);
    font-weight: 700;
    letter-spacing: 0.08em;
}

body.lm-theme .mr-card__wish {
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--lm-rose);
}

body.lm-theme .mr-card__quick {
    background: var(--lm-plum);
    border-radius: var(--lm-pill);
    margin: 0 0.75rem 0.75rem;
    width: calc(100% - 1.5rem);
}

body.lm-theme .mr-card__eyebrow { color: var(--lm-soft); letter-spacing: 0.1em; }
body.lm-theme .mr-card__title a { color: var(--lm-ink); }
body.lm-theme .mr-card__title a:hover { color: var(--lm-plum); }
body.lm-theme .mr-card__price { color: var(--lm-plum); font-weight: 600; }

/* --------------------------------------------------------------------------
   Newsletter — the rounded plum "Join the Circle" panel.
   -------------------------------------------------------------------------- */
body.lm-theme .lm-cta__panel {
    background: var(--lm-plum);
    border-radius: var(--lm-card-radius);
    padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
    box-shadow: var(--lm-shadow-lg);
}

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

body.lm-theme .lm-cta__body {
    color: rgba(255, 255, 255, 0.8);
    max-width: 52ch;
    line-height: 1.8;
}

body.lm-theme .lm-cta__form {
    display: flex;
    gap: 0.6rem;
    max-width: 480px;
}

body.lm-theme .lm-cta__form input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: var(--lm-pill);
    padding: 0.7rem 1.4rem;
}

body.lm-theme .lm-cta__form input::placeholder { color: rgba(255, 255, 255, 0.55); }

body.lm-theme .lm-cta__form input:focus {
    outline: none;
    border-color: var(--lm-rose);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.08);
}

body.lm-theme .lm-cta__btn {
    background: #fff;
    color: var(--lm-plum);
    border-radius: var(--lm-pill);
    font-weight: 700;
}

body.lm-theme .lm-cta__note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Inherited chrome — footer, journal cards, brand strip, dividers: soften
   onto the porcelain palette (most of the work is done by the --mr-* token
   re-point above; these are the finishing touches).
   -------------------------------------------------------------------------- */
body.lm-theme .mr-footer {
    background: var(--lm-porcelain);
    border-top: 1px solid var(--lm-line);
}

body.lm-theme .mr-footer__brand { font-family: var(--lm-font-head); color: var(--lm-ink); }

body.lm-theme .mr-social {
    border-radius: 50%;
    background: var(--lm-sand-soft);
    color: var(--lm-plum);
}

body.lm-theme .mr-social:hover { background: var(--lm-rose); color: #fff; }

body.lm-theme .mr-article__media img,
body.lm-theme .mr-cta__media img { border-radius: var(--lm-card-radius); }

body.lm-theme .mr-ulink { color: var(--lm-rose); }
body.lm-theme .mr-ulink:hover { color: var(--lm-plum); }

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

/* Brand wordmarks read as quiet serif press logos */
body.lm-theme .mr-brands__mark,
body.lm-theme .mr-brand {
    font-family: var(--lm-font-head);
    color: var(--lm-soft);
}

/* Respect reduced-motion — the design's lifts/scales are decorative. */
@media (prefers-reduced-motion: reduce) {
    body.lm-theme .mr-btn,
    body.lm-theme .lm-concern__tile,
    body.lm-theme .mr-card {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Mobile (from the Stitch mobile frames): tighter hero, stacked actions,
   shorter concern tiles, 20px margins.
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    body.lm-theme .lm-header__bar { grid-template-columns: auto 1fr auto; }
    body.lm-theme .lm-logo { font-size: 1.5rem; }
    body.lm-theme .lm-hero { padding: 2.5rem 0 3rem; }
    body.lm-theme .lm-hero__title { font-size: 2.2rem; }
    body.lm-theme .lm-concern__tile { height: 340px; }
}
