/* Layout: a full-bleed hero whose calm lime wall carries the words, a pinned scroll film, then sections that
   alternate a working bench (try-on, sizes) with full-bleed photographs (naturals). One light, one palette, one shoot. */
:root {
  --lime: #f4efe7;          /* lime-plaster wall */
  --lime-2: #ebe3d6;        /* a step darker, for cards */
  --paper: #fffcf7;
  --ink: #1d2340;           /* indigo, the oldest rug dye, madder red's partner */
  --ink-2: #4f5674;
  --line: #d6d0c6;
  --rojo: #a4161f;          /* Granada's crimson */
  --terra: #a2452a;         /* Cádiz's terracotta, deepened to read as text on lime */
  --accent: var(--rojo);
  --accent-ink: var(--accent);   /* the accent as text (on the dark ground it has to be lighter than as a fill) */
  --lime-rgb: 244, 239, 231; --paper-rgb: 255, 252, 247; --ink-rgb: 29, 35, 64;
  --shade-rgb: 20, 24, 46;       /* shadows and scrims: dark in both lights */
  --terra-ink: #a2452a;
  --film-bg: #efe6d9;
  --ok-bg: #e4efe3; --ok-ink: #24502c; --bad-bg: #fbe9e7; --bad-ink: #8f1d14;
  --display: "Instrument Serif", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut: clamp(20px, 4.2vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
/* the shop after closing, in midnight indigo: deep-dyed ground, the plaster becomes the ink, crimson stays the brand
   (a deeper fill under white words, a lighter one as words on the ground). The photographs stay as they were shot. */
:root[data-theme="dark"] {
  --lime: #10131f; --lime-2: #171b2b; --paper: #1e2336;
  --ink: #eee8dc; --ink-2: #a8adc2; --line: #2f3550;
  --rojo: #c8323a; --terra: #b0502d; --terra-ink: #e8957a;
  --accent-ink: #f08a80;
  --lime-rgb: 16, 19, 31; --paper-rgb: 30, 35, 54; --ink-rgb: 238, 232, 220; --shade-rgb: 0, 0, 0;
  --film-bg: #161a29;
  --ok-bg: #1e3322; --ok-ink: #9fd3a6; --bad-bg: #3a1820; --bad-ink: #f3a49b;
  color-scheme: dark;
}
:root:lang(ar) { --display: "El Messiri", serif; --body: "Tajawal", system-ui, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--lime); color: var(--ink); font: 400 1rem/1.6 var(--body); overflow-x: clip; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--lime); border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { padding-inline: var(--gut); max-width: 1360px; margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: .75rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-ink); }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
:lang(ar) .eyebrow { letter-spacing: 0; font-size: .9375rem; }
h1, h2, .pname { font-family: var(--display); font-weight: 400; letter-spacing: -.012em; text-wrap: balance; }
h2 { font-size: clamp(2.4rem, 4.6vw, 4.2rem); line-height: 1; }
h1 em, h2 em { font-style: italic; color: var(--accent-ink); }
:lang(ar) h1, :lang(ar) h2, :lang(ar) .pname { font-weight: 600; letter-spacing: 0; line-height: 1.25; }
:lang(ar) h1 em, :lang(ar) h2 em { font-style: normal; }
.lead { color: var(--ink-2); font-size: 1.0625rem; max-width: 58ch; }
.lbl { font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
:lang(ar) .lbl { letter-spacing: 0; font-size: .9375rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: transform .25s var(--ease), box-shadow .25s, background .25s; }
.btn-main { background: var(--accent); color: #fff; box-shadow: 0 14px 30px -14px var(--accent); }
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -14px var(--accent); }
.btn-main .arrow { transition: transform .25s var(--ease); }
.btn-main:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .btn-main .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn-main:hover .arrow { transform: scaleX(-1) translateX(4px); }
.btn-ghost { color: var(--ink); background: rgba(var(--paper-rgb), .62); box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .28); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(var(--paper-rgb), .95); }
.btn.wide { width: 100%; }
.btn.wa { min-height: 48px; font-size: .9375rem; }
.btn.wa:disabled { opacity: .5; }
.btn-line { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: none; font-weight: 500; font-size: .9375rem; transition: border-color .2s, background .2s; }
.btn-line:hover { border-color: var(--ink); background: var(--paper); }
a.btn-line { color: inherit; text-decoration: none; }   /* (a link that looks like the buttons beside it: coleccion.html's «Probar en casa») */
#rotBtn { justify-content: center; }  /* it sits right above the WhatsApp button: same centred label */

/* header: over the hero it is clear; after it, lime glass; it leaves on the way down and comes back on the way up */
.top { position: fixed; z-index: 40; inset: 0 0 auto; display: flex; align-items: center; gap: 28px; padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gut) 14px; transition: transform .4s var(--ease), background .3s, box-shadow .3s; }
.top.solid { background: rgba(var(--lime-rgb), .9); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
/* dark: the light words of the bar need a dusk band over the bright photographs under it */
[data-theme="dark"] .top:not(.solid) { background: linear-gradient(rgba(var(--lime-rgb), .82), rgba(var(--lime-rgb), .5) 60%, rgba(var(--lime-rgb), 0)); }
.top.away { transform: translateY(-105%); }
.brand { display: flex; align-items: center; min-height: 44px; gap: 10px; font: 400 1.75rem/1 var(--display); color: var(--ink); text-decoration: none; white-space: nowrap; }
:lang(ar) .brand { font-family: "Instrument Serif", serif; font-weight: 400; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand small { font: 600 .6875rem/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
:lang(ar) .brand small { letter-spacing: 0; font-size: .875rem; }
.nav { display: flex; gap: 26px; margin-inline-start: auto; font-size: .9375rem; }
.nav a { color: var(--ink); text-decoration: none; padding-block: 12px; background: linear-gradient(currentColor, currentColor) no-repeat 0 85% / 0 1px; transition: background-size .3s var(--ease); }
[dir="rtl"] .nav a { background-position: 100% 85%; }
.nav a:hover { background-size: 100% 1px; }
.tools { display: flex; gap: 6px; align-items: center; }
/* the bar's links as a list, where they don't fit in the bar */
.nav-pick { position: relative; display: none; }
.nav-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 45; display: grid; gap: 2px; min-width: 15rem; padding: 6px; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 14px 34px rgba(var(--shade-rgb), .22); }
.nav-menu[hidden] { display: none; }
.nav-menu ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-menu a:hover, .nav-menu a:focus-visible, .tools .nav-menu .nav-theme:hover { background: var(--lime); }
.nav-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent-ink); }
[dir="rtl"] .nav-menu a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--accent-ink); }
.tools .nav-menu .nav-theme { display: none; justify-content: flex-start; gap: 10px; width: 100%; padding: 0 12px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; font-weight: 600; }
@media (max-width: 1199px) { .nav { display: none; } .nav-pick { display: block; } .tools { margin-inline-start: auto; } }
.tools button { min-width: 44px; min-height: 44px; border: 0; background: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tools button:hover { background: rgba(var(--ink-rgb), .07); }
.tools a.cart-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; border-radius: 999px; color: var(--ink); text-decoration: none; }   /* the legal pages' basket: a link to the store's */
.tools a.cart-btn:hover { background: rgba(var(--ink-rgb), .07); }
.theme-btn .sun, [data-theme="dark"] .theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: block; }
/* the language menu (lang.js): the code of the language on, and under it the three, each named in its own language */
.lang-pick { position: relative; }
.tools .lang { gap: 4px; padding: 0 10px; font-size: .875rem; font-weight: 700; letter-spacing: .06em; }
.lang-code { min-width: 1.3em; text-align: center; }
.lang-caret { opacity: .7; transition: transform .2s var(--ease); }
.lang[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 45; display: grid; gap: 2px; min-width: 11.5rem; padding: 6px; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 14px 34px rgba(var(--shade-rgb), .22); }
.tools .lang-menu button { justify-content: flex-start; gap: 10px; width: 100%; padding: 0 12px; border-radius: 10px; font: 600 1rem/1.2 "Manrope", system-ui, sans-serif; text-align: start; }
.tools .lang-menu button[lang="ar"] { font-family: "Tajawal", system-ui, sans-serif; font-size: 1.0625rem; }
.tools .lang-menu button:hover, .tools .lang-menu button:focus-visible { background: var(--lime); }
.lang-menu button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -2px; }
.lang-check { visibility: hidden; flex: none; color: var(--accent-ink); }
.lang-menu [aria-checked="true"] .lang-check { visibility: visible; }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--ink); color: var(--lime); font-size: .875rem; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }

