/* ═══════════════════════════════════════════
   REINO PARRILLA — style.css
   ═══════════════════════════════════════════ */

:root {
  --bg:    #0b0c10;
  --bg2:   #111111;
  --bg3:   #1a1a1a;
  --cream: #f0e8d8;
  --gold:  #c9a84c;
  --gold2: #e8d07a;
  --ember: #e84c0b;
  --green: #25d366;
  --green2:#1db954;
  --red:   #8B0000;
  --border:#2a2a2a;
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;

  /* Fuego / brasas */
  --core-heat: #ffede8;
  --flame-mid: #ff5500;
  --flame-outer: #8b0000;
  --spark-color: #ffaa00;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── SCROLL PROGRESS BAR ── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2px;
  background: var(--ember);
  box-shadow: 0 0 8px var(--ember);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ─────────────────────────────
   CAPAS DE FUEGO (brasas + candela)
   Intensidad proporcional al scroll vía
   animation-timeline: scroll(root). Sin JS.
───────────────────────────────*/
.fire-layer {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* no bloquea clics sobre el contenido */
  animation: fire-intensity linear;
  animation-timeline: scroll(root);
}

.background-fire { z-index: 4; }
.foreground-sparks { z-index: 26; }

/* Resplandor base del brasero (fondo) */
.glow {
  position: absolute;
  bottom: -22vh;
  left: 0;
  width: 100%;
  height: 65vh;
  background: radial-gradient(ellipse at 50% 100%, var(--flame-mid) 0%, var(--flame-outer) 38%, transparent 70%);
  filter: blur(46px) contrast(1.5);
  mix-blend-mode: screen;
  animation: ember-breathe 3.2s ease-in-out infinite;
}
@keyframes ember-breathe {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.85; }
}

/* Torbellinos de candela (columnas en espiral sobre el brasero) */
.flame-vortex {
  position: absolute;
  bottom: -8vh;
  width: 34vw;
  height: 46vh;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,140,40,0.9) 0%, rgba(232,76,11,0.35) 45%, transparent 72%);
  filter: blur(26px) contrast(1.4);
  mix-blend-mode: screen;
  animation: vortex-swirl 7s ease-in-out infinite;
}
.flame-vortex:nth-child(2) { left: 8%; animation-delay: -2.3s; }
.flame-vortex:nth-child(3) { left: 62%; animation-delay: -4.6s; width: 26vw; height: 38vh; }
@keyframes vortex-swirl {
  0%, 100% { transform: scale(1) rotate(0deg) translateX(0); opacity: 0.4; }
  30%      { transform: scale(1.12) rotate(3deg) translateX(3vw); opacity: 0.7; }
  65%      { transform: scale(0.94) rotate(-4deg) translateX(-2.5vw); opacity: 0.55; }
}

/* Núcleo caliente justo sobre el brasero */
.coal-bed {
  position: absolute;
  bottom: -6vh;
  left: 50%;
  transform: translateX(-50%);
  width: 70vw;
  height: 22vh;
  background: radial-gradient(ellipse at 50% 100%, var(--core-heat) 0%, var(--spark-color) 34%, transparent 68%);
  filter: blur(14px);
  mix-blend-mode: screen;
  animation: coal-heat 2.6s ease-in-out infinite;
}
@keyframes coal-heat {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 0.8; }
}

/* Chispas ascendentes */
.spark {
  position: absolute;
  bottom: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--core-heat) 0%, var(--spark-color) 55%, transparent 78%);
  box-shadow: 0 0 10px var(--spark-color), 0 0 22px var(--flame-mid);
  opacity: 0;
  animation-name: rise;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) scale(1) translateX(0); opacity: 1; }
  70%  { opacity: 0.9; }
  100% { transform: translateY(-120vh) scale(0) translateX(52px); opacity: 0; }
}

/* Intensidad del fuego proporcional al scroll */
@keyframes fire-intensity {
  0%   { opacity: 0.18; transform: translateY(20%) scale(1);     filter: brightness(0.5); }
  50%  { opacity: 0.6;  transform: translateY(0%) scale(1.1); }
  100% { opacity: 1;    transform: translateY(-10%) scale(1.28); filter: brightness(1.5); }
}

/* Sin soporte de animation-timeline → fuego estático visible */
@supports not (animation-timeline: scroll(root)) {
  .fire-layer { animation: none; opacity: 0.6; }
}

