/* =====================================================================
   Eghlim 8 — storefront design system
   RTL · mobile-first · Warm Cream gallery (light) / museum at night (dark)
   Motion only on transform / opacity / clip-path (GPU friendly).
   ===================================================================== */

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"),
         url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root,
[data-theme="light"] {
    --gold: #EFB127;
    --gold-hover: #F7C64B;
    --gold-soft: rgba(239, 177, 39, 0.16);
    --ink: #0D0D0D;
    --bg: #FAF6F0;
    --bg-elev: #F0EAE1;
    --bg-elev-2: #E7DED1;
    --text: #0D0D0D;
    --text-2: #3F3A33;
    --muted: #776F64;
    --line: rgba(13, 13, 13, 0.1);
    --line-strong: rgba(13, 13, 13, 0.2);
    --wall: #EEE6DA;
    --wall-2: #E2D7C6;
    --lamp: #0D0D0D;
    --beam: rgba(239, 177, 39, 0.5);
    --beam-fade: rgba(239, 177, 39, 0.06);
    --header-bg: rgba(250, 246, 240, 0.86);
    --shadow-sm: 0 1px 2px rgba(44, 32, 14, 0.06), 0 4px 14px rgba(44, 32, 14, 0.06);
    --shadow-md: 0 12px 32px rgba(44, 32, 14, 0.12);
    --shadow-art: 0 22px 44px rgba(44, 30, 10, 0.28), 0 4px 10px rgba(44, 30, 10, 0.18);
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #111215;
    --bg-elev: #1A1B20;
    --bg-elev-2: #24252B;
    --text: #F0EAE1;
    --text-2: #D6CFC4;
    --muted: #9C958A;
    --line: rgba(240, 234, 225, 0.1);
    --line-strong: rgba(240, 234, 225, 0.2);
    --wall: #1C1D22;
    --wall-2: #141519;
    --lamp: #34353C;
    --beam: rgba(239, 177, 39, 0.38);
    --beam-fade: rgba(239, 177, 39, 0.03);
    --header-bg: rgba(17, 18, 21, 0.86);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-art: 0 24px 54px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
}

:root {
    --font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
    --radius-s: 10px;
    --radius: 16px;
    --radius-l: 24px;
    --header-h: 64px;
    /* Open purchase sheet on phones; the product stage shrinks by the same amount. */
    --sheet-max: min(58svh, 540px);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --container: 1320px;
    --gutter: 16px;
    --ambient: #EFB127;
}

/* ---- Base ------------------------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-feature-settings: "ss01";
    font-size: 16px;
    line-height: 1.85;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

body.is-locked {
    overflow: hidden;
}

/* "ss01" above draws every digit as a Persian one — right for Persian text only. English runs
   (marked server-side by View\LatinText as bdi.ltr), code and e-mail/URL fields keep Latin digits. */
.ltr,
code,
kbd,
samp,
pre,
input[type="email"],
input[type="url"] {
    font-feature-settings: normal;
}

img,
svg,
canvas {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-heading, var(--font));
    line-height: 1.35;
    font-weight: 800;
}

p {
    margin: 0;
}

/* Persian body copy is justified with the last line flush right (RTL start).
   Zero specificity, so any component that sets its own alignment wins. */
:where(p, li, dd, blockquote, figcaption) {
    text-align: justify;
}

/* Centred blocks keep their (last) line centred. */
.hero__caption,
.empty-state,
.frame-swatch,
.size-option__box {
    text-align-last: center;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

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

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    inset-inline-start: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius-s);
    background: var(--gold);
    color: var(--ink);
    font-weight: 700;
    transition: top 0.2s;
}

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

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

.container--narrow {
    max-width: 820px;
}

.site-main {
    outline: none;
}

.icon {
    width: 22px;
    height: 22px;
    flex: none;
}

.icon--sm {
    width: 18px;
    height: 18px;
}

.icon--xs {
    width: 15px;
    height: 15px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
}

/* ---- Buttons & controls ------------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    background: var(--gold);
    color: var(--ink);
    box-shadow: 0 6px 18px rgba(239, 177, 39, 0.35);
}

.btn--primary:hover {
    background: var(--gold-hover);
}

.btn--secondary {
    background: var(--text);
    color: var(--bg);
}

.btn--ghost {
    border-color: var(--line-strong);
    color: var(--text);
}

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

.btn--link {
    min-height: 40px;
    padding: 0 6px;
    color: var(--text-2);
    text-decoration: underline;
    font-weight: 600;
}

.btn--block {
    width: 100%;
}

.btn--sm {
    min-height: 38px;
    padding: 0 16px;
    font-size: 14px;
}

.btn--lg {
    min-height: 56px;
    font-size: 16px;
}

.btn[disabled],
.btn.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.icon-btn {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover {
    background: var(--bg-elev);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.link-arrow:hover .icon {
    transform: translateX(-3px);
}

.link-arrow .icon {
    transition: transform 0.2s var(--ease);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--bg-elev-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.9;
}

.badge--gold {
    background: var(--gold-soft);
    color: #8A5E00;
}

[data-theme="dark"] .badge--gold {
    color: var(--gold);
}

.badge--ink {
    background: var(--text);
    color: var(--bg);
}

.chip {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.chip input,
.segmented__option input,
.size-option input,
.frame-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.chip > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.chip input:checked + span {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

.chip input:focus-visible + span,
.segmented__option input:focus-visible + span,
.size-option input:focus-visible + .size-option__box,
.frame-option input:focus-visible + .frame-option__box {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--bg-elev-2);
}

.segmented__option {
    position: relative;
}

.segmented__option span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    transition: background-color 0.25s var(--ease), box-shadow 0.25s;
}

.segmented__option input:checked + span {
    background: var(--bg);
    box-shadow: var(--shadow-sm);
}

.select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding-inline: 14px 6px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 14px;
}

.select__label {
    color: var(--muted);
}

.select select {
    border: 0;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}

.select select option {
    background: var(--bg);
    color: var(--text);
}

.field {
    display: grid;
    gap: 6px;
}

.field__label {
    color: var(--text-2);
    font-size: 14px;
    font-weight: 700;
}

.field__input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--bg);
    font-size: 16px;
}

.field__input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 4px var(--gold-soft);
}

.field__input--code {
    text-align: center;
    letter-spacing: 0.5em;
    font-size: 22px;
    font-weight: 800;
}

.field__error {
    color: #B3261E;
    font-size: 14px;
    font-weight: 600;
}

[data-theme="dark"] .field__error {
    color: #FF8A80;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field input {
    width: 100%;
    min-height: 42px;
    padding-inline: 16px 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-elev);
    font-size: 14px;
}

.search-field input:focus {
    border-color: var(--gold);
    outline: none;
    background: var(--bg);
}

.search-field__btn {
    position: absolute;
    inset-inline-end: 4px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.search-field--large input {
    min-height: 56px;
    font-size: 17px;
}

/* Test accounts only (test mode): payments go through the test gateway. */
.test-banner {
    position: relative;
    z-index: 51;
    padding: 6px 16px;
    background: repeating-linear-gradient(-45deg, var(--gold), var(--gold) 14px, #F7C64B 14px, #F7C64B 28px);
    color: #0D0D0D;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

/* ---- Header ------------------------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    border-bottom: 1px solid var(--line);
}

/* The frosted glass lives on a pseudo-element: a backdrop-filter on the header itself makes the
   header the containing block of the fixed mobile drawer, squeezing the menu into 64 px. */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    pointer-events: none;
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

/* The logo: the real lamp lockup (rail, lamp head, beam with «اقلیم هشت»). Light and dark
   versions swap with the theme; the dark one comes first in the markup. */
.brand {
    --brand-lamp: #0D0D0D;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

[data-theme="dark"] .brand {
    --brand-lamp: #E8E1D6;
}

.brand__logo {
    position: relative;
    display: block;
    flex: none;
}

.brand__mark {
    display: block;
    width: auto;
    height: 46px;
}

.brand__mark--dark {
    display: none;
}

[data-theme="dark"] .brand__mark--dark {
    display: block;
}

[data-theme="dark"] .brand__mark--dark + .brand__mark--light {
    display: none;
}

/* The lamp's rail drawn out to one side across the shop name, level with the rail at the top
   edge of the logo; the brand clips it where the name ends. */
.brand.has-rail {
    overflow: hidden;
}

.brand.has-rail .brand__logo::after {
    content: "";
    position: absolute;
    top: 0;
    right: calc(100% - 1px);
    width: 640px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand-lamp);
}

.brand.has-rail .brand__text {
    padding-top: 4px;
}

.brand__text {
    display: grid;
    line-height: 1.25;
}

.brand__name {
    font-weight: 900;
    font-size: 18px;
    white-space: nowrap;
}

/* Narrow phones: the logo mark already carries «اقلیم هشت»; drop the text so
   menu, search, lamp, account and cart keep full 44 px targets (fits 320 px). */
@media (max-width: 419px) {
    .site-header .brand__text {
        display: none;
    }
}

.brand__tagline {
    display: none;
    color: var(--muted);
    font-size: 11px;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-inline-start: auto;
}

.site-header__search {
    display: none;
    width: 240px;
    margin-inline-end: 6px;
}

.site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(86vw, 360px);
    padding: 16px;
    background: var(--bg);
    box-shadow: var(--shadow-md);
    transform: translateX(105%);
    transition: transform 0.35s var(--ease);
    overflow-y: auto;
}

[data-nav-open] .site-nav {
    transform: translateX(0);
}

.site-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-nav__title {
    font-weight: 900;
    font-size: 18px;
}

.site-nav__list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__link {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding-inline: 12px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
    background: var(--bg-elev);
}

.site-nav__backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(13, 13, 13, 0.4);
}

