/* =========================================
   VARIABLES Y RESET (Estilo Fast Food / Familiar)
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800;900&family=Playfair+Display:ital,wght@0,600;0,800;1,600&display=swap');

:root { 
  --primary: #d32f2f; /* Rojo vibrante */
  --primary-dark: #b71c1c;
  --secondary: #fbc02d; /* Amarillo brillante */
  --accent: #ff6f00; /* Naranja para llamadas a la acción */
  --dark-bg: #211f1d; /* Carbón neutro para el footer y fondos oscuros */
  --bg: #fffdf8; /* Blanco crema */
  --text: #1a1a1a;
  --muted: #666;
  --border: #f0e6d2;
  --shadow: 0 10px 25px rgba(211, 47, 47, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
  font-family: 'Montserrat', sans-serif; 
  background: var(--bg); 
  color: var(--text); 
  line-height: 1.6; 
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }

/* =========================================
   TOPLINE Y HEADER
========================================= */
.topline { 
  background: var(--primary); 
  color: #fff; 
  text-align: center; 
  font-size: 0.75rem; 
  letter-spacing: 0.2em; 
  padding: 8px; 
  text-transform: uppercase; 
  font-weight: 800;
}
.header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 15px 5%; 
  background: #fff; 
  position: sticky; 
  top: 0; 
  z-index: 100; 
  border-bottom: 4px solid var(--secondary); 
}
.brand { display: flex; align-items: center; gap: 15px; }
.logo-img { height: 60px; width: auto; object-fit: contain; }
.brand b { display: block; font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--primary); line-height: 1; }
.brand small { font-size: 0.7rem; letter-spacing: 0.15em; color: var(--muted); font-weight: 800; }
nav { display: flex; gap: 30px; font-weight: 800; font-size: 0.95rem; }
nav a { transition: color 0.2s; }
nav a:hover { color: var(--primary); }
.cart-btn { 
  background: var(--secondary); 
  color: var(--text); 
  padding: 12px 24px; 
  border-radius: 8px; 
  font-weight: 900; 
  font-size: 1rem;
  display: flex; 
  align-items: center; 
  gap: 10px; 
  transition: transform 0.2s, background 0.2s;
}
.cart-btn:hover { transform: scale(1.05); background: #ffca28; }
.cart-btn b { 
  background: var(--primary); 
  color: #fff; 
  padding: 4px 10px; 
  border-radius: 20px; 
  font-size: 0.85rem; 
}

/* =========================================
   HERO SECTION (Estilo Mundo Cómics / Dark)
========================================= */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 90px 8%;
  /* Imagen principal de portada, con degradado para asegurar contraste */
  background-color: var(--dark-bg);
  background-image:
    linear-gradient(90deg,
      rgba(20, 16, 14, 0.88) 0%,
      rgba(20, 16, 14, 0.70) 48%,
      rgba(20, 16, 14, 0.34) 100%),
    url('/img/portada.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #fff;
  min-height: 78vh;
  position: relative;
  isolation: isolate;
}
.hero-text { max-width: 600px; z-index: 2; }
.kicker { 
  font-size: 0.85rem; 
  letter-spacing: 0.2em; 
  font-weight: 900; 
  color: var(--secondary); 
  margin-bottom: 15px; 
  display: block; 
  text-transform: uppercase;
}
.kicker.dark { color: var(--primary); }
.hero h1 { 
  font-family: 'Montserrat', sans-serif; 
  font-size: clamp(3rem, 6vw, 5rem); 
  line-height: 1.05; 
  font-weight: 900;
  margin-bottom: 25px; 
  text-transform: uppercase;
}
.hero h1 em { 
  color: var(--secondary); 
  font-style: normal; 
  font-family: 'Playfair Display', serif;
  text-transform: none;
}
.hero p { font-size: 1.1rem; color: #ccc; margin-bottom: 35px; }
.cta { 
  display: inline-block; 
  background: var(--primary); 
  color: #fff; 
  padding: 18px 40px; 
  border-radius: 8px; 
  font-weight: 900; 
  font-size: 1.1rem;
  text-transform: uppercase;
  transition: 0.3s; 
  box-shadow: 0 5px 15px rgba(211, 47, 47, 0.4);
}
.cta:hover { background: var(--accent); transform: translateY(-3px); }
.hero-art {
  position: relative;
  z-index: 1;
}
.hero-art img {
  height: min(360px, 34vw);
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.55));
  animation: float 6s infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* =========================================
   SECCIÓN MENÚ
========================================= */
.section { padding: 80px 8%; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; flex-wrap: wrap; gap: 20px; }
.section-head h2 { font-family: 'Playfair Display', serif; font-size: 3.5rem; color: var(--primary); line-height: 1; }
.section-head h2 em { color: var(--secondary); text-shadow: 2px 2px 0px var(--text); }
input[type="search"] { 
  padding: 15px 25px; 
  border-radius: 8px; 
  border: 2px solid var(--border); 
  width: 300px; 
  outline: none; 
  font-size: 1rem;
  font-family: inherit;
}
input[type="search"]:focus { border-color: var(--primary); }

.categories { display: flex; gap: 15px; margin-bottom: 40px; overflow-x: auto; padding-bottom: 10px; }
.cat { 
  background: #fff; 
  border: 2px solid var(--border); 
  padding: 10px 24px; 
  border-radius: 8px; 
  font-weight: 800; 
  color: var(--muted);
  transition: all 0.2s;
}
.cat.active, .cat:hover { 
  background: var(--primary); 
  color: #fff; 
  border-color: var(--primary); 
  transform: translateY(-2px);
}

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.product { 
  background: #fff; 
  border-radius: 16px; 
  overflow: hidden; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}
.product:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.product img { width: 100%; height: 220px; object-fit: cover; }
.product-info { padding: 25px; }
.product-info h3 { font-size: 1.4rem; font-weight: 900; color: var(--text); margin-bottom: 10px; }
.product-info p { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; font-weight: 600; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; }
.price { font-weight: 900; font-size: 1.4rem; color: var(--primary); }
.add { 
  background: var(--secondary); 
  color: var(--text); 
  padding: 10px 20px; 
  border-radius: 8px; 
  font-weight: 900; 
  text-transform: uppercase;
  transition: 0.2s;
}
.add:hover { background: var(--primary); color: #fff; }

/* =========================================
   HISTORIA Y CONTACTO
========================================= */
.story { background: #fff; padding: 80px 8%; text-align: center; border-top: 1px solid var(--border); }
.story-copy h2 { font-family: 'Playfair Display', serif; font-size: 3rem; color: var(--primary); margin-bottom: 20px; }
.story-copy h2 em { color: var(--secondary); }
.story-copy p { max-width: 800px; margin: auto; font-size: 1.1rem; color: var(--muted); font-weight: 600; }

.contact { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  background: var(--primary); 
  padding: 60px 8%; 
  color: #fff; 
}
.contact h2 { font-size: 2.5rem; font-weight: 900; text-transform: uppercase; }
.dark-cta { background: var(--secondary); color: var(--text); box-shadow: none; }
.dark-cta:hover { background: #fff; }

footer { text-align: center; padding: 40px; background: var(--dark-bg); color: #888; font-weight: 600; }

/* =========================================
   MODALES Y DRAWER (Carrito)
========================================= */
.shade, .modal { position: fixed; inset: 0; z-index: 1000; }
.shade-bg, .modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); border: none; cursor: pointer; }
.drawer { 
  position: absolute; right: 0; top: 0; bottom: 0; width: 400px; max-width: 100%; 
  background: #fff; padding: 30px; display: flex; flex-direction: column; gap: 20px; 
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--border); padding-bottom: 15px; }
.drawer-head h2 { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--primary); }
.x { background: none; font-size: 2.5rem; font-weight: bold; color: var(--muted); cursor: pointer; line-height: 1; }
.x:hover { color: var(--primary); }
.cart-items { flex: 1; overflow-y: auto; }
.cart-row { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px dashed var(--border); }
.cart-row b { font-size: 1.1rem; }
.sum { display: flex; justify-content: space-between; font-weight: 900; font-size: 1.5rem; color: var(--primary); margin-top: auto; }
.wide { width: 100%; text-align: center; }

.modal-card { 
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); 
  background: #fff; width: 500px; max-width: 90%; padding: 35px; border-radius: 12px; 
  display: flex; flex-direction: column; gap: 15px; box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.modal-card label { display: flex; flex-direction: column; font-weight: 800; font-size: 0.9rem; gap: 8px; color: var(--text); text-transform: uppercase;}
.modal-card input, .modal-card select, .modal-card textarea { 
  padding: 12px; border: 2px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 1rem; font-weight: 600;
}
.modal-card input:focus, .modal-card select:focus, .modal-card textarea:focus { outline: none; border-color: var(--primary); }
#feedback { margin-top: 10px; font-weight: 800; text-align: center; color: var(--primary); }
[hidden] { display: none !important; }

/* =========================================
   RESPONSIVE (Móviles)
========================================= */
@media(max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 64px 7% 55px;
    min-height: 78vh;
    background-position: center center;
    background-image:
      linear-gradient(rgba(20, 16, 14, 0.76), rgba(20, 16, 14, 0.76)),
      url('/img/portada.jpg');
  }
  .hero-art img { height: 230px; max-height: 230px; margin-top: 28px; } 
  nav { display: none; } 
  .section-head { flex-direction: column; align-items: flex-start; }
  input[type="search"] { width: 100%; }
  .contact { flex-direction: column; text-align: center; gap: 30px; } 
  .drawer { width: 100%; }
}