/* ── NAVBAR ── */
nav {
  position: fixed;
  top: 0; width: 100%;
  z-index: 40;
  background: rgba(11,12,16,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.75rem;
}
.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.nav-logo:hover { color: var(--gold2); }

.nav-side {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.nav-side-left { justify-content: flex-start; }
.nav-side-right { justify-content: flex-end; }
.nav-side a { transition: color 0.2s; white-space: nowrap; }
.nav-side a:hover { color: var(--ember); }

.btn-wa-nav {
  padding: 0.5rem 1.25rem;
  background: var(--green);
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  transition: background 0.2s;
}
.btn-wa-nav:hover { background: var(--green2); color: #fff; }

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 0.5rem 1.5rem 1rem;
}
.mobile-menu a {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu .btn-wa-nav { margin-top: 0.75rem; text-align: center; display: block; }

@media (max-width: 768px) {
  .nav-side { display: none; }
  .nav-inner { display: flex; justify-content: center; position: relative; }
  .nav-logo { margin-left: 0; }
  .hamburger { display: flex; position: absolute; right: 1.5rem; }
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    text-align: center;
  }
  .hero-main { text-align: center; }
  .hero-logo { margin-left: auto; margin-right: auto; }
  .hero-side { order: -1; }
  .hero-flag-wrap { display: none; }
  .hero-ctas { justify-content: center; }
  .hero p { margin-left: auto; margin-right: auto; }
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 72px;
  overflow: hidden;
  background-image: url("portada-reino-parrilla.webp");
  background-size: cover;
  background-position: center 30%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center top, rgba(11,12,16,0.02) 0%, rgba(11,12,16,0.22) 60%, rgba(4,4,7,0.55) 100%),
    linear-gradient(to bottom, rgba(11,12,16,0.18) 0%, rgba(11,12,16,0.22) 60%, rgba(52,22,8,0.12) 100%);
  z-index: 1;
}

/* Pared de ladrillos en el hero, justo bajo el menú.
   Intensidad inversamente proporcional a la candela: visible arriba,
   fundida con el fondo oscuro abajo (donde vive el fuego). */
.hero-brick {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgba(11,12,16,0) 0%, rgba(11,12,16,0.2) 78%, rgba(4,4,7,0.35) 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: brick-fade linear;
  animation-timeline: scroll(root);
}
@keyframes brick-fade {
  0%   { opacity: 0.95; filter: brightness(1); }
  50%  { opacity: 0.6;  filter: brightness(0.6); }
  100% { opacity: 0.12; filter: brightness(0.4); }
}
@supports not (animation-timeline: scroll(root)) {
  .hero-brick { animation: none; opacity: 0.55; }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-main {
  flex: 1 1 auto;
  max-width: 640px;
  text-align: left;
}

.hero-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 2rem;
  padding: 0.75rem 1.5rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(201,168,76,0.35);
  background: rgba(11,12,16,0.55);
  backdrop-filter: blur(6px);
}
.hero-flag-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-flag {
  width: 64px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  animation: hero-flag-bob 4s ease-in-out infinite;
}
@keyframes hero-flag-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
.hero-logo {
  display: block;
  height: 96px;
  width: auto;
  margin-bottom: 1.75rem;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.55));
}

.hero-badge span {
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

#countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.05em;
}

.cd-unit { text-align: center; }
.cd-label {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: rgba(240,232,216,0.55);
  font-weight: 400;
  margin-top: 2px;
}
.cd-sep { padding-top: 4px; color: var(--gold); }

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  background: linear-gradient(to bottom, var(--cream) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.05rem;
  color: rgba(240,232,216,0.75);
  max-width: 600px;
  margin: 0 0 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--gold2); transform: scale(1.04); }

.btn-cot {
  background: linear-gradient(135deg, var(--gold), #ff9b3c);
  color: var(--bg);
}
.btn-cot:hover { background: linear-gradient(135deg, var(--gold2), #ffb066); transform: scale(1.04); }

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
}
.btn-wa:hover { background: var(--green2); transform: scale(1.04); color: #fff; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: 1px solid rgba(201,168,76,0.5);
  color: var(--gold);
  font-weight: 700;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
}
.btn-outline:hover { background: rgba(201,168,76,0.1); transform: scale(1.04); }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(240,232,216,0.3);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}
.scroll-hint svg { width: 16px; height: 16px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── FADE-IN ON SCROLL ── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}
.fade-in.d1 { transition-delay: 0.1s; }
.fade-in.d2 { transition-delay: 0.2s; }
.fade-in.d3 { transition-delay: 0.3s; }
.fade-in.d4 { transition-delay: 0.4s; }

/* ── SECTION SHARED ── */
section { position: relative; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: monospace;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
}

/* ── EL REINO ── */
.reino {
  padding: 6rem 0;
  background: var(--cream);
  color: var(--bg);
}

.reino-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem;
}
.reino-intro .flame-icon {
  width: 48px; height: 48px;
  color: var(--red);
  margin: 0 auto 1.5rem;
}
.reino-intro .section-title { color: var(--bg); margin-bottom: 1.5rem; }
.reino-intro blockquote {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: #444;
  line-height: 1.7;
}

