/* ============================================================
   jovo — Fotografías de autor
   Paleta tomada del volante: pared cálida oscura, dorado,
   crema de papel y verde bosque.
   ============================================================ */

:root {
    --ink:      #15120e;
    --ink-2:    #1e1914;
    --wall:     #2b231b;
    --paper:    #f7f2e9;
    --paper-2:  #efe7d9;
    --paper-3:  #e6dbc8;
    --line:     #ddd0bb;
    --text:     #2a241d;
    --muted:    #7b6e5e;
    --gold:     #d3a24a;
    --gold-2:   #ecc97f;
    --gold-ink: #9a7127;
    --forest:   #14241d;
    --ok:       #3f7d55;
    --danger:   #b2442f;

    --serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans:   'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --script: 'Caveat', 'Segoe Script', cursive;

    --radius: 10px;
    --wrap:   1320px;
    --gutter: clamp(16px, 4vw, 40px);
    /* Cuadro real: sombra de contacto + sombra ambiente (el canto lo pinta protect.js) */
    --shadow-panel: 10px 12px 10px -3px rgba(20, 12, 4, .36), 18px 28px 44px -8px rgba(20, 12, 4, .32);
    --shadow-panel-hover: 12px 16px 14px -3px rgba(20, 12, 4, .32), 24px 42px 60px -10px rgba(20, 12, 4, .36);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font: 400 17px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-variant-numeric: lining-nums; font-weight: 700; line-height: 1.12; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: var(--gold); color: var(--ink); padding: .5rem 1rem; border-radius: 6px; }
