/* ═══════════ Muñoz Fotografía ═══════════ */
:root {
  --bg: #0b0b0c;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --line: #2a2a2f;
  --text: #f3f2ee;
  --muted: #9d9b96;
  --accent: #d7ff3a;
  --accent-ink: #0b0b0c;
  --danger: #ff6b5e;
  --ok: #7be38f;
  --warn: #ffc65c;
  --radius: 14px;
  --radius-sm: 9px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --font: "Avenir Next", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Century Gothic", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: .1em .4em; border-radius: 5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.grow { flex: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font: 700 .74rem/1 var(--font-display); letter-spacing: .32em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #cfcdc8; max-width: 38em; }

/* ─── Botones ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 650 .95rem/1 var(--font); padding: .85em 1.35em; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .15s, color .15s, border-color .15s;
  background: var(--surface-2); color: var(--text);
}
.btn:hover { transform: translateY(-1px); color: inherit; }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #e6ff7a; color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-danger { background: transparent; border-color: rgba(255,107,94,.45); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #1a0705; }
.btn-sm { font-size: .84rem; padding: .6em 1em; }
.btn-lg { font-size: 1.02rem; padding: 1em 1.6em; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.08); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.16); }
.icon-btn .ico { width: 20px; height: 20px; }

.chip {
  display: inline-flex; align-items: center; gap: .4em; font: 600 .86rem/1 var(--font);
  padding: .62em 1em; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.chip span { color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--muted); color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.is-active span { color: #555; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── Cabecera ─── */
.site-header, .admin-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(11,11,12,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { height: 34px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--font-display); text-transform: uppercase; }
.brand-text strong { font-size: .98rem; letter-spacing: .34em; font-weight: 700; }
.brand-text span { font-size: .6rem; letter-spacing: .5em; color: var(--muted); margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: clamp(10px, 2.2vw, 28px); }
.site-nav a:not(.btn) { text-decoration: none; font-size: .92rem; color: #cfcdc8; }
.site-nav a:not(.btn):hover { color: var(--accent); }

/* ─── Secciones ─── */
.section { padding: clamp(56px, 9vw, 110px) var(--gutter); max-width: var(--max); margin: 0 auto; width: 100%; }
.section.narrow { max-width: 760px; }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); max-width: 720px; }

/* ─── Hero ─── */
.hero {
  position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end;
  padding: clamp(100px, 14vw, 160px) var(--gutter) clamp(48px, 8vw, 96px);
  overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero.has-photo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,11,12,.25) 0%, rgba(11,11,12,.55) 45%, var(--bg) 100%);
}
.hero-mark {
  position: absolute; right: -6vw; top: 50%; transform: translateY(-55%); z-index: -1;
  width: min(78vw, 980px); color: transparent; opacity: .9;
}
.hero-mark-svg { width: 100%; height: auto; stroke: rgba(215,255,58,.22); stroke-width: 2.4; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(60% 60% at 80% 40%, rgba(215,255,58,.08), transparent 70%);
}
.hero-inner { max-width: var(--max); width: 100%; margin: 0 auto; }
.hero h1 { font-size: clamp(2.6rem, 7.4vw, 5.6rem); font-weight: 800; letter-spacing: -.035em; line-height: .98; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-bottom: 2rem; }
.hint { color: var(--muted); font-size: .9rem; margin-top: .9rem; }
.form-error { color: var(--danger); font-weight: 600; margin-top: .9rem; }