.reino-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 768px) { .reino-cards { grid-template-columns: 1fr; } }

.reino-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  transition: background 0.2s;
}
.reino-card:hover { background: #fff; }
.reino-card .card-icon {
  width: 40px; height: 40px;
  color: var(--red);
  margin: 0 auto 1rem;
}
.reino-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--bg); }
.reino-card p { font-size: 0.9rem; color: #555; line-height: 1.6; }

.trust-badges {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto;
}
@media (max-width: 600px) { .trust-badges { grid-template-columns: repeat(2,1fr); } }

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem;
  background: rgba(139,0,0,0.08);
  border: 1px solid rgba(139,0,0,0.18);
  border-radius: 6px;
}
.badge strong {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bg);
  line-height: 1.3;
}
.badge small { font-size: 0.6rem; color: #777; margin-top: 3px; }

/* ── CATALOG ── */
.catalog {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.catalog-header { text-align: center; margin-bottom: 3rem; }
.catalog-header .section-title { color: var(--cream); margin-bottom: 0.75rem; }
.catalog-header p { color: rgba(240,232,216,0.55); max-width: 520px; margin: 0 auto 1.5rem; font-size: 0.9rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(240,232,216,0.6);
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 560px)  { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

.product-card {
  background: rgba(17,17,17,0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s;
}
.product-card:hover {
  border-color: rgba(201,168,76,0.6);
  transform: translateY(-3px);
}

.product-card .img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg3);
  overflow: hidden;
}
.product-card .img-wrap a {
  display: block;
  width: 100%;
  height: 100%;
}
.product-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.product-card:hover img { transform: scale(1.06); }
.product-card .img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.product-card:hover .img-overlay { opacity: 1; }

.product-card .card-body {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-card .card-id {
  font-family: monospace;
  font-size: 0.6rem;
  color: rgba(201,168,76,0.55);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.25rem;
}
.product-card .card-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.4;
  flex: 1;
  margin-bottom: 0.75rem;
}
.product-card .card-cta {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
  margin-top: auto;
}
.product-card .card-cta:hover { color: var(--ember); }
.product-card.card-hidden { display: none; }

.load-more-sentinel {
  padding: 2rem;
  text-align: center;
  color: rgba(240,232,216,0.3);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ── COMO FUNCIONA ── */
.como-funciona {
  padding: 6rem 0;
  background: rgba(17,17,17,0.9);
  border-top: 1px solid var(--border);
}
.como-funciona .section-title { color: var(--cream); text-align: center; margin-bottom: 4rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 2rem;
  position: relative;
}
@media (max-width: 768px) { .steps { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

.steps::before {
  content: '';
  position: absolute;
  top: 32px; left: 0;
  width: 100%; height: 1px;
  background: var(--border);
}
@media (max-width: 768px) { .steps::before { display: none; } }

.step {
  text-align: center;
  position: relative;
}
.step-num {
  width: 64px; height: 64px;
  margin: 0 auto 1.5rem;
  background: var(--bg);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  box-shadow: 0 0 20px rgba(201,168,76,0.2);
}
.step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ember);
  margin-bottom: 0.5rem;
}
.step p { font-size: 0.85rem; color: rgba(240,232,216,0.65); line-height: 1.6; }

/* ── PAGOS ── */
.pagos {
  padding: 4rem 0;
  background: rgba(11,12,16,0.95);
  border-top: 1px solid var(--border);
  text-align: center;
}
.pagos h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 2rem;
}
.metodos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.metodo {
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240,232,216,0.75);
  transition: border-color 0.2s;
}
.metodo:hover { border-color: rgba(201,168,76,0.4); }

/* ── TERRITORIO ── */
.territorio {
  padding: 6rem 0;
  background: linear-gradient(to bottom, rgba(17,17,17,0.9), var(--bg));
  border-top: 1px solid var(--border);
  text-align: center;
}
.territorio .section-title { color: var(--gold); margin-bottom: 1rem; }
.territorio > .container > p {
  font-size: 1rem;
  color: rgba(240,232,216,0.7);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.territorio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}
@media (max-width: 520px) { .territorio-grid { grid-template-columns: 1fr; } }

.territorio-card {
  background: rgba(17,17,17,0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
}
.dir-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
}
.dir-card svg { color: var(--ember); width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.dir-card p { font-size: 0.85rem; font-weight: 600; color: var(--cream); }
.dir-card small { font-size: 0.75rem; color: rgba(240,232,216,0.5); }

.phones-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.phone-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  transition: color 0.2s;
}
.phone-link:hover { color: var(--green); }
.phone-link svg { color: var(--green); width: 16px; height: 16px; flex-shrink: 0; }
.phone-link .ph-label { font-size: 0.75rem; font-weight: 700; color: var(--cream); display: block; }
.phone-link .ph-num { font-size: 0.7rem; color: rgba(240,232,216,0.5); display: block; }

.territorio-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ── FOOTER ── */
footer {
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
}
.footer-fire {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.coal-deep-bed {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 15% 90%, #ff2200 2%, #7a0c00 12%, transparent 25%),
    radial-gradient(circle at 35% 85%, #ff7700 1%, #9e1900 15%, transparent 30%),
    radial-gradient(circle at 55% 92%, #ff3300 3%, #660800 10%, transparent 22%),
    radial-gradient(circle at 75% 88%, #ff8800 2%, #8a1200 14%, transparent 28%),
    radial-gradient(circle at 90% 90%, #ff1100 2%, #5e0500 10%, transparent 20%),
    radial-gradient(ellipse at 20% 95%, #0a0a0a 20px, transparent 22px),
    radial-gradient(ellipse at 40% 98%, #080808 30px, transparent 32px),
    radial-gradient(ellipse at 60% 93%, #0d0d0d 25px, transparent 27px),
    radial-gradient(ellipse at 80% 97%, #050505 35px, transparent 37px);
  animation: coal-pulse 2.5s infinite alternate ease-in-out;
}
.live-flames {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 140px;
  mix-blend-mode: screen;
}
.flame-tongue {
  position: absolute;
  bottom: -10px;
  background: linear-gradient(to top, var(--flame-mid), #ffaa00 50%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  transform-origin: center bottom;
  opacity: 0.85;
}
.ft1 { left: 12%; width: 80px; height: 120px; animation: dance-flame 1.2s infinite alternate ease-in-out; }
.ft2 { left: 32%; width: 120px; height: 160px; animation: dance-flame 0.9s infinite alternate ease-in-out 0.2s; }
.ft3 { left: 52%; width: 90px; height: 130px; animation: dance-flame 1.4s infinite alternate ease-in-out 0.4s; }
.ft4 { left: 72%; width: 110px; height: 150px; animation: dance-flame 1.1s infinite alternate ease-in-out 0.1s; }
.ft5 { left: 88%; width: 70px; height: 110px; animation: dance-flame 1.3s infinite alternate ease-in-out 0.3s; }
.footer-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 3rem 1rem 1.5rem;
  display: flex;
  justify-content: center;
}
.footer-shield {
  background: rgba(3, 3, 3, 0.72);
  border: 1px solid rgba(255, 85, 0, 0.22);
  border-radius: 8px;
  padding: 1.5rem 2.5rem;
  max-width: 720px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), inset 0 0 15px rgba(255, 85, 0, 0.08);
}
@keyframes coal-pulse {
  0%   { filter: brightness(0.9) contrast(1.1); }
  100% { filter: brightness(1.3) contrast(1.4); }
}
@keyframes dance-flame {
  0%   { transform: scaleX(1) scaleY(1) rotate(-2deg); border-radius: 40% 60% 20% 20%; }
  100% { transform: scaleX(1.15) scaleY(1.25) rotate(3deg); border-radius: 60% 40% 25% 15%; }
}
@media (prefers-reduced-motion: reduce) {
  .coal-deep-bed, .flame-tongue { animation: none; }
}
.footer-logo {
  height: 48px;
  width: auto;
  margin-bottom: 1rem;
  opacity: 0.92;
}
.footer-quote {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--gold);
  font-style: italic;
  margin-bottom: 1.25rem;
}
.footer-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.9rem;
  color: rgba(240,232,216,0.92);
  font-family: monospace;
  margin-bottom: 1rem;
}
.footer-contacts a { color: rgba(240,232,216,0.92); text-decoration: underline; text-underline-offset: 3px; }
.footer-contacts a:hover { color: var(--green); }
.footer-sep { color: rgba(240,232,216,0.45); }
.footer-copy { font-size: 0.8rem; color: rgba(240,232,216,0.78); font-family: monospace; }
.footer-legal { margin-top: 0.5rem; font-size: 0.78rem; font-family: monospace; }
.footer-legal a { color: rgba(217,180,74,0.85); text-decoration: none; }
.footer-legal a:hover { color: #d9b44a; }
.m-footer { max-width: 860px; margin: 0 auto; padding: 1.2rem 1rem 2.4rem; text-align: center; font-size: 0.78rem; color: rgba(240,232,216,0.7); font-family: monospace; }
.m-footer a { color: rgba(217,180,74,0.85); text-decoration: none; }
.m-footer a:hover { color: #d9b44a; }

/* ── FLOATING WA ── */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 56px; height: 56px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.12); color: #fff; }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }

/* ─────────────────────────────
   CATÁLOGO PDF — catalogo.html
───────────────────────────────*/
.cat-page {
  background: #fff;
  color: #111;
  font-family: var(--sans);
}

.cat-header {
  position: relative;
  background: var(--bg);
  color: var(--cream);
  padding: 3rem 2rem;
  text-align: center;
}
.cat-header h1 {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.cat-header p { font-size: 0.9rem; color: rgba(240,232,216,0.6); }
.cat-header .print-btn {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.cat-header .print-btn:hover { background: var(--gold2); }

.cat-body { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.cat-section-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--bg);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.5rem;
  margin: 2.5rem 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cat-section-title .cat-icon { font-size: 1.25rem; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 600px) { .cat-grid { grid-template-columns: repeat(2,1fr); } }

.cat-item {
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
}
.cat-item img { width:100%; aspect-ratio:1; object-fit:cover; }
.cat-item .cat-item-body { padding: 0.5rem 0.625rem; }
.cat-item .cat-item-id { font-family: monospace; font-size: 0.6rem; color: #aaa; text-transform: uppercase; }
.cat-item .cat-item-name { font-size: 0.75rem; font-weight: 600; color: #222; line-height: 1.35; margin-top: 2px; }
.cat-item .cat-item-cta {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--green);
  font-family: monospace;
}

.cat-footer-back {
  background: var(--bg);
  color: var(--cream);
  text-align: center;
  padding: 2.5rem;
  margin-top: 3rem;
  border-radius: 8px;
}
.cat-footer-back h2 {
  font-family: var(--serif);
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-style: italic;
}
.cat-footer-back p { font-size: 0.95rem; color: rgba(240,232,216,0.95); margin-bottom: 0.25rem; }

@media print {
  .cat-header .print-btn { display: none; }
  .cat-item { break-inside: avoid; }
  .cat-section-title { break-before: auto; }
}

/* pedido.js eliminado del sitio público */

/* ── LEGIBILIDAD MÓVIL: sube el tamaño de las letras más pequeñas ── */
@media (max-width: 600px) {
  .cd-label { font-size: 0.7rem; }
  .scroll-hint { font-size: 0.75rem; }
  .badge strong { font-size: 0.8rem; }
  .badge small { font-size: 0.75rem; }
  .filter-btn { font-size: 0.85rem; }
  .product-card .card-id { font-size: 0.75rem; }
  .product-card .card-name { font-size: 0.9rem; }
  .product-card .card-cta { font-size: 0.85rem; }
  .cat-item .cat-item-id { font-size: 0.75rem; }
  .cat-item .cat-item-name { font-size: 0.88rem; }
  .dir-card small { font-size: 0.85rem; }
  .phone-link .ph-label { font-size: 0.85rem; }
  .phone-link .ph-num { font-size: 0.85rem; }
  .step p { font-size: 0.95rem; }
  .reino-card p { font-size: 1rem; }
}

/* ═══ FICHAS DE TARJETAS: peso · links a ficha y manual ═══ */
.product-card .card-weight { font-weight: 600; color: rgba(240,232,216,0.78); }
.product-card .card-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.product-card .card-ficha { display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 700; color: var(--gold); text-decoration: none; border-bottom: 1px dashed rgba(217,180,74,0.5); padding-bottom: 1px; }
.product-card .card-ficha:hover { color: var(--ember); border-color: var(--ember); }
.product-card .card-manual { display: inline-flex; margin-top: 0; font-size: 0.7rem; font-weight: 700; color: var(--gold2); text-decoration: none; border-bottom: 1px dashed rgba(232,208,122,0.5); }
.product-card .card-manual:hover { color: var(--ember); border-color: var(--ember); }

.product-card .card-weight-line { font-size: 0.7rem; font-weight: 600; color: rgba(240,232,216,0.78); margin: 0 0 0.5rem; }

/* ═══ PEDIDO DEL REINO — selección múltiple desde la portada ═══ */
body.pedido-lock { overflow: hidden; }

.pick-btn {
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 100px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,168,76,0.06);
  transition: all 0.2s;
}
.pick-btn:hover { border-color: var(--gold); background: rgba(201,168,76,0.14); }
.pick-btn.on { background: var(--gold); color: var(--bg); border-color: var(--gold); }

#pedido-bar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translate(-50%, 200%);
  z-index: 1200;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: 96vw;
  background: rgba(17,17,17,0.92);
  border: 1px solid rgba(201,168,76,0.45);
  border-radius: 100px;
  padding: 0.5rem 0.6rem 0.5rem 0.85rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  transition: transform 0.35s ease;
}
#pedido-bar.show { transform: translate(-50%, 0); }
#pedido-bar .pedido-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--ember);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}
#pedido-bar .pedido-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold2);
}
#pedido-bar button {
  padding: 0.5rem 0.9rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
  background: transparent;
  transition: all 0.2s;
}
#pedido-bar button:hover { background: rgba(201,168,76,0.14); }
#pedido-bar .pedido-enviar { background: var(--gold); color: var(--bg); border-color: var(--gold); }
#pedido-bar .pedido-enviar:hover { background: var(--gold2); }

.pedido-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pedido-backdrop.open { display: flex; }
.pedido-panel {
  width: min(560px, 94vw);
  max-height: 82vh;
  overflow-y: auto;
  background: var(--bg2);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.7);
}
.pedido-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem 0.6rem;
}
.pedido-head h3 { font-family: var(--serif); color: var(--gold2); font-size: 1.1rem; }
.pedido-x { font-size: 1.4rem; color: rgba(240,232,216,0.6); line-height: 1; }
.pedido-x:hover { color: var(--gold); }
.pedido-body { padding: 0.4rem 1.15rem 1.15rem; }
.pedido-hint { font-size: 0.78rem; color: rgba(240,232,216,0.6); margin-bottom: 0.75rem; }
.pedido-empty { font-size: 0.85rem; color: rgba(240,232,216,0.45); padding: 0.5rem 0; }

.cmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.cmp-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cmp-card img { width: 100%; height: 92px; object-fit: cover; }
.cmp-noimg { width: 100%; height: 92px; background: repeating-linear-gradient(45deg, var(--bg3), var(--bg3) 8px, var(--bg2) 8px, var(--bg2) 16px); }
.cmp-body { padding: 0.5rem 0.6rem 0.6rem; }
.cmp-id { font-family: monospace; font-size: 0.58rem; color: rgba(201,168,76,0.55); text-transform: uppercase; letter-spacing: 0.08em; }
.cmp-name { font-size: 0.7rem; color: var(--cream); line-height: 1.35; margin: 0.15rem 0 0.3rem; }
.cmp-qty { font-size: 0.7rem; font-weight: 800; color: var(--ember); }

.pedido-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.4rem; }
.pedido-actions .btn-primary { padding: 0.6rem 1rem; border-radius: 100px; font-size: 0.78rem; font-weight: 800; background: var(--gold); color: var(--bg); transition: all 0.2s; text-align: center; }
.pedido-actions .btn-primary:hover { background: var(--gold2); }
.pedido-actions .btn-ghost { padding: 0.6rem 1rem; border-radius: 100px; font-size: 0.78rem; border: 1px solid var(--border); color: rgba(240,232,216,0.7); }

.car-add-btn {
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.5rem 0.8rem;
  border: 1px dashed rgba(201,168,76,0.4);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(201,168,76,0.05);
  transition: all 0.2s;
}
.car-add-btn:hover { background: rgba(201,168,76,0.14); }