/* ───────── 1 · hero ───────── */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; isolation: isolate; --rx: 66%; --ry: 80%; }
.photo { position: absolute; inset: -2%; z-index: -2; will-change: transform; }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.photo .push { width: 100%; height: 100%; transform-origin: var(--rx) var(--ry); animation: push 26s ease-in-out infinite alternate; }
@keyframes push { to { transform: scale(1.06); } }
.glow { position: absolute; z-index: -1; left: var(--rx); top: var(--ry); width: 46vw; height: 30vw; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 214, 160, .32), rgba(255, 214, 160, 0)); mix-blend-mode: soft-light; animation: breathe 7s ease-in-out infinite; pointer-events: none; }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(var(--lime-rgb), .84) 0%, rgba(var(--lime-rgb), .56) 30%, rgba(var(--lime-rgb), 0) 52%); }
.copy { position: absolute; left: var(--gut); top: 50%; transform: translateY(-44%); width: min(34rem, 40vw); }
.hero h1 { margin: 18px 0 22px; font-size: clamp(3rem, 6.4vw, 6.4rem); line-height: .96; }
:lang(ar) .hero h1 { font-size: clamp(2.5rem, 5vw, 4.75rem); line-height: 1.22; }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: block; }
.sub { max-width: 30rem; margin: 0 0 32px; font-size: 1.125rem; color: var(--ink-2); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font-size: .875rem; color: var(--ink-2); }
.trust > span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { color: var(--accent-ink); flex: none; }
.tag { position: absolute; left: 57%; top: 49%; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border: 0; text-align: start;
  background: rgba(var(--paper-rgb), .93); border-radius: 999px; box-shadow: 0 18px 40px -20px rgba(var(--shade-rgb), .6); color: var(--ink); transition: transform .3s var(--ease); }
[dir="rtl"] .tag { padding: 10px 10px 10px 18px; }
.tag:hover { transform: translateY(-3px); }
.tag::before { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 46px; background: rgba(var(--paper-rgb), .85); }
.tag::after { content: ""; position: absolute; left: calc(50% - 5px); top: calc(100% + 46px); width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .75); } 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } }
.tag .dot { width: 36px; height: 36px; border-radius: 50%; background: var(--rojo); flex: none; }
.tag b { display: block; font: 400 1.25rem/1.05 var(--display); }
:lang(ar) .tag b { font-weight: 600; font-size: 1.0625rem; }
.tag small { display: block; font-size: .8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cue { position: absolute; left: var(--gut); bottom: 30px; display: flex; align-items: center; gap: 12px; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
:lang(ar) .cue { letter-spacing: 0; font-size: .875rem; }
.cue i { width: 1px; height: 40px; background: rgba(var(--ink-rgb), .25); position: relative; overflow: hidden; }
.cue i::after { content: ""; position: absolute; inset: 0; background: var(--ink); animation: drip 2.2s ease-in-out infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }
/* entrance */
.in .photo { animation: settle 2.6s var(--ease) both; }
@keyframes settle { from { transform: scale(1.12); filter: brightness(1.15) saturate(.7); } to { transform: none; filter: none; } }
.in .eyebrow, .in .sub, .in .ctas, .in .trust { animation: rise 1s var(--ease) both; }
.in .line > span { animation: lineup 1.1s var(--ease) both; }
.in .eyebrow { animation-delay: .5s; } .in .line:nth-child(1) > span { animation-delay: .6s; } .in .line:nth-child(2) > span { animation-delay: .72s; }
.in .line:nth-child(3) > span { animation-delay: .84s; } .in .sub { animation-delay: 1.05s; } .in .ctas { animation-delay: 1.2s; } .in .trust { animation-delay: 1.35s; }
.in .tag { animation: tagin 1s var(--ease) 1.9s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes tagin { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes lineup { from { transform: translateY(105%); } }

/* ───────── 2 · film ───────── */
.film { position: relative; height: 320vh; background: var(--film-bg); }
.film-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--film-bg) url(img/film-poster.webp) center / cover no-repeat; }
.film.ready .film-stage { background-image: none; }
@media (max-width: 900px) and (orientation: portrait) { .film-stage { background-image: url(img/film-poster-m.webp); } }   /* the portrait frames' first (app.js: tall) */
#filmcv { position: absolute; inset: 0; width: 100%; height: 100%; }
.film-load { position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: rgba(var(--ink-rgb), .1); transition: opacity .5s; }
.film-load i { display: block; height: 100%; width: 0; background: var(--ink); }
.film.ready .film-load { opacity: 0; }
.caps { position: absolute; inset: 0; pointer-events: none; }
.cap { position: absolute; left: var(--gut); top: 18%; max-width: 22rem; display: grid; gap: 6px; padding: 20px 24px; background: rgba(var(--paper-rgb), .9); backdrop-filter: blur(6px); border-radius: 18px; opacity: 0;
  font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1.12 var(--display); color: var(--ink); will-change: opacity, transform; }
:lang(ar) .cap { font-weight: 600; line-height: 1.4; font-size: clamp(1.25rem, 2vw, 1.75rem); }
.cap .n { font: 700 .75rem/1 var(--body); letter-spacing: .2em; color: var(--accent-ink); }

/* ───────── 3 · try-on ───────── */
.probador { padding-block: clamp(4rem, 9vw, 8rem) clamp(3rem, 6vw, 5rem); scroll-margin-top: 70px; }
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); max-width: 48rem; }
.sec-head.row { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; }
.sec-head.row > div:first-child { display: grid; gap: 14px; }
.p-grid { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: clamp(1.25rem, 3vw, 2.75rem); align-items: start; }
.p-stage-col { min-width: 0; display: grid; gap: 14px; }
.p-stage { position: relative; overflow: hidden; border-radius: 22px; background: var(--lime-2); line-height: 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
#pRoom { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
/* your photo: the stage hugs it, so a rug reaching past its edges is cut there like at the edge of our rooms */
.p-stage.own { width: fit-content; max-width: 100%; margin-inline: auto; }
.p-stage.own #pRoom { display: block; aspect-ratio: auto; width: auto; max-width: 100%; max-height: 78vh; }
.p-rug, .p-shadow { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.p-rug { cursor: grab; touch-action: none; }
.p-rug.drag { cursor: grabbing; }
.p-rug img { position: absolute; top: 0; left: 0; max-width: none; pointer-events: none; }
.p-shadow { background: rgba(30, 18, 10, .55); filter: blur(3px); pointer-events: none; }  /* tight: a rug lies flat, a wide halo reads as lifted */
.p-lit, .p-lift { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* the room's light on the rug (light.js): darker in shadow, brighter in the sun */
.p-lit { mix-blend-mode: multiply; }
.p-lift { mix-blend-mode: color-dodge; }
.p-stage:not(.lit) .p-lit, .p-stage:not(.lit) .p-lift { display: none; }
.p-ao { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.p-occ { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.p-stage.own .p-ao, .p-stage.own:not(.floor) .p-occ { display: none; }
.p-stage.busy .p-rug, .p-stage.busy .p-shadow, .p-stage.busy .hd { visibility: hidden; }
.p-stage.busy::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(var(--paper-rgb), 0) 30%, rgba(var(--paper-rgb), .38) 48%, rgba(var(--paper-rgb), .95) 50%, rgba(var(--paper-rgb), 0) 50.6%); background-size: 100% 200%; animation: scan 1.8s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes scan { from { background-position: 0 100%; } to { background-position: 0 0; } }
.p-hint { position: absolute; left: 16px; bottom: 16px; padding: 8px 14px; border-radius: 99px; background: rgba(var(--paper-rgb), .92); font-size: .875rem; line-height: 1.3; pointer-events: none; transition: opacity .5s; }
[dir="rtl"] .p-hint { left: auto; right: 16px; }
.p-big { position: absolute; z-index: 6; top: 12px; inset-inline-end: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(var(--paper-rgb), .92); color: var(--ink); box-shadow: 0 4px 14px -6px rgba(var(--shade-rgb), .5); cursor: pointer; }
.p-big:hover { background: rgba(var(--paper-rgb), 1); }
/* before and after: the room as it is, laid over the try-on and cut at the line (--x: the line, from the left) */
.p-cmp { position: absolute; z-index: 6; top: 12px; inset-inline-end: 64px; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 99px; background: rgba(var(--paper-rgb), .92); color: var(--ink); font-size: .875rem; font-weight: 600; line-height: 1; box-shadow: 0 4px 14px -6px rgba(var(--shade-rgb), .5); cursor: pointer; }
.p-cmp:hover { background: rgba(var(--paper-rgb), 1); }
.p-cmp[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.p-before, .p-cut { position: absolute; inset: 0; width: 100%; height: 100%; }
.p-before { z-index: 2; object-fit: cover; pointer-events: none; clip-path: inset(0 calc(100% - var(--x, 50%)) 0 0); }
[dir="rtl"] .p-before { clip-path: inset(0 0 0 var(--x, 50%)); }
.p-stage:not(.cmp) .p-before { display: none; }
.p-cut { z-index: 4; line-height: 1.2; touch-action: pan-y; cursor: ew-resize; }
.p-cut[hidden] { display: none; }
.p-cut::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .45); pointer-events: none; }
.p-knob { position: absolute; top: 50%; left: var(--x, 50%); display: grid; place-items: center; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 2px 12px rgba(0, 0, 0, .4); touch-action: none; }
.p-knob:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }
.p-stage.cmp .p-rug { pointer-events: none; }
.p-stage.cmp .hd, .p-stage.cmp .p-hint { display: none; }
.p-stage.cmp { cursor: default; }
.p-stage { cursor: zoom-in; }
/* on your photo the rug starts low in the frame: the hint goes up top, out of its way */
.p-stage.own .p-hint, .p-stage.hall .p-hint { top: 12px; bottom: auto; }   /* (the hallway's runner lies at the bottom of the photo) */
.p-hint.gone { opacity: 0; }
.hd { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: none; touch-action: none; cursor: grab; z-index: 3; }
.p-stage.own .hd { transition: opacity .4s; }
/* once the corners are set they fade away so the photo reads clean; a touch on the photo brings them back */
.p-stage.settled .hd { opacity: 0; pointer-events: none; }
/* with a mouse there is no touch to call them back: they come back while the pointer is over the photo */
@media (hover: hover) { .p-stage.settled:hover .hd { opacity: 1; pointer-events: auto; } }
.p-stage.settled:focus-within .hd { opacity: 1; pointer-events: auto; }
.hd::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--rojo); box-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.rooms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.rooms button, .upload { position: relative; display: grid; gap: 6px; padding: 6px 6px 10px; border: 1px solid transparent; border-radius: 14px; background: var(--paper); font-size: .875rem; font-weight: 600; text-align: center; line-height: 1.2; }
.rooms img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; }
.rooms button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.rooms button:hover, .upload:hover { border-color: var(--line); }
.rooms .upload { cursor: pointer; align-content: center; justify-items: center; border: 1px dashed var(--ink-2); color: var(--ink-2); }
.up-wrap { position: relative; display: grid; }
/* on a phone the tile opens two choices: Android's picker alone offers only the gallery, never the camera */
.up-menu { position: absolute; bottom: calc(100% + 8px); right: 0; z-index: 5; display: grid; gap: 4px; width: max-content; min-width: 13rem; padding: 6px; border-radius: 14px; background: var(--paper); box-shadow: 0 10px 30px rgba(var(--shade-rgb), .22); }
[dir="rtl"] .up-menu { right: auto; left: 0; }
.up-menu[hidden] { display: none; }
.up-opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 10px; font-size: .9375rem; font-weight: 600; cursor: pointer; }
.up-opt:hover, .up-opt:focus-within { background: var(--lime); }
.up-opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
/* «Hacer una foto»: the camera inside the page, so the photo comes with the phone's tilt */
.cam { position: fixed; inset: 0; z-index: 80; background: #000; }
.cam[hidden] { display: none; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-hint { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 128px); margin: 0; padding: 8px 14px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .875rem; text-align: center; }
.cam-x { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); inset-inline-start: 12px; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; }
.cam-shot { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); width: 76px; height: 76px; border: 4px solid #fff; border-radius: 50%; background: rgba(255, 255, 255, .35); cursor: pointer; }
.cam-shot:active { background: #fff; }
.cam button:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
body.cam-on { overflow: hidden; }
.upload:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.upload.on { border-style: solid; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }

.p-panel { display: grid; gap: 18px; padding: 28px; background: var(--paper); border-radius: 22px; position: sticky; top: 90px; }
.kind { font-size: .875rem; color: var(--ink-2); }
.pname { font-size: 2.6rem; line-height: 1; margin-top: -8px; }
.pnote { color: var(--ink-2); font-size: .9375rem; }
.swatch-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.swatch-row button { aspect-ratio: 2 / 3; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--lime); }
.swatch-row button img { width: 100%; height: 100%; object-fit: contain; }
.swatch-row button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.field { display: grid; gap: 10px; }
.one-size { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.one-size small { color: var(--ink-2); font-size: .875rem; }
.buy { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.price { font: 400 2.25rem/1 "Instrument Serif", serif; font-variant-numeric: tabular-nums; }
.price small { font: 500 .8125rem var(--body); color: var(--ink-2); }

/* ───────── 4 · naturals ───────── */
.naturales { position: relative; min-height: 92vh; display: grid; align-items: center; isolation: isolate; overflow: hidden; scroll-margin-top: 0; --accent: var(--terra); --accent-ink: var(--terra-ink); }
.naturales > picture img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }
.naturales::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(var(--lime-rgb), .86), rgba(var(--lime-rgb), .5) 32%, rgba(var(--lime-rgb), 0) 54%); }
.n-copy { width: min(32rem, 40vw); margin-inline-start: var(--gut); display: grid; gap: 18px; justify-items: start; }
.n-copy p:not(.eyebrow) { color: var(--ink-2); font-size: 1.0625rem; }

