/* 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: #2a1d17;           /* walnut-brown ink */
  --ink-2: #5b4638;
  --line: #d9cdbb;
  --rojo: #a4161f;          /* Granada's crimson */
  --terra: #a2452a;         /* Cádiz's terracotta, deepened to read as text on lime */
  --accent: var(--rojo);
  --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;
}
: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); 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); }
.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); }
: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(255, 252, 247, .62); box-shadow: inset 0 0 0 1px rgba(42, 29, 23, .28); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255, 252, 247, .95); }
.btn.wide { width: 100%; }
.btn.ar { margin-top: 10px; min-height: 48px; font-size: .9375rem; }
.btn.ar[hidden] { display: none; }
#arMv { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.btn.wa { margin-top: 10px; 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); }

/* 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(244, 239, 231, .9); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.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 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; }
.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(42, 29, 23, .07); }
.lang { font-size: .875rem; font-weight: 600; padding: 0 12px; }
.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(244, 239, 231, .84) 0%, rgba(244, 239, 231, .56) 30%, rgba(244, 239, 231, 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); 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(255, 252, 247, .93); border-radius: 999px; box-shadow: 0 18px 40px -20px rgba(42, 29, 23, .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(255, 252, 247, .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(42, 29, 23, .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: #efe6d9; }
.film-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #efe6d9 url(img/film-poster.webp) center / cover no-repeat; }
.film.ready .film-stage { background-image: none; }
#filmcv { position: absolute; inset: 0; width: 100%; height: 100%; }
.film-load { position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: rgba(42, 29, 23, .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(255, 252, 247, .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(--rojo); }

/* ───────── 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 { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: soft-light; opacity: .7; pointer-events: 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(255, 252, 247, 0) 30%, rgba(255, 252, 247, .38) 48%, rgba(255, 252, 247, .95) 50%, rgba(255, 252, 247, 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(255, 252, 247, .92); font-size: .875rem; line-height: 1.3; pointer-events: none; transition: opacity .5s; }
[dir="rtl"] .p-hint { left: auto; right: 16px; }
/* on your photo the rug starts low in the frame: the hint goes up top, out of its way */
.p-stage.own .p-hint { top: 12px; bottom: auto; }
.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(4, 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(42, 29, 23, .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; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.sizes button { flex: 1 1 calc(50% - 8px); min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: none; font-size: .9375rem; font-variant-numeric: tabular-nums; display: grid; line-height: 1.2; padding: 6px 8px; }
.sizes button small { color: var(--ink-2); font-size: .8125rem; }
.sizes button[aria-pressed="true"] { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.sizes button[aria-pressed="true"] small { color: rgba(244, 239, 231, .75); }
.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); }
.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(244, 239, 231, .86), rgba(244, 239, 231, .5) 32%, rgba(244, 239, 231, 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; }
.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 { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(42, 29, 23, .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); }
.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); }
: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; }

/* ───────── 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-selected="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; }
.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; 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; }
.foot { padding-block: 2rem 3rem; border-top: 1px solid var(--line); display: grid; gap: 16px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot nav a { color: var(--ink-2); text-decoration: none; font-size: .9375rem; display: inline-flex; align-items: center; min-height: 44px; }
.foot nav a:hover { color: var(--ink); }
.sample { font-size: .875rem; color: var(--ink-2); max-width: 70ch; }

/* cart */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(42, 29, 23, .45); }
.cart { 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(42, 29, 23, .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: 1; overflow-y: auto; 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; }
.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; }
.qty { display: inline-flex; align-items: center; gap: 4px; justify-self: end; }
.qty button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 99px; background: none; }
.qty span { min-width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.cart-empty { flex: 1; color: var(--ink-2); }
.cart-foot { display: grid; gap: 10px; }
.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; }
.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; }

/* ───────── 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; }
  .top:not(.solid) { background: linear-gradient(rgba(244, 239, 231, .92), rgba(244, 239, 231, 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(4, 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, .sizes button small, .rooms button, .upload { font-size: .875rem; }
  .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 10px; }
  .card-img .try { display: none; }
}
@media (max-width: 400px) {
  .lang { padding: 0 8px; }
}
@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; aspect-ratio: 16 / 9; background-image: url(img/film-poster.webp) !important; }
  #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; }
}
.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; }
.cam-shot:disabled { opacity: .35; cursor: default; }