.lamp-switch__icon {
    position: relative;
    display: grid;
    place-items: center;
}

.lamp-switch__glow {
    position: absolute;
    top: 13px;
    left: 50%;
    width: 24px;
    height: 14px;
    translate: -50% 0;
    background: var(--gold);
    clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
    opacity: 0.85;
    filter: blur(1px);
    transition: opacity 0.3s;
}

[data-theme="dark"] .lamp-switch__glow {
    opacity: 0;
}

.account {
    position: relative;
}

.account__dot {
    position: absolute;
    top: 9px;
    inset-inline-end: 9px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--gold);
}

.account__menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 200px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: var(--shadow-md);
}

.account__hello {
    padding: 6px 10px;
    color: var(--muted);
    font-size: 13px;
}

.account__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding-inline: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
}

.account__item:hover {
    background: var(--bg-elev);
}

.cart-link__badge {
    position: absolute;
    top: 4px;
    inset-inline-end: 2px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--ink);
    font-size: 11px;
    font-weight: 900;
    line-height: 19px;
    text-align: center;
}

.cart-link__badge.is-bump {
    animation: bump 0.45s var(--ease);
}

@keyframes bump {
    40% { transform: scale(1.35); }
}

/* ---- Signature lamp & beam ---------------------------------------------------------------- */

.lamp {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.lamp__rail {
    position: absolute;
    top: 30px;
    left: 0;
    width: 17%;
    height: 5px;
    background: var(--lamp);
}

.lamp__head {
    position: absolute;
    top: 25px;
    left: 14%;
    width: 22%;
    height: 18px;
    background: var(--lamp);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lamp__beam {
    position: absolute;
    top: 43px;
    left: 14.6%;
    width: 85.4%;
    height: calc(100% - 43px);
    background: linear-gradient(160deg, var(--beam) 0%, var(--beam-fade) 62%, transparent 92%);
    clip-path: polygon(3% 0, 24% 0, 100% 34%, 100% 100%, 58% 100%);
    transform-origin: 6% 0;
    opacity: 0;
    will-change: opacity, transform;
}

.lamp__dust {
    position: absolute;
    top: 43px;
    left: 14.6%;
    width: 85.4%;
    height: calc(100% - 43px);
    background:
        radial-gradient(1.5px 1.5px at 28% 22%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 44% 38%, rgba(255, 255, 255, 0.55), transparent),
        radial-gradient(1.5px 1.5px at 62% 52%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 51% 70%, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(1px 1px at 76% 64%, rgba(255, 255, 255, 0.4), transparent);
    clip-path: polygon(3% 0, 24% 0, 100% 34%, 100% 100%, 58% 100%);
    opacity: 0;
}

.is-lit .lamp__beam {
    animation: lamp-on 1.5s var(--ease) forwards;
}

.is-lit .lamp__dust {
    animation: dust 9s ease-in-out 1.4s infinite alternate;
}

@keyframes lamp-on {
    0% { opacity: 0; transform: scaleY(0.94); }
    14% { opacity: 0.55; }
    20% { opacity: 0.08; }
    30% { opacity: 0.8; }
    36% { opacity: 0.32; }
    100% { opacity: 1; transform: scaleY(1); }
}

@keyframes dust {
    from { opacity: 0.25; transform: translate3d(0, 0, 0); }
    to { opacity: 0.6; transform: translate3d(-6px, 10px, 0); }
}

[data-theme="dark"] .lamp__head {
    box-shadow: 0 6px 30px rgba(239, 177, 39, 0.25);
}

.lamp--mini {
    height: 120px;
}

.lamp--mini .lamp__rail { top: 18px; }
.lamp--mini .lamp__head { top: 14px; height: 12px; }
.lamp--mini .lamp__beam,
.lamp--mini .lamp__dust { top: 26px; height: calc(100% - 26px); }

/* ---- Hero --------------------------------------------------------------------------------- */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: 76px 44px;
}

.hero .lamp {
    z-index: -1;
    width: min(100%, 980px);
}

.hero__inner {
    display: grid;
    gap: 36px;
    align-items: center;
}

.hero__copy {
    display: grid;
    gap: 16px;
    justify-items: start;
}

.hero__title {
    font-size: clamp(32px, 8.6vw, 64px);
    font-weight: 900;
    line-height: 1.25;
}

.hero__subtitle {
    max-width: 560px;
    color: var(--text-2);
    font-size: clamp(16px, 2.4vw, 19px);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.hero__spotlight {
    display: grid;
    justify-items: center;
    gap: 14px;
    width: min(74%, 330px);
    margin-inline: auto;
    text-decoration: none;
    perspective: 1000px;
}

.hero__frame {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    padding: 4.5%;
    background: #1C1C1C;
    box-shadow: var(--shadow-art);
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.3s var(--ease);
    will-change: transform;
}

.hero__frame img {
    width: 100%;
    height: auto;
    -webkit-user-drag: none;
    user-select: none;
}

/* Real room mockup as the hero picture: a square photo card under the lamp. */
.hero__spotlight--room {
    width: min(100%, 440px);
}

.hero__photo {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-l);
    background: var(--bg-elev-2);
    box-shadow: var(--shadow-md);
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.3s var(--ease), translate 0.35s var(--ease);
    will-change: transform;
    touch-action: pan-y; /* horizontal swipes change the slide; vertical ones scroll the page */
}

.hero__photo.is-dragging {
    transition: transform 0.3s var(--ease);
    cursor: grabbing;
}

.hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

/* Rotating hero: the next room photo fades in on top, then replaces the base picture. */
.hero__photo .hero__photo-next {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s var(--ease);
}

.hero__photo .hero__photo-next.is-visible {
    opacity: 1;
}

.hero__caption {
    transition: opacity 0.35s var(--ease);
}

.hero__caption.is-swapping {
    opacity: 0;
}

/* Link + slide dots. The dots are buttons (thumb-sized targets around a small dot). */
.hero__showcase {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 0;
}

.hero__dots {
    display: flex;
    justify-content: center;
    gap: 0;
}

.hero__dot {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.hero__dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line-strong);
    transition: background-color 0.3s, transform 0.3s;
}

.hero__dot:hover::before {
    background: var(--muted);
}

.hero__dot.is-active::before {
    background: var(--gold);
    transform: scale(1.3);
}

.hero__dot:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -3px;
}

/* Glass glare. The span is a clip box over the picture only: inset 0 plus a margin equal to the
   frame's padding (both percentages resolve against the frame's width), so the light band on
   ::before slides across the picture and never onto the moulding or past the frame. */
.hero__glare,
.art-card__glint {
    position: absolute;
    inset: 0;
    margin: 4.5%;
    overflow: hidden;
    pointer-events: none;
}

.hero__glare::before,
.art-card__glint::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.24) 46%, transparent 60%);
    transform: translateX(var(--gx, -40%));
    transition: transform 0.3s var(--ease);
}

.hero__caption {
    display: grid;
    justify-items: center;
    text-align: center;
}

.hero__caption-title {
    font-weight: 800;
}

.hero__caption-meta {
    color: var(--muted);
    font-size: 13px;
}

/* The hero lamp is a light switch: a transparent target over its rail and head (the lamp is
   min(100%, 980px) wide, head at 14–36%), plus the hint beside it. */
.hero__lamp-switch {
    position: absolute;
    top: 6px;
    left: 0;
    z-index: 1;
    width: min(38%, 372px);
    height: 58px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.hero:has(.hero__lamp-switch:hover) .lamp__head {
    box-shadow: 0 0 0 3px var(--gold-soft), 0 8px 26px rgba(239, 177, 39, 0.35);
}

.hero__hint {
    position: absolute;
    top: 16px;
    left: min(40%, 392px);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    color: var(--text-2);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.hero__hint:hover {
    border-color: var(--gold);
    color: var(--text);
}

.hero__hint .icon {
    color: var(--gold);
}

/* ---- Sections ----------------------------------------------------------------------------- */

.section {
    position: relative;
    padding-block: 48px;
}

.section--tight {
    padding-block: 24px 56px;
}

.section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section__title {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 900;
}

.section__title--center {
    margin-bottom: 26px;
    text-align: center;
}

.section__subtitle {
    margin-top: 6px;
    max-width: 640px;
    color: var(--text-2);
}

.page-head {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: 44px 20px;
}

.page-head .lamp {
    z-index: -1;
    opacity: 0.85;
}

.page-head .lamp__beam {
    opacity: 0.55;
}

.page-head--collection {
    border-bottom: 3px solid color-mix(in srgb, var(--accent, var(--gold)) 60%, transparent);
}

.page-head__title {
    font-size: clamp(28px, 6vw, 44px);
    font-weight: 900;
}

.page-head__intro {
    margin-top: 10px;
    max-width: 720px;
    color: var(--text-2);
    font-size: 17px;
}

.page-head__count {
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

.page-head .search-field {
    margin-top: 16px;
    max-width: 640px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs a {
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--text);
    text-decoration: underline;
}

.empty-state {
    padding: 48px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--text-2);
    text-align: center;
}

.fine-print {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

/* ---- Collections -------------------------------------------------------------------------- */

.collection-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max(165px, 47%);
    gap: 12px;
    padding-bottom: 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

/* Sliders scroll by swipe, mouse drag and the arrow buttons — no scrollbar under them. */
.collection-rail::-webkit-scrollbar,
.art-rail::-webkit-scrollbar,
.day-picker::-webkit-scrollbar {
    display: none;
}

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

.collection-tile {
    position: relative;
    display: grid;
    align-content: end;
    min-height: 250px;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent) 22%, var(--bg-elev));
    overflow: hidden;
    text-decoration: none;
    scroll-snap-align: start;
    isolation: isolate;
}

.collection-tile__art {
    position: absolute;
    inset: 10px 15% 62px 15%;
    z-index: -1;
    display: block;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    transform: rotate(-3deg);
    transition: transform 0.4s var(--ease);
}

.collection-tile__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 5px solid #1C1C1C;
}

