/* ========================================
   VARIABLES Y CONFIGURACIÓN BASE
======================================== */

:root {
  --bg-dark: #8C031C;
  --bg-pink: #F288A4;
  --bg-light-pink: #F4C9CA;
  --bg-red: #F24141;
  --bg-cream: #F2F2F2;
  --text-dark: #8C031C;
  --text-light: #F2F2F2;
  --text-muted: #8C031C;
  --shadow: 0 10px 25px rgba(140, 3, 28, 0.15);
  --shadow-soft: 0 5px 15px rgba(242, 137, 164, 0.2);
}

* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text-dark);
  /* Para cambiar la imagen de fondo, simplemente modifica la URL aquí: */
  background-image: url('https://images.unsplash.com/photo-1554118811-1e0d58224f24?w=1920&q=80&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
}

/* Detalles decorativos coquette */
.main-container::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: var(--bg-light-pink);
  border-radius: 35px;
  z-index: -1;
  opacity: 0.3;
}

/* Decoración de esquinas */
.site-header::after {
  content: '✨';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  opacity: 0.7;
  animation: sparkle 2s ease-in-out infinite;
}

/* Contenedor principal centrado */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  background: rgba(242, 242, 242, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 20px;
  margin-bottom: 20px;
  min-height: calc(100vh - 40px);
  position: relative;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ========================================
   HEADER Y BANNER
======================================== */

.site-header {
  position: relative;
  height: 50vh;
  min-height: 400px;
  max-height: 600px;
  overflow: hidden;
  border-radius: 30px 30px 0 0;
  box-shadow: var(--shadow-soft);
}

.site-header .banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--text-light);
  padding: 20px;
}

.brand {
  font-size: 3rem;
  letter-spacing: 1px;
  margin: 0;
  font-weight: 700;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  color: #F2F2F2;
}

.tag {
  margin: 12px 0 0;
  opacity: 0.95;
  font-size: 1.2rem;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(140, 3, 28, 0.3);
  color: var(--text-light);
}

/* ========================================
   NAVEGACIÓN DE CATEGORÍAS
======================================== */

.category-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
  justify-content: center;
  background: var(--bg-cream);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--bg-light-pink);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.chip {
  border: 2px solid transparent;
  background: var(--bg-light-pink);
  color: var(--text-dark);
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(242, 137, 164, 0.3);
  transition: left 0.5s;
}

.chip:hover::before {
  left: 100%;
}

.chip:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  background: var(--bg-pink);
  border-color: var(--bg-dark);
  color: var(--text-light);
}

.chip.active {
  background: var(--bg-dark);
  color: var(--text-light);
  border-color: var(--bg-dark);
  box-shadow: var(--shadow);
}

.chip.active:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* ========================================
   SECCIÓN PRINCIPAL Y PRODUCTOS
======================================== */

main { 
  padding: 40px 20px 80px; 
}

.section-title { 
  font-size: 1.6rem; 
  margin: 8px 0 18px; 
}

.product-grid {
  display: grid;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  align-items: stretch;
}

