/* The Voxel Tavern — estilos */
:root {
  --bg: #120e0a;
  --bg-2: #1b1510;
  --bg-3: #241c15;
  --parch: #f1e6d2;
  --text: #efe4d0;
  --muted: #b3a38b;
  --gold: #d69a4a;
  --gold-2: #e8b36a;
  --ember: #e0663a;
  --line: rgba(241, 230, 210, .12);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shell: min(1240px, calc(100vw - 64px));
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; background: var(--bg); }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; line-height: 1.02; letter-spacing: -.01em; }
h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 em, h1 em { font-style: italic; color: var(--gold-2); }
p { margin: 0; }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; top: -60px; left: 16px; z-index: 200; padding: 10px 16px; background: var(--gold); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 50px; padding: 0 26px; border-radius: 4px; border: 1px solid transparent; font-weight: 600; font-size: .95rem; cursor: pointer; letter-spacing: .01em; transition: all .25s var(--ease); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1209; box-shadow: 0 10px 30px -12px rgba(214, 154, 74, .8), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-line { border-color: rgba(241, 230, 210, .35); color: var(--text); }
.btn-line:hover { border-color: var(--gold-2); color: var(--gold-2); }
.btn-block { width: 100%; }

/* Barra superior y cabecera */
.topbar { display: flex; justify-content: center; gap: 24px; padding: 8px 16px; background: #0b0806; font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--line); position: relative; }
.topbar a { position: absolute; right: 20px; color: var(--gold); }
.header { position: sticky; top: 0; z-index: 50; background: rgba(18, 14, 10, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; line-height: .9; }
.brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; }
.brand small { display: block; font-family: var(--mono); font-size: .56rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-weight: 400; margin-bottom: 3px; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { padding: 8px 14px; font-size: .92rem; color: var(--muted); border-radius: 4px; transition: color .2s; }
.nav a:hover { color: var(--gold-2); }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); cursor: pointer; font-weight: 600; font-size: .9rem; transition: border-color .2s; }
.cart-btn:hover { border-color: var(--gold); }
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.cart-btn b { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--bg); font-size: .75rem; }
.cart-btn.bump b { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.4); } }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: none; position: relative; cursor: pointer; }
.menu-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); transition: all .3s; }
.menu-toggle span:first-child { top: 17px; } .menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* Hero */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; z-index: -2; animation: slowzoom 24s ease-in-out infinite alternate; }
@keyframes slowzoom { to { transform: scale(1.06); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(18,14,10,.95) 0%, rgba(18,14,10,.7) 38%, rgba(18,14,10,.1) 70%), linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-inner { padding: 120px 0 60px; }
.kicker { font-family: var(--mono); font-size: .76rem; letter-spacing: .25em; text-transform: uppercase; color: var(--gold); }
.hero h1 { font-size: clamp(3rem, 7vw, 6.4rem); margin: 22px 0; max-width: 10.5em; }
.lead { max-width: 32em; font-size: 1.1rem; color: rgba(239, 228, 208, .8); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-trust { list-style: none; padding: 26px 0 40px; margin-top: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-top: 1px solid var(--line); }
.hero-trust li { display: grid; gap: 2px; }
.hero-trust b { font-family: var(--serif); font-size: 1.8rem; color: var(--gold-2); font-weight: 600; }
.hero-trust span { font-size: .84rem; color: var(--muted); }

/* Secciones */
.section { padding: clamp(80px, 10vw, 130px) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); background-image: radial-gradient(ellipse at 50% 0%, rgba(214, 154, 74, .1), transparent 60%); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 50px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.eyebrow { font-family: var(--mono); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.section-intro { color: var(--muted); font-size: 1.05rem; max-width: 36em; margin-top: 18px; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Productos */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: .88rem; font-weight: 500; transition: all .2s; }
.filter:hover { color: var(--text); border-color: rgba(241,230,210,.3); }
.filter.is-active { background: var(--parch); color: var(--bg); border-color: var(--parch); }
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; }
.product:hover { transform: translateY(-6px); border-color: rgba(214, 154, 74, .6); box-shadow: 0 30px 60px -30px rgba(0,0,0,.9), 0 0 40px -20px rgba(214, 154, 74, .5); }
.product[hidden] { display: none; }
.product-media { position: relative; aspect-ratio: 1; overflow: hidden; background: #0d0a07; border: 0; padding: 0; cursor: zoom-in; width: 100%; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.product:hover .product-media img { transform: scale(1.07); }
.badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; background: rgba(18,14,10,.8); color: var(--gold-2); border: 1px solid rgba(214,154,74,.4); }
.product-media::after { content: "Vista rápida"; position: absolute; inset: auto 12px 12px; padding: 10px; text-align: center; border-radius: 6px; background: rgba(241, 230, 210, .92); color: var(--bg); font-size: .82rem; font-weight: 600; opacity: 0; transform: translateY(8px); transition: all .3s var(--ease); }
.product:hover .product-media::after { opacity: 1; transform: none; }
.product-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product h3 { font-size: 1.45rem; }
.product-meta { font-family: var(--mono); font-size: .7rem; color: var(--muted); letter-spacing: .04em; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.price { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--gold-2); }
.add { padding: 9px 14px; border-radius: 4px; border: 1px solid rgba(214,154,74,.5); background: transparent; color: var(--gold-2); font-weight: 600; font-size: .85rem; cursor: pointer; transition: all .2s; }
.add:hover { background: var(--gold); color: var(--bg); }

/* Acabados */
.finishes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.finish { position: relative; padding: 38px 30px 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); display: grid; gap: 12px; }
.finish.featured { border-color: var(--gold); background: linear-gradient(180deg, rgba(214,154,74,.1), transparent 70%), var(--bg); }
.finish-n { font-family: var(--serif); font-size: 3rem; color: var(--gold); line-height: 1; font-style: italic; }
.finish h3 { font-size: 1.8rem; }
.finish p { color: var(--muted); }
.finish b { font-family: var(--mono); font-size: .8rem; color: var(--gold-2); letter-spacing: .06em; padding-top: 14px; border-top: 1px solid var(--line); }

/* Encargos */
.commission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.commission-media { margin: 0; position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 5; }
.commission-media img { width: 100%; height: 100%; object-fit: cover; }
.commission-media figcaption { position: absolute; left: 20px; bottom: 20px; font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--parch); text-shadow: 0 2px 20px #000; }
.quest { list-style: none; counter-reset: q; padding: 0; margin: 30px 0; display: grid; gap: 14px; }
.quest li { counter-increment: q; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; }
.quest li::before { content: counter(q, upper-roman); grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; font-family: var(--serif); color: var(--gold-2); font-weight: 700; }
.quest b { font-weight: 600; }
.quest span { color: var(--muted); font-size: .92rem; }
.form { display: grid; gap: 14px; padding: 26px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.form input, .form textarea, .guild-form input { width: 100%; padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--bg); color: var(--text); transition: border-color .2s; }
.form input:focus, .form textarea:focus, .guild-form input:focus { outline: none; border-color: var(--gold); }
.invalid { border-color: var(--ember) !important; }
.form-note { font-size: .84rem; color: var(--muted); min-height: 1.2em; text-align: center; }
.form-note.ok { color: #9ccf7a; }
.form-note.err { color: var(--ember); }

/* Gremio */
.guild { padding: clamp(80px, 10vw, 120px) 0; background: radial-gradient(ellipse at 50% 100%, rgba(224, 102, 58, .18), transparent 60%), #0b0806; border-top: 1px solid var(--line); text-align: center; }
.guild-inner { max-width: 640px; }
.guild h2 { margin-bottom: 14px; }
.guild p { color: var(--muted); }
.guild-form { display: flex; gap: 10px; margin: 30px auto 12px; max-width: 480px; }

/* Pie */
.footer { padding: 36px 0; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer .brand { color: var(--text); font-size: 1.3rem; }
.footer .brand img { width: 40px; height: 40px; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer nav a:hover { color: var(--gold-2); }

/* Modal */
.modal { width: min(940px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--text); overflow: auto; overflow-x: hidden; }
.modal::backdrop { background: rgba(5, 4, 3, .75); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(18,14,10,.8); font-size: 1.4rem; cursor: pointer; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; }
.modal-img { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.modal-body { padding: 36px 32px; display: grid; gap: 16px; align-content: start; }
.modal-body .eyebrow { margin: 0; }
.modal-body h2 { font-size: 2.4rem; }
.modal-desc { color: var(--muted); }
.specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.specs div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 2px 0 0; font-weight: 600; font-size: .92rem; }
.options { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.options legend { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.options label { display: flex; cursor: pointer; }
.options input { position: absolute; opacity: 0; }
.options span { flex: 1; display: flex; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; transition: all .2s; }
.options small { color: var(--gold-2); font-family: var(--mono); }
.options input:checked + span { border-color: var(--gold); background: rgba(214, 154, 74, .1); }
.options input:focus-visible + span { outline: 2px solid var(--gold-2); }
.modal-buy { display: flex; gap: 10px; }
.modal-buy .btn { flex: 1; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; }
.qty button { width: 42px; height: 48px; border: 0; background: none; cursor: pointer; font-size: 1.2rem; }
.qty output { min-width: 26px; text-align: center; font-weight: 700; }

/* Cesta */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(5,4,3,.6); backdrop-filter: blur(2px); }
.cart { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(420px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .4s var(--ease); }
.cart.open { transform: none; }
.cart header { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.cart header h2 { font-size: 2rem; }
.cart header button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 1.4rem; cursor: pointer; }
.ship { padding: 14px 24px; font-size: .84rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.ship i { display: block; height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 8px; overflow: hidden; }
.ship em { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), var(--gold-2)); transition: width .5s var(--ease); }
.cart-items { list-style: none; margin: 0; padding: 8px 24px; overflow: auto; flex: 1; }
.cart-items li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-items img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.cart-items b { font-family: var(--serif); font-size: 1.15rem; display: block; line-height: 1.1; }
.cart-items small { color: var(--muted); font-size: .78rem; }
.line-qty { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.line-qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; line-height: 1; }
.line-price { font-weight: 700; color: var(--gold-2); white-space: nowrap; }
.cart-empty { padding: 40px 24px; text-align: center; color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1.3rem; }
.cart footer { padding: 20px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total b { font-family: var(--serif); font-size: 1.9rem; color: var(--gold-2); }
.cart-note { font-size: .76rem; color: var(--muted); text-align: center; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translateX(-50%); padding: 12px 20px; border-radius: 999px; background: var(--parch); color: var(--bg); font-weight: 600; font-size: .9rem; box-shadow: 0 20px 40px -10px rgba(0,0,0,.6); animation: pop .3s var(--ease); }

/* Responsive */
@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --shell: calc(100vw - 40px); }
  .topbar p { font-size: .72rem; }
  .topbar a { display: none; }
  .menu-toggle { display: block; }
  .nav { position: fixed; top: 74px; left: 0; right: 0; flex-direction: column; padding: 14px 20px 24px; background: rgba(18,14,10,.98); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all .3s var(--ease); }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 10px; font-size: 1.05rem; }
  .cart-btn { margin-left: auto; }
  .hero-trust { grid-template-columns: repeat(2, 1fr); }
  .finishes, .commission-grid, .modal-grid { grid-template-columns: 1fr; }
  .modal-img { min-height: 0; aspect-ratio: 4 / 3; }
  .commission-media { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  :root { --shell: calc(100vw - 32px); }
  .brand { font-size: 1.2rem; }
  .brand img { width: 36px; height: 36px; }
  .cart-btn span { display: none; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 20%, rgba(18,14,10,.55) 60%, rgba(18,14,10,.3)); }
  .hero-inner { padding-top: 180px; }
  .hero-actions .btn { width: 100%; }
  .products { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-body { padding: 12px; }
  .product h3 { font-size: 1.15rem; }
  .product-foot { flex-direction: column; align-items: stretch; }
  .product-meta { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .guild-form { flex-direction: column; }
  .modal-body { padding: 26px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
