:root {
  --primary-red: #dc2626;
  --dark-red: #b91c1c;
  --gold-accent: #f59e0b;
  --gold-light: #fbbf24;
  --bg-dark: #0b0f19;
  --bg-card-dark: #161e2e;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: #f8fafc;
  color: var(--text-dark);
  overflow-x: hidden;
  width: 100%;
}

/* --- Banner Semanal Dinámico (PocketBase) --- */
.restock-banner {
  background: linear-gradient(90deg, #0b0f19 0%, #1c1917 50%, #0b0f19 100%);
  color: #f8fafc;
  padding: 0.85rem 1.5rem;
  border-bottom: 2px solid var(--gold-accent);
  position: relative;
  z-index: 110;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-inner-wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  text-align: center;
}

.banner-tag {
  background: var(--gold-accent);
  color: #000;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.05em;
}

.banner-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fef08a;
}

/* --- Barra de Navegación Universal --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 5%;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand .logo {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--bg-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-brand .logo span {
  color: var(--primary-red);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Enlaces en PC */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: #334155;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--primary-red);
}

.btn-nav {
  background: #1877f2;
  color: #ffffff !important;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-nav:hover {
  background: #1464cc;
}

/* Botón de Idioma */
.lang-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: var(--bg-dark);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* Botón Hamburguesa (oculto en PC) */
.menu-btn {
  display: none;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: var(--bg-dark);
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.menu-btn:hover {
  background: #e2e8f0;
}

/* --- Hero Section --- */
.hero {
  padding: 5.5rem 5%;
  background: radial-gradient(circle at center, #1e293b 0%, var(--bg-dark) 100%);
  color: white;
  text-align: center;
  position: relative;
  border-bottom: 3px solid var(--gold-accent);
}

.hero-content {
  max-width: 850px;
  margin: 0 auto;
}

.badge {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold-light));
  color: #0b0f19;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  color: #cbd5e1;
  margin-bottom: 2.2rem;
}

.hero-buttons .btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  margin: 0.35rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-buttons .btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
  color: white;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.btn.secondary {
  background: #ffffff;
  color: var(--bg-dark);
}

/* --- Franja de Retailers --- */
.retailers-strip {
  background: #0f172a;
  color: #94a3b8;
  padding: 1.6rem 5%;
  text-align: center;
  border-bottom: 1px solid #1e293b;
}

.strip-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
  color: #e2e8f0;
  font-weight: 600;
}

.retailer-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.retailer-badge {
  background: #1e293b;
  color: #f8fafc;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #334155;
}

/* --- Categorías de Productos --- */
.categories {
  padding: 4.5rem 5%;
  text-align: center;
}

.categories h2 {
  font-size: 2.1rem;
  margin-bottom: 2.5rem;
  color: var(--bg-dark);
  font-weight: 800;
}

.section-sub {
  color: var(--text-muted);
  margin-top: -1.8rem;
  margin-bottom: 2.8rem;
  font-size: 1.05rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
  max-width: 1050px;
  margin: 0 auto;
}

.cat-pill {
  background: white;
  padding: 1.25rem 1.1rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-weight: 700;
  color: var(--bg-dark);
  text-align: left;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.12);
  border-color: var(--primary-red);
}

.cat-pill i {
  color: var(--gold-accent);
  font-size: 1.35rem;
  width: 28px;
  text-align: center;
}

.cat-pill:hover i {
  color: var(--primary-red);
}

/* --- Banner Concierge --- */
.concierge-banner {
  padding: 3.5rem 5%;
  background: #f1f5f9;
}

.banner-inner {
  max-width: 950px;
  margin: 0 auto;
  background: white;
  padding: 2.2rem 2.8rem;
  border-radius: 16px;
  border-left: 6px solid var(--gold-accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-md);
}

.banner-icon {
  font-size: 2.6rem;
  color: var(--primary-red);
}

.banner-inner h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
  color: var(--bg-dark);
  font-weight: 800;
}

.banner-inner p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Sección About Us --- */
.about-section {
  padding: 5rem 5%;
  background: white;
}

.about-card {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-card h2 {
  font-size: 2.2rem;
  margin: 1.2rem 0 1.5rem 0;
  color: var(--bg-dark);
  font-weight: 800;
}

.about-card p {
  color: #475569;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.about-quote {
  margin-top: 2rem;
  padding: 1.3rem;
  background: #f8fafc;
  border-radius: 8px;
  font-style: italic;
  font-weight: 700;
  color: var(--bg-dark);
  border-left: 4px solid var(--gold-accent);
}

/* --- Ubicación --- */
.location {
  padding: 4.5rem 5%;
  background: #e2e8f0;
  text-align: center;
}

.location-details {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2.5rem;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.location-details h2 {
  margin-bottom: 1.2rem;
  font-weight: 800;
}

.location-details p {
  margin-bottom: 1.1rem;
  color: #475569;
  line-height: 1.6;
}

.location-details p i {
  color: var(--primary-red);
}

/* --- Modal / Popup Flotante de Inventario --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(5px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}

.modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 950px;
  max-height: 85vh;
  max-height: 85dvh;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  background: #ffffff;
  border-bottom: 2px solid #f1f5f9;
  flex-shrink: 0;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title-wrap i {
  color: var(--gold-accent);
  font-size: 1.35rem;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--bg-dark);
  font-weight: 800;
}

.close-btn {
  background: #f1f5f9;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: var(--primary-red);
  color: white;
}

.modal-body {
  padding: 1.2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.2rem;
}

.gallery-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-accent);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: 160px;
  object-fit: cover;
  display: block;
  background: #f1f5f9;
  flex-shrink: 0;
}

.gallery-info {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  flex-shrink: 0;
  background: #ffffff;
  min-height: 65px;
}

.gallery-info h4 {
  margin: 0 0 0.35rem 0;
  font-size: 0.95rem;
  color: var(--bg-dark);
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

.gallery-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #16a34a;
  display: block;
  margin-top: auto;
}

/* --- Botón Flotante Messenger --- */
.float-btn {
  position: fixed;
  bottom: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: 24px;
  background-color: #0084ff;
  color: white;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 14px rgba(0, 132, 255, 0.4);
  text-decoration: none;
  z-index: 1000;
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.float-btn:hover {
  transform: scale(1.08);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 2.5rem 5%;
  background: var(--bg-dark);
  color: #64748b;
  font-size: 0.9rem;
  border-top: 3px solid var(--primary-red);
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  margin: 0 10px;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold-accent);
}

/* ========================================================
   ADAPTACIÓN PARA MÓVILES Y TABLETS (Cualquier iPhone/Android)
   ======================================================== */
@media (max-width: 860px) {
  .menu-btn {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    padding: 1.2rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--gold-accent);
    display: none;
  }

  .nav-links.active {
    display: flex;
    animation: slideDown 0.25s ease-out forwards;
  }

  .nav-links a {
    font-size: 1.05rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .btn-nav {
    text-align: center;
    justify-content: center;
    padding: 0.8rem;
    margin-top: 0.5rem;
  }

  /* Ajustes esenciales del modal en pantalla móvil */
  .modal-overlay {
    padding: 0.6rem;
  }

  .modal-container {
    max-height: 88dvh;
  }

  .modal-body {
    padding: 0.85rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .gallery-card img {
    height: 120px;
  }

  .gallery-info {
    padding: 0.6rem;
    min-height: 55px;
  }

  .gallery-info h4 {
    font-size: 0.82rem;
  }

  .gallery-price {
    font-size: 0.92rem;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