/* ───────── 5 · collection ───────── */
.coleccion { padding-block: clamp(4rem, 9vw, 8rem) clamp(2rem, 5vw, 4rem); scroll-margin-top: 70px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 99px; background: none; font-size: .9375rem; font-weight: 500; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.6vw, 2.25rem); }
.card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
/* the shop being updated (its catalogue out of reach, or nothing published yet): one plain line, nothing to try or buy */
.grid .down { grid-column: 1 / -1; padding: 28px 24px; border-radius: 22px; background: var(--lime-2); font-size: 1.0625rem; text-align: center; }
.down #probador, .down #medidas, .down .filters, .down #cartBtn, .down [data-rug], .down a[href$="#probador"], .down a[href$="#medidas"] { display: none !important; }
.card-img { position: relative; aspect-ratio: 4 / 5; display: grid; place-items: center; padding: 12%; border: 0; border-radius: 22px; background: var(--lime-2); overflow: hidden; width: 100%; min-width: 0; }
.card-img img { position: absolute; inset: 10% 12%; width: 76%; height: 80%; object-fit: contain;   /* the box, not max-height: % of an auto grid row is ignored and a tall rug (Cádiz) ran past the card */
  filter: drop-shadow(0 14px 18px rgba(var(--shade-rgb), .22)); transition: transform .6s var(--ease); }