/* =========================================
   NUEVA SECCIÓN CONTACTO CON MAPA
========================================= */
.contact-map-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding: 80px 8%;
  background: #fff;
  align-items: center;
}
.contact-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
  line-height: 1.1;
}
.contact-info p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 30px;
  font-weight: 600;
}
.map-container iframe {
  width: 100%;
  height: 400px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 4px solid var(--border);
}

/* =========================================
   FOOTER PROFESIONAL
========================================= */
.site-footer {
  background: var(--dark-bg);
  color: #fff;
  padding: 60px 8% 20px;
  font-family: 'Montserrat', sans-serif;
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { color: #aaa; margin-top: 10px; max-width: 300px; line-height: 1.6; }
.footer-links h4, .footer-contact h4 {
  color: var(--secondary);
  margin-bottom: 20px;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.footer-links a {
  display: block;
  color: #ccc;
  margin-bottom: 12px;
  transition: color 0.2s;
  font-weight: 600;
}
.footer-links a:hover { color: var(--primary); }
.footer-contact p { color: #ccc; margin-bottom: 12px; font-weight: 600; }
.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #888;
  font-size: 0.9rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a {
  color: var(--secondary);
  font-weight: 800;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom a:hover { color: #fff; text-decoration: underline; }

/* Responsive para móviles */
@media(max-width: 768px) {
  .contact-map-section { grid-template-columns: 1fr; text-align: center; }
  .footer-content { grid-template-columns: 1fr; text-align: center; }
  .footer-brand p { margin: 10px auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