.collection-tile:hover .collection-tile__art {
    transform: rotate(0deg) translateY(-4px);
}

.collection-tile__body {
    display: grid;
    padding: 12px 14px;
    background: linear-gradient(0deg, var(--bg-elev) 60%, color-mix(in srgb, var(--bg-elev) 0%, transparent));
}

.collection-tile__title {
    font-weight: 900;
    font-size: 16px;
}

.collection-tile__count {
    color: var(--muted);
    font-size: 13px;
}

/* ---- Artwork cards & grids ---------------------------------------------------------------- */

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

.art-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max(170px, 48%);
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.art-rail .art-card {
    scroll-snap-align: start;
}

/* Rails scroll by touch natively; with a mouse they can be dragged (and use the arrow buttons). */
.rail-wrap {
    position: relative;
}

@media (hover: hover) and (pointer: fine) {
    .collection-rail,
    .art-rail {
        cursor: grab;
    }
}

.collection-rail.is-dragging,
.art-rail.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}

.collection-rail.is-dragging a,
.art-rail.is-dragging a {
    pointer-events: none;
}

.rail-btn {
    position: absolute;
    top: calc(50% - 30px);
    z-index: 2;
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s var(--ease);
}

.rail-btn:hover {
    transform: scale(1.06);
}

.rail-btn[disabled] {
    opacity: 0;
    pointer-events: none;
}

.rail-btn svg {
    width: 20px;
    height: 20px;
}

/* RTL: the rail starts on the right, so "previous" sits on the right edge and "next" on the left. */
.rail-btn--prev {
    right: -10px;
}

.rail-btn--next {
    left: -10px;
}

@media (hover: hover) and (pointer: fine) {
    .rail-wrap.has-overflow .rail-btn {
        display: grid;
    }
}

.art-card__link {
    display: grid;
    gap: 10px;
    text-decoration: none;
}

.art-card__frame {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 4%;
    background: #1C1C1C;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.art-card__img,
.art-card__placeholder {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: color-mix(in srgb, var(--card-accent, var(--gold)) 30%, var(--bg-elev));
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.art-card__glint {
    margin: 4%;
    opacity: 0;
    transition: opacity 0.35s;
}

.art-card__glint::before {
    transition: transform 0.6s var(--ease);
}

.art-card__link:hover .art-card__frame {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--line);
}

.art-card__link:hover .art-card__glint {
    opacity: 1;
}

.art-card__link:hover .art-card__glint::before {
    transform: translateX(30%);
}

/* Room mockup on hover (added by app.js on mouse/trackpad devices only). The
   square photo covers the whole frame; the artwork sits in its upper middle. */
.art-card__room {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
    opacity: 0;
    scale: 1.04;
    transition: opacity 0.45s var(--ease), scale 0.8s var(--ease);
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.art-card__link:is(:hover, :focus-visible) .art-card__frame.has-room .art-card__room {
    opacity: 1;
    scale: 1;
}

.art-card__body {
    display: grid;
    gap: 2px;
}

.art-card__title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.6;
}

.art-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    color: var(--muted);
    font-size: 13px;
}

.art-card__price {
    color: var(--text-2);
    font-weight: 700;
}

.art-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.art-card__badges:empty {
    display: none;
}

/* ---- Filters & pager ------------------------------------------------------------------------ */

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.filters__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
}

.filters__legend {
    float: inline-start;
    margin-inline-end: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.filters__clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 40px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.filters__clear:hover {
    color: var(--text);
}

.pager {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 32px;
}

.pager__links {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
}

.pager__link {
    font-weight: 700;
}

/* ---- Home blocks -------------------------------------------------------------------------- */

.section--studio {
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--gold) 9%, transparent) 40%, transparent);
}

.section--studio .lamp {
    z-index: -1;
}

.section--studio .lamp__beam {
    opacity: 0.6;
}

.studio-band {
    display: grid;
    gap: 28px;
}

.studio-band__copy {
    display: grid;
    gap: 14px;
    justify-items: start;
}

/* Home › room simulator: the living-room scene of the planner cropped to its measured wall
   (x 560–1560, y 400–1400 of the 2048 px photo) with three 40 × 60 cm works hung 8 cm apart. */
.section--room {
    overflow: hidden;
}

.room-band {
    display: grid;
    gap: 28px;
}

.room-band__copy {
    display: grid;
    gap: 14px;
    justify-items: start;
}

.room-band__points {
    display: grid;
    gap: 10px;
    margin: 4px 0 8px;
    padding: 0;
    list-style: none;
    color: var(--text-2);
    font-size: 15px;
}

.room-band__points li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.room-band__points .icon {
    flex: none;
    margin-top: 4px;
    color: var(--gold);
}

.room-band__points strong {
    color: var(--text);
}

.room-band__scene {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-l);
    background: #B6ABA0 url("/assets/img/rooms/living.webp") 53.44% 38.17% / 204.8% auto no-repeat;
    container-type: inline-size;
    box-shadow: var(--shadow-md);
}

.room-band__piece {
    position: absolute;
    top: 50.5%;
    width: 18.5%;
    aspect-ratio: 2 / 3;
    translate: -50% -50%;
    border: max(3px, 0.9cqw) solid #17140f;
    background: #f4f1ea;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32), 0 2px 5px rgba(0, 0, 0, 0.25);
    transition: translate 0.5s var(--ease);
}

.room-band__piece img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.room-band__piece--1 { left: 72.2%; }
.room-band__piece--2 { left: 50%; }
.room-band__piece--3 { left: 27.8%; }

.room-band__scene:hover .room-band__piece--1 { translate: -50% -52%; }
.room-band__scene:hover .room-band__piece--3 { translate: -50% -48%; }

.steps {
    display: grid;
    gap: 12px;
    margin: 6px 0;
    padding: 0;
    list-style: none;
}

.steps__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.steps__num {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    font-weight: 900;
}

.steps__title {
    display: block;
    font-weight: 800;
}

.steps__text {
    color: var(--text-2);
    font-size: 15px;
}

.steps--cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    margin-top: 20px;
}