.card-img:hover img { transform: scale(1.04) rotate(-1.2deg); }
.card-img .try { position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 8px); opacity: 0; padding: 10px 16px; border-radius: 99px; background: var(--paper); font-size: .875rem; font-weight: 600; white-space: nowrap; transition: opacity .3s, transform .3s var(--ease); }
.card-img:hover .try, .card-img:focus-visible .try { opacity: 1; transform: translate(-50%, 0); }
/* sold: still to be seen and tried, plainly marked, no basket */
.sold-tag { display: inline-flex; align-items: center; justify-self: start; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--ink); color: var(--lime); font-size: .875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
:lang(ar) .sold-tag { letter-spacing: 0; font-size: .9375rem; }
.card-img .sold-tag { position: absolute; top: 14px; inset-inline-start: 14px; }
/* «Nuevo» (26 Oct): a piece the owner marked new — crimson, so it is never read as «Vendida» */
.new-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--rojo); color: #fff; font-size: .875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
:lang(ar) .new-tag { letter-spacing: 0; font-size: .9375rem; }
.card-img .new-tag { position: absolute; top: 14px; inset-inline-start: 14px; }
.rp-photo .new-tag { position: absolute; top: 18px; inset-inline-start: 18px; }
.p-panel .sold-tag { margin-top: -6px; }
.btn-main:disabled, .btn-line:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.card-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: baseline; }
.card-meta h3 { font: 400 1.75rem/1.1 var(--display); }
.card-meta h3 a { display: inline-block; padding-block: 7px; margin-block: -7px; color: inherit; text-decoration: none; }   /* a finger's height */
.card-meta h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card:has(h3 a:focus-visible) .card-img .try { opacity: 1; transform: translate(-50%, 0); }
:lang(ar) .card-meta h3 { font-weight: 600; font-size: 1.375rem; }
.card-meta .from { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.card-meta .kind { grid-column: 1 / -1; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* a discount (26 Oct): the price before struck through, the price now in the shop's red, the share off on a chip */
.deal { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: .45em; }
.deal .was { color: var(--ink-2); font-weight: 400; text-decoration-thickness: 1px; }
.deal .now { color: var(--accent-ink); font-weight: 700; }
.deal .off { align-self: center; padding: 2px 8px; border-radius: 99px; background: var(--rojo); color: #fff; font: 700 .875rem/1.3 var(--body); white-space: nowrap; }
.card-meta .from.deal { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
.price.deal .was { font-size: .6em; }

/* «Ofertas» and «Descuentos»: shown only while there is one */
.nuevo, .ofertas, .descuentos { padding-block: clamp(2rem, 5vw, 4rem); scroll-margin-top: 70px; }
.of-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: clamp(1.25rem, 2.6vw, 2.25rem); }
.offer-card { display: grid; gap: 16px; align-content: start; padding: clamp(16px, 2.4vw, 24px); border-radius: 22px; background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.of-pics { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.of-pics { align-items: start; }
.of-pics a { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 16px; background: var(--lime-2); }
.of-pics img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; }   /* the box, whatever the rug's shape: every picture the same height */
.of-meta { display: grid; gap: 6px; }
.of-meta h3 { font: 400 1.75rem/1.15 var(--display); overflow-wrap: anywhere; }
:lang(ar) .of-meta h3 { font-weight: 600; font-size: 1.375rem; }
.of-sizes { color: var(--ink-2); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.of-meta .price { font-size: 2rem; }
.of-save { color: var(--ok-ink); font-weight: 700; }
.offer-card .btn { justify-self: start; }
@media (max-width: 480px) { .offer-card .btn { justify-self: stretch; } }
.cart-sum .of-row { color: var(--ok-ink); font-weight: 600; }

/* ───────── 6 · sizes ───────── */
.medidas { padding-block: clamp(3rem, 7vw, 6rem); scroll-margin-top: 70px; }
.m-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(1.5rem, 4vw, 3.5rem); background: var(--paper); border-radius: 28px; }
.m-copy { display: grid; gap: 16px; align-content: start; min-width: 0; }
.m-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--lime); justify-self: start; margin-top: 6px; }
.m-tabs button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 99px; background: none; font-weight: 600; font-size: .9375rem; }
.m-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--lime); }
.m-range { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; color: var(--ink-2); }
.m-range output { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
#mRange { width: 100%; accent-color: var(--rojo); min-height: 44px; }
.m-answer { display: grid; gap: 6px; justify-items: start; padding-top: 16px; border-top: 1px solid var(--line); }
.m-size { font: 400 3rem/1 "Instrument Serif", serif; font-variant-numeric: tabular-nums; }
.m-why { color: var(--ink-2); font-size: .9375rem; max-width: 48ch; margin-bottom: 6px; }
.m-plan { display: grid; gap: 10px; min-width: 0; }
.m-plan svg { width: 100%; height: auto; background: var(--lime); border-radius: 18px; }
/* the plan's drawing (app.js draws it; here, not in a <style> inside it: the shop's CSP allows no inline style) */
#mPlan .g { stroke: var(--line); stroke-width: 1; }
#mPlan .f { fill: var(--lime-2); stroke: var(--ink); stroke-width: 1.5; }
#mPlan .f2 { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
#mPlan .hall { fill: none; stroke: var(--ink); stroke-width: 2; }
#mPlan .r { fill: var(--rojo); opacity: .88; }
#mPlan .rc { stroke: #6e0d14; stroke-width: 2; stroke-dasharray: 6 4; }
#mPlan .r2 { fill: none; stroke: #fffcf7; stroke-width: 2; stroke-dasharray: 4 4; }
#mPlan .lab { font: 600 12px Manrope, Tajawal, sans-serif; fill: var(--ink); }
#mPlan .lab2 { font: 600 12px Manrope, Tajawal, sans-serif; fill: #fffcf7; }
.m-plan figcaption { font-size: .875rem; color: var(--ink-2); }

/* ───────── 7 · promises, footer ───────── */
.promesas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }
.promesas div { display: grid; align-content: start; gap: 6px; padding-top: 18px; border-top: 1px solid var(--ink); min-width: 0; }
.promesas b { font: 400 1.5rem/1.15 var(--display); }
:lang(ar) .promesas b { font-weight: 600; font-size: 1.1875rem; }
.promesas span { color: var(--ink-2); font-size: .9375rem; }
/* the footer, on the store and the legal pages: the shop, the legal pages with the withdrawal button, the networks */
.foot { padding-block: clamp(2.5rem, 5vw, 4rem) 2.5rem; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.7fr) minmax(0, .9fr); gap: 32px 48px; align-items: start; padding-bottom: 10px; }
.foot-brand { display: grid; gap: 2px; justify-items: start; }
.foot-brand p { font-size: .875rem; color: var(--ink-2); }
.foot-brand p a { display: inline-block; margin-top: 10px; padding-block: 10px; color: var(--ink); font-size: .9375rem; text-underline-offset: 3px; }
.foot-h { margin-bottom: 8px; font: 700 .75rem/1.4 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
:lang(ar) .foot-h { letter-spacing: 0; font-size: .9375rem; line-height: 1.4; font-weight: 700; }
.foot-legal ul { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 0 32px; }
.foot-legal a:not(.withdraw) { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-size: .9375rem; background: linear-gradient(currentColor, currentColor) no-repeat 0 78% / 0 1px; transition: background-size .3s var(--ease); }
[dir="rtl"] .foot-legal a:not(.withdraw) { background-position: 100% 78%; }
.foot-legal a:not(.withdraw):hover, .foot-legal a[aria-current] { background-size: 100% 1px; }
/* «Desistir del contrato aquí»: the law wants it easy to find, so it is a button of its own, in the brand's crimson */
.withdraw { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 14px; padding: 0 20px; border: 1.5px solid var(--accent-ink); border-radius: 999px; color: var(--accent-ink); font-weight: 700; font-size: .9375rem; text-decoration: none; transition: background .2s, color .2s; }
.withdraw:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
[dir="rtl"] .withdraw svg { transform: scaleX(-1); }
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .3); transition: background .2s, color .2s; }
.social a:hover { background: var(--ink); color: var(--lime); }
.complaints { font-size: .875rem; color: var(--ink-2); max-width: 75ch; }
.complaints { padding-top: 18px; border-top: 1px solid var(--line); }
/* the owner's way in: there for him, quiet for everyone else */
@media (max-width: 900px) { .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 600px) { .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; } .foot-legal ul { gap: 0 20px; } }

/* cart */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(var(--shade-rgb), .45); }
.cart { overflow-y: auto; overscroll-behavior: contain; position: fixed; z-index: 60; top: 0; bottom: 0; inset-inline-end: 0; width: min(27rem, 100%); display: flex; flex-direction: column; gap: 16px; padding: calc(20px + env(safe-area-inset-top, 0px)) 24px calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--paper); box-shadow: 0 0 60px rgba(var(--shade-rgb), .25); }
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cart-head h2 { font-size: 2.2rem; }
.x { width: 44px; height: 44px; border: 0; border-radius: 99px; background: var(--lime); font-size: 1rem; }
.cart-items { flex: none; display: grid; gap: 14px; align-content: start; }
.cart-items li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cart-items .thumb { grid-row: span 2; width: 70px; aspect-ratio: 4 / 5; border-radius: 10px; background: var(--lime-2); display: grid; place-items: center; padding: 6px; overflow: hidden; }   /* (hidden: a runner's tall picture can't stretch the box past 4 : 5) */
.cart-items .thumb img { max-height: 100%; object-fit: contain; }
.cart-items .t { font: 400 1.25rem/1.1 var(--display); }
:lang(ar) .cart-items .t { font-weight: 600; font-size: 1.0625rem; }
.cart-items .s { color: var(--ink-2); font-size: .875rem; font-variant-numeric: tabular-nums; }
.cart-items .p { font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; }
.cart-items .rm { justify-self: end; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--ink-2); font-size: .875rem; }
.cart-items .rm:hover { color: var(--ink); border-color: var(--ink-2); }
.cart-items .qty { grid-column: 2; display: inline-flex; align-items: center; justify-self: start; border: 1px solid var(--line); border-radius: 99px; }   /* an accessory with more units: − n + */
.cart-items .qty ~ .rm { grid-column: 3; }
.cart-items .qty button { min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--ink); font-size: 1.125rem; border-radius: 99px; }
.cart-items .qty button:disabled { color: var(--ink-2); opacity: .45; }
.cart-items .qty output { min-width: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-empty { flex: 1; color: var(--ink-2); }
.cart-foot { display: grid; gap: 10px; }
.cart-sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; font-size: .9375rem; color: var(--ink-2); }
.cart-sum dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.125rem; }
.cart-total b { font-variant-numeric: tabular-nums; }
.cart-ship { font-size: .875rem; color: var(--ink-2); }
.cart-note { font-size: .875rem; padding: 12px 14px; background: var(--lime); border-radius: 12px; }
.buyer { display: grid; gap: 12px; }
.buyer-h { font-weight: 700; }
.way { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.way legend { padding: 0; margin-bottom: 4px; }
.way-o { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.way-o:has(input:checked) { border-color: var(--ink); background: var(--lime); }
.way-o input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--rojo); }
.way-o > span { display: grid; gap: 2px; }
.way-o small { color: var(--ink-2); font-size: .8125rem; }
.cart-free { font-size: .875rem; color: var(--ink-2); }
.buyer .fld input { min-height: 46px; }
.cart-secure { font-size: .8125rem; color: var(--ink-2); text-align: center; }
.cart-legal { display: grid; gap: 10px; font-size: .875rem; color: var(--ink-2); }
.cart-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.agree { display: flex; gap: 10px; align-items: center; min-height: 44px; color: var(--ink); cursor: pointer; }
.agree input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--rojo); }
#checkoutBtn[aria-disabled="true"] { opacity: .55; }
.cart-demo { font-size: .875rem; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-2); }
.btn:disabled { opacity: .7; cursor: progress; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 99px; background: var(--ink); color: var(--lime); font-size: .9375rem; }
.toast a { color: inherit; font-weight: 700; text-underline-offset: 3px; padding: 10px 2px; }

