/* Tipografía y responsive móvil — Los Magos Del Billar */
:root {
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", system-ui, -apple-system, sans-serif;
  --gold: #e9e025;
  --gold-dark: #d4ac0d;
  --text-body: 1rem;
  --leading-body: 1.65;
  --leading-snug: 1.45;
}

.text-gold {
  color: var(--gold);
}

.bg-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.font-poppins,
.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Títulos de sección con escala fluida */
.section-title {
  font-size: clamp(1.625rem, 5.5vw, 3rem);
  line-height: 1.15;
  font-weight: 700;
}

.section-lead {
  font-size: clamp(0.9375rem, 2.8vw, 1.125rem);
  line-height: 1.6;
  color: #9ca3af;
}

/* Hero móvil */
@media (max-width: 639px) {
  :root {
    --text-body: 0.9375rem;
  }

  .hero-section {
    min-height: 100svh;
    padding-top: 2rem;
    padding-bottom: 4.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-title-main {
    font-size: clamp(1.5rem, 7vw, 1.875rem) !important;
    line-height: 1.2;
  }

  .hero-title-brand {
    font-size: clamp(1.25rem, 5.5vw, 1.5rem) !important;
    margin-top: 0.5rem;
  }

  .hero-lead-text {
    font-size: 0.9375rem !important;
    line-height: 1.6;
    margin-bottom: 1.25rem;
  }

  .hero-badge {
    font-size: 0.6875rem;
    padding: 0.3rem 0.65rem;
  }

  .hero-keyword {
    font-size: 0.6875rem;
    padding: 0.3rem 0.6rem;
  }

  .hero-keywords {
    gap: 0.35rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta {
    font-size: 0.9375rem !important;
    padding: 0.875rem 1.25rem !important;
    width: 100%;
    max-width: 20rem;
  }

  .hero-location-text {
    font-size: 0.8125rem;
    line-height: 1.5;
    padding: 0 0.25rem;
  }

  .hero-social {
    font-size: 1.75rem !important;
  }

  /* Secciones más compactas en móvil */
  section.py-20,
  .section-parallax-wrap.py-20 {
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }

  section.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Títulos Tailwind grandes → escala móvil */
  h2.text-4xl,
  h2.text-3xl {
    font-size: clamp(1.5rem, 5.5vw, 1.875rem) !important;
    line-height: 1.2;
  }

  h3.text-2xl,
  h3.text-3xl {
    font-size: clamp(1.25rem, 4.5vw, 1.5rem) !important;
  }

  p.text-lg,
  p.text-xl {
    font-size: 0.9375rem !important;
    line-height: 1.6;
  }

  .text-center.text-gray-400.mb-12.text-lg {
    margin-bottom: 2rem;
    font-size: 0.9375rem !important;
  }

  /* Cards e iconos */
  .text-5xl.text-gold {
    font-size: 2.25rem !important;
  }

  .text-4xl.text-gold.mb-4 {
    font-size: 2rem !important;
  }

  /* Botones CTA finales */
  a.rounded-full.text-lg {
    font-size: 0.9375rem !important;
    padding-top: 0.875rem !important;
    padding-bottom: 0.875rem !important;
  }

  /* Tienda (inicio) */
  .page-title-shop {
    font-size: clamp(1.375rem, 5vw, 1.75rem) !important;
  }

  .sidebar .boton-categoria {
    font-size: 0.875rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
  }

  /* Tienda / carrito: un solo offset para header fijo (evita hueco doble) */
  .shop-layout .flex.min-h-screen {
    padding-top: 4rem;
  }

  .shop-layout main.flex-1 {
    margin: 0 !important;
    padding: 0.5rem 0.75rem !important;
    background-color: transparent;
    border-radius: 0;
  }

  main.flex-1.p-3,
  main.flex-1.p-4 {
    padding: 0.5rem 0.75rem !important;
  }

  /* Galería index */
  #galeria h2 {
    font-size: clamp(1.25rem, 4.5vw, 1.5rem) !important;
    margin-bottom: 1.5rem;
  }

  .gallery-tile {
    border-radius: 0.75rem;
  }

  /* Grid productos / cards padding */
  .bg-gray-800.rounded-2xl.p-8,
  .bg-gray-800\/90.rounded-2xl.p-8,
  .bg-gray-800.rounded-xl.p-6 {
    padding: 1.25rem !important;
  }

  /* Footer */
  footer p.text-sm {
    font-size: 0.8125rem;
  }
}

@media (max-width: 380px) {
  .hero-keywords {
    max-width: 100%;
  }

  .hero-keyword:nth-child(n+3) {
    display: none;
  }
}

/* ——— Tienda (inicio) y carrito ——— */
.shop-layout,
.shop-layout button,
.shop-layout input,
.shop-layout select,
.shop-layout textarea,
.shop-layout p,
.shop-layout a,
.shop-layout label {
  font-family: var(--font-body);
}

.shop-layout h1,
.shop-layout h2,
.shop-layout h3,
.shop-layout h4,
.shop-layout .font-poppins,
.shop-layout .page-title-shop,
.shop-layout .producto-titulo,
#contenedor-productos .producto-titulo,
.modal-contenido h3,
#envio-modal h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.shop-layout .boton-categoria {
  font-weight: 500;
  letter-spacing: -0.01em;
}

#carrito-productos h3,
.carrito-acciones-total,
#total {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.producto-precio,
#carrito-productos .tabular-nums {
  font-variant-numeric: tabular-nums;
}

.modal-contenido,
.producto-agregar-modal {
  font-family: var(--font-body);
}

.producto-agregar-modal {
  font-weight: 700;
}

/* Menú lateral móvil (inicio, carrito) */
#sidebar nav a,
#sidebar .boton-categoria {
  color: #f9fafb;
}

#sidebar nav a:not(.nav-active):not(.bg-gold),
#sidebar .boton-categoria:not(.bg-gold) {
  color: #f3f4f6;
}

#sidebar nav a:not(.nav-active):not(.bg-gold):hover,
#sidebar .boton-categoria:not(.bg-gold):hover {
  color: #ffffff;
  background-color: #374151;
}

#sidebar .bg-gold,
#sidebar a.bg-gold,
#sidebar button.bg-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%) !important;
  color: #111827 !important;
}

#sidebar .bi,
#sidebar .fas,
#sidebar .fa {
  opacity: 1;
}

#sidebar footer p {
  color: #d1d5db;
}

body.sidebar-menu-open #open-menu {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 767px) {
  #sidebar {
    z-index: 55;
  }

  #sidebar.sidebar-open {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #overlay:not(.hidden) {
    z-index: 45;
  }
}