.steps--cards .steps__item {
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.promises {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.promise {
    display: grid;
    gap: 6px;
    align-content: start;
    padding: 18px 16px;
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.promise__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--gold-soft);
    color: var(--text);
}

.promise__title {
    font-weight: 800;
}

.promise__text {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.7;
}

.section--insta {
    padding-block: 32px 56px;
}

.insta-band {
    display: grid;
    justify-items: start;
    gap: 14px;
    padding: 24px;
    border-radius: var(--radius-l);
    background: var(--text);
    color: var(--bg);
}

.insta-band .section__subtitle {
    color: color-mix(in srgb, var(--bg) 75%, transparent);
}

.insta-band__icon .icon {
    width: 40px;
    height: 40px;
    color: var(--gold);
}

.insta-band .btn--secondary {
    background: var(--gold);
    color: var(--ink);
}

.article-list {
    display: grid;
    gap: 18px;
}

.article-card__link {
    display: grid;
    gap: 8px;
    text-decoration: none;
}

.article-card__cover {
    border-radius: var(--radius);
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.article-card__title {
    font-size: 18px;
}

.article-card__excerpt {
    color: var(--text-2);
}

.article-card__meta {
    display: flex;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

/* ---- Prose, FAQ, frames guide ------------------------------------------------------------- */

.prose {
    color: var(--text-2);
    font-size: 17px;
}

.prose > * + * {
    margin-top: 1em;
}

.prose h2 {
    margin-top: 1.6em;
    color: var(--text);
    font-size: 21px;
}

.prose ul,
.prose ol {
    padding-inline-start: 1.4em;
}

.prose li + li {
    margin-top: 0.4em;
}

.prose a {
    color: var(--text);
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
}

.faq {
    display: grid;
    gap: 10px;
}

.faq__item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.faq__q::-webkit-details-marker {
    display: none;
}

.faq__chevron {
    transition: transform 0.25s var(--ease);
}

.faq__item[open] .faq__chevron {
    transform: rotate(180deg);
}

.faq__a {
    padding: 0 18px 18px;
    color: var(--text-2);
}

.frames-guide {
    display: grid;
    gap: 28px;
}

.frame-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.frame-swatch {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 18px 12px;
    border-radius: var(--radius);
    background: var(--bg-elev);
    text-align: center;
}

.frame-swatch__title {
    font-size: 14px;
}

.frame-swatch__meta {
    color: var(--muted);
    font-size: 12px;
}

.frame-sample {
    --frame-color: #1C1C1C;
    display: block;
    width: 84px;
    aspect-ratio: 2 / 3;
    padding: 9px;
    background: var(--frame-color);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), var(--shadow-sm);
}

.frame-sample__inner {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--ambient) 0%, color-mix(in srgb, var(--ambient) 40%, #FAF6F0) 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.frame-sample[data-finish="metallic"] {
    background: linear-gradient(135deg, color-mix(in srgb, var(--frame-color) 55%, #fff) 0%, var(--frame-color) 30%, color-mix(in srgb, var(--frame-color) 70%, #000) 55%, var(--frame-color) 75%, color-mix(in srgb, var(--frame-color) 50%, #fff) 100%);
}

.frame-sample[data-finish="woodgrain"] {
    background:
        repeating-linear-gradient(97deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 5px, rgba(255, 255, 255, 0.06) 5px 6px, transparent 6px 11px),
        var(--frame-color);
}

.frame-sample[data-finish="none"] {
    padding: 4px;
    background: #FFFFFF;
}

.frame-sample--sm {
    width: 34px;
    padding: 4px;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.price-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 14px;
}

.price-table th,
.price-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: start;
    white-space: nowrap;
}

.price-table thead th {
    background: var(--bg-elev);
    font-weight: 800;
}

.price-table tbody tr:last-child > * {
    border-bottom: 0;
}

/* Frames guide: add-on cards (paper border, passe-partout, glazing). */
.frames-guide__lead {
    margin: -14px 0 0;
    color: var(--text-2);
}

.addon-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.addon-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.addon-card__body {
    display: grid;
    gap: 4px;
}

.addon-card__title {
    font-size: 15px;
}

.addon-card__text {
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.7;
}

.addon-card__note {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

/* A small swatch drawn in CSS: dark frame, the border or passe-partout, then the picture. */
.addon-sample {
    --mat-color: #F6F4EF;
    position: relative;
    flex: none;
    display: block;
    width: 52px;
    aspect-ratio: 2 / 3;
    padding: 5px;
    background: #1C1C1C;
    box-shadow: var(--shadow-sm);
}

.addon-sample__inner {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--ambient) 0%, color-mix(in srgb, var(--ambient) 40%, #FAF6F0) 100%);
}

.addon-sample[data-group="mat"] .addon-sample__inner {
    border: 6px solid var(--mat-color);
}

.addon-sample[data-style="passepartout"] .addon-sample__inner {
    box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.18), inset -1px -1px 0 rgba(255, 255, 255, 0.6);
}

.addon-sample[data-group="glazing"]::after {
    content: "";
    position: absolute;
    inset: 5px;
    background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.55) 42%, rgba(255, 255, 255, 0.1) 50%, transparent 62%);
}

.addon-sample[data-glazing="anti_reflective"]::after {
    opacity: 0.3;
}

.addon-sample[data-glazing="glass"]::after {
    background: linear-gradient(120deg, transparent 22%, rgba(220, 245, 240, 0.6) 40%, rgba(255, 255, 255, 0.12) 50%, transparent 64%);
}

/* ---- Product page ------------------------------------------------------------------------- */

.pdp__layout {
    display: grid;
    gap: 22px;
    padding-top: 12px;
}

.pdp__stage {
    position: relative;
}

.stage {
    position: relative;
    height: min(64svh, 600px);
    min-height: 360px;
    border-radius: var(--radius-l);
    overflow: hidden;
    isolation: isolate;
    container-type: size;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    --art-w: min(66cqw, 55cqh);
}

/* Phones: while the bottom sheet is open the stage shrinks to stay pinned above it. The sheet's
   height (--sheet-max, set on .configurator below) and the stage's height use the same value, so
   the whole framed artwork stays visible above the open sheet. */
@media (max-width: 959px) {
    .stage {
        transition: height 0.42s var(--ease);
    }

    .pdp.is-configuring .stage {
        height: calc(100svh - var(--header-h) - var(--sheet-max) - 14px);
        min-height: 200px;
    }

    .pdp.is-configuring .stage__modes,
    .pdp.is-configuring .stage__note,
    .pdp.is-configuring .stage__loading {
        opacity: 0;
        pointer-events: none;
    }
}

.stage__wall {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(60% 52% at 50% 42%, color-mix(in srgb, var(--ambient) 32%, transparent), transparent 72%),
        radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.35), transparent 60%),
        linear-gradient(180deg, var(--wall) 0%, var(--wall-2) 100%);
    transition: background 0.6s;
}

[data-theme="dark"] .stage__wall {
    background:
        radial-gradient(60% 52% at 50% 42%, color-mix(in srgb, var(--ambient) 22%, transparent), transparent 72%),
        linear-gradient(180deg, var(--wall) 0%, var(--wall-2) 100%);
}

.stage .lamp {
    z-index: -1;
}

/* «در فضای واقعی»: the designer's room mockup fills the stage (square photo,
   artwork centred in its upper half — keep that part when cropping). */
.stage__room {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
    opacity: 0;
    scale: 1.035;
    transition: opacity 0.5s var(--ease), scale 0.9s var(--ease);
    pointer-events: none;
    -webkit-user-drag: none;
}

.stage[data-mode="room"] .stage__room {
    opacity: 1;
    scale: 1;
}

.stage__piece {
    position: absolute;
    top: 47%;
    left: 50%;
    width: var(--art-w);
    margin: 0;
    translate: -50% -50%;
    perspective: 1100px;
    transition: opacity 0.45s var(--ease), scale 0.6s var(--ease);
}

.stage[data-mode="room"] .stage__piece {
    opacity: 0;
    scale: 0.96;
}

