:root {
  --rosa: #e75480;
  --rosa-oscuro: #c73e6b;
  --rosa-claro: #ff8fab;
  --rosa-fondo: #fff0f5;
  --blanco: #ffffff;
  --texto: #57263a;
  --texto-suave: #a3647c;
  --borde: #ffd3e0;
  --sombra: 0 10px 30px rgba(231, 84, 128, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: #fff8fb;
  color: var(--texto);
  line-height: 1.55;
}
h1, h2, h3, .logo {
  font-family: 'Playfair Display', 'Times New Roman', serif;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo { font-size: 1.5rem; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.logo span { color: var(--rosa); }
.logo-icono { width: 26px; height: 26px; color: var(--rosa); }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { font-weight: 600; color: var(--texto-suave); }
.nav a:hover { color: var(--rosa); }
.cart-btn {
  position: relative;
  background: var(--rosa-fondo);
  border: 1px solid var(--borde);
  border-radius: 999px;
  padding: 9px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rosa-oscuro);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.cart-btn:hover { background: #ffe3ee; border-color: var(--rosa-claro); }
.icono-carrito { width: 20px; height: 20px; }
.cart-count {
  position: absolute;
  top: -7px;
  right: -7px;
  background: var(--rosa);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px #fff;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #ffe3ee 0%, #fff0f5 45%, #ffffff 100%);
  padding: 84px 20px;
  text-align: center;
}
.hero h1 { font-size: 2.6rem; margin: 14px 0; }
.hero h1 em { color: var(--rosa); font-style: normal; }
.hero p { max-width: 560px; margin: 0 auto 28px; color: var(--texto-suave); font-size: 1.08rem; }
.hero-eyebrow {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--borde);
  color: var(--rosa-oscuro);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
}
.hero-evento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 880px;
  margin: 0 auto 28px;
}
.hero-evento-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: 12px 16px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(231, 84, 128, 0.08);
}
.hero-evento-icono {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--rosa-fondo);
  color: var(--rosa);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-evento-icono svg { width: 18px; height: 18px; }
.hero-evento-texto { display: flex; flex-direction: column; line-height: 1.35; }
.hero-evento-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texto-suave);
}
.hero-evento-texto strong { font-size: 0.95rem; color: var(--texto); }
.hero-evento-detalle { font-size: 0.84rem; color: var(--texto-suave); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 1rem;
}
.btn-primario { background: var(--rosa); color: #fff; box-shadow: 0 8px 20px rgba(231, 84, 128, 0.35); }
.btn-primario:hover { background: var(--rosa-oscuro); }
.btn-secundario { background: #fff; border: 2px solid var(--rosa); color: var(--rosa); }

/* ---------- Contenido ---------- */
.contenedor { max-width: 1120px; margin: 0 auto; padding: 56px 20px; }
.seccion-titulo { text-align: center; margin-bottom: 34px; }
.seccion-titulo h2 { font-size: 2rem; }
.seccion-titulo p { color: var(--texto-suave); margin-top: 8px; }

/* ---------- Grid de productos ---------- */
.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}
.producto-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.producto-card:hover { transform: translateY(-5px); box-shadow: 0 16px 38px rgba(231, 84, 128, 0.2); }
.producto-foto { position: relative; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.producto-foto img { width: 100%; height: 100%; object-fit: cover; }
.producto-foto svg.producto-icono { width: 72px; height: 72px; }
.foto-contador {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--texto);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(87, 38, 58, 0.12);
}
.producto-info { padding: 18px; }
.chip {
  display: inline-block;
  background: var(--rosa-fondo);
  color: var(--rosa-oscuro);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.producto-nombre { font-size: 1.15rem; margin: 10px 0 6px; }
.producto-desc { font-size: 0.9rem; color: var(--texto-suave); }
.producto-pie { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 10px; }
.producto-precio { font-size: 1.3rem; font-weight: 700; color: var(--rosa); }
.btn-agregar { background: var(--rosa); color: #fff; border: none; border-radius: 999px; padding: 9px 18px; font-weight: 700; }
.btn-agregar:hover { background: var(--rosa-oscuro); }
.btn-detalle {
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--rosa-fondo);
  color: var(--rosa-oscuro);
  border: 1px solid var(--borde);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-detalle:hover { background: #ffe3ee; border-color: var(--rosa-claro); }
.btn-detalle svg { width: 15px; height: 15px; }

/* ---------- Detalle de producto ---------- */
.sin-scroll { overflow: hidden; }
.detalle-overlay {
  position: fixed;
  inset: 0;
  background: rgba(87, 38, 58, 0.5);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.detalle-overlay.abierto { opacity: 1; visibility: visible; }
.detalle-modal {
  position: relative;
  background: #fff;
  border-radius: 24px;
  width: min(880px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(87, 38, 58, 0.28);
  transform: translateY(14px);
  transition: transform 0.25s ease;
}
.detalle-overlay.abierto .detalle-modal { transform: translateY(0); }
.detalle-cerrar {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--rosa-fondo);
  color: var(--rosa-oscuro);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.detalle-cerrar:hover { background: #ffe3ee; }
.detalle-cerrar svg { width: 14px; height: 14px; }
.detalle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.detalle-galeria { display: flex; flex-direction: column; gap: 10px; }
.detalle-foto-principal {
  aspect-ratio: 1/1;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detalle-foto-principal img { width: 100%; height: 100%; object-fit: cover; }
.detalle-foto-principal svg.producto-icono { width: 90px; height: 90px; }
.detalle-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.detalle-thumbs[hidden] { display: none; }
.detalle-thumb {
  width: 62px;
  height: 62px;
  padding: 0;
  border: 2px solid var(--borde);
  border-radius: 12px;
  overflow: hidden;
  background: var(--rosa-fondo);
  transition: border-color 0.2s ease;
}
.detalle-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detalle-thumb:hover { border-color: var(--rosa-claro); }
.detalle-thumb.activa { border-color: var(--rosa); }
.detalle-info { padding-top: 6px; }
.detalle-nombre { font-size: 1.9rem; line-height: 1.2; margin: 12px 0 10px; }
.detalle-desc { color: var(--texto-suave); font-size: 0.95rem; margin-bottom: 18px; }
.detalle-precio { font-size: 1.8rem; font-weight: 700; color: var(--rosa); margin-bottom: 18px; }
.detalle-agregar { width: 100%; }

.sin-productos { text-align: center; color: var(--texto-suave); padding: 40px 0; }

/* ---------- Carrito ---------- */
.carrito-overlay {
  position: fixed;
  inset: 0;
  background: rgba(87, 38, 58, 0.45);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.carrito-overlay.abierto { opacity: 1; visibility: visible; }
.carrito-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 92vw);
  background: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.25s ease;
}
.carrito-overlay.abierto .carrito-panel { transform: translateX(0); }
.carrito-cabecera { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.carrito-cabecera h3 { font-size: 1.3rem; }
.carrito-cerrar { background: var(--rosa-fondo); border: none; border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--rosa-oscuro); }
.carrito-cerrar svg { width: 14px; height: 14px; }
.carrito-items { flex: 1; overflow-y: auto; }
.carrito-vacio { text-align: center; color: var(--texto-suave); margin-top: 30px; }
.carrito-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rosa-fondo); align-items: center; }
.carrito-item-foto { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.carrito-item-foto svg.producto-icono { width: 28px; height: 28px; }
.carrito-item-foto img { width: 100%; height: 100%; object-fit: cover; }
.carrito-item-info { flex: 1; }
.carrito-item-info strong { display: block; font-size: 0.92rem; }
.carrito-item-subtotal { font-weight: 700; color: var(--rosa); }
.carrito-item-controles { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.carrito-item-controles button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rosa); background: #fff; color: var(--rosa); font-weight: 700; line-height: 1; }
.carrito-resumen { border-top: 1px solid var(--borde); padding-top: 14px; margin-top: 10px; }
.carrito-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; }
.carrito-total span:last-child { color: var(--rosa); }
.carrito-datos { border-top: 1px solid var(--borde); padding-top: 14px; margin-top: 10px; }
.carrito-datos label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--texto-suave); margin-bottom: 4px; }
.carrito-datos input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.92rem;
  margin-bottom: 10px;
  color: var(--texto);
  background: #fff;
}
.carrito-datos input:focus { outline: 2px solid var(--rosa-claro); outline-offset: 1px; }
.carrito-nota { font-size: 0.72rem; color: var(--texto-suave); text-align: center; margin-top: 10px; line-height: 1.4; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--texto);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 80;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Página de resultado del pago ---------- */
.pago-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
  background: linear-gradient(135deg, #ffe3ee 0%, #fff0f5 45%, #ffffff 100%);
}
.pago-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 24px;
  box-shadow: var(--sombra);
  padding: 36px;
  width: min(520px, 100%);
  text-align: center;
}
.pago-icono {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rosa-fondo);
  color: var(--rosa);
}
.pago-icono svg { width: 30px; height: 30px; }
.pago-icono.aprobado { background: #e8f7ee; color: #2f8f5b; }
.pago-icono.rechazado { background: #ffe6e6; color: #c0392b; }
.pago-icono.pendiente { background: #fff6e0; color: #b7791f; }
.pago-card h1 { font-size: 1.8rem; margin-bottom: 8px; }
.pago-card > p { color: var(--texto-suave); margin-bottom: 22px; }
.pago-resumen { border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); padding: 14px 0; margin-bottom: 16px; text-align: left; }
.pago-item { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; color: var(--texto-suave); padding: 4px 0; }
.pago-item strong { color: var(--texto); font-weight: 600; }
.pago-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.15rem; font-weight: 700; margin-bottom: 22px; }
.pago-total strong { color: var(--rosa); font-size: 1.5rem; }
.pago-acciones { display: flex; flex-direction: column; gap: 10px; }
.pago-acciones .btn { width: 100%; }
.pago-nota { font-size: 0.78rem; color: var(--texto-suave); margin-top: 16px; line-height: 1.45; }

/* ---------- Footer ---------- */
.footer { background: #fff; border-top: 1px solid var(--borde); text-align: center; padding: 26px 20px; color: var(--texto-suave); }

/* ---------- Admin ---------- */
.admin-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffe3ee, #fff0f5 50%, #ffffff);
  padding: 20px;
}
.admin-auth-form {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 24px;
  box-shadow: var(--sombra);
  padding: 36px;
  width: min(400px, 100%);
  text-align: center;
}
.admin-auth-form h2 { margin: 10px 0 6px; }
.admin-auth-form p { color: var(--texto-suave); margin-bottom: 20px; }
.admin-auth-icon { font-size: 46px; }
.admin-auth-form input { width: 100%; padding: 12px; border: 1px solid var(--borde); border-radius: 12px; margin-bottom: 14px; font-family: inherit; font-size: 1rem; }
.admin-panel { max-width: 980px; margin: 0 auto; padding: 40px 20px 60px; }
.admin-cabecera { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.admin-cabecera h2 { font-size: 1.8rem; }
.admin-grid { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.admin-card { background: #fff; border: 1px solid var(--borde); border-radius: 22px; box-shadow: var(--sombra); padding: 24px; }
.admin-card h3 { margin-bottom: 18px; }
.campo { display: block; margin-bottom: 14px; }
.campo label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.campo input, .campo textarea, .campo select { width: 100%; padding: 10px; border: 1px solid var(--borde); border-radius: 12px; font-family: inherit; font-size: 0.95rem; background: #fff; color: var(--texto); }
.campo textarea { resize: vertical; }
#preview-foto { display: none; width: 140px; height: 140px; object-fit: cover; border-radius: 16px; border: 2px solid var(--borde); margin-top: 10px; }
#preview-foto.mostrar { display: block; }

/* ---------- Botón de subida de fotos ---------- */
.campo .input-foto-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.campo .foto-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 26px 16px;
  background: var(--rosa-fondo);
  border: 2px dashed var(--borde);
  border-radius: 16px;
  color: var(--texto-suave);
  font-weight: 600;
  font-size: 0.92rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.campo .foto-drop:hover {
  background: #ffe3ee;
  border-color: var(--rosa-claro);
  color: var(--rosa);
}
.campo .foto-drop svg {
  width: 30px;
  height: 30px;
  color: var(--rosa);
}
.campo .input-foto-oculto:focus-visible + .foto-drop {
  outline: 2px solid var(--rosa);
  outline-offset: 3px;
}
.admin-form-card .btn { width: 100%; margin-top: 6px; }
.admin-item { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: var(--sombra); }
.admin-item-foto { width: 64px; height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.admin-item-foto img { width: 100%; height: 100%; object-fit: cover; }
.admin-item-foto svg.producto-icono { width: 32px; height: 32px; }
.admin-item-info { flex: 1; }
.admin-item-info strong { display: block; margin-bottom: 4px; }
.admin-item-precio { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--rosa); }
.btn-eliminar { background: #ffe3ec; color: var(--rosa-oscuro); border: none; border-radius: 999px; padding: 8px 14px; font-weight: 700; }
.btn-eliminar:hover { background: var(--rosa); color: #fff; }
.admin-preview { margin-top: 18px; border-top: 1px dashed var(--borde); padding-top: 18px; }
.admin-preview h3 { margin-bottom: 14px; font-size: 1.2rem; }
.admin-preview .producto-card { text-align: left; }
.admin-cabecera-botones { display: flex; gap: 12px; align-items: center; }
.admin-pedidos-card { margin-top: 24px; }
.admin-pedido { border: 1px solid var(--borde); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.admin-pedido-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.admin-pedido-fecha { display: block; font-size: 0.76rem; color: var(--texto-suave); margin-bottom: 8px; }
.admin-pedido-items { font-size: 0.86rem; color: var(--texto-suave); line-height: 1.6; margin-bottom: 8px; }
.admin-pedido-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--texto-suave); }
.admin-pedido-pie strong { color: var(--rosa); font-size: 1rem; }
.pedido-estado { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 999px; }
.pedido-estado.aprobado { background: #e8f7ee; color: #2f8f5b; }
.pedido-estado.rechazado { background: #ffe6e6; color: #c0392b; }
.pedido-estado.pendiente, .pedido-estado.iniciado, .pedido-estado.iniciando { background: #fff6e0; color: #b7791f; }
.pedido-estado.error { background: #ffe6e6; color: #c0392b; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .admin-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .detalle-grid { grid-template-columns: 1fr; gap: 20px; }
  .detalle-foto-principal { aspect-ratio: 4/3; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; row-gap: 8px; }
  .logo { font-size: 1.3rem; }
  .cart-btn { margin-left: auto; }
  .nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
    margin-left: 0;
    gap: 26px;
    padding-top: 4px;
  }
  .nav a { font-size: 0.95rem; }
  .detalle-overlay { padding: 12px; align-items: flex-end; }
  .detalle-modal { padding: 20px; border-radius: 20px; max-height: 92vh; }
  .detalle-nombre { font-size: 1.55rem; }
  .detalle-precio { font-size: 1.5rem; }
}