/* ───────── responsive ───────── */
@media (max-width: 1100px) {
  .p-grid { grid-template-columns: 1fr; }
  .p-panel { position: static; }
  .swatch-row { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 30rem; }
  .m-grid { grid-template-columns: 1fr; }
  .promesas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .tools { margin-inline-start: auto; }
  .brand small { display: none; }
  .brand { font-size: 1.5rem; }
  .brand-mark { width: 34px; height: 34px; }
  .top:not(.solid) { background: linear-gradient(rgba(var(--lime-rgb), .92), rgba(var(--lime-rgb), 0)); }
  .hero { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .hero::before, .glow, .cue { display: none; }
  .photo { position: relative; inset: auto; height: 54svh; min-height: 340px; overflow: hidden; }
  .photo img { object-position: 70% 50%; }
  .in .photo, .photo .push { animation: none; }
  .copy { position: relative; left: auto; top: auto; transform: none; width: auto; padding: 26px var(--gut) 40px; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 3.6rem); margin: 14px 0 16px; }
  :lang(ar) .hero h1 { font-size: clamp(2.1rem, 9vw, 3rem); }
  .sub { font-size: 1.0625rem; margin-bottom: 24px; }
  .ctas .btn { flex: 1 1 auto; }
  .tag { left: var(--gut); top: calc(54svh - 74px); }
  [dir="rtl"] .tag { left: auto; right: var(--gut); }
  .tag::before, .tag::after { display: none; }
  /* the rug sits in the middle of every frame, so on a phone the film fills the screen (portrait frames cut
     from the full-size clip) and the words ride on a card at the bottom */
  .film { height: 260vh; }
  .cap { left: var(--gut); right: var(--gut); top: auto; bottom: calc(28px + env(safe-area-inset-bottom)); max-width: none; padding: 16px 20px; }
  .naturales { min-height: 0; display: flex; flex-direction: column; }
  .naturales > picture img { position: static; height: 46svh; min-height: 280px; }
  .naturales::before { display: none; }
  .n-copy { width: auto; margin: 0; padding: 28px var(--gut) 8px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rooms { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .rooms button, .upload { font-size: .8125rem; padding: 4px 4px 8px; border-radius: 10px; }
}
@media (max-width: 600px) {
  .eyebrow, .cap .n, .lbl { font-size: .875rem; letter-spacing: .14em; }
  .tag small, .rooms button, .upload { font-size: .875rem; }
  .rooms { grid-template-columns: repeat(6, minmax(0, 1fr)); }   /* five names don't fit across a phone: three rooms, then two */
  .rooms > * { grid-column: span 2; }
  .rooms > :nth-child(n+4) { grid-column: span 3; }
  .grid { grid-template-columns: 1fr; }
  .promesas { grid-template-columns: 1fr; }
  .p-panel { padding: 20px; }
  .pname { font-size: 2.2rem; }
  .p-stage { border-radius: 14px; }
  .m-size { font-size: 2.4rem; }
  .m-tabs { justify-self: stretch; }
  .m-tabs button { flex: 1; padding: 0 6px; white-space: nowrap; }
  .card-img .try { display: none; }
}
@media (max-width: 370px) {
  .m-tabs { flex-wrap: wrap; border-radius: 26px; }   /* four tabs don't fit one row on the narrowest phones */
  .m-tabs button { flex: 1 1 40%; }
}
@media (max-width: 400px) {             /* brand, language, basket and the menu on one line down to 320 px (the light in the menu) */
  .top { gap: 10px; }
  .tools { gap: 0; }
  .tools .lang { padding: 0 6px; }
  .tools > .theme-btn { display: none; }
  .tools .nav-menu .nav-theme { display: flex; }
}
@media (max-width: 349px) { .brand-mark { display: none; } }   /* 320 px: the name keeps the line, the seal gives way */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .film { height: auto; }
  .film-stage { position: relative; height: auto; overflow: visible; padding-top: 56.25%; background: var(--film-bg) url(img/film-poster.webp) top / 100% auto no-repeat !important; }   /* the poster in its 16:9, the words under it */
  #filmcv, .film-load { display: none; }
  .caps { position: relative; display: grid; gap: 12px; padding: 20px var(--gut); background: var(--lime); }
  .cap { position: static; opacity: 1; transform: none; max-width: none; }
}
/* Save-Data (app.js): the same still film as reduced motion above, without its frames */
.film.poster-only { height: auto; }
.film.poster-only .film-stage { position: relative; height: auto; overflow: visible; padding-top: 56.25%; background: var(--film-bg) url(img/film-poster.webp) top / 100% auto no-repeat !important; }
.film.poster-only #filmcv, .film.poster-only .film-load { display: none; }
.film.poster-only .caps { position: relative; display: grid; gap: 12px; padding: 20px var(--gut); background: var(--lime); }
.film.poster-only .cap { position: static; opacity: 1; transform: none; max-width: none; }
.rooms button.up-opt { display: flex; width: 100%; gap: 10px; padding: 0 14px; border: 0; border-radius: 10px; background: none; box-shadow: none; font-size: .9375rem; font-weight: 600; line-height: normal; text-align: start; }
.rooms button.up-opt:hover, .rooms button.up-opt:focus-visible { background: var(--lime); }
.up-menu .up-opt[hidden] { display: none; }

/* «Con el móvil»: the code the phone scans, and what the phone is doing */
.phone-dlg { width: min(29rem, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 28px 28px 24px; border: 0; border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(var(--shade-rgb), .35); overflow: auto; }
.phone-dlg::backdrop { background: rgba(var(--shade-rgb), .5); }
.phone-dlg h2 { margin: 0 0 18px; padding-inline-end: 52px; font: 400 clamp(1.6rem, 3vw, 2rem)/1.1 var(--display); }
.ph-x { position: absolute; top: 16px; inset-inline-end: 16px; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--lime); color: var(--ink); cursor: pointer; }
.ph-x:hover { background: var(--line); }
.ph-x:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ph-qr { display: grid; place-items: center; min-height: 15rem; padding: 14px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ph-qr svg { display: block; width: min(15rem, 62vw); height: auto; }
.ph-steps { display: grid; gap: 8px; margin: 18px 0 0; padding-inline-start: 1.4em; font-size: 1rem; line-height: 1.45; }
.ph-steps li::marker { font-weight: 700; color: var(--accent-ink); }
.ph-state { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--lime); font-weight: 600; }
.ph-state.on { background: var(--ok-bg); color: var(--ok-ink); }

/* the phone's page for it (foto.html) */
.ph-page { min-height: 100dvh; background: var(--lime); }
.ph-main { display: grid; gap: 16px; align-content: start; max-width: 30rem; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px)); }
.ph-main .brand { margin: 0; }
.ph-main h1 { margin: 12px 0 0; font: 400 clamp(2.2rem, 9vw, 2.8rem)/1.05 var(--display); }
.ph-lead { margin: 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.5; }
.ph-acts { display: grid; gap: 10px; margin-top: 8px; }
.ph-acts[hidden] { display: none; }
.ph-big, .ph-soft { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 20px; border-radius: 16px; font: 700 1.0625rem/1.2 var(--body); cursor: pointer; }
.ph-big { border: 0; background: var(--ink); color: var(--lime); }
.ph-soft { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.ph-soft input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ph-big:focus-visible, .ph-soft:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.ph-msg { margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--paper); font-weight: 600; }
.ph-msg.ok { background: var(--ok-bg); color: var(--ok-ink); }
.ph-msg.bad { background: var(--bad-bg); color: var(--bad-ink); }
.ph-sent { width: 100%; max-height: 46dvh; object-fit: contain; border-radius: 14px; background: var(--paper); }
.ph-sent[hidden] { display: none; }
.cam-shot:disabled { opacity: .35; cursor: default; }