/* Tarjetas de productos */
.card {
  width: 300px;
  background: var(--bg-cream);
  border-radius: 25px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid var(--bg-light-pink);
  position: relative;
  margin: 0 auto;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: var(--bg-pink);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(242, 137, 164, 0.05);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

/* Imágenes de productos */
.card-media {
  width: 100%;
  aspect-ratio: 1;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-media img {
  transform: scale(1.05);
}

/* Contenido de las tarjetas */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.card-title {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
  flex-grow: 1;
}

.price {
  color: var(--bg-dark);
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ingredients {
  margin: 8px 0 0;
  padding-left: 16px;
  color: #6b7280;
  font-size: 0.85rem;
}

.ingredients li {
  margin: 3px 0;
  position: relative;
}

.ingredients li::before {
  content: '•';
  color: var(--brand);
  font-weight: bold;
  position: absolute;
  left: -12px;
}

/* Botones */
.btn {
  align-self: stretch;
  border: 0;
  border-radius: 15px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
  margin-top: auto;
  box-shadow: var(--shadow-soft);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn.primary {
  background: var(--bg-dark);
  color: var(--text-light);
  box-shadow: var(--shadow);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  background: var(--bg-red);
}

.btn.primary:active,
.btn.primary:focus {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
  background: var(--bg-dark);
  color: var(--text-light);
  outline: none;
}

.btn.primary:focus-visible {
  outline: 2px solid var(--bg-pink);
  outline-offset: 2px;
}

/* ========================================
   CARRUSEL DE DESTACADOS
======================================== */

.nc-section { 
  margin: 60px 0 80px 0; 
}

.nc-container { 
  width: 100%; 
  max-width: 900px; 
  margin: 0 auto; 
}

.nc-container input[type=radio] { 
  display: none; 
}

.nc-cards { 
  position: relative; 
  width: 100%; 
  height: 360px; 
  margin-bottom: 16px; 
}

.nc-card { 
  position: absolute; 
  width: 60%; 
  height: 100%; 
  left: 0; 
  right: 0; 
  margin: auto; 
  transition: transform .4s ease; 
  cursor: pointer; 
  border-radius: 10px; 
  overflow: hidden; 
  box-shadow: var(--shadow); 
}

.nc-card img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
}

.nc-player { 
  background: #fff; 
  border-radius: 10px; 
  padding: 12px; 
  box-shadow: var(--shadow); 
}

.nc-info-area { 
  display: grid; 
  grid-template-columns: auto 1fr auto; 
  gap: 10px; 
  align-items: center; 
}

.nc-title { 
  font-weight: 700; 
  margin: 0; 
}

.nc-subtitle { 
  color: #6b7280; 
  font-size: 12px; 
}

.nc-time { 
  color: #6b7280; 
  font-size: 12px; 
  margin-left: auto; 
}

/* Posiciones del carrusel */
#item-1:checked ~ .nc-cards #nc-card-3,
#item-2:checked ~ .nc-cards #nc-card-1,
#item-3:checked ~ .nc-cards #nc-card-2 { 
  transform: translateX(-40%) scale(.85); 
  opacity: .6; 
  z-index: 0; 
}

#item-1:checked ~ .nc-cards #nc-card-2,
#item-2:checked ~ .nc-cards #nc-card-3,
#item-3:checked ~ .nc-cards #nc-card-1 { 
  transform: translateX(40%) scale(.85); 
  opacity: .6; 
  z-index: 0; 
}

#item-1:checked ~ .nc-cards #nc-card-1,
#item-2:checked ~ .nc-cards #nc-card-2,
#item-3:checked ~ .nc-cards #nc-card-3 { 
  transform: translateX(0) scale(1); 
  opacity: 1; 
  z-index: 1; 
}

/* ========================================
   CARRITO DE COMPRAS
======================================== */

.cart-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-dark);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 1000;
  border: 3px solid var(--bg-light-pink);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-fab:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow);
  border-color: var(--bg-pink);
}

