/* ========== RESET Y VARIABLES ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --rosa-fuerte: #fd96b5;
  --rosa-medio: #ffb9ce;
  --rosa-claro: #ffdcea;
  --blanco: #ffffff;
  --magenta: #9d417b;
  --sombra: 0 4px 20px rgba(157, 65, 123, 0.12);
  --sombra-hover: 0 8px 30px rgba(157, 65, 123, 0.2);
  --radio: 18px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Mulish', -apple-system, sans-serif;
  color: var(--magenta);
  background: var(--blanco);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Fraunces', serif; color: var(--magenta); }

a { color: var(--magenta); text-decoration: none; }

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 220, 234, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--sombra);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.logo-heart {
  background: var(--rosa-fuerte);
  color: var(--blanco);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: 22px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--rosa-fuerte); }

.cart-btn {
  position: relative;
  background: var(--rosa-fuerte);
  color: var(--blanco);
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--sombra);
  transition: transform 0.2s;
}

.cart-btn:hover { transform: scale(1.05); }

.cart-badge {
  background: var(--magenta);
  color: var(--blanco);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.8rem;
  margin-left: 4px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--magenta);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--rosa-medio), var(--rosa-claro));
  padding: 60px 20px;
  text-align: center;
  overflow: hidden;
}

.hero-decor {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(253, 150, 181, 0.3) 0%, transparent 8%),
    radial-gradient(circle at 85% 70%, rgba(253, 150, 181, 0.25) 0%, transparent 10%),
    radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.4) 0%, transparent 7%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 600px; margin: 0 auto; }

.hero-script {
  font-family: 'Dancing Script', cursive;
  font-size: 1.3rem;
  color: var(--magenta);
  margin-bottom: 8px;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 14px;
  letter-spacing: -1px;
}

.hero-text {
  font-size: 1.05rem;
  margin-bottom: 26px;
  color: var(--magenta);
  opacity: 0.9;
}

.btn-primary {
  display: inline-block;
  background: var(--rosa-fuerte);
  color: var(--blanco);
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--sombra);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--sombra-hover);
  color: var(--blanco);
}

.hero-cake {
  margin: 30px auto 0;
  width: 200px;
  animation: flotar 3s ease-in-out infinite;
}

.flame { animation: parpadear 1.2s ease-in-out infinite; transform-origin: 100px 42px; }

@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes parpadear {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.85; }
}

/* ========== AVISOS ========== */
.avisos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 900px;
  margin: -30px auto 50px;
  padding: 0 20px;
  position: relative;
  z-index: 5;
}

.aviso {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 18px;
  box-shadow: var(--sombra);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.aviso-icon {
  background: var(--rosa-claro);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.aviso strong { display: block; margin-bottom: 4px; font-size: 1rem; }
.aviso p { font-size: 0.9rem; opacity: 0.85; }

/* ========== CATEGORÍAS Y PRODUCTOS ========== */
.categoria {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.categoria.alt {
  background: var(--rosa-claro);
  max-width: 100%;
  border-radius: 0;
}

.categoria.alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }

.categoria-script {
  font-family: 'Dancing Script', cursive;
  font-size: 1.2rem;
  color: var(--rosa-fuerte);
  margin-bottom: 6px;
}

.categoria h2 {
  font-size: 2.2rem;
  margin-bottom: 30px;
}

.productos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  text-align: left;
}

.producto {
  background: var(--blanco);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: transform 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(20px);
}

.producto.visible {
  opacity: 1;
  transform: translateY(0);
}

.producto:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra-hover);
}

.producto-img {
  background: var(--rosa-claro);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--magenta);
  opacity: 0.9;
  overflow: hidden;
}

.producto-img .cam-icon { font-size: 2rem; }
.producto-img small { font-size: 0.8rem; }

.producto-info { padding: 18px; }
.producto-info h3 { font-size: 1.25rem; margin-bottom: 8px; }
.producto-info p { font-size: 0.92rem; opacity: 0.85; margin-bottom: 14px; }

.btn-agregar {
  width: 100%;
  background: var(--rosa-fuerte);
  color: var(--blanco);
  border: none;
  padding: 12px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.2s;
}

.btn-agregar:hover {
  background: var(--magenta);
  transform: scale(1.02);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--magenta);
  color: var(--blanco);
  padding: 50px 20px 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer h3, .footer h4 { color: var(--blanco); margin-bottom: 10px; }