/* ───────── the legal pages (legal/*.html): the store's bar, always solid, and a page to read ───────── */
.top.static { position: sticky; }
/* a rug's own page (alfombra.html): the picture beside what it is, its sizes and how to buy it; others like it below */
.rug-page { padding-block: clamp(1.25rem, 3vw, 2rem) clamp(3rem, 6vw, 5rem); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9375rem; color: var(--ink-2); }
.crumbs a { color: inherit; text-underline-offset: 3px; }
.crumbs { align-items: center; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.rp-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; margin-top: clamp(1rem, 2.5vw, 1.75rem); }
.rp-top[hidden], .rp-gone[hidden], .rp-more[hidden], .rp-down[hidden] { display: none; }
.rp-photo { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 26px; background: var(--lime-2); overflow: hidden; }
.rp-photo img { position: absolute; inset: 7% 9%; width: 82%; height: 86%; object-fit: contain; }
.rp-photo .sold-tag { position: absolute; top: 18px; inset-inline-start: 18px; }
.rp-info { display: grid; gap: 14px; align-content: start; position: sticky; top: 96px; }
.rp-info h1 { font: 400 clamp(2.6rem, 5.5vw, 4rem)/1 var(--display); }
:lang(ar) .rp-info h1 { font-weight: 600; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.2; }
.rp-sold { padding: 12px 14px; border-radius: 12px; background: var(--lime); font-size: .9375rem; }
.rp-lbl { margin-bottom: 8px; font-weight: 700; font-size: .9375rem; }
.rp-size { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.rp-size small { color: var(--ink-2); font-size: .875rem; }
.rp-price { display: flex; align-items: baseline; gap: 10px; color: var(--ink-2); font-size: .9375rem; }
.rp-price b { color: var(--ink); font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.rp-price b.deal .was { font-size: .7em; }
.rp-ship { color: var(--ink-2); font-size: .9375rem; }
.rp-label { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; font-size: .9375rem; }
.rp-label[hidden] { display: none; }
.rp-label dt { color: var(--ink-2); }
.rp-label dd { margin: 0; color: var(--ink); }
.rp-label .rp-seal { width: 20px; height: 20px; vertical-align: -5px; margin-inline-end: 6px; }   /* the shop's seal beside its name, the importer */
.rp-label [hidden] { display: none; }
.rp-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.rp-acts .btn { flex: 1 1 12rem; justify-content: center; }
.rp-said { font-size: .9375rem; font-weight: 600; }
.rp-said a { color: var(--accent-ink); text-underline-offset: 3px; }
.rp-facts { display: grid; gap: 8px; margin: 6px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .9375rem; color: var(--ink-2); }
.rp-facts li { padding-inline-start: 22px; position: relative; }
.rp-facts li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); }
.rp-gone, .rp-down { margin-top: 24px; display: grid; gap: 12px; }
.rp-gone h1 { font: 400 clamp(2.2rem, 5vw, 3.2rem)/1.05 var(--display); }
.rp-more { margin-top: clamp(3rem, 7vw, 5rem); display: grid; gap: 22px; }
.rp-more h2 { font: 400 clamp(1.9rem, 4vw, 2.6rem)/1.05 var(--display); }
@media (max-width: 900px) { .rp-top { grid-template-columns: minmax(0, 1fr); } .rp-info { position: static; } .rp-photo { aspect-ratio: 1; } }
/* «Nosotros» */
.about { max-width: calc(46rem + 2 * var(--gut)); padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 5rem); display: grid; gap: 18px; }
.about h1 { font: 400 clamp(2.4rem, 6vw, 3.6rem)/1.02 var(--display); }
:lang(ar) .about h1, :lang(ar) .rp-gone h1, :lang(ar) .rp-more h2 { font-weight: 600; line-height: 1.25; }
.about section { display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.about h2 { font: 400 clamp(1.6rem, 3vw, 2rem)/1.1 var(--display); }
:lang(ar) .about h2 { font-weight: 600; font-size: 1.4rem; }
/* the family's photo, then the years one under the other on a thread, each with its dot */
.ab-photo { margin: 8px 0 4px; display: grid; gap: 8px; }
.ab-photo img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); }
.ab-photo figcaption { font-size: .875rem; color: var(--ink-2); font-style: italic; }
.ab-time { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 18px; }
.ab-time li { position: relative; display: grid; gap: 4px; padding-inline-start: 26px; }
.ab-time li::before { content: ""; position: absolute; inset-inline-start: 5px; top: .45em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.ab-time li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 9px; top: calc(.45em + 13px); bottom: -14px; width: 1px; background: var(--line); }
.ab-time h3 { font: 400 1.3rem/1.15 var(--display); }
:lang(ar) .ab-time h3 { font-weight: 600; font-size: 1.1rem; }
.ab-time p, .about section > p, .ab-why li { color: var(--ink-2); }
.ab-why { margin: 0; padding-inline-start: 1.1em; display: grid; gap: 8px; }
.ab-why b { color: var(--ink); }
/* «Contacto»: four ways to reach the shop, then where it is */
.contact { max-width: calc(60rem + 2 * var(--gut)); padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 5rem); display: grid; gap: 18px; }
.contact h1 { font: 400 clamp(2.4rem, 6vw, 3.6rem)/1.02 var(--display); }
:lang(ar) .contact h1 { font-weight: 600; line-height: 1.25; }
.ct-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.ct-card { display: grid; gap: 6px; align-content: start; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.ct-card svg { color: var(--accent-ink); }
.ct-card h2 { font-size: 1.25rem; }
.ct-card p { color: var(--ink-2); font-size: .9375rem; }
.ct-card p > a { display: inline-block; padding: 11px 0; margin: -11px 0; color: var(--accent-ink); font-weight: 600; text-underline-offset: 3px; }   /* the number, the address: 44px to tap, the card as it was */
.ct-where { display: grid; gap: 12px; margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.ct-where h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.ct-map { margin: 0; display: grid; gap: 8px; }
.ct-map-box { position: relative; }
.ct-map img, .ct-map iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); }
.ct-map iframe { border: 0; outline: 1px solid var(--line); background: var(--paper); }
.ct-map-go { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); white-space: nowrap; }
@media (max-width: 420px) { .ct-map img, .ct-map iframe { aspect-ratio: 4 / 5; } .ct-map-go { white-space: normal; width: max-content; max-width: calc(100% - 32px); } }
.ct-map figcaption { font-size: .875rem; color: var(--ink-2); }
.ct-map figcaption a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-underline-offset: 3px; }
@media (max-width: 600px) { .ct-cards { grid-template-columns: minmax(0, 1fr); } }
.ab-visit { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.ab-visit dt { font-weight: 700; }
.ab-visit dd { margin: 0; }
.ab-visit dd > a { display: inline-block; padding: 11px 0; margin: -11px 0; color: var(--accent-ink); font-weight: 600; text-underline-offset: 3px; }   /* the phone: 44px to tap, the list as it was */
/* the opening hours, a row a day: the day, then its hours (lang.js) */
.hours { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; }
.hours .hrow { display: contents; }
.hours .hday { font-weight: 600; color: var(--ink); }
.hours .htime { font-variant-numeric: tabular-nums; }
.hours .htime > span { display: block; }
@media (max-width: 380px) { .hours { grid-template-columns: minmax(0, 1fr); gap: 0; } .hours .htime { margin-bottom: 6px; } }
.legal { max-width: calc(46rem + 2 * var(--gut)); padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 5rem); }
.legal h1 { margin-top: 14px; font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.02; }
:lang(ar) .legal h1 { font-weight: 600; line-height: 1.3; font-size: clamp(2rem, 5vw, 2.8rem); }
.lg-binding { margin-top: 22px; padding: 14px 18px; border-radius: 14px; background: var(--lime-2); border-inline-start: 3px solid var(--accent-ink); font-size: .9375rem; }
.lg-body { display: grid; gap: 30px; margin-top: 26px; }
.lg-body .lead { color: var(--ink-2); }
.lg-body h2, .withdraw-box h2 { margin-bottom: 6px; font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.1; }
:lang(ar) .lg-body h2, :lang(ar) .withdraw-box h2 { font-size: 1.4rem; line-height: 1.4; }
.lg-body p { margin-top: 10px; max-width: 68ch; }
.legal a:not(.btn) { color: var(--accent-ink); text-underline-offset: 3px; }
.legal code { font: 600 .875em/1 ui-monospace, "SF Mono", Menlo, monospace; padding: 2px 6px; border-radius: 6px; background: var(--lime-2); unicode-bidi: isolate; direction: ltr; }
/* where a real shop would put its own details: plainly a show shop's blank */
.pending { padding: 1px 8px; border-radius: 6px; background: var(--lime-2); color: var(--ink-2); font-style: italic; }
.legal table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: .9375rem; }
.legal th, .legal td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
[dir="rtl"] .legal th, [dir="rtl"] .legal td { padding: 10px 0 10px 12px; }
.legal th[scope="row"] { width: 34%; font-weight: 700; }
.legal table.ship caption { caption-side: top; text-align: start; padding-bottom: 6px; color: var(--ink-2); font-size: .9375rem; }
.legal table.ship th[scope="row"] small { display: block; margin-top: 2px; font-weight: 400; font-size: .875rem; color: var(--ink-2); }
.legal table.ship td a { display: inline-block; padding-block: 11px; margin-block: -11px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.legal thead th { font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
:lang(ar) .legal thead th { letter-spacing: 0; font-size: .9375rem; }
.lg-table h2 { font-size: 1.375rem; }
.model { margin-top: 12px; padding: 16px 20px; border: 1.5px dashed rgba(var(--ink-rgb), .3); border-radius: 14px; background: var(--paper); }
.model p:first-child { margin-top: 0; }
.updated { margin-top: 36px; font-size: .875rem; color: var(--ink-2); }
@media (max-width: 600px) {
  .lg-table tr { display: grid; padding-block: 8px; border-bottom: 1px solid var(--line); }
  .lg-table th, .lg-table td { width: auto !important; padding: 2px 0; border: 0; }
  /* the delivery prices: four columns don't fit a phone — a block for each destination, a line for each size */
  .legal table.ship thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal table.ship tr { display: grid; padding-block: 10px; border-bottom: 1px solid var(--line); }
  .legal table.ship th, .legal table.ship td { width: auto; padding: 3px 0; border: 0; }
  .legal table.ship td[data-col] { display: flex; justify-content: space-between; gap: 12px; }
  .legal table.ship td[data-col]::before { content: attr(data-col); color: var(--ink-2); }
}
/* a link inside a sentence: 44px to tap, the lines where they were */
.lg-body p a { padding-block: 11px; }
.form-note a { padding-block: 13px; }   /* (its smaller line) */

/* «Desistir del contrato aquí»: the details, then a look at them, then the receipt */
.withdraw-box { margin-top: 44px; padding: clamp(20px, 4vw, 36px); border-radius: 22px; background: var(--paper); scroll-margin-top: 96px; }
.withdraw-box .step { display: grid; gap: 14px; }
.withdraw-box .step:focus { outline: none; }
.withdraw-box h3 { font: 400 1.75rem/1.1 var(--display); }
:lang(ar) .withdraw-box h3 { font-weight: 600; font-size: 1.375rem; line-height: 1.4; }
.fld { display: grid; gap: 6px; }
.fld label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 700; }
.fld .req { font-weight: 500; font-size: .875rem; color: var(--ink-2); }
.fld .hint { font-size: .875rem; color: var(--ink-2); }
.fld input { width: 100%; min-height: 50px; padding: 0 14px; border: 1.5px solid rgba(var(--ink-rgb), .5); border-radius: 12px; background: var(--lime); color: var(--ink); font-size: 1rem; }
.fld input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; border-color: var(--ink); }
.fld input[aria-invalid="true"] { border-color: var(--bad-ink); background: var(--bad-bg); }
.fld-err { display: flex; gap: 8px; align-items: flex-start; color: var(--bad-ink); font-weight: 600; font-size: .9375rem; }
.fld-err::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--bad-ink); color: var(--paper); font: 800 .75rem/1 var(--body); }
.review { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--lime); }
.review dt { font-weight: 700; color: var(--ink-2); }
.review dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .review { grid-template-columns: minmax(0, 1fr); gap: 2px; } .review dd { margin-bottom: 8px; } }
.withdraw-box .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.withdraw-box .btns .btn { flex: 1 1 14rem; }
.receipt { display: grid; gap: 10px; padding: 18px 20px; border-radius: 14px; background: var(--ok-bg); color: var(--ok-ink); }
.receipt h3 { color: inherit; }
.receipt p { color: var(--ink); }
.form-msg { padding: 12px 14px; border-radius: 12px; background: var(--bad-bg); color: var(--bad-ink); font-weight: 600; }
.form-note { margin-top: 18px; font-size: .875rem; color: var(--ink-2); }