.script { font-family: var(--script); font-size: 1.45em; line-height: 1.25; }
.note { font-size: .88rem; color: var(--muted); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── Botones ────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .85rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
    font-weight: 500; letter-spacing: .02em; text-decoration: none; cursor: pointer;
    transition: transform .2s, background .2s, box-shadow .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 8px 24px -10px rgba(211, 162, 74, .8); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ── Cabecera ───────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(21, 18, 14, .96);
    backdrop-filter: blur(10px);
    transition: background .3s, box-shadow .3s;
    color: #f4ecdf;
}
.home .site-header { position: fixed; left: 0; right: 0; background: transparent; }
.home .site-header.is-scrolled, .nav-open .site-header { background: rgba(21, 18, 14, .94); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand img { width: 74px; height: auto; }
.brand-sub { font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; color: #cfc2ae; border-left: 1px solid rgba(255,255,255,.2); padding-left: .8rem; line-height: 1.3; max-width: 9.5em; }
.main-nav { margin-left: auto; display: flex; gap: 2rem; }
.main-nav a { text-decoration: none; font-size: .95rem; color: #e9dfcf; position: relative; padding: .3rem 0; }
.main-nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--gold); transition: right .25s; }
.main-nav a:hover::after { right: 0; }
.cart-link { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #f4ecdf; border: 1px solid rgba(255,255,255,.18); transition: border-color .2s; }
.cart-link:hover { border-color: var(--gold); }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--gold); color: var(--ink); font-size: .72rem; font-weight: 600; display: grid; place-items: center; }
.nav-toggle { display: none; background: none; border: 0; color: #f4ecdf; cursor: pointer; padding: .4rem; }

/* ── Panel (el producto: impresión con borde negro) ─────── */
.panel {
    --depth: 2px;   /* panel de 8 mm */
    position: relative;
    background: #0f0f0f;
    box-shadow: var(--shadow-panel);
    transition: transform .35s ease, box-shadow .35s ease;
}
/* Reflejo de luz sobre la superficie y borde fino del panel */
.panel::after {
    content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    background:
        linear-gradient(128deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .04) 28%, rgba(255, 255, 255, 0) 45%),
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 240, 215, .10), transparent 70%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), inset 1px 1px 0 0 rgba(255, 255, 255, .12);
}
/* Cantos de la impresión envolvente (la foto dobla sobre el panel) */
.wrap-edge { position: absolute; z-index: 1; pointer-events: none; transform-origin: 0 0; }
.wrap-edge--r { top: 0; left: 100%; width: var(--depth); height: 100%; transform: skewY(45deg); filter: brightness(.66) saturate(.92); }
.wrap-edge--b { left: 0; top: 100%; width: 100%; height: var(--depth); transform: skewX(45deg); filter: brightness(.48) saturate(.9); }
.panel--lg { --depth: 3.5px; }
.ci-thumb .panel { --depth: 1.5px; }
.panel--empty { aspect-ratio: 2 / 3; background: linear-gradient(160deg, #3a3025, #1c1712); }

/* Imagen protegida */
.pimg {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(110deg, #1b1814 30%, #2a241d 50%, #1b1814 70%) 0 0 / 300% 100%;
    animation: shimmer 1.6s linear infinite;
    user-select: none; -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
.pimg.is-ready { animation: none; background: #0f0f0f; }
.pimg canvas { width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease, filter .25s ease; pointer-events: none; }
.pimg.is-ready canvas { opacity: 1; }
.pimg-guard { position: absolute; inset: 0; z-index: 2; background: transparent; }
@keyframes shimmer { to { background-position: -300% 0; } }

/* Escudo anti-captura */
.jv-shield .pimg canvas, .jv-shield #room-canvas { filter: blur(26px) brightness(.55) saturate(.6); }
.shield-msg {
    position: fixed; inset: 0; z-index: 400; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
    color: #fff; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase;
    background: rgba(10, 8, 6, .35); opacity: 0; transition: opacity .2s;
}
.shield-msg .ico { color: var(--gold); }
.jv-shield .shield-msg { opacity: 1; }

/* ═════════════ HERO ═════════════ */
.hero {
    position: relative; overflow: hidden;
    color: #f4ecdf;
    background:
        radial-gradient(ellipse 38% 45% at 50% 0%, rgba(255, 196, 120, .28), transparent 70%),
        radial-gradient(ellipse 30% 40% at 85% 0%, rgba(255, 196, 120, .22), transparent 70%),
        radial-gradient(ellipse 60% 60% at 70% 45%, #4a3a2a 0%, transparent 70%),
        linear-gradient(180deg, #2a2119 0%, #1f1913 70%, #17120e 100%);
    padding: 120px 0 clamp(56px, 7vw, 96px);
    min-height: min(100vh, 900px);
}
/* Foto destacada de fondo, muy difuminada */
.hero-bg {
    position: absolute; inset: -80px; pointer-events: none;
    background-size: cover; background-position: center;
    filter: blur(48px) saturate(1.25) brightness(.62);
    transform: scale(1.1);
}
/* Velo oscuro para que el texto siempre se lea */
.hero-light { position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(18, 14, 10, .82) 0%, rgba(18, 14, 10, .55) 38%, rgba(18, 14, 10, .15) 70%, rgba(18, 14, 10, .25) 100%),
        linear-gradient(180deg, rgba(18, 14, 10, .35) 0%, transparent 25%, transparent 75%, rgba(18, 14, 10, .55) 100%),
        radial-gradient(ellipse 22% 30% at 12% 0%, rgba(255, 200, 130, .14), transparent 70%); }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.rule { display: block; width: 56px; height: 3px; background: var(--gold); border-radius: 2px; margin-bottom: 1.4rem; }
.hero h1 { color: #fbf6ee; font-size: clamp(2.4rem, 4.4vw, 3.9rem); letter-spacing: -.01em; margin-bottom: .45em; }
.hero h1 em { font-style: normal; color: var(--gold-2); }
.hero .lead { font-size: 1.12rem; color: #d9ccb8; max-width: 30em; }
.hero-cats { list-style: none; padding: 0; margin: 1.8rem 0 2.2rem; display: grid; gap: .35rem; }
.hero-cats a { display: inline-flex; align-items: center; gap: 1rem; text-decoration: none; padding: .35rem 0; color: #efe5d5; font-size: 1.05rem; transition: color .2s; }
.hero-cats a .ico { color: var(--gold); flex: none; }
.hero-cats a:hover { color: var(--gold-2); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.6rem; }
.hero-from { color: #cbbda8; font-size: .95rem; }
.hero-from strong { color: #fff; font-weight: 600; }

.hero-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 10px 0 40px; }

/* Carrusel: un solo cuadro grande a la vez */
.hero-wall {
    position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: min(64vh, 620px);
    /* nada se sale del carrusel al cambiar de foto (deja espacio para la sombra) */
    clip-path: inset(-30px -60px -80px -30px);
}
.hero-stage, .hero-copy, .wall-item, .wall-item .panel { min-width: 0; max-width: 100%; }

/* Carrusel: un solo cuadro grande a la vez. Solo el activo ocupa espacio,
   así el alto se ajusta a cada foto (vertical u horizontal). */
.wall-item {
    display: block; text-decoration: none;
    width: min(100%, calc(min(64vh, 620px) * var(--ar, .6667)));
    position: absolute; top: 50%; left: 50%;
    opacity: 0; transform: translate(-50%, -50%) translateX(26px) scale(.985); pointer-events: none;
    transition: opacity .3s ease, transform .5s ease;
}
.wall-item.is-active {
    position: relative; top: auto; left: auto; opacity: 1; transform: none; pointer-events: auto;
    transition: opacity .7s ease .2s, transform .9s cubic-bezier(.2, .8, .2, 1) .2s;
}
.wall-item.is-leaving { transform: translate(-50%, -50%) translateX(-26px) scale(.985); }
.wall-item .panel { --depth: 4px; box-shadow: 14px 20px 18px -4px rgba(0, 0, 0, .55), 28px 44px 70px -10px rgba(0, 0, 0, .6); }
.wall-item:hover .panel { transform: translateY(-4px); }

/* Fondo: una capa por obra, se funden entre sí */
.hero-bg { opacity: 0; transition: opacity 1.2s ease; }
.hero-bg.is-active { opacity: 1; }

/* Título de la obra y controles, centrados bajo el cuadro */
.hero-caption { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; margin-top: 34px; text-align: center; }
.hero-caption-text { display: grid; width: 100%; max-width: 30rem; }
.hero-cap {
    grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: .35rem;
    text-decoration: none; opacity: 0; transform: translateY(6px); transition: opacity .5s, transform .6s; pointer-events: none;
}
.hero-cap.is-active { opacity: 1; transform: none; pointer-events: auto; }
.hero-cap span { font-size: .68rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-2); }
.hero-cap strong {
    font-family: var(--serif); font-weight: 500; font-style: italic; font-size: 1.3rem; line-height: 1.3;
    color: #f5ede0; text-wrap: balance;
}
.hero-cap:hover strong { color: var(--gold-2); }

.hero-controls { display: flex; align-items: center; gap: 18px; }
.hero-arrow {
    display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .04); color: #f5ede0;
    cursor: pointer; transition: border-color .2s, background .2s, color .2s;
    -webkit-tap-highlight-color: transparent;
}
.hero-arrow:hover { border-color: var(--gold); color: var(--gold-2); background: rgba(211, 162, 74, .1); }
.hero-dots { display: flex; gap: 8px; flex: none; }
.hero-dots button { box-sizing: content-box; width: 22px; height: 2px; padding: 10px 0; border: 0; background: rgba(255, 255, 255, .3) content-box; cursor: pointer; transition: background .3s, width .3s; }
.hero-dots button.is-active { width: 36px; background: var(--gold) content-box; }

/* ═════════════ SECCIONES ═════════════ */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.6rem; }
.section-head--left { text-align: left; margin-left: 0; }
.section-head h2, .section-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.section-head p { color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: .7rem; font-size: .76rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: .9rem; }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--gold); }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 2.8rem; }
.chip {
    display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1.1rem; border-radius: 999px;
    border: 1px solid var(--line); background: #fff8; text-decoration: none; font-size: .92rem; color: var(--text);
    transition: all .2s;
}
.chip .ico { color: var(--gold-ink); }
.chip span { font-size: .75rem; color: var(--muted); }
.chip:hover { border-color: var(--gold); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #f5ecdd; }
.chip.is-active .ico { color: var(--gold-2); }
.chip.is-active span { color: #bfb19c; }

/* Grilla de obras */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 48px 32px; }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card-link {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 1 / 1; padding: 8% 8% 10%;
    background:
        radial-gradient(ellipse 60% 55% at 50% -8%, rgba(255, 246, 228, .95), rgba(255, 246, 228, 0) 70%),
        linear-gradient(180deg, #ede4d4, #dccfb9);
    border-radius: 4px;
    transition: background .3s;
}
.card-link .panel { width: 64%; }
.card-link .panel--horizontal { width: 97%; }
.card-link .panel--cuadrada { width: 82%; }
.card:hover .panel { transform: translateY(-4px); box-shadow: var(--shadow-panel-hover); }
.card-body { padding: 1rem .15rem 0; }
.card-cat { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); }
.card-title { font-size: 1.28rem; margin: .2rem 0 .15rem; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--gold-ink); }
.card-place { font-size: .9rem; color: var(--muted); margin: 0 0 .35rem; }
.card-price { font-size: .95rem; margin: 0; }
.card-price strong { font-weight: 600; }
.empty-state, .grid-empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.empty-state .ico { margin: 0 auto 1rem; color: var(--gold); }

/* ═════════════ TAMAÑOS ═════════════ */
.sizes { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.sizes-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.sizes-table-wrap h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.price-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6rem 0 1rem; background: #fffdf8; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 1.28rem; }
.price-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.price-table td { padding: .85rem 1.4rem; border-bottom: 1px solid var(--line); }
.price-table tr:last-child td { border-bottom: 0; }
.price-table td:first-child { border-right: 1px solid var(--line); }
.price-table td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.price-table tr:hover td { background: #fbf4e6; }

.sizes-visual { position: relative; }
.edge-demo { perspective: 1400px; padding: 10px 30px 40px; }
.edge-face {
    aspect-ratio: 16 / 10; border-radius: 1px; position: relative;
    transform: rotateX(38deg) rotateZ(-14deg) rotateY(-6deg);
    transform-origin: 60% 50%;
    background: linear-gradient(170deg, #9fc6e8 0%, #f3ead8 45%, #d8c1a0 60%, #6f8a4b 61%, #4e6a36 100%);
    box-shadow: 30px 40px 50px rgba(30, 20, 8, .35);
    overflow: visible;
    --depth: 5px;
}
.edge-face:not(.is-wrapped) { box-shadow: 2px 2px 0 #6f8a4b, 3px 3px 0 #5d7a44, 5px 5px 0 #4e6a36, 30px 40px 50px rgba(30, 20, 8, .35); }
.edge-face .pimg { aspect-ratio: auto !important; height: 100%; }
.annot { position: absolute; top: -.6rem; left: 0; color: var(--text); max-width: 14em; transform: rotate(-4deg); }
.features { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; text-align: center; font-size: .92rem; color: var(--muted); }
.features strong { display: block; color: var(--text); font-weight: 500; }
.feat-circle { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto .8rem; border-radius: 50%; box-shadow: 0 10px 24px -10px rgba(40, 25, 10, .5); border: 3px solid #fff; }
.feat-edge { background: linear-gradient(135deg, #e9e3d8 0 46%, #7fa25a 46% 68%, #4c6a34 68% 100%); }
.feat-hang { background: #d8c3a2; color: #5e5e5e; }
.feat-color { background: conic-gradient(from 200deg, #d2332b, #f0b22b, #f7d23a, #2f7fcc, #1d4fa0, #2b8c4a, #d2332b); }

/* ═════════════ PASOS ═════════════ */
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); counter-reset: s; }
.steps-list li { background: #fffdf8; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.8rem; }
.steps-list h3 { font-size: 1.35rem; margin-top: 1rem; }
.steps-list p { color: var(--muted); margin: 0; }
.step-n { font-variant-numeric: lining-nums tabular-nums; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold-ink); font-family: var(--serif); font-size: 1.3rem; }
.steps-ship { text-align: center; margin: 2.4rem 0 0; color: var(--muted); }

/* ═════════════ BANDA + PIE ═════════════ */
.band { background: var(--forest); color: #e8e0d0; padding: 2.4rem 0; }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.band-item { display: flex; align-items: center; gap: 1rem; padding: .4rem 1.4rem; font-size: .95rem; line-height: 1.4; }
.band-item + .band-item { border-left: 1px solid rgba(255, 255, 255, .14); }
.band-item .ico { color: var(--gold); flex: none; }
.band-item p { margin: 0; }
.flag { display: inline-block; width: 26px; height: 17px; vertical-align: -3px; margin-left: .3rem; background: linear-gradient(180deg, #f7d23a 0 50%, #1d4fa0 50% 75%, #d2332b 75%); border-radius: 2px; }

.site-footer {
    background:
        linear-gradient(180deg, rgba(10, 16, 12, .0), rgba(10, 16, 12, .6)),
        radial-gradient(ellipse 80% 60% at 50% 120%, #26352b, transparent 70%),
        #0f1813;
    color: #cfc5b4; padding: 3.2rem 0 2.4rem;
}
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.6rem 3rem; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 2rem; }
.footer-brand img { width: 88px; flex: none; }
.footer-brand .script { margin: 0; color: #ece2d0; font-size: 1.5rem; max-width: 26em; position: relative; padding-bottom: .6rem; }
.footer-brand .script::after { content: ''; position: absolute; left: 30%; bottom: 0; width: 34%; height: 3px; border-radius: 3px; background: var(--gold); transform: rotate(-1deg); }
.footer-links { display: flex; flex-direction: column; gap: .7rem; }
.social { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; font-size: 1.1rem; font-weight: 500; }
.social .ico { color: var(--gold); }
.social:hover { color: var(--gold-2); }
.footer-copy { grid-column: 1 / -1; margin: 0; font-size: .8rem; color: #8d8574; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 1.4rem; }

/* ═════════════ OBRA ═════════════ */
.page-obra main, .page-cart main, .page-order main { padding-top: 2rem; padding-bottom: 5rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: var(--muted); margin-bottom: 1.8rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--gold-ink); }
.obra-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 70px); align-items: start; }
.obra-stage {
    display: flex; align-items: center; justify-content: center;
    padding: clamp(24px, 5%, 48px) clamp(20px, 4%, 40px) clamp(32px, 6%, 56px);
    min-height: 420px;
    background:
        radial-gradient(ellipse 55% 35% at 50% 0%, rgba(255, 238, 200, .9), transparent 70%),
        linear-gradient(180deg, #ece3d3, #ddd0ba);
    border-radius: 4px;
}
.panel--lg.panel--vertical { width: min(70%, 520px); }
.panel--lg.panel--horizontal { width: 97%; }
.panel--lg.panel--cuadrada { width: min(84%, 600px); }
.panel--lg { box-shadow: 16px 20px 16px -4px rgba(40, 25, 8, .38), 28px 48px 70px -14px rgba(40, 25, 8, .45); }

.room { margin: 1.4rem 0 0; }
/* Vista de referencia a escala: la pared representa 320 × 240 cm */
.room-wall {
    position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px;
    background:
        linear-gradient(180deg, transparent 92%, #b9a88c 92%, #a8977a 100%),
        radial-gradient(ellipse 60% 50% at 40% 0%, #f7f0e2, transparent 70%),
        #e4d9c5;
}
/* Centro del cuadro a 150 cm del piso: 8% (piso) + 150/240 = 70.5% */
.room-frame {
    position: absolute; left: 40%; bottom: 70.5%; transform: translate(-50%, 50%);
    background: #d8cdb9; box-shadow: 1px 1px 0 rgba(0, 0, 0, .28), 2px 2px 0 rgba(0, 0, 0, .22), 5px 7px 6px -2px rgba(40, 25, 8, .4), 9px 15px 20px -6px rgba(40, 25, 8, .32);
    transition: width .45s cubic-bezier(.2, .8, .2, 1);
}
.room-frame canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .5s; }
.room-frame.is-ready canvas { opacity: 1; }
/* Sofá de 200 × 85 cm y persona de 170 cm, apoyados en el piso */
.room-sofa { position: absolute; left: 40%; bottom: 8%; width: 62.5%; height: 35.4%; transform: translateX(-50%); }
.room-person { position: absolute; left: 80%; bottom: 8%; height: 70.8%; width: auto; aspect-ratio: 56 / 170; fill: #6f5f4b; opacity: .85; }
.room figcaption { font-size: .82rem; color: var(--muted); margin-top: .6rem; text-align: center; }

.obra-info { position: sticky; top: 96px; }
.obra-cat { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); text-decoration: none; }
.obra-info h1 { font-size: clamp(2.1rem, 4vw, 3rem); margin: .5rem 0 .4rem; }
.obra-detalle { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.1rem; margin-bottom: .3rem; }
.obra-meta { color: var(--muted); font-size: .95rem; }
.obra-desc { color: #4a4034; margin: 1.2rem 0 1.6rem; }

.buy fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; }
.buy legend { font-weight: 500; margin-bottom: .8rem; font-size: .95rem; letter-spacing: .04em; }
.size-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.size-opt input { position: absolute; opacity: 0; pointer-events: none; }
.size-box {
    display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%;
    padding: .9rem .5rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fffdf8;
    cursor: pointer; text-align: center; transition: border-color .2s, box-shadow .2s, background .2s;
}
.size-shape { display: block; width: calc(var(--sw) * .5px); height: calc(var(--sh) * .5px); max-width: 48px; max-height: 48px; background: linear-gradient(160deg, #9cc0de 0%, #e8dcc2 48%, #7d9a58 52%, #56733c 100%); box-shadow: 1px 1px 0 #5e6f48, 2px 2px 0 #4c5c39, 3px 4px 5px -1px rgba(40, 25, 8, .35); margin: auto 0 .35rem; }
.size-label { font-size: .88rem; }
.size-price { font-weight: 600; font-size: .98rem; }
.size-opt input:checked + .size-box { border-color: var(--gold); background: #fdf6e7; box-shadow: 0 0 0 1px var(--gold); }
.size-opt input:focus-visible + .size-box { outline: 2px solid var(--gold); outline-offset: 2px; }
.size-box:hover { border-color: var(--gold); }

.buy-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.2rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; }
.qty button { width: 42px; height: 42px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; border-radius: 50%; }
.qty button:hover { color: var(--gold-ink); }
.qty input { width: 40px; border: 0; text-align: center; background: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty--sm button { width: 34px; height: 34px; }
.qty--sm span { min-width: 26px; text-align: center; }
.buy-total { text-align: right; }
.buy-total span { display: block; font-size: .8rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.buy-total strong { font-variant-numeric: lining-nums tabular-nums; font-size: 1.6rem; font-family: var(--serif); }
.buy .btn + .btn { margin-top: .6rem; }
.obra-specs { list-style: none; padding: 1.4rem 0 0; margin: 1.6rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .7rem; font-size: .92rem; color: #4a4034; }
.obra-specs li { display: flex; gap: .8rem; align-items: flex-start; }
.obra-specs .ico { color: var(--gold-ink); flex: none; }

.related { margin-top: clamp(60px, 8vw, 100px); }
.related h2 { font-size: 1.9rem; margin-bottom: 1.6rem; }

/* ═════════════ CARRITO ═════════════ */
.cart-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 60px); align-items: start; }
.cart-items ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.ci { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 1.2rem; padding: 1.4rem 2.4rem 1.4rem 0; border-bottom: 1px solid var(--line); }
.ci-thumb { display: flex; align-items: center; justify-content: center; background: var(--paper-2); padding: 12px; aspect-ratio: 1; }
.ci-thumb .panel { width: 100%; max-height: 100%; box-shadow: 5px 6px 8px -2px rgba(20, 12, 4, .35); }
.ci-thumb .pimg { max-height: 86px; }
.ci-title { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; text-decoration: none; margin: .1rem 0 .5rem; }
.ci-size select { width: 100%; max-width: 260px; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; }
.ci-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .7rem; }
.ci-sub { font-size: 1.1rem; }
.ci-del { position: absolute; top: 1.2rem; right: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--muted); }
.ci-del:hover { color: var(--danger); border-color: var(--danger); }
.cart-summary { display: flex; justify-content: space-between; align-items: baseline; padding: 1.4rem 0 .4rem; font-size: 1.1rem; }
.cart-summary strong { font-variant-numeric: lining-nums tabular-nums; font-family: var(--serif); font-size: 2rem; }
.cart-empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.cart-empty .ico { margin: 0 auto 1rem; color: var(--gold); }

.checkout { background: #fffdf8; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); position: sticky; top: 96px; }
.checkout h2 { font-size: 1.6rem; }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 500; }
.field input, .field textarea { padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(211, 162, 74, .2); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1rem; }
.form-error { background: #fbe9e4; color: var(--danger); padding: .7rem 1rem; border-radius: 8px; font-size: .92rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ═════════════ CONFIRMACIÓN ═════════════ */
.order-card { max-width: 560px; margin: 0 auto; background: #fffdf8; border: 1px solid var(--line); border-radius: 14px; padding: clamp(24px, 5vw, 48px); text-align: center; }
.order-card .btn { margin-top: .7rem; }
.order-check { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 1.8rem; }
.order-code strong { font-variant-numeric: lining-nums tabular-nums; font-family: var(--serif); font-size: 1.25rem; letter-spacing: .06em; }
.order-table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; text-align: left; }
.order-table td, .order-table th { padding: .8rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.order-table td:last-child { text-align: right; white-space: nowrap; }
.order-table td span { font-size: .88rem; color: var(--muted); }
.order-table tfoot th { font-weight: 500; }
.order-table tfoot td { font-variant-numeric: lining-nums tabular-nums; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; }
.order-next { text-align: left; background: var(--paper-2); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
.order-next h2 { font-size: 1.2rem; }
.order-next p:last-child { margin: 0; }

.page-empty { text-align: center; padding: 8rem var(--gutter) 6rem; }

/* ── Toast ──────────────────────────────────────────────── */
.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translate(-50%, 140%);
    background: var(--ink); color: #f3eadb; padding: .9rem 1.3rem; border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35); font-size: .95rem; max-width: calc(100% - 32px);
    opacity: 0; visibility: hidden;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s, visibility .35s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast a { color: var(--gold-2); margin-left: .6rem; white-space: nowrap; }

/* ═════════════ RESPONSIVE ═════════════ */
@media (max-width: 1000px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); }
    .hero { padding: 110px 0 clamp(48px, 8vw, 72px); min-height: 0; }
    .hero-stage { max-width: 640px; margin: 0 auto; width: 100%; }
    .sizes-grid, .obra-grid, .cart-grid { grid-template-columns: minmax(0, 1fr); }
    .obra-info, .checkout { position: static; }
    .band-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 0; }
    .band-item:nth-child(3) { border-left: 0; }
}
@media (max-width: 760px) {
    body { font-size: 16px; }
    .main-nav {
        position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
        background: rgba(21, 18, 14, .98); padding: .5rem var(--gutter) 1.2rem;
        transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all .25s;
    }
    .main-nav a { padding: .9rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
    .nav-open .main-nav { transform: none; opacity: 1; pointer-events: auto; }
    .cart-link { margin-left: auto; }
    .nav-toggle { display: block; }
    .brand-sub { display: none; }
    .steps-list { grid-template-columns: minmax(0, 1fr); }
    .features { grid-template-columns: 1fr 1fr 1fr; gap: .6rem; font-size: .8rem; }
    .feat-circle { width: 72px; height: 72px; }
    .band-grid { grid-template-columns: minmax(0, 1fr); }
    .band-item + .band-item { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 1rem; }
    .footer-inner { grid-template-columns: minmax(0, 1fr); }
    .footer-brand { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .field-row { grid-template-columns: minmax(0, 1fr); }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
    .card-title { font-size: 1.08rem; }
    .annot { position: static; transform: none; margin-bottom: .5rem; }
    .price-table { font-size: 1.1rem; }
    .obra-stage { min-height: 0; }
}
/* ═════════════ CELULAR: diseño propio, compacto y centrado en las fotos ═════════════ */
@media (max-width: 600px) {
    :root { --gutter: 18px; }
    .header-inner { height: 60px; }
    .brand img { width: 64px; }
    .main-nav { top: 60px; }
    .cart-link { width: 40px; height: 40px; }

    /* Hero: primero el carrusel, debajo el texto. Las categorías ya están en los filtros */
    .hero { padding: 76px 0 52px; }
    .hero-stage { order: -1; margin-bottom: 30px; }
    .hero h1 { overflow-wrap: break-word; }
    .hero-inner { gap: 0; }
    .rule { width: 40px; margin-bottom: 1rem; }
    .hero h1 { font-size: 2.35rem; line-height: 1.08; margin-bottom: .6rem; }
    .hero .lead { font-size: 1rem; margin-bottom: 0; }
    .hero-cats { display: none; }
    .hero-copy { display: flex; flex-direction: column; }
    .hero-cta { order: 3; margin-top: 1.6rem; gap: .9rem 1.2rem; }
    .hero-cta .btn { padding: .8rem 1.4rem; }
    .hero-stage { padding: 8px 0 0; }
    .hero-wall { min-height: 0; }
    .wall-item { width: min(100%, calc(58vh * var(--ar, .6667))); width: min(100%, calc(58svh * var(--ar, .6667))); }
    .hero-caption { margin-top: 22px; gap: 16px; }
    .hero-cap strong { font-size: 1.12rem; }
    .hero-cap span { font-size: .62rem; }
    .hero-controls { gap: 14px; }
    .hero-arrow { width: 40px; height: 40px; }
    .hero-dots { gap: 6px; }
    .hero-dots button { width: 16px; }
    .hero-dots button.is-active { width: 28px; }
    .hero-cap strong { font-size: 1.05rem; }

    /* Secciones más compactas */
    .section { padding: 56px 0; }
    .section-head { margin-bottom: 1.6rem; }
    .section-head h2, .section-head h1 { font-size: 1.95rem; }
    .section-head p { font-size: .95rem; }

    /* Filtros en una sola fila deslizable */
    .filters {
        flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
        margin: 0 calc(var(--gutter) * -1) 1.8rem; padding: 2px var(--gutter);
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .filters::-webkit-scrollbar { display: none; }
    .chip { flex: none; padding: .45rem .95rem; font-size: .88rem; }

    /* Colección en dos columnas, tipo galería */
    .grid, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
    .card-link { aspect-ratio: 4 / 5; padding: 14% 10%; border-radius: 3px; }
    .card-link .panel { width: 78%; }
    .card-link .panel--horizontal { width: 100%; }
    .card-link .panel--cuadrada { width: 90%; }
    .card-body { padding-top: .7rem; }
    .card-cat { font-size: .62rem; letter-spacing: .14em; }
    .card-title { font-size: 1rem; line-height: 1.2; margin: .15rem 0; }
    .card-place { font-size: .78rem; margin-bottom: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .card-price { font-size: .85rem; }

    /* Tamaños: tabla y características en filas */
    .sizes-grid { gap: 28px; }
    .sizes-table-wrap h2 { font-size: 1.95rem; }
    .price-table { font-size: 1.05rem; margin-top: 1.2rem; }
    .price-table td { padding: .75rem 1.1rem; }
    .edge-demo { padding: 0 22px 18px; max-width: 360px; margin: 0 auto; }
    .annot { text-align: center; font-size: 1.3em; margin: .4rem auto 0; max-width: none; }
    .features { grid-template-columns: minmax(0, 1fr); gap: 0; text-align: left; margin-top: 1.2rem; font-size: .9rem; }
    .features li { display: grid; grid-template-columns: 52px 1fr; column-gap: 1rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line); }
    .features li:last-child { border-bottom: 1px solid var(--line); }
    .feat-circle { grid-row: span 2; width: 52px; height: 52px; margin: 0; border-width: 2px; }
    .feat-circle .ico { width: 24px; height: 24px; }

    /* Pasos: número al lado del título */
    .steps-list { gap: 10px; }
    .steps-list li { display: grid; grid-template-columns: 40px 1fr; column-gap: 1rem; padding: 1.1rem 1.2rem; }
    .step-n { grid-row: span 2; width: 38px; height: 38px; font-size: 1.05rem; }
    .steps-list h3 { margin: 0 0 .2rem; font-size: 1.12rem; align-self: end; }
    .steps-list p { font-size: .9rem; }
    .steps-ship { font-size: .9rem; margin-top: 1.6rem; }

    /* Banda y pie */
    .band { padding: 1.4rem 0; }
    .band-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
    .band-item { flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1rem .6rem 1rem 0; font-size: .85rem; border: 0 !important; }
    .band-item .ico { width: 28px; height: 28px; }
    .footer-brand .script { font-size: 1.3rem; }

    /* Obra: foto → datos y compra → pared de referencia → detalles */
    .page-obra main { padding-top: 1rem; padding-bottom: 6.5rem; }
    .crumbs { font-size: .78rem; margin-bottom: 1rem; }
    .obra-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
    .obra-media { display: contents; }
    .obra-stage { order: 1; padding: 22px 14px 28px; margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
    .obra-info { order: 2; padding-top: 1.4rem; }
    .room { order: 3; margin-top: 2rem; }
    .obra-info h1 { font-size: 2rem; margin-top: .3rem; }
    .obra-desc { margin: .8rem 0 1.2rem; font-size: .95rem; }
    .size-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
    .size-box { padding: .7rem .3rem .6rem; gap: .15rem; }
    .size-shape { max-width: 34px; max-height: 34px; transform: scale(.8); margin-bottom: .1rem; }
    .size-label { font-size: .78rem; }
    .size-price { font-size: .88rem; }
    .buy-total strong { font-size: 1.4rem; }
    .obra-specs { font-size: .88rem; }
    .related h2 { font-size: 1.5rem; }

    /* Carrito */
    .ci { grid-template-columns: 84px 1fr; gap: .9rem; }
    .checkout { padding: 20px 18px; }
}

/* Barra de compra fija (solo celular, aparece al bajar del botón principal) */
.buy-bar { display: none; }
@media (max-width: 600px) {
    .buy-bar {
        display: flex; align-items: center; gap: 1rem;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom));
        background: rgba(247, 242, 233, .96); backdrop-filter: blur(12px);
        border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(40, 25, 8, .12);
        transform: translateY(110%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    }
    .buy-bar.is-on { transform: none; }
    .buy-bar-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
    .buy-bar-info span { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .buy-bar-info strong { font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; font-size: 1.25rem; }
    .buy-bar .btn { margin-left: auto; padding: .75rem 1.2rem; flex: none; }
    .toast { bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Impresión: nunca imprimir las fotos */
@media print {
    .pimg, .room, canvas, .hero-wall { visibility: hidden !important; }
    body::before { content: 'Contenido protegido · jovo'; display: block; text-align: center; padding: 1rem; }
}