.artframe {
    position: relative;
    padding: 4.6%;
    background: var(--frame-color, #1C1C1C);
    box-shadow: var(--shadow-art), inset 0 0 0 1px rgba(0, 0, 0, 0.35), inset 2px 2px 0 rgba(255, 255, 255, 0.08);
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transform-style: preserve-3d;
    transition: transform 0.25s ease-out, padding 0.3s var(--ease), background 0.3s;
    will-change: transform;
}

.stage[data-finish="metallic"] .artframe {
    background: linear-gradient(135deg, color-mix(in srgb, var(--frame-color) 55%, #fff) 0%, var(--frame-color) 28%, color-mix(in srgb, var(--frame-color) 72%, #000) 52%, var(--frame-color) 76%, color-mix(in srgb, var(--frame-color) 50%, #fff) 100%);
}

.stage[data-finish="woodgrain"] .artframe {
    background:
        repeating-linear-gradient(97deg, rgba(0, 0, 0, 0.13) 0 1px, transparent 1px 4px, rgba(255, 255, 255, 0.07) 4px 5px, transparent 5px 9px),
        var(--frame-color);
}

.stage[data-finish="none"] .artframe {
    padding: 2.4%;
    background: #FFFFFF;
}

.stage[data-type="digital"] .artframe {
    padding: 0;
    background: transparent;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    border-radius: 6px;
    overflow: hidden;
}

.artframe__art {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--bg-elev-2);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.artframe__art.has-lqip {
    background: var(--lqip) center / cover no-repeat, var(--bg-elev-2);
}

.artframe__art.has-lqip::before {
    content: "";
    position: absolute;
    inset: -12px;
    background: inherit;
    filter: blur(12px);
    transition: opacity 0.6s;
}

.artframe__art.is-ready::before {
    opacity: 0;
}

.artframe__canvas {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.9s var(--ease) 0.15s;
    -webkit-user-drag: none;
}

.artframe__art.is-ready .artframe__canvas {
    opacity: 1;
}

.artframe__noscript {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Glass glare: lives inside .artframe__art, whose overflow clip keeps the moving light band on
   the picture (it never spills onto the moulding or past the frame). */
.artframe__glare {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.2) 45%, rgba(255, 255, 255, 0.05) 52%, transparent 62%);
    transform: translateX(var(--gx, -30%));
    pointer-events: none;
    transition: transform 0.25s ease-out, opacity 0.3s;
}

.stage[data-finish="none"] .artframe__glare,
.stage[data-type="digital"] .artframe__glare {
    opacity: 0;
}

.stage__shadow {
    position: absolute;
    inset: auto 8% -6% 8%;
    height: 10%;
    z-index: -1;
    background: radial-gradient(50% 50% at 50% 50%, rgba(40, 28, 10, 0.25), transparent 70%);
}

.stage__size {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    padding: 2px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    font-size: 13px;
    font-weight: 800;
    transition: opacity 0.3s;
}

/* Honest caption on the room photo: the mockup's frame and mat are only an example. */
.stage__note {
    position: absolute;
    top: 12px;
    inset-inline: 12px auto;
    max-width: calc(100% - 24px);
    padding: 3px 12px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.stage[data-mode="room"] .stage__note {
    opacity: 1;
}

.stage[data-mode="room"] .stage__size,
.stage[data-mode="room"] .stage__loading {
    opacity: 0;
}

.stage__loading {
    position: absolute;
    left: 50%;
    bottom: 64px;
    translate: -50% 0;
    padding: 4px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    transition: opacity 0.4s;
}

.stage.is-ready .stage__loading {
    opacity: 0;
}

.stage__modes {
    position: absolute;
    inset: auto 10px 10px 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.stage__mode {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.stage__mode[aria-pressed="true"] {
    background: var(--text);
    color: var(--bg);
}

.pdp__protect {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
}

.pdp__info {
    display: grid;
    gap: 16px;
    align-content: start;
    padding-bottom: 110px;
}

.pdp__title {
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 900;
}

.pdp__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pdp__badges:empty {
    display: none;
}

.pdp__story {
    color: var(--text-2);
    font-size: 17px;
}

/* Configurator — bottom sheet on phones, inline card on desktop.
   A flex column (not a grid): under max-height only flex lets the options shrink and scroll inside
   the sheet; a grid row kept its full height and ran past the bottom of the screen. */

.configurator {
    --peek: 78px;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    max-height: var(--sheet-max);
    border-radius: 22px 22px 0 0;
    background: var(--bg-elev);
    box-shadow: 0 -12px 40px rgba(20, 14, 4, 0.18);
    transform: translateY(calc(100% - var(--peek) - env(safe-area-inset-bottom)));
    transition: transform 0.42s var(--ease);
}

.configurator[data-open="true"] {
    transform: translateY(0);
}

.sheet__peek {
    display: flex;
    flex: none;
    align-items: center;
    gap: 12px;
    min-height: var(--peek);
    padding: 14px 16px 10px;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.sheet__grip {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 42px;
    height: 5px;
    translate: -50% 0;
    border-radius: 999px;
    background: var(--line-strong);
}

.sheet__summary {
    display: grid;
    flex: 1;
    min-width: 0;
    line-height: 1.5;
}

.sheet__price {
    font-size: 18px;
    font-weight: 900;
}

.sheet__desc {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.configurator[data-open="true"] .sheet__open-label {
    visibility: hidden;
}

.sheet__body {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    gap: 18px;
    padding: 4px 16px calc(16px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.opt-group {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.opt-group__legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 0;
    font-weight: 800;
}

.opt-group__hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.opt-group__link {
    justify-self: start;
    color: var(--text-2);
    font-size: 13px;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.size-option {
    position: relative;
}

.size-option__box {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-height: 92px;
    padding: 10px 6px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.size-option__shape {
    width: calc(var(--w) * 0.34px);
    height: calc(var(--h) * 0.34px);
    max-height: 36px;
    max-width: 24px;
    border: 2px solid currentColor;
    border-radius: 2px;
    opacity: 0.55;
}

.size-option__dims {
    font-weight: 800;
    font-size: 14px;
    line-height: 1.3;
}

.size-option__price {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
}

.size-option input:checked + .size-option__box {
    border-color: var(--text);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.frame-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.frame-option {
    position: relative;
}

.frame-option__box {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    min-height: 64px;
    padding: 8px 10px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.frame-option__box .frame-sample {
    grid-row: span 2;
}

.frame-option__name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.frame-option__price {
    color: var(--muted);
    font-size: 12px;
}

.frame-option input:checked + .frame-option__box {
    border-color: var(--text);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.sheet__total {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 2px 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.sheet__total-label {
    color: var(--text-2);
    font-weight: 700;
}

.sheet__total-price {
    font-size: 22px;
    font-weight: 900;
}

.sheet__total-words {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 13px;
}

/* Prints continue on the room-preview page: say what comes next. */
.sheet__next {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: var(--radius-s);
    background: var(--gold-soft);
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.8;
}

.sheet__next .icon {
    flex: none;
    margin-top: 3px;
}

.ai-callout {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
    border-radius: var(--radius);
    background: var(--gold-soft);
}

.ai-callout__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gold);
    color: var(--ink);
}

.ai-callout p {
    margin-block: 4px 6px;
    color: var(--text-2);
    font-size: 14px;
}

.pdp__details {
    display: grid;
    gap: 10px;
}

.detail {
    border-bottom: 1px solid var(--line);
}

.detail__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.detail__summary::-webkit-details-marker {
    display: none;
}

.detail__chevron {
    transition: transform 0.25s var(--ease);
}

.detail[open] .detail__chevron {
    transform: rotate(180deg);
}

.detail > p {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    color: var(--text-2);
    font-size: 15px;
}

.specs {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
}

.specs div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 15px;
}

.specs dt {
    color: var(--muted);
}

.specs dd {
    margin: 0;
    font-weight: 700;
    text-align: end;
}

.pdp__note {
    color: var(--muted);
    font-size: 13px;
}

/* Product page: QR of the artwork's short link, with send / Telegram / WhatsApp / download. */
.share-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.share-card__qr {
    display: block;
    padding: 6px;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.share-card__qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.share-card__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.share-card__title {
    font-size: 16px;
    font-weight: 900;
}

.share-card__text,
.share-card__link {
    color: var(--text-2);
    font-size: 13.5px;
    text-align: start;
}

.share-card__link {
    color: var(--muted);
    font-size: 13px;
}

.share-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

@media (max-width: 419px) {
    .share-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .share-card__qr {
        width: 150px;
    }

    .share-card__text,
    .share-card__link {
        text-align: center;
    }

    .share-card__actions {
        justify-content: center;
    }
}

/* ---- Cart ------------------------------------------------------------------------------------ */

.cart-lines {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.cart-line {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.cart-line.is-unavailable {
    opacity: 0.65;
}

.cart-line__art img {
    width: 72px;
    height: auto;
    border: 4px solid #1C1C1C;
}

.cart-line__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.cart-line__title {
    font-weight: 800;
    text-decoration: none;
}

.cart-line__meta {
    color: var(--muted);
    font-size: 13px;
}

.cart-line__price {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    font-size: 14px;
}

.cart-total {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: var(--radius-l);
    background: var(--bg-elev);
}

.cart-total__row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
}

.cart-total__words {
    color: var(--muted);
    font-size: 13px;
}

.cart-empty {
    display: grid;
    justify-items: center;
    gap: 12px;
}

/* ---- Dialogs & toasts ---------------------------------------------------------------------- */

.dialog {
    width: min(100% - 24px, 440px);
    max-height: calc(100dvh - 24px);
    padding: 28px 22px 22px;
    border: 0;
    border-radius: var(--radius-l);
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-md);
    overflow: hidden auto;
}

.dialog::backdrop {
    background: rgba(13, 13, 13, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.dialog[open] {
    animation: dialog-in 0.35s var(--ease);
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
}

.dialog__close-form {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    margin: 0;
}

.dialog__title {
    position: relative;
    margin-bottom: 6px;
    font-size: 22px;
}

.dialog__text {
    position: relative;
    margin-bottom: 16px;
    color: var(--text-2);
    font-size: 15px;
}

.dialog__fine {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
}

.login-dialog {
    isolation: isolate;
}

.login-dialog .lamp {
    z-index: -1;
}

.login-step {
    position: relative;
    display: grid;
    gap: 14px;
}

.login-step__row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

/* Two ways in: one-time code or password. */
.login-modes {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 4px 0 16px;
    padding: 4px;
    border-radius: 999px;
    background: var(--bg-elev);
}

.login-modes[hidden] {
    display: none;
}

.login-mode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.login-mode[aria-selected="true"] {
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.login-step__forgot {
    justify-self: center;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
    white-space: normal;
}

/* Password field with a show / hide button on its end side. */
.password-input {
    position: relative;
    display: block;
}

/* The input is always left-to-right, so the button and its room are on the physical left. */
.password-input .field__input {
    width: 100%;
    padding-left: 48px;
}

.password-input__toggle {
    position: absolute;
    top: 50%;
    left: 2px;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
}

.password-input__toggle[aria-pressed="true"] {
    color: var(--gold);
}

.toast-region {
    position: fixed;
    top: calc(var(--header-h) + 10px);
    left: 50%;
    z-index: 80;
    display: grid;
    gap: 8px;
    width: min(100% - 24px, 420px);
    translate: -50% 0;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--text);
    color: var(--bg);
    box-shadow: var(--shadow-md);
    font-weight: 700;
    font-size: 15px;
    animation: toast-in 0.35s var(--ease);
}

.toast--error {
    background: #B3261E;
    color: #FFFFFF;
}

.toast .icon {
    color: var(--gold);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-10px); }
}

/* ---- Footer -------------------------------------------------------------------------------- */
/* One rhythm everywhere: every column title has the same size and gold rule, every row the same
   type size and spacing. Phones: feature strip 2 × 2, the two link columns side by side. */

.site-footer {
    margin-top: 32px;
    border-top: 1px solid var(--line);
    background: var(--bg-elev);
    color: var(--text-2);
    font-size: 14.5px;
}

.footer-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
    margin: 0;
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
    list-style: none;
}

.footer-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: start;
}

.footer-feature__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gold-soft);
    color: var(--text);
}

.footer-feature__icon .icon {
    width: 21px;
    height: 21px;
}

.footer-feature__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.footer-feature__title {
    color: var(--text);
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.6;
}

.footer-feature__text {
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.75;
}

.site-footer__main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 20px;
    padding-block: 34px 30px;
}

.site-footer__brand,
.site-footer__contact {
    grid-column: 1 / -1;
}

.site-footer__brand {
    display: grid;
    gap: 14px;
    align-content: start;
}

.brand--footer .brand__mark {
    height: 62px;
}

.brand--footer .brand__name {
    font-size: 20px;
}

.site-footer__text {
    color: var(--text-2);
    font-size: 14px;
    line-height: 2;
}

.site-footer__title {
    position: relative;
    margin-bottom: 16px;
    padding-bottom: 10px;
    color: var(--text);
    font-size: 15.5px;
    font-weight: 800;
}

.site-footer__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
}

.site-footer__links,
.footer-contact {
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__links li,
.footer-contact li {
    text-align: start;
}

.site-footer__links a {
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer__links a:hover {
    color: var(--text);
    text-decoration: underline;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

.footer-social__link {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.footer-social__link:hover {
    border-color: var(--gold);
    background: var(--gold-soft);
    transform: translateY(-2px);
}

.footer-social__link .icon {
    width: 20px;
    height: 20px;
}

.footer-contact__row {
    display: grid;
    grid-template-columns: 20px auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.footer-contact__row > .icon {
    width: 19px;
    height: 19px;
    color: var(--muted);
}

.footer-contact__row--wide {
    align-items: start;
}

.footer-contact__label {
    color: var(--muted);
    font-size: 13.5px;
    white-space: nowrap;
}

.footer-contact__label::after {
    content: ":";
}

.footer-contact__value {
    min-width: 0;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

a.footer-contact__value:hover {
    text-decoration: underline;
}

.footer-contact__note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
    text-align: start;
}

.footer-contact__note .icon {
    flex: none;
    margin-top: 5px;
}

/* Brand story beside the trust-seal slot (eNamad), like a shop's "about" strip. */
.site-footer__about {
    display: grid;
    gap: 18px;
    padding-block: 26px;
    border-top: 1px solid var(--line);
}

.site-footer__story p {
    color: var(--muted);
    font-size: 14px;
    line-height: 2.05;
}

.site-footer__seal {
    display: flex;
    justify-content: flex-start;
}

/* No code yet: the slot exists, but only a signed-in admin sees its placeholder. */
.site-footer__seal.is-empty {
    display: none;
}

.is-admin .site-footer__seal.is-empty {
    display: flex;
}

.site-footer__seal > a,
.seal-placeholder {
    display: grid;
    place-items: center;
    width: 132px;
    min-height: 144px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #FFFFFF;
}

.site-footer__seal img {
    width: auto;
    max-width: 112px;
    height: auto;
}

.seal-placeholder {
    gap: 6px;
    border: 1.5px dashed var(--line-strong);
    text-align: center;
}

.seal-placeholder__badge {
    display: grid;
    justify-items: center;
    gap: 4px;
}

.seal-placeholder__icon {
    width: 44px;
    height: 44px;
    color: #2B5FD9;
}

.seal-placeholder__stars {
    color: #CFCFCF;
    font-size: 13px;
    letter-spacing: 1px;
    line-height: 1;
}

.seal-placeholder__stars .is-on {
    color: #F2B01E;
}

.seal-placeholder__note {
    color: #5C5C5C;
    font-size: 10.5px;
    line-height: 1.7;
}

.site-footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-block: 18px calc(18px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.site-footer__bottom p {
    text-align: center;
}

.site-footer__credit a {
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.site-footer__credit a:hover {
    text-decoration: underline;
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    text-decoration: none;
}

.back-to-top:hover {
    color: var(--text);
}

.page-artwork .site-footer {
    padding-bottom: 90px;
}

@media (min-width: 640px) {
    .site-footer__main {
        grid-template-columns: 1.4fr 1fr 1fr;
    }

    .site-footer__brand {
        grid-column: auto;
    }

    .site-footer__about {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 36px;
    }

    .site-footer__bottom {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 20px;
    }

    .site-footer__bottom p {
        text-align: start;
    }

    .site-footer__credit {
        margin-inline-start: auto;
    }
}

@media (min-width: 960px) {
    .footer-features {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }

    .site-footer__main {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
        gap: 32px;
        padding-block: 40px 34px;
    }

    .site-footer__contact {
        grid-column: auto;
    }

    .page-artwork .site-footer {
        padding-bottom: 0;
    }
}

/* ---- Reveal-on-scroll ----------------------------------------------------------------------- */

.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---- Breakpoints ---------------------------------------------------------------------------- */

@media (min-width: 640px) {
    :root {
        --gutter: 24px;
    }

    .brand__tagline {
        display: block;
    }

    .art-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .art-rail {
        grid-auto-columns: max(190px, 27%);
    }

    .collection-rail {
        grid-auto-columns: max(180px, 25%);
    }

    .collection-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .promises {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .size-options {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .frame-options {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .insta-band {
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    .article-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    :root {
        --header-h: 72px;
    }

    .site-header .brand__mark {
        height: 52px;
    }

    .site-header__menu {
        display: none;
    }

    .site-nav {
        position: static;
        flex-direction: row;
        width: auto;
        padding: 0;
        background: transparent;
        box-shadow: none;
        transform: none;
        overflow: visible;
        margin-inline-start: 18px;
    }

    .site-nav__head,
    .site-nav__search,
    .site-nav__backdrop {
        display: none !important;
    }

    .site-nav__list {
        display: flex;
        gap: 2px;
    }

    .site-nav__link {
        min-height: 40px;
        padding-inline: 10px;
        font-size: 15px;
        white-space: nowrap;
    }

    .brand__tagline {
        display: none;
    }

    .hero {
        padding-block: 110px 80px;
    }

    .hero__inner {
        grid-template-columns: 1.15fr 0.85fr;
    }

    .hero__spotlight {
        width: min(100%, 340px);
    }

    .hero__spotlight--room {
        width: min(100%, 520px);
    }

    .art-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 30px 22px;
    }

    .art-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .art-rail {
        grid-auto-columns: max(220px, 18%);
    }

    .collection-rail {
        grid-auto-columns: max(200px, 16%);
    }

    .collection-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .collection-tile {
        min-height: 300px;
    }

    .studio-band {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 48px;
    }

    .room-band {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 48px;
    }

    .article-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* Product page: pinned stage beside an inline configurator */
    .pdp__layout {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        gap: 40px;
        align-items: start;
        padding-top: 28px;
    }

    .pdp__stage {
        position: sticky;
        top: calc(var(--header-h) + 16px);
    }

    .stage {
        height: auto;
        aspect-ratio: 5 / 5.6;
        max-height: calc(100vh - var(--header-h) - 80px);
    }

    .pdp__info {
        padding-bottom: 40px;
    }

    .configurator {
        position: static;
        max-height: none;
        border-radius: var(--radius-l);
        box-shadow: none;
        border: 1px solid var(--line);
        transform: none;
    }

    .sheet__peek {
        display: none;
    }

    .sheet__body {
        padding: 20px;
        overflow: visible;
    }

    .size-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .frame-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (min-width: 1200px) {
    .art-grid:not(.art-grid--compact) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .site-header__search {
        display: flex;
    }

    .search-link {
        display: none;
    }

    .brand__tagline {
        display: block;
    }

    .size-options {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .frame-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .lamp__beam {
        opacity: 1;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ==== Phase 3: checkout, payment result, customer area ================================== */

.page-head--compact {
    padding-block: 28px 12px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid--pair {
    grid-template-columns: 1fr 1fr;
}

.field__input--ltr {
    direction: ltr;
    text-align: left;
}

.field__input--area {
    min-height: 0;
    padding-block: 12px;
    line-height: 1.8;
    resize: vertical;
}

select.field__input {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: left 22px center, left 16px center;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}

[aria-invalid="true"].field__input {
    border-color: #B3261E;
}

.checkout {
    display: grid;
    gap: 22px;
    align-items: start;
}

.checkout__main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.checkout__alert,
.checkout__note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--radius-s);
}

.checkout__alert {
    background: #FDECEA;
    color: #8C1D18;
    font-weight: 600;
}

[data-theme="dark"] .checkout__alert {
    background: rgba(255, 138, 128, 0.12);
    color: #FFB4AB;
}

.checkout__note {
    background: color-mix(in srgb, var(--gold) 12%, var(--bg-elev));
    color: var(--text-2);
}

.checkout__note[hidden],
.checkout__alert[hidden] {
    display: none;
}

.checkout-step {
    display: grid;
    gap: 16px;
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--bg-elev);
}

.checkout-step__title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    font-size: 17px;
    font-weight: 900;
}

.checkout-step__n {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--text);
    color: var(--bg);
    font-size: 14px;
}

.checkout-step__hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--text-2);
}

/* Map picker: the customer moves the map under a fixed centre pin. */
.map-picker {
    display: grid;
    gap: 10px;
}

.map-picker__hint {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    font-size: 14px;
}

.map-picker__frame {
    position: relative;
    overflow: hidden;
    height: clamp(220px, 42vw, 320px);
    border-radius: var(--radius);
    background:
        repeating-linear-gradient(0deg, transparent 0 38px, var(--line) 38px 39px),
        repeating-linear-gradient(90deg, transparent 0 38px, var(--line) 38px 39px),
        var(--bg-elev-2);
}

.map-picker__canvas {
    position: absolute;
    inset: 0;
}

.map-picker__pin {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    color: var(--text);
    translate: -50% -100%;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

.map-picker__pin .icon {
    width: 36px;
    height: 36px;
    fill: var(--gold);
}

.map-picker__loading {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 3;
    translate: -50% 0;
    padding: 4px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.map-picker__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.map-picker__result {
    flex: 1 1 220px;
    margin: 0;
    color: var(--text-2);
    font-size: 13px;
}

/* Shipping options */
.ship {
    display: grid;
    gap: 10px;
}

.ship__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
}

.ship__options {
    display: grid;
    gap: 8px;
}

.ship-option,
.day-chip,
.slot-chip {
    position: relative;
    display: block;
    cursor: pointer;
}

.ship-option input,
.day-chip input,
.slot-chip input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.ship-option__box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ship-option__name {
    font-weight: 800;
}

.ship-option__eta {
    grid-column: 1;
    color: var(--muted);
    font-size: 13px;
}

.ship-option__cost {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-weight: 900;
}

.ship-option input:checked + .ship-option__box,
.day-chip input:checked + .day-chip__box,
.slot-chip input:checked + span {
    border-color: var(--text);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.ship-option input:focus-visible + .ship-option__box,
.day-chip input:focus-visible + .day-chip__box,
.slot-chip input:focus-visible + span,
.check-row input:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.check-row[hidden] {
    display: none;
}

.check-row input {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 5px;
    accent-color: var(--gold);
}

.check-row__note {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.check-row__note--warn {
    margin-top: 2px;
    color: var(--text-2);
}

.check-row__note--warn::before {
    content: "• ";
    color: var(--gold);
}

.summary-item__studio {
    width: fit-content;
    margin-top: 6px;
}

.check-row--boxed {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--gold) 8%, var(--bg));
}

/* Jalali day picker: a horizontal strip of day chips (thumb-friendly on phones). */
.day-picker {
    display: flex;
    gap: 8px;
    margin-inline: -4px;
    padding: 4px 4px 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.day-chip {
    flex: 0 0 76px;
    scroll-snap-align: start;
}

.day-chip__box {
    display: grid;
    justify-items: center;
    padding: 10px 4px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    text-align: center;
    text-align-last: center;
}

.day-chip__weekday {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.day-chip__day {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.4;
}

.day-chip__month {
    font-size: 12px;
}

.day-chip.is-off {
    cursor: not-allowed;
}

.day-chip.is-off .day-chip__box {
    border-style: dashed;
    background: transparent;
    opacity: 0.55;
}

.day-chip.is-off .day-chip__month {
    color: #B3261E;
    font-weight: 700;
}

.slot-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.slot-chip > span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    font-weight: 700;
}

/* Order summary */
.summary-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-l);
    background: var(--bg-elev);
    box-shadow: var(--shadow-sm);
}

.summary-card__title {
    font-size: 17px;
}

.summary-items {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.summary-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
}

.summary-items--plain .summary-item:not(:has(.summary-item__art)) {
    grid-template-columns: 1fr auto;
}

.summary-item__art img {
    width: 48px;
    height: 72px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.summary-item__body {
    display: grid;
    justify-items: start;
    gap: 2px;
    min-width: 0;
}

.summary-item__title {
    overflow: hidden;
    max-width: 100%;
    font-weight: 800;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-item__meta {
    color: var(--muted);
    font-size: 13px;
}

.summary-item__price {
    font-size: 14px;
    white-space: nowrap;
}

.summary-totals {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.summary-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.summary-totals dt {
    color: var(--text-2);
}

.summary-totals dd {
    margin: 0;
    font-weight: 700;
}

.summary-totals__payable {
    padding-top: 6px;
    font-size: 18px;
}

.summary-totals__payable dd {
    font-weight: 900;
}

.summary-card__words,
.summary-card__terms {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.summary-card__secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

/* Payment result, login landing, notices */
.result-card,
.login-card {
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: clamp(22px, 5vw, 36px);
    border-radius: var(--radius-l);
    background: var(--bg-elev);
    box-shadow: var(--shadow-sm);
    text-align: center;
    text-align-last: center;
}

.result-card__icon,
.login-card__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--text);
}

.result-card__icon .icon,
.login-card__icon .icon {
    width: 30px;
    height: 30px;
}

.result-card--paid .result-card__icon {
    background: #2E7D4F;
    color: #FFFFFF;
}

.result-card--failed .result-card__icon {
    background: #FDECEA;
    color: #B3261E;
}

.result-card__title,
.login-card__title {
    font-size: clamp(20px, 4vw, 26px);
}

.result-card__text,
.result-card__ref,
.result-card__next,
.result-card__total,
.login-card__text {
    margin: 0;
    color: var(--text-2);
}

.result-card__next {
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-card .summary-items,
.result-card .summary-totals {
    width: 100%;
    text-align: start;
    text-align-last: auto;
}

.result-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.login-card {
    max-width: 460px;
    margin-inline: auto;
}

/* Customer area */
.account-nav {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    overflow-x: auto;
    scrollbar-width: none;
}

.account-nav__link {
    flex: none;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-2);
    font-weight: 700;
    text-decoration: none;
}

.account-nav__link[aria-current="page"] {
    background: var(--text);
    color: var(--bg);
}

a.account__item {
    color: inherit;
    text-decoration: none;
}

a.account__item:hover {
    background: var(--bg-elev);
}

.order-list,
.download-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.order-row__link {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 4px 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
    text-decoration: none;
}

.order-row__number {
    font-weight: 900;
}

.order-row__date {
    grid-row: 2;
    color: var(--muted);
    font-size: 13px;
}

.order-row__total {
    grid-row: 2;
    grid-column: 2;
}

.order-row__chevron {
    grid-row: 1 / span 2;
    grid-column: 3;
    color: var(--muted);
}

.status-badge {
    justify-self: start;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--bg-elev-2);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-badge--pending_payment {
    background: color-mix(in srgb, var(--gold) 22%, var(--bg));
}

.status-badge--processing_print,
.status-badge--paid_awaiting_ai,
.status-badge--ready_to_ship,
.status-badge--shipped {
    background: rgba(46, 125, 79, 0.14);
    color: #1F6B41;
}

.status-badge--delivered,
.status-badge--completed_digital {
    background: #2E7D4F;
    color: #FFFFFF;
}

.status-badge--cancelled,
.status-badge--refunded {
    background: rgba(179, 38, 30, 0.1);
    color: #8C1D18;
}

[data-theme="dark"] .status-badge--processing_print,
[data-theme="dark"] .status-badge--paid_awaiting_ai,
[data-theme="dark"] .status-badge--ready_to_ship,
[data-theme="dark"] .status-badge--shipped {
    color: #8FD3A8;
}

[data-theme="dark"] .status-badge--cancelled,
[data-theme="dark"] .status-badge--refunded {
    color: #FFB4AB;
}

.order-detail {
    display: grid;
    gap: 16px;
}

.order-detail__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}

.order-detail__date,
.order-detail__ref {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.detail-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--bg-elev);
}

.detail-card__title {
    font-size: 16px;
}

/* Profile › password */
.password-card {
    margin-top: 18px;
}

.password-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
}

.password-card__intro,
.password-card__hint {
    margin: 0;
    color: var(--text-2);
    font-size: 13.5px;
    line-height: 1.9;
}

.password-card__hint {
    color: var(--muted);
    font-size: 12.5px;
}

.password-card__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-self: start;
    margin: 0;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.password-card__status.is-on {
    background: var(--gold-soft);
    color: var(--text);
}

.password-card__remove {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.order-detail__address,
.order-detail__shipping {
    margin: 0;
    color: var(--text-2);
}

.order-detail__shipping {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}

.pay-again {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--gold) 14%, var(--bg-elev));
}

.pay-again p {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.download-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.download-row__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.download-row__state {
    color: var(--text-2);
    font-size: 13px;
}

.download-row__action {
    grid-column: 1 / -1;
}

.download-row__action:empty {
    display: none;
}

.download-row--exhausted,
.download-row--pending_ai {
    opacity: 0.75;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .field--wide {
        grid-column: 1 / -1;
    }

    .ship__options {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .download-row {
        grid-template-columns: auto 1fr auto;
    }

    .download-row__action {
        grid-column: auto;
    }
}

@media (min-width: 960px) {
    .checkout {
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 28px;
    }

    .checkout__summary {
        position: sticky;
        top: calc(var(--header-h) + 16px);
    }
}

/* ---- Admin bar (signed-in admins only; built by app.js) ------------------------------------ */

.admin-bar {
    position: relative;
    z-index: 52;
    background: #0D0D0D;
    color: #F0EAE1;
    font-size: 13px;
    line-height: 1.6;
}

.admin-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 6px var(--gutter);
}

.admin-bar__brand {
    color: var(--gold);
    font-weight: 800;
    text-decoration: none;
}

.admin-bar__context {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    min-width: 0;
}

.admin-bar__sku {
    direction: ltr;
    color: #B9B1A5;
}

.admin-bar__title {
    max-width: 260px;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-bar__state {
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.admin-bar__state.is-on { background: rgba(74, 222, 128, 0.18); color: #86EFAC; }
.admin-bar__state.is-off { background: rgba(239, 177, 39, 0.2); color: var(--gold); }

.admin-bar__stat {
    color: #B9B1A5;
}

.admin-bar__actions {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.admin-bar__link {
    padding: 3px 12px;
    border: 1px solid rgba(240, 234, 225, 0.22);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.admin-bar__link:hover,
.admin-bar__link:focus-visible {
    border-color: var(--gold);
    color: var(--gold);
}

.admin-bar__link.is-primary {
    border-color: var(--gold);
    background: var(--gold);
    color: #0D0D0D;
    font-weight: 800;
}

.admin-bar__hide {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #B9B1A5;
    font-size: 18px;
    cursor: pointer;
}

.admin-bar__hide:hover {
    color: #F0EAE1;
}

@media (max-width: 640px) {
    .admin-bar__actions {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .admin-bar__link {
        white-space: nowrap;
    }

    .admin-bar__hide {
        margin-inline-start: auto;
    }
}

.admin-quick {
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-l);
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-md);
}

.admin-quick::backdrop {
    background: rgba(13, 13, 13, 0.55);
}

.admin-quick__form {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.admin-quick__title {
    font-size: 18px;
}

.admin-quick__field {
    display: grid;
    gap: 4px;
}

.admin-quick__label,
.admin-quick__prices legend {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-quick__input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-s);
    background: var(--bg-elev);
    color: var(--text);
    font: inherit;
}

.admin-quick__input--amount {
    max-width: 150px;
    font-variant-numeric: tabular-nums;
}

.admin-quick__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.admin-quick__check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.admin-quick__prices {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.admin-quick__price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.admin-quick__size {
    min-width: 92px;
    font-size: 14px;
}

.admin-quick__status {
    min-height: 1.6em;
    font-size: 14px;
}

.admin-quick__status.is-ok { color: #15803D; }
.admin-quick__status.is-error { color: #B91C1C; }

.admin-quick__buttons {
    display: flex;
    gap: 10px;
}

/* ---- Journal: topics, article page, content blocks ------------------------------------------- */

.journal-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.chip-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

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

.chip-link.is-active {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--ink);
}

.article-card__topic {
    justify-self: start;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.journal-pager {
    margin-top: 28px;
}

.journal-pager .pager__link.is-current {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--ink);
}

.journal-article__preview {
    padding: 8px 16px;
    background: repeating-linear-gradient(-45deg, var(--gold), var(--gold) 14px, #F7C64B 14px, #F7C64B 28px);
    color: #0D0D0D;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.journal-article__head {
    position: relative;
    overflow: hidden;
    padding: 34px 0 22px;
}

.journal-article__head .lamp {
    opacity: 0.55;
}

.journal-article__title {
    margin-top: 10px;
    font-size: clamp(26px, 5vw, 40px);
    line-height: 1.4;
}

.journal-article__excerpt {
    margin-top: 12px;
    color: var(--text-2);
    font-size: 18px;
    text-align: justify;
    text-align-last: start;
}

.journal-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

.journal-article__cover {
    margin: 0 auto 26px;
}

.journal-article__cover img {
    width: 100%;
    max-height: 560px;
    border-radius: var(--radius-l);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.journal-toc {
    margin-bottom: 26px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.journal-toc__title {
    font-weight: 800;
    cursor: pointer;
}

.journal-toc__list {
    margin: 10px 0 0;
    padding-inline-start: 1.4em;
    color: var(--text-2);
}

.journal-toc__item + .journal-toc__item {
    margin-top: 4px;
}

.journal-toc__item--h3 {
    margin-inline-start: 1.2em;
    font-size: 15px;
}

.journal-toc a {
    text-decoration: none;
}

.journal-toc a:hover {
    color: var(--text);
    text-decoration: underline;
}

.journal-body {
    font-size: 17.5px;
    line-height: 2.05;
}

/* Body text justified with the last line at the start (right): the brand typesetting rule. */
.journal-body p,
.journal-body li,
.journal-body blockquote p {
    text-align: justify;
    text-align-last: start;
}

.journal-body > * + * {
    margin-top: 1.1em;
}

.jb-heading {
    margin-top: 1.7em;
    color: var(--text);
    scroll-margin-top: calc(var(--header-h) + 16px);
}

h2.jb-heading { font-size: 23px; }
h3.jb-heading { font-size: 19px; }

.jb-image {
    margin: 1.6em 0;
}

.jb-image img {
    width: 100%;
    border-radius: var(--radius);
}

.jb-image figcaption,
.jb-compare figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.jb-quote {
    margin: 1.6em 0;
    padding: 6px 20px 6px 0;
    border-inline-start: 4px solid var(--gold);
    color: var(--text);
    font-size: 19px;
    font-weight: 600;
}

.jb-quote cite {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
}

.jb-palette {
    margin: 1.6em 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.jb-palette__title {
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 800;
}

.jb-palette__list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.jb-swatch__button {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 0 0 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    text-align: center;
    cursor: copy;
}

.jb-swatch__chip {
    display: block;
    height: 64px;
    background: var(--swatch);
}

.jb-swatch__name {
    padding: 0 6px;
    font-size: 13px;
    font-weight: 700;
}

.jb-swatch__hex {
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.jb-swatch__button.is-copied .jb-swatch__hex {
    color: var(--gold);
}

.jb-compare {
    margin: 1.6em 0;
}

.jb-compare__frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-elev);
    user-select: none;
}

.jb-compare__img {
    display: block;
    width: 100%;
}

.jb-compare__img--after {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 0 0 var(--pos));
}

.jb-compare__label {
    position: absolute;
    top: 10px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(13, 13, 13, 0.65);
    color: #FAF6F0;
    font-size: 12px;
    font-weight: 800;
}

.jb-compare__label--before { left: 10px; }
.jb-compare__label--after { right: 10px; }

.jb-compare__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 3px;
    margin-left: -1.5px;
    background: var(--gold);
    box-shadow: 0 0 0 1px rgba(13, 13, 13, 0.25);
    pointer-events: none;
}

.jb-compare__handle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    background: rgba(13, 13, 13, 0.55);
    transform: translate(-50%, -50%);
}

.jb-compare__range {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    direction: ltr;
}

.jb-compare__frame:focus-within .jb-compare__handle {
    background: var(--gold-hover);
}

.jb-artworks {
    margin: 1.8em 0;
}

.jb-artworks__title {
    margin-bottom: 12px;
    font-size: 18px;
}

.jb-artworks__grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jb-artworks--single .jb-artworks__grid {
    grid-template-columns: minmax(0, 300px);
    justify-content: center;
}

@media (min-width: 720px) {
    .jb-artworks__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.jb-callout {
    margin: 1.6em 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-inline-start: 4px solid var(--gold);
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.jb-callout--note { border-inline-start-color: #3B82F6; }
.jb-callout--warn { border-inline-start-color: #DC2626; }

.jb-callout__title {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.jb-callout > * + * {
    margin-top: 0.6em;
}

.jb-faq {
    margin: 1.6em 0;
}

.jb-divider {
    width: 120px;
    margin: 2em auto;
    border: 0;
    border-top: 2px solid var(--gold);
}

.journal-body ul,
.journal-body ol {
    padding-inline-start: 1.4em;
}

.journal-body a {
    color: var(--text);
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
}

.journal-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin: 34px 0 10px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.journal-share__label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.journal-share .link-arrow {
    margin-inline-start: auto;
}

/* ---- Capture shield ------------------------------------------------------------------------- */
/* On a screenshot attempt (or while the window has no focus) the artworks blur at once — no fade,
   so there is nothing to catch mid-transition — and the share prompt opens (app.js). */
html.is-shielded main img,
html.is-shielded main canvas {
    filter: blur(28px) saturate(0.7);
    transition: none !important;
}

.capture-shield {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(13, 13, 13, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.capture-shield[hidden] {
    display: none;
}

.capture-shield__panel {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 10px;
    width: min(100%, 420px);
    padding: 30px 22px 22px;
    border-radius: var(--radius-l);
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.capture-shield__close {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
}

.capture-shield__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gold-soft);
}

.capture-shield__title {
    font-size: 18px;
    font-weight: 900;
}

.capture-shield__text {
    color: var(--text-2);
    font-size: 14px;
    text-align: center;
}

.capture-shield__copied {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #E3F4E8;
    color: #1E6B3A;
    font-size: 13px;
    font-weight: 700;
}

.capture-shield__copied[hidden] {
    display: none;
}

.capture-shield__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.capture-shield__note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

/* Printing a page leaves the artworks out (the invoice has its own print stylesheet). */
@media print {
    main img,
    main canvas {
        visibility: hidden !important;
    }

    .capture-shield,
    .admin-bar {
        display: none !important;
    }
}

/* ---- Collaboration: shops / concept stores, designers -------------------------------------- */

.collab-cards {
    display: grid;
    gap: 16px;
}

.collab-card {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: 10px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--bg-elev);
}

.collab-card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--gold-soft);
}

.collab-card__title {
    font-size: 19px;
    font-weight: 900;
}

.collab-card__text {
    color: var(--text-2);
    text-align: start;
}

.collab-stack {
    display: grid;
    gap: 16px;
}

.collab-done,
.collab-state {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: #E3F4E8;
    color: #1E6B3A;
    font-weight: 700;
    text-align: start;
}

.collab-state {
    background: var(--gold-soft);
    color: var(--text);
}

[data-theme="dark"] .collab-done {
    background: rgba(46, 160, 90, 0.18);
    color: #9FE2B5;
}

.collab-note {
    color: var(--muted);
    font-size: 13px;
    text-align: start;
}

.collab-note-box {
    padding: 12px 14px;
    border-inline-start: 3px solid var(--gold);
    border-radius: 10px;
    background: var(--bg-elev);
    text-align: start;
}

.collab-steps {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.collab-steps li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 10px;
    counter-increment: step;
    text-align: start;
}

.collab-steps li::before {
    content: counter(step);
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gold);
    color: #0D0D0D;
    font-weight: 900;
}

.collab-steps span {
    color: var(--text-2);
    font-size: 14px;
}

.collab-checks {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.collab-checks li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: start;
}

.collab-checks .icon {
    flex: none;
    margin-top: 5px;
    color: var(--gold);
}

.collab-protect {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.collab-protect .collab-card__icon {
    flex: none;
}

.collab-check {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.collab-check input {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 4px;
    accent-color: var(--gold);
}

.field__optional {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.field__hint {
    color: var(--muted);
    font-size: 12.5px;
}

.collab-works {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.collab-work {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.collab-work__thumb {
    width: 60px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-elev-2);
}

.collab-work__body {
    display: grid;
    gap: 2px;
    min-width: 0;
    text-align: start;
}

.collab-work__meta,
.collab-work__note {
    color: var(--muted);
    font-size: 12.5px;
}

.collab-work__note {
    color: var(--text-2);
}

.collab-work__link {
    grid-column: 2 / -1;
    font-size: 13px;
    font-weight: 700;
}

.collab-badge {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--bg-elev-2);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.collab-badge--approved { background: #E3F4E8; color: #1E6B3A; }
.collab-badge--rejected { background: #FDE4E1; color: #9F2A1E; }
.collab-badge--needs_changes,
.collab-badge--pending { background: var(--gold-soft); color: var(--text); }

@media (min-width: 720px) {
    .collab-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