/* ───────── after Stripe's page: the order and its invoice (compra/) ───────── */
.buy { max-width: calc(46rem + 2 * var(--gut)); padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 5rem); display: grid; gap: 18px; justify-items: start; }
.buy h1 { font-size: clamp(2.2rem, 5.5vw, 3.2rem); line-height: 1.05; }
:lang(ar) .buy h1 { font-weight: 600; line-height: 1.35; font-size: clamp(1.9rem, 5vw, 2.6rem); }
.buy > * { width: 100%; }
.buy > .eyebrow { width: auto; }
.od-items { list-style: none; padding: 0; margin: 6px 0 0; border-top: 1px solid var(--line); }
.od-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.od-items .t { font-weight: 600; }
.od-items .ship .t { font-weight: 400; color: var(--ink-2); }
.od-items .s { grid-column: 1; color: var(--ink-2); font-size: .9375rem; }
.od-items .p { grid-row: 1 / 3; grid-column: 2; align-self: center; font-variant-numeric: tabular-nums; }
.od-total { display: flex; justify-content: space-between; gap: 16px; font-size: 1.125rem; }
.od-total b { font-variant-numeric: tabular-nums; }
.od-seal { width: 72px; height: 72px; margin-bottom: 4px; }
/* where the order is: three steps on a thread, the reached ones filled with the seal's red */
.od-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
.od-steps li { position: relative; display: grid; gap: 2px; padding-top: 26px; font-size: .9375rem; color: var(--ink-2); }
.od-steps li::before { content: ""; position: absolute; top: 4px; inset-inline-start: 0; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--lime); box-sizing: border-box; z-index: 1; }
.od-steps li::after { content: ""; position: absolute; top: 10px; inset-inline: 14px 0; height: 2px; background: var(--line); }
.od-steps li:last-child::after { display: none; }
.od-steps li.done::before { border-color: var(--accent); background: var(--accent); }
.od-steps li.done:has(+ li.done)::after { background: var(--accent); }
.od-steps li[aria-current="step"]::before { box-shadow: 0 0 0 4px rgba(164, 22, 31, .16); }
.od-steps li.done b { color: var(--ink); }
.od-steps span { font-size: .8125rem; }
.od-sheet { display: grid; gap: 14px; padding: clamp(18px, 4vw, 30px); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 2px rgba(var(--shade-rgb), .05), 0 18px 40px -24px rgba(var(--shade-rgb), .28); }
.od-sheet > * { margin: 0; }
.od-sheet .od-items { margin: 0; border-top: 0; }
.od-sheet .od-items li:first-child { padding-top: 0; }
.od-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
/* the invoice: a sheet of paper under the shop's seal, a kilim border under its head (it prints as it looks) */
.inv-sheet { display: grid; gap: 22px; padding: clamp(22px, 5vw, 52px); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 2px rgba(var(--shade-rgb), .05), 0 18px 40px -24px rgba(var(--shade-rgb), .28); }
.inv-sheet > * { margin: 0; }
.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 22px 32px; }
.inv-from { display: flex; align-items: center; gap: 16px; }
.inv-seal { width: 88px; height: 88px; flex: none; }
.inv-brand { font-family: var(--display); font-size: 1.75rem; line-height: 1.1; }
:lang(ar) .inv-brand { font-family: "Instrument Serif", serif; }
.inv-sub { margin-top: 4px; font: 600 .6875rem/1.3 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
:lang(ar) .inv-sub { letter-spacing: 0; font-size: .8125rem; }
@media (max-width: 600px) { .inv-sub { font-size: .875rem; letter-spacing: .14em; } }   /* a phone: read at arm's length (on paper it keeps the mark's size) */
.inv-id { display: grid; gap: 10px; justify-items: end; }
.buy .inv-id h1 { font-size: clamp(2rem, 4.5vw, 2.6rem); line-height: 1; }
.inv-band { height: 14px; border-block: 1px solid var(--accent); }
/* the kilim's eyes, only whole ones: «space» spreads them over the width instead of cutting the last */
.inv-band::before { content: ""; display: block; height: 100%; background: var(--accent);
  --eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M10 2.2 15 6l-5 3.8L5 6Z' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3Ccircle cx='10' cy='6' r='1.2'/%3E%3C/svg%3E");
  -webkit-mask: var(--eye) space center / 20px 12px; mask: var(--eye) space center / 20px 12px; }
.inv-meta { display: grid; grid-template-columns: auto auto; gap: 4px 16px; align-content: start; font-size: .9375rem; }
.inv-meta dt, .inv-tot dt { color: var(--ink-2); }
.inv-tot dd { padding-inline-start: 24px; }
.inv-meta dd, .inv-tot dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.inv-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 18px 32px; }
.inv-parties p { margin-top: 6px; }
.inv-parties #invBuyer span, .inv-parties #invSeller span { display: block; overflow-wrap: anywhere; }
.inv-parties #invSeller .pending { display: table; }
.inv-scroll { overflow-x: auto; }
.inv-lines { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.inv-lines th, .inv-lines td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
[dir="rtl"] .inv-lines th, [dir="rtl"] .inv-lines td { padding: 10px 0 10px 12px; }
.inv-lines thead th { font-size: .8125rem; color: var(--ink-2); font-weight: 600; }
.inv-lines .n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-tot { display: grid; grid-template-columns: auto auto; gap: 6px 0; justify-self: end; width: auto; min-width: min(100%, 18rem); }
.inv-tot .tot { font-weight: 700; font-size: 1.125rem; color: var(--ink); padding-top: 8px; border-top: 1px solid var(--ink); }
.inv-tot dd.tot { font-size: 1.375rem; }
.inv-paid { font-size: .875rem; color: var(--ink-2); }
.inv-thanks { padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font: italic 400 1.25rem/1.3 var(--display); color: var(--ink-2); }
@media (max-width: 560px) { .inv-id { justify-items: start; } .inv-seal { width: 64px; height: 64px; } }
@page { margin: 16mm 14mm; }
@media print {
  .skip, .top, .foot, .od-acts, .toast { display: none !important; }
  /* paper is white whatever the light on screen: the dark theme's pale ink would print faint */
  :root, :root[data-theme="dark"] { --ink: #1d2340; --ink-2: #4f5674; --line: #d6d0c6; --lime: #fff; --lime-2: #f4efe7; --accent-ink: #a4161f; --ink-rgb: 29, 35, 64; }
  body { background: #fff; color: var(--ink); }
  .buy { padding: 0; max-width: none; }
  .inv-sheet { padding: 0; border: 0; box-shadow: none; background: none; }
  .inv-seal, .inv-band, .inv-band::before { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .cart-demo, .pending { border-color: #999; color: #333; background: none; }
}
.od-pay { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; padding: 18px 20px; border-radius: 14px; background: var(--lime-2); }
.od-pay dt { color: var(--ink-2); }
.od-pay dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.od-pay .code { font-variant-numeric: tabular-nums; unicode-bidi: isolate; direction: ltr; text-align: start; }
[dir="rtl"] .od-pay .code { text-align: end; }
@media (max-width: 480px) { .od-pay { grid-template-columns: minmax(0, 1fr); gap: 2px; } .od-pay dd { margin-bottom: 8px; } }
.od-refunds { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.od-refunds a { display: block; padding: 14px 18px; border-radius: 14px; background: var(--lime-2); color: var(--ink); font-weight: 600; min-height: 44px; }
.inv-corrects { margin: 0 0 12px; font-weight: 700; }

/* the error pages (errores/404.html, 50x.html — Caddy shows them) */
.err-seal { width: 72px; height: 72px; }
.err-page { min-height: 100svh; display: grid; place-items: center; padding: 32px var(--gut); }
.err { max-width: 34rem; display: grid; gap: 14px; justify-items: start; }
.err h1 { margin: 0; font: 400 clamp(2.2rem, 7vw, 3.4rem)/1.05 var(--display); }
.err p { margin: 0; color: var(--ink-2); }
.err .btn { margin: 10px 0 18px; }
.err-other { font-size: .9375rem; }
.err-other:lang(ar) { justify-self: stretch; font-family: "Tajawal", system-ui, sans-serif; }
.err-other a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-ink); }
/* the shop's details from shop.json (a phone, an address, Spanish hours) read in their own direction inside an Arabic page */
[data-shop] { unicode-bidi: plaintext; }

/* ───────── the whole collection (coleccion.html) and the try-on alone (probador.html), 25 Oct: the home page shows the
   first 30, these all of them with their filters — beside the pieces on a computer, a row above them on a phone ───────── */
.grid-more { margin: clamp(1.75rem, 3vw, 2.5rem) 0 0; text-align: center; }
.grid-more[hidden] { display: none; }
.p-all { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--accent-ink); text-underline-offset: 3px; }
.p-all[hidden] { display: none; }
.filters button .n { margin-inline-start: 8px; font-size: .8125rem; font-weight: 400; opacity: .7; font-variant-numeric: tabular-nums; }
.filters button .n:empty { display: none; }
.col-page { padding-block: clamp(1.75rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); }
.col-page h1 { margin: 10px 0 8px; font: 400 clamp(2.25rem, 5vw, 3.5rem)/1.05 var(--display); }
:lang(ar) .col-page h1 { font-weight: 600; }
.col-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: start; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.col-side { position: sticky; top: 24px; }
.col-ft { margin: 0 0 12px; font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
:lang(ar) .col-ft { letter-spacing: 0; }
.col-filters { flex-direction: column; flex-wrap: nowrap; }
.col-filters button { display: flex; justify-content: space-between; align-items: center; text-align: start; border-radius: 12px; }
.col-main .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .col-main .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .col-body { grid-template-columns: minmax(0, 1fr); }
  .col-side { position: static; }
  .col-filters { flex-direction: row; overflow-x: auto; margin-inline: calc(-1 * var(--gut)); padding: 2px var(--gut) 6px; scrollbar-width: none; }
  .col-filters::-webkit-scrollbar { display: none; }
  .col-filters button { flex: none; border-radius: 99px; }
}
@media (max-width: 600px) { .col-main .grid { grid-template-columns: minmax(0, 1fr); } }
main[data-tryall] .probador { padding-top: clamp(6rem, 10vw, 8rem); }
.p-filters { margin: 0 0 10px; gap: 6px; }
@media (max-width: 900px) { .p-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; } .p-filters::-webkit-scrollbar { display: none; } }
.p-filters button { flex: none; min-height: 44px; padding: 0 14px; font-size: .875rem; }
main[data-tryall] .swatch-row { max-height: 22rem; overflow-y: auto; padding: 2px; align-content: start; }

/* 25 Oct: «¿Te ha llegado bien?» (compra/opinion.html) and the offers box under the terms */
.agree.offers { align-items: flex-start; }
.agree.offers input { margin-top: 2px; }
.rv-form { display: grid; gap: 22px; }
.rv-more { display: grid; gap: 22px; }
.rv-more[hidden] { display: none; }
.rv-q { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.rv-q legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.rv-opt { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.rv-opt input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--rojo); }
.rv-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.rv-opt:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.rv-q[aria-invalid="true"] .rv-opt, .rate[aria-invalid="true"] .stars-in { border-color: var(--bad-ink); }
.stars-in { display: flex; gap: 4px; width: max-content; padding: 2px; border: 1.5px solid transparent; border-radius: 12px; }
.stars-in label { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; color: rgba(var(--ink-rgb), .5); font-size: 2rem; line-height: 1; cursor: pointer; transition: color .15s var(--ease, ease), transform .15s var(--ease, ease); }
.stars-in label.on { color: #b07a12; }
:root[data-theme="dark"] .stars-in label.on { color: #e7b34a; }
.stars-in label:hover { transform: scale(1.08); }
.stars-in label:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .stars-in label { transition: none; } .stars-in label:hover { transform: none; } }
.fld textarea { width: 100%; min-height: 96px; padding: 12px 14px; border: 1.5px solid rgba(var(--ink-rgb), .5); border-radius: 12px; background: var(--lime); color: var(--ink); font: inherit; font-size: 1rem; resize: vertical; }
.fld textarea:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; border-color: var(--ink); }
.fld textarea[aria-invalid="true"] { border-color: var(--bad-ink); background: var(--bad-bg); }
.fld .opt { font-weight: 500; font-size: .9375rem; color: var(--ink-2); }
.rv-only { margin: -8px 0 0; color: var(--ink-2); font-size: .9375rem; }