.fab-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-fab.bounce {
  animation: bounceAnimation 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceAnimation {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.cart-fab .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
  animation: pulseAnimation 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulseAnimation {
  0% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1); }
  75% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.cart-panel {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 340px;
  max-height: 60vh;
  background: var(--bg-cream);
  border: 3px solid var(--bg-light-pink);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: none;
  z-index: 1000;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-panel.open {
  display: block;
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cart-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 8px; 
}

.cart-title { 
  margin: 0; 
  font-size: 1.1rem; 
  font-weight: 700; 
}

.cart-items { 
  margin: 0; 
  padding: 0; 
  list-style: none; 
  max-height: 40vh; 
  overflow: auto; 
}

.cart-item { 
  display: grid; 
  grid-template-columns: 50px 1fr auto; 
  grid-template-rows: auto auto;
  align-items: start; 
  gap: 8px 12px; 
  padding: 12px 0; 
  border-bottom: 1px solid #f1f5f9; 
  font-size: 0.85rem; 
}

.cart-item:last-child { 
  border-bottom: none; 
}

.cart-item-image { 
  width: 50px; 
  height: 50px; 
  border-radius: 8px; 
  object-fit: cover; 
  flex-shrink: 0; 
  grid-row: 1 / 3;
}

.cart-item .name { 
  font-weight: 600; 
  font-size: 0.9rem; 
  line-height: 1.2; 
  grid-column: 2;
  grid-row: 1;
}

.cart-item .price { 
  color: #6b7280; 
  font-weight: 600; 
  font-size: 0.85rem; 
  grid-column: 2;
  grid-row: 2;
}

.cart-item .qty-controls {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
}

.cart-remove { 
  background: transparent; 
  border: 1px solid #e5e7eb; 
  border-radius: 8px; 
  padding: 6px 8px; 
  cursor: pointer; 
}

.cart-footer { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-top: 10px; 
}

.cart-total { 
  font-weight: 700; 
}

.qty-controls { 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
}

.qty-btn { 
  width: 28px; 
  height: 28px; 
  border: 1px solid #e5e7eb; 
  background: #f9fafb; 
  border-radius: 8px; 
  cursor: pointer; 
  display: grid; 
  place-content: center; 
}

.qty-value { 
  min-width: 22px; 
  text-align: center; 
  font-weight: 600; 
}

/* ========================================
   FOOTER
======================================== */

.site-footer { 
  background: var(--bg-dark); 
  color: var(--text-light); 
  margin-top: 48px; 
  border-radius: 0 0 30px 30px;
}

.footer-inner { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 36px 20px; 
  display: grid; 
  grid-template-columns: repeat(12, 1fr); 
  gap: 20px; 
}

.footer-col { 
  grid-column: span 3; 
}

.footer-col.align-end { 
  display: flex; 
  align-items: end; 
  justify-content: flex-end; 
}

.footer-brand { 
  margin: 0 0 6px; 
  color: #fff; 
}

.footer-links { 
  list-style: none; 
  margin: 8px 0 0; 
  padding: 0; 
}

.footer-links a { 
  color: #cbd5e1; 
  text-decoration: none; 
  transition: color .2s ease; 
}

.footer-links a:hover { 
  color: #fff; 
}

.btn.contact { 
  background: var(--bg-light-pink); 
  color: var(--text-dark); 
  padding: 12px 18px; 
  border-radius: 25px; 
  text-decoration: none; 
  display: inline-block; 
  border: 2px solid var(--bg-pink); 
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn.contact:hover { 
  box-shadow: var(--shadow); 
  transform: translateY(-2px); 
  background: var(--bg-pink); 
  color: var(--text-light);
}

.footer-bottom { 
  border-top: 1px solid #1f2937; 
  padding: 14px 20px; 
  text-align: center; 
  color: #94a3b8; 
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Desktop grande (1200px+) */
@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }
  .card {
    width: 100%;
    max-width: 320px;
  }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .card {
    width: 100%;
    max-width: 300px;
  }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .card {
    width: 100%;
    max-width: 280px;
  }
  .site-header {
    height: 45vh;
    min-height: 350px;
  }
  .brand {
    font-size: 2.5rem;
  }
}

/* Móvil (767px y menos) */
@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 15px;
  }
  .card {
    width: 100%;
    max-width: 100%;
  }
  .site-header {
    height: 40vh;
    min-height: 300px;
  }
  .brand {
    font-size: 2rem;
  }
  .tag {
    font-size: 1rem;
  }
  .category-menu {
    padding: 15px;
    gap: 8px;
  }
  .chip {
    padding: 10px 16px;
    font-size: 0.8rem;
  }
  main {
    padding: 20px 15px 40px;
  }
  .nc-cards { 
    height: 240px; 
  }
  .nc-card { 
    width: 80%; 
  }
}

/* Móvil pequeño (480px y menos) */
@media (max-width: 480px) {
  .site-header {
    height: 35vh;
    min-height: 250px;
  }
  .brand {
    font-size: 1.6rem;
  }
  .tag {
    font-size: 0.9rem;
  }
  .category-menu {
    padding: 12px;
    gap: 6px;
  }
  .chip {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
  .section-title {
    font-size: 1.4rem;
  }
  .card {
    border-radius: 15px;
  }
  .card-body {
    padding: 15px;
  }
  .cart-panel {
    right: 12px;
    left: 12px;
    width: auto;
  }
  .cart-fab {
    right: 12px;
    bottom: 12px;
  }
}

/* Footer responsive */
@media (max-width: 900px) { 
  .footer-inner { 
    grid-template-columns: repeat(6, 1fr); 
  } 
  .footer-col { 
    grid-column: span 6; 
  } 
  .footer-col.align-end { 
    justify-content: flex-start; 
  } 
}