.footer-brand { font-size: 1.8rem; }
.footer p { font-size: 0.92rem; opacity: 0.92; margin-bottom: 6px; }

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ========== MODAL ========== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(157, 65, 123, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}

.modal.activo { display: flex; }

.modal-content {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 28px;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--sombra-hover);
  animation: aparecer 0.25s ease;
}

.modal-content h3 { font-size: 1.5rem; margin-bottom: 18px; }

.campo { margin-bottom: 14px; }
.campo label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.campo input, .campo select, .campo textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--rosa-medio);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--magenta);
  background: var(--blanco);
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none;
  border-color: var(--rosa-fuerte);
}
.campo textarea { resize: vertical; min-height: 70px; }

.modal-acciones { display: flex; gap: 10px; margin-top: 18px; }
.modal-acciones button { flex: 1; padding: 12px; border-radius: 999px; border: none; font-weight: 700; cursor: pointer; font-size: 0.95rem; }
.btn-cancelar { background: var(--rosa-claro); color: var(--magenta); }
.btn-confirmar { background: var(--rosa-fuerte); color: var(--blanco); }
.btn-confirmar:hover { background: var(--magenta); }

@keyframes aparecer {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== DRAWER CARRITO ========== */
.drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--blanco);
  z-index: 250;
  display: flex;
  flex-direction: column;
  transition: right 0.35s ease;
  box-shadow: -8px 0 30px rgba(157, 65, 123, 0.2);
}

.drawer.abierto { right: 0; }

.drawer-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--rosa-claro);
}

.drawer-header h3 { font-size: 1.4rem; }

.drawer-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--magenta);
  line-height: 1;
}

.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }

.cart-item {
  background: var(--rosa-claro);
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.cart-item h4 { font-size: 1rem; margin-bottom: 4px; }
.cart-item .detalles { font-size: 0.85rem; opacity: 0.85; margin-bottom: 8px; white-space: pre-line; }
.cart-item .precio-linea { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.cart-item .eliminar { background: none; border: none; color: var(--magenta); cursor: pointer; font-size: 0.85rem; text-decoration: underline; }

.carrito-vacio { text-align: center; padding: 40px 20px; opacity: 0.6; }

.drawer-footer { padding: 20px; border-top: 1px solid var(--rosa-claro); }
.drawer-footer .total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; }
.drawer-footer .a-cotizar { font-size: 0.85rem; opacity: 0.8; margin-bottom: 14px; }

.btn-enviar {
  width: 100%;
  background: #25D366;
  color: var(--blanco);
  border: none;
  padding: 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-enviar:hover { filter: brightness(0.95); }
.btn-enviar:disabled { background: #ccc; cursor: not-allowed; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(157, 65, 123, 0.4);
  z-index: 240;
  display: none;
}

.overlay.activo { display: block; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rosa-claro);
    flex-direction: column;
    padding: 20px;
    gap: 12px;
  }
  .nav-links.abierto { display: flex; }
  .hero-title { font-size: 2.2rem; }
  .hero-cake { width: 160px; }
  .avisos { grid-template-columns: 1fr; }
  .categoria { padding: 40px 16px; }
  .categoria h2 { font-size: 1.8rem; }
  .productos { grid-template-columns: 1fr; gap: 18px; }
}

/* ========== ACCESIBILIDAD ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== ICONOS SVG ========== */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

.cart-btn .icon { color: var(--blanco); }

.logo-heart svg { width: 18px; height: 18px; }

.menu-toggle svg { width: 26px; height: 26px; }

.aviso-icon svg {
  width: 20px;
  height: 20px;
  color: var(--magenta);
}

.placeholder-cake {
  width: 70px;
  height: 70px;
  color: var(--rosa-fuerte);
  opacity: 0.7;
}

.placeholder-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1rem;
  color: var(--magenta);
  opacity: 0.6;
  margin-top: 4px;
}

.btn-enviar svg {
  width: 18px;
  height: 18px;
  color: var(--blanco);
}

/* ========== IMAGENES DE PRODUCTOS ========== */
.producto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========== LOGOS ========== */
.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(157, 65, 123, 0.2);
}

.hero-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 6px 25px rgba(157, 65, 123, 0.18);
}

@media (max-width: 768px) {
  .hero-logo { max-width: 220px; }
  .logo-img { width: 38px; height: 38px; }
}