/* ==========================================
   XELA TORTILLERÍA — ESTILOS PÚBLICOS
   ========================================== */

/* ---- Variables ---- */
:root {
  --color-primary: #E63200;
  --color-primary-dark: #B82800;
  --color-secondary: #1E7228;
  --color-accent: #F5A800;
  --color-gold: #F5A800;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F9F9F9;
  --color-text: #1A1A1A;
  --color-text-light: #555555;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #128C7E;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --transition: 0.3s ease;
  --nav-height: 68px;
  --color-btc: #F7931A;
  --color-sol: #9945FF;
  --color-eth: #627EEA;
  --color-xrp: #fff;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
p { margin-bottom: 1rem; }

.section-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  display: block;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
}
.center { text-align: center; }

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn-whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  border-color: var(--color-whatsapp);
}
.btn-whatsapp:hover {
  background: var(--color-whatsapp-dark);
  border-color: var(--color-whatsapp-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.9rem; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.1rem; }

/* ==========================================
   NAVBAR
   ========================================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 10px rgba(0,0,0,0.1);
  transition: all var(--transition);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
}
.brand-logo {
  height: 54px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(230, 50, 0, 0.15));
  transition: transform var(--transition);
}
.brand-logo:hover {
  transform: scale(1.05);
}
.brand-icon { font-size: 1.6rem; }
.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  transition: all var(--transition);
}
.nav-links a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary);
  padding: 0.5rem;
}

/* ==========================================
   CRYPTO MARQUEE
   ========================================== */
.crypto-marquee {
  margin-top: var(--nav-height);
  height: var(--nav-height);
  background: #111;
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 100;
}
.crypto-marquee-track {
  display: flex;
  animation: crypto-scroll 20s linear infinite;
}
.crypto-marquee-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.crypto-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.crypto-icon {
  flex-shrink: 0;
}
.crypto-name {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
}
.crypto-name-btc { color: var(--color-btc); }
.crypto-name-sol { color: var(--color-sol); }
.crypto-name-eth { color: var(--color-eth); }
.crypto-name-xrp { color: var(--color-xrp); }
.crypto-dot {
  color: rgba(255,255,255,0.25);
  font-size: 0.7rem;
}
.crypto-text {
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-body);
}
@keyframes crypto-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  /* nav-height + marquee-height = 68px + 68px = 136px */
  min-height: calc(100vh - var(--nav-height) - var(--nav-height));
  background: linear-gradient(
    135deg,
    #8C1500 0%,
    #B82800 20%,
    #E63200 45%,
    #C47000 70%,
    #1E7228 100%
  );
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 3rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(245, 168, 0, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(30, 114, 40, 0.25) 0%, transparent 50%);
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.02) 40px,
    rgba(255,255,255,0.02) 80px
  );
  pointer-events: none;
}
.hero-content {
  text-align: center;
  z-index: 1;
  max-width: 800px;
}
.hero-eyebrow {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-gold);
  margin-bottom: 1rem;
}
.hero-title {
  color: #fff;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-title span { color: var(--color-gold); }
.hero-slogan {
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
  color: var(--color-gold);
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.88);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-badges {
  display: flex;
  gap: 1rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 1;
}
.badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
}
.badge span { margin-right: 0.3rem; }

/* ==========================================
   HISTORIA
   ========================================== */
.section-historia {
  padding: 6rem 0;
  background: var(--color-bg);
}
.historia-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
}
.historia-img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.historia-img-placeholder {
  background: linear-gradient(135deg, #FFF0E0, #FFE4B0);
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.historia-img-placeholder .big-emoji { font-size: 5rem; }
.historia-img-placeholder p {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-primary);
  font-style: italic;
}
.historia-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.stat {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--color-accent);
}
.stat strong {
  display: block;
  font-size: 1.5rem;
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}
.stat span {
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.historia-text h2 { color: var(--color-primary); margin-bottom: 1.25rem; }
.historia-text p { color: var(--color-text-light); font-size: 1.05rem; line-height: 1.8; }
.historia-text p strong { color: var(--color-text); }

/* ==========================================
   PRODUCTOS
   ========================================== */
.section-productos {
  padding: 6rem 0;
  background: var(--color-bg-alt);
}
.productos-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}
.productos-grid {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0.25rem 1.5rem;
  flex: 1;
  min-width: 0;
  /* hide scrollbar */
  scrollbar-width: none;
}
.productos-grid::-webkit-scrollbar {
  display: none;
}
.producto-card {
  flex: 0 0 300px;
  width: 300px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
}
.producto-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}
.producto-card.destacado {
  border-color: var(--color-accent);
  background: linear-gradient(to bottom, #FFFDE7, #fff);
}
.producto-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  white-space: nowrap;
}
.producto-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
}
.producto-card h3 { color: var(--color-primary); }
.producto-desc {
  font-size: 0.93rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.producto-features {
  margin-bottom: 1.25rem;
}
.producto-features li {
  font-size: 0.88rem;
  color: var(--color-secondary);
  font-weight: 600;
  padding: 0.2rem 0;
}
.producto-price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.producto-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-light);
}
.productos-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-primary);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0;
}
.productos-arrow:hover {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.productos-arrow-prev { left: -20px; }
.productos-arrow-next { right: -20px; }
.productos-scroll-indicator {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.productos-scroll-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.3;
  transition: opacity 0.3s;
}
.productos-scroll-indicator .dot.active {
  opacity: 1;
}
@media (max-width: 768px) {
  .productos-arrow { display: none; }
}

/* ==========================================
   PRECIOS
   ========================================== */
.section-precios {
  padding: 6rem 0;
  background: var(--color-bg);
}
.precios-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
}
.precios-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.98rem;
}
.precios-table th {
  background: var(--color-primary);
  color: #fff;
  padding: 1rem 1.5rem;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1rem;
}
.precios-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #EEEEEE;
}
.precios-table tr:last-child td { border-bottom: none; }
.precios-table tr:hover td { background: #FFF5F0; }
.emoji-td { margin-right: 0.5rem; font-size: 1.1rem; }
.precios-notas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.nota {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  font-size: 0.93rem;
  border-left: 4px solid var(--color-accent);
}
.nota span { margin-right: 0.5rem; font-size: 1.1rem; }

/* ==========================================
   UBICACIÓN
   ========================================== */
.section-ubicacion {
  padding: 6rem 0;
  background: var(--color-bg-alt);
}
.ubicacion-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.info-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.info-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
}
.info-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 0;
  line-height: 1.5;
}
.ubicacion-mapa {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 450px;
}
.ubicacion-mapa iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================
   CONTACTO (CTA)
   ========================================== */
.section-contacto {
  padding: 6rem 0;
  background: linear-gradient(135deg, #8C1500, #1E7228);
  position: relative;
  overflow: hidden;
}
.section-contacto::before {
  content: '🌽';
  position: absolute;
  font-size: 20rem;
  opacity: 0.04;
  top: -3rem;
  right: -3rem;
  pointer-events: none;
}
.contacto-content { position: relative; z-index: 1; }
.contacto-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: #0F1F0F;
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-logo-img {
  height: 36px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  filter: brightness(0) invert(1);
}
.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 0;
}
.footer-links h4, .footer-contact h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}
.footer-links ul li { margin-bottom: 0.5rem; }
.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.93rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--color-gold); }
.footer-contact p {
  font-size: 0.93rem;
  margin-bottom: 0.5rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-system-link {
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  transition: color var(--transition);
}
.footer-system-link:hover { color: rgba(255,255,255,0.6); }

/* ==========================================
   WHATSAPP FLOTANTE
   ========================================== */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
  width: 60px;
  height: 60px;
  background: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all var(--transition);
  animation: pulse-wa 2.5s infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
  animation: none;
}
@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.1); }
}
.wa-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.whatsapp-float:hover .wa-tooltip { opacity: 1; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 900px) {
  .historia-grid, .ubicacion-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0.5rem; border-radius: 0; border-bottom: 1px solid #EEEEEE; }
  .historia-stats { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .precios-table th, .precios-table td { padding: 0.75rem 1rem; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .contacto-actions { flex-direction: column; align-items: center; }
  .historia-stats { grid-template-columns: 1fr 1fr 1fr; }
}

/* Scroll reveal utility class */
.revealed { opacity: 1 !important; transform: translateY(0) !important; }