.code-form {
  position: relative; display: flex; gap: 8px; max-width: 520px; width: 100%;
  background: rgba(20,20,22,.88); border: 1px solid var(--line); border-radius: 999px; padding: 6px;
  backdrop-filter: blur(8px);
}
.section.center .code-form { margin: 0 auto; }
.code-form input {
  flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text);
  font: 650 1.02rem var(--font); letter-spacing: .08em; text-transform: uppercase; padding: 0 12px 0 40px;
}
.code-form input::placeholder { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.code-form input:focus { outline: none; }
.code-form:focus-within { border-color: var(--accent); }
.code-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.code-form.small { max-width: 360px; margin-top: 12px; }
.code-form.small input { padding-left: 14px; }

/* ─── Pasos ─── */
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step-num { display: block; font: 800 2.6rem/1 var(--font-display); color: var(--accent); margin-bottom: 18px; letter-spacing: -.02em; }
.step-list p { color: var(--muted); margin: 0; }

/* ─── Portfolio ─── */
.portfolio-grid { columns: 3 280px; column-gap: 12px; }
.portfolio-grid figure { margin: 0 0 12px; break-inside: avoid; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.portfolio-grid img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Servicios ─── */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.service { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.service .ico { width: 30px; height: 30px; color: var(--accent); margin-bottom: 18px; }
.service p { color: var(--muted); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0 0; }
.stats div { border-top: 1px solid var(--line); padding-top: 16px; }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: 0; font: 800 clamp(1.8rem, 4vw, 2.8rem)/1.1 var(--font-display); }

/* ─── Contacto ─── */
.contact-card {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: calc(var(--radius) * 1.6);
  background: var(--accent); color: var(--accent-ink);
}
.contact-card .eyebrow { color: var(--accent-ink); }
.contact-card p { color: #2b2f17; margin: 0; }
.contact-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.contact-card .btn-accent { background: var(--accent-ink); color: var(--accent); }
.contact-card .btn-accent:hover { background: #222; color: var(--accent); }
.contact-card .btn-ghost { border-color: rgba(0,0,0,.25); color: var(--accent-ink); }
.contact-card .btn-ghost:hover { border-color: var(--accent-ink); }
.contact-card .muted { color: #3b4020; }

/* ─── Pie ─── */
.site-footer { border-top: 1px solid var(--line); padding: 48px var(--gutter) 28px; margin-top: 40px; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-logo { color: var(--text); }
.footer-logo-svg { width: 190px; height: auto; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-cols h4 { font: 700 .72rem var(--font-display); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-cols a { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: .92rem; margin-bottom: 8px; color: #d4d2cd; }
.footer-copy { max-width: var(--max); margin: 36px auto 0; color: var(--muted); font-size: .82rem; }

/* ─── Equipo / álbumes ─── */
.lock-badge { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); color: var(--accent); margin-bottom: 20px; }
.lock-badge .ico { width: 28px; height: 28px; }
.team-head { padding-bottom: 0; }
.team-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.album-list-section { padding-top: 32px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.album-card { text-decoration: none; color: inherit; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.album-card:hover { transform: translateY(-3px); border-color: var(--muted); color: inherit; }
.album-cover { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-cover-mark { width: 45%; color: var(--line); }
.album-badge { position: absolute; left: 12px; top: 12px; background: rgba(11,11,12,.8); backdrop-filter: blur(6px); font-size: .78rem; font-weight: 650; padding: .45em .8em; border-radius: 999px; }
.album-badge.is-live { background: var(--accent); color: var(--accent-ink); }
.album-meta { padding: 18px 20px 20px; }
.album-meta h2 { font-size: 1.15rem; margin-bottom: .3em; }
.album-meta p { color: var(--muted); font-size: .9rem; margin: 0; }
.album-counts { display: flex; gap: 16px; margin-top: 10px !important; }
.album-counts span { display: inline-flex; align-items: center; gap: 6px; }
.empty { text-align: center; padding: 56px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty .ico { width: 40px; height: 40px; color: var(--accent); margin-bottom: 14px; }
.empty h2 { color: var(--text); }
.other-code { margin-top: 48px; color: var(--muted); }
.other-code summary { cursor: pointer; }

/* ─── Álbum ─── */
.album-head { max-width: var(--max); margin: 0 auto; width: 100%; padding: 28px var(--gutter) 10px; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.album-head-row { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
.album-head h1 { font-size: clamp(1.8rem, 4.4vw, 3rem); margin-bottom: .2em; }
.album-sub { color: var(--muted); margin: 0; }
.album-desc { margin: 12px 0 0; max-width: 40em; color: #cfcdc8; }
.album-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.price-note { margin: 0; color: var(--muted); font-size: .86rem; }
.price-note strong { color: var(--text); }
.notice { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); background: rgba(255,198,92,.1); border: 1px solid rgba(255,198,92,.35); color: #ffe2a8; font-size: .92rem; }
.notice.ok { background: rgba(123,227,143,.1); border-color: rgba(123,227,143,.35); color: #c5f5cf; }
.notice a { color: inherit; font-weight: 650; }

.toolbar {
  position: sticky; top: 59px; z-index: 20; max-width: var(--max); margin: 0 auto; width: 100%;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center;
  padding: 12px var(--gutter); background: rgba(11,11,12,.9); backdrop-filter: blur(10px);
}
.toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); max-width: calc(100% + var(--gutter) * 2); }
.toolbar .chips::-webkit-scrollbar { display: none; }
.dorsal-search input {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--text);
  font: 500 .9rem var(--font); padding: .62em 1.1em; width: 210px;
}
.dorsal-search input:focus { outline: none; border-color: var(--accent); }

.gallery { max-width: var(--max); margin: 0 auto; width: 100%; padding: 8px var(--gutter) 120px; columns: 4 240px; column-gap: 10px; }
.gallery-empty { text-align: center; color: var(--muted); margin-top: -80px; padding-bottom: 80px; }
.tile {
  position: relative; break-inside: avoid; margin: 0 0 10px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface); cursor: zoom-in; animation: rise .45s ease both;
}
.tile img { width: 100%; height: auto; transition: transform .45s ease, opacity .3s; }
.tile:hover img { transform: scale(1.03); }
.tile-info {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: 12px;
  padding: 26px 10px 9px; font-size: .8rem; font-weight: 650;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none;
}
.tile-info span { display: inline-flex; align-items: center; gap: 4px; }
.tile-info .liked { color: var(--accent); }
.tile-info .tag { margin-left: auto; background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 999px; }
.tile-cart, .tile-owned {
  position: absolute; top: 9px; right: 9px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(11,11,12,.7); color: var(--text); backdrop-filter: blur(6px);
  opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s, background .2s;
}
.tile:hover .tile-cart, .tile-cart.in-cart, .tile-owned { opacity: 1; transform: none; }
.tile-cart.in-cart { background: var(--accent); color: var(--accent-ink); }
.tile-owned { background: var(--ok); color: #0b2a12; cursor: default; }
.tile-cart .ico, .tile-owned .ico { width: 18px; height: 18px; }
@media (hover: none) { .tile-cart { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ─── Cesta ─── */
.cartbar { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 40; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.cartbar-btn {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 14px 22px; font: 600 .98rem var(--font); cursor: pointer;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: pop .35s cubic-bezier(.2,1.4,.4,1);
}
.cartbar-btn strong { padding-left: 12px; border-left: 1.5px solid rgba(0,0,0,.25); }
@keyframes pop { from { transform: translateY(30px) scale(.9); opacity: 0; } }

.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%);
  background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.3,.8,.3,1);
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.25rem; }
.drawer-body { overflow-y: auto; padding: 18px 20px 28px; }
.cart-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.cart-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.cart-item img { width: 100%; height: 100%; object-fit: cover; }
.cart-item button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.75); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cart-item button .ico { width: 14px; height: 14px; }
.cart-full { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.cart-full img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.upsell { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px dashed var(--accent); margin-bottom: 16px; font-size: .92rem; }
.upsell button { margin-top: 10px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.total-row strong { font-size: 1.6rem; }
.checkout { display: flex; flex-direction: column; gap: 12px; }

/* ─── Formularios ─── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span, .field > legend { font-size: .86rem; font-weight: 650; color: #d4d2cd; padding: 0; }
.field em { font-style: normal; color: var(--muted); font-weight: 500; }
.field small { color: var(--muted); font-size: .8rem; }
input, select, textarea { font: inherit; }
.field input, .field select, .field textarea, .tags-input, .title-input, .copy-src {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: .72em .9em; font-size: .98rem;
}
.field input:focus, .field select:focus, .field textarea:focus, .tags-input:focus, .title-input:focus { outline: none; border-color: var(--accent); }
.pay-methods { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pay-methods legend { font-size: .86rem; font-weight: 650; margin-bottom: 6px; padding: 0; }
.pay-option { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--accent); background: rgba(215,255,58,.06); }
.pay-option input { accent-color: var(--accent); margin-top: 4px; }
.pay-option span { display: flex; flex-direction: column; }
.pay-option small { color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: #cfcdc8; cursor: pointer; }
.check input { accent-color: var(--accent); margin-top: 4px; width: 17px; height: 17px; flex: none; }
.check a { color: var(--accent); }

/* ─── Visor (lightbox) ─── */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(6,6,7,.97);
  display: grid; grid-template-columns: 1fr 380px; grid-template-rows: auto 1fr;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.lb-top-actions { display: flex; gap: 8px; }
.lb-counter { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px 20px; user-select: none; }
.lb-figure { margin: 0; position: relative; max-height: 100%; display: grid; place-items: center; min-height: 0; height: 100%; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; border-radius: 6px; transition: opacity .2s; touch-action: pan-y; }
.lb-figure img.loading { opacity: .35; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255,255,255,.18); }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
.lb-burst { position: absolute; left: 50%; top: 50%; color: var(--accent); transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none; }
.lb-burst .ico { width: 110px; height: 110px; filter: drop-shadow(0 6px 24px rgba(0,0,0,.5)); }
.lb-burst.go { animation: burst .7s ease forwards; }
@keyframes burst { 30% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 60% { transform: translate(-50%, -50%) scale(.95); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; } }
.lb-side { grid-row: 2; grid-column: 2; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.lb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.lb-spacer { flex: 1; }
.lb-tags { color: var(--muted); font-size: .85rem; }
.like-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 999px; padding: .55em 1em; font: 650 .95rem var(--font); cursor: pointer; transition: transform .15s;
}
.like-btn .ico { color: transparent; stroke: currentColor; stroke-width: 2; width: 20px; height: 20px; }
.like-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.like-btn[aria-pressed="true"] .ico { color: var(--accent); }
.like-btn:active { transform: scale(.92); }
.like-btn.bump .ico { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }
.comments { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 16px; }
.comments h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.comments h3 span { color: var(--muted); font-weight: 500; }
.comment-list { list-style: none; margin: 0 0 12px; padding: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.comment-list li { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: .92rem; animation: rise .3s ease both; }
.comment-list li.pending { opacity: .6; }
.comment-list b { font-weight: 700; }
.comment-list small { color: var(--muted); margin-left: 6px; }
.comment-list p { margin: 3px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.comment-list .del { float: right; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .8rem; }
.comment-list .empty-c { background: none; color: var(--muted); padding: 0; text-align: center; margin-top: 20px; }
.comment-form { display: flex; flex-direction: column; gap: 8px; }
.comment-form input { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: .65em 1em; font-size: .92rem; min-width: 0; }
.comment-form input:focus { outline: none; border-color: var(--accent); }
.comment-row { display: flex; gap: 8px; }
.comment-row input { flex: 1; }
.comment-msg { min-height: 1.2em; font-size: .82rem; color: var(--muted); margin: 0; }
.comment-msg.err { color: var(--danger); }

.toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 80; transform: translate(-50%, 20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ─── Pedido / descargas ─── */
.bizum-box { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin: 24px 0; }
.bizum-box div { display: flex; justify-content: space-between; align-items: center; background: var(--surface); padding: 18px 20px; }
.bizum-box dt { color: var(--muted); }
.bizum-box dd { margin: 0; font: 800 1.4rem var(--font-display); letter-spacing: .02em; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 24px; }
.dl-grid figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.dl-grid img { width: 100%; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface); }

/* ─── Textos legales / impresión ─── */
.prose h2 { font-size: 1.25rem; margin-top: 2em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--accent); }
.print-logo { display: none; }
.box { display: inline-block; width: 14px; height: 14px; border: 1.5px solid currentColor; margin-right: 8px; vertical-align: -2px; }
.printable ol { list-style: none; padding-left: 0; }
.sign-row { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.sign { min-width: 240px; border-bottom: 1px solid currentColor; padding-bottom: 60px; }
@media print {
  :root { --bg: #fff; --text: #000; --muted: #444; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .no-print, .skip { display: none !important; }
  .section { padding: 0; }
  .print-logo { display: block; width: 150px; margin-bottom: 16px; }
  .print-logo svg { width: 100%; height: auto; }
  .eyebrow { color: #000; }
  h1 { font-size: 18pt; }
}

/* ═══════════ Panel ═══════════ */
.admin-header { flex-wrap: wrap; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-nav a { text-decoration: none; padding: .5em .85em; border-radius: 999px; font-size: .9rem; color: #cfcdc8; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.is-active { background: var(--text); color: var(--bg); }
.badge { display: inline-block; min-width: 1.5em; padding: .1em .45em; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; text-align: center; }
.admin-main { max-width: 1180px; margin: 0 auto; width: 100%; padding: 32px var(--gutter) 80px; }
.admin-main h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel h2 { font-size: 1.15rem; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; background: rgba(123,227,143,.12); border: 1px solid rgba(123,227,143,.35); }
.flash-error { background: rgba(255,107,94,.12); border-color: rgba(255,107,94,.4); }
.login-card { max-width: 400px; margin: 6vh auto; text-align: center; }
.login-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; margin-top: 20px; }
.login-logo { width: 190px; margin: 0 auto 24px; color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 20px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat strong { display: block; font: 800 1.8rem/1.2 var(--font-display); }
.quick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.admin-cols .panel { margin: 0; }
.list-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.list-row > div { flex: 1; }
.mini { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; }
.top-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.top-grid figure { margin: 0; }
.top-grid img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; width: 100%; }
.top-grid figcaption { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-admin { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-all { grid-column: 1 / -1; }
.form-grid h2 { margin: 0; }
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-pick legend { grid-column: 1 / -1; margin-bottom: 8px; }
.big-check { font-size: .95rem; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.big-check:has(input:checked) { border-color: var(--accent); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions form { margin: 0; }
.admin-title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.admin-title-row h1, .admin-title-row h2 { margin: 0; }
.pill { display: inline-block; padding: .35em .8em; border-radius: 999px; font-size: .8rem; font-weight: 650; background: var(--surface-2); color: var(--muted); }
.pill.is-live, .pill.status-paid { background: rgba(123,227,143,.15); color: var(--ok); }
.pill.status-pending { background: rgba(255,198,92,.15); color: var(--warn); }
.pill.status-cancelled { background: var(--surface-2); color: var(--muted); }
.team-list { display: grid; gap: 16px; }
.team-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rename-form { display: flex; gap: 8px; flex: 1; min-width: 240px; }
.title-input { font-size: 1.15rem !important; font-weight: 700; background: transparent !important; border-color: transparent !important; padding-left: 0 !important; }
.title-input:hover, .title-input:focus { border-color: var(--line) !important; padding-left: .7em !important; }
.share-box { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; background: var(--bg); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 14px; }
.share-box .label { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 4px; }
.code-big { font-size: 1.3rem; font-weight: 800; letter-spacing: .08em; color: var(--accent); background: none; padding: 0; }
.copy-src { font-size: .85rem !important; color: var(--muted) !important; }
.album-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-bottom: 28px; }
.album-admin-card { padding: 0; overflow: hidden; text-decoration: none; color: inherit; margin: 0; }
.album-admin-card:hover { border-color: var(--muted); color: inherit; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 36px 20px; text-align: center; transition: border-color .2s, background .2s; }
.dropzone .ico { width: 38px; height: 38px; color: var(--accent); }
.dropzone p { margin: 10px 0; }
.dropzone.is-over { border-color: var(--accent); background: rgba(215,255,58,.05); }
.upload-progress { margin-top: 16px; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.upload-progress p { margin: 8px 0 0; font-size: .9rem; }
.upload-errors { color: var(--danger); font-size: .88rem; margin: 8px 0 0; padding-left: 18px; }
.photo-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.photo-admin { background: var(--bg); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); animation: rise .3s ease both; }
.photo-admin-img { position: relative; aspect-ratio: 1; background: var(--surface-2); }
.photo-admin-img img { width: 100%; height: 100%; object-fit: cover; }
.cover-tag { position: absolute; left: 6px; top: 6px; background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.photo-stats { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.7); font-size: .72rem; padding: 2px 7px; border-radius: 999px; }
.tags-input { border-radius: 0 !important; border-width: 1px 0 !important; font-size: .85rem !important; padding: .55em .7em !important; }
.tags-input.saved { border-color: var(--ok) !important; }
.photo-admin-actions { display: flex; }
.mini-btn { flex: 1; background: none; border: 0; border-right: 1px solid var(--line); color: var(--muted); font: 600 .78rem var(--font); padding: 9px 4px; cursor: pointer; }
.mini-btn:last-child { border-right: 0; }
.mini-btn:hover { color: var(--text); background: var(--surface-2); }
.mini-btn.is-on { color: var(--accent); }
.mini-btn.danger:hover { color: var(--danger); }
.danger-zone { margin-top: 32px; text-align: right; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 650; padding: 12px 14px; background: var(--surface); }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.admin-chips { margin-bottom: 18px; }
.comment-admin-list { display: grid; gap: 12px; }
.comment-admin { display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 16px; }
.comment-admin p { margin: 0 0 4px; }
.comment-admin.is-hidden { opacity: .65; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .lightbox { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
  .lb-stage { padding: 0 8px 8px; }
  .lb-figure img { max-height: 58vh; }
  .lb-nav { width: 40px; height: 40px; background: rgba(0,0,0,.5); }
  .lb-side { grid-column: 1; grid-row: 3; border-left: 0; border-top: 1px solid var(--line); max-height: 42vh; }
  .comment-list { max-height: 18vh; }
  .contact-card { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .hide-sm { display: none; }
  .brand-text { display: none; }
  .album-actions { align-items: flex-start; }
  .toolbar { top: 59px; }
  .dorsal-search, .dorsal-search input { width: 100%; }
  .gallery { columns: 2 140px; column-gap: 6px; padding-left: 8px; padding-right: 8px; }
  .tile { margin-bottom: 6px; border-radius: 6px; }
  .tile-info { font-size: .72rem; gap: 8px; padding: 20px 7px 6px; }
  .form-grid, .mode-pick { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .code-form { flex-wrap: nowrap; }
  .code-form .btn { padding-left: 1em; padding-right: 1em; }
  .cart-items { grid-template-columns: repeat(3, 1fr); }
  .table { font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.hero-preview { width: 100%; max-width: 520px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 14px; }
@media (max-width: 700px) { .code-form input { font-size: .95rem; padding-left: 36px; } .code-icon { left: 18px; } }
