/* ============ BASE ============ */
:root {
  --rosa: #d6336c;
  --rosa-soft: #ff69b4;
  --rosa-bg: #ffe4ec;
  --texto: #2c2c2c;
  --texto-suave: #666;
  --gris-bg: #f8f5f7;
  --blanco: #fff;
  --borde: #eee;
  --sombra: 0 4px 16px rgba(0,0,0,.08);
  --sombra-fuerte: 0 12px 40px rgba(0,0,0,.15);
  --radio: 14px;
  --radio-sm: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--gris-bg);
  color: var(--texto);
  line-height: 1.5;
  padding-bottom: 100px;
}
.hidden { display: none !important; }
img { max-width: 100%; display: block; }

/* ============ HEADER ============ */
.site-header {
  background: var(--blanco);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  position: sticky; top: 0; z-index: 100;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texto); }
.logo img { width: 40px; height: 40px; border-radius: 50%; }
.logo span { font-family: 'Dancing Script', cursive; font-size: 1.6rem; color: var(--rosa); font-weight: 700; }
.top-nav { display: flex; gap: 18px; margin-left: auto; }
.top-nav a { text-decoration: none; color: var(--texto-suave); font-weight: 500; font-size: .95rem; padding: 6px 0; transition: color .2s; }
.top-nav a:hover, .top-nav a.active { color: var(--rosa); }
.cart-btn {
  position: relative; background: var(--rosa); color: #fff; border: none;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  font-size: 1.1rem; transition: transform .2s;
}
.cart-btn:hover { transform: scale(1.05); }
.cart-btn span {
  position: absolute; top: -4px; right: -4px;
  background: #fff; color: var(--rosa); font-size: .7rem; font-weight: 700;
  border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ============ BANNER ============ */
.banner-horario {
  padding: 12px 22px; text-align: center; font-weight: 500; font-size: .92rem;
}
.banner-horario.comercial { background: #e7f5e8; color: #1e6b28; }
.banner-horario.nocturno { background: #2a2440; color: #f5e1a4; }
.banner-horario.cerrado { background: #ffe9d6; color: #a1490e; }

/* ============ LAYOUT ============ */
.pedido-layout {
  max-width: 1300px; margin: 22px auto; padding: 0 20px;
  display: grid; grid-template-columns: 250px 1fr; gap: 24px;
}

/* ============ FILTROS ============ */
.filtros {
  background: var(--blanco); border-radius: var(--radio);
  padding: 20px; box-shadow: var(--sombra); height: fit-content;
  position: sticky; top: 90px;
}
.filtros h3 { font-size: 1rem; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.filtros ul { list-style: none; }
.filtros li {
  padding: 10px 12px; border-radius: var(--radio-sm);
  cursor: pointer; margin-bottom: 4px; font-size: .92rem;
  transition: background .15s;
}
.filtros li:hover { background: var(--gris-bg); }
.filtros li.active { background: var(--rosa); color: #fff; font-weight: 600; }
.info-minimo {
  margin-top: 20px; padding: 14px; background: var(--rosa-bg);
  border-radius: var(--radio-sm); font-size: .82rem;
}
.info-minimo h4 { font-size: .88rem; margin-bottom: 8px; color: var(--rosa); }
.info-minimo p { margin-bottom: 4px; color: #6b3a4d; }

/* ============ CATÁLOGO ============ */
.catalogo-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; gap: 16px; flex-wrap: wrap;
}
.catalogo-header h1 { font-size: 1.5rem; color: var(--texto); }
#buscador {
  padding: 10px 16px; border: 1px solid var(--borde); border-radius: 50px;
  font-size: .92rem; width: 260px; outline: none; transition: border .2s;
}
#buscador:focus { border-color: var(--rosa); }

.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.producto-card {
  background: var(--blanco); border-radius: var(--radio);
  overflow: hidden; box-shadow: var(--sombra);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.producto-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-fuerte); }
.producto-img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--gris-bg); }
.producto-img img { width: 100%; height: 100%; object-fit: cover; }
.badge-18 {
  position: absolute; top: 10px; right: 10px;
  background: #d32f2f; color: #fff; font-weight: 700; font-size: .7rem;
  padding: 3px 8px; border-radius: 20px;
}
.producto-info { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.producto-info h3 { font-size: .98rem; font-weight: 600; }
.producto-info p { font-size: .82rem; color: var(--texto-suave); flex: 1; }
.producto-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.precio { color: var(--rosa); font-weight: 700; font-size: 1.05rem; }
.btn-agregar {
  background: var(--rosa); color: #fff; border: none;
  padding: 7px 14px; border-radius: 50px; cursor: pointer;
  font-size: .8rem; font-weight: 600; transition: all .2s;
}
.btn-agregar:hover { background: #b02a56; }
.btn-agregar.added { background: #2e7d32; }
.sin-resultados { text-align: center; padding: 40px; color: var(--texto-suave); grid-column: 1/-1; }

/* ============ UBICACIÓN ============ */
.ubicacion-section {
  max-width: 1300px; margin: 40px auto; padding: 0 20px;
}
.ubicacion-container {
  background: var(--blanco); border-radius: var(--radio);
  padding: 30px; box-shadow: var(--sombra);
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center;
}
.ubicacion-texto h2 { font-size: 1.6rem; margin-bottom: 12px; color: var(--texto); }
.ubicacion-texto p { color: var(--texto-suave); margin-bottom: 8px; }
.horario-retiro { font-weight: 500; color: var(--rosa) !important; }
.ubicacion-acciones { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.btn-primario, .btn-secundario {
  border: none; padding: 12px 22px; border-radius: 50px;
  font-weight: 600; cursor: pointer; font-size: .92rem;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.btn-primario { background: var(--rosa); color: #fff; }
.btn-primario:hover { background: #b02a56; transform: translateY(-2px); }
.btn-primario:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-secundario { background: var(--gris-bg); color: var(--texto); }
.btn-secundario:hover { background: #e8e4e6; }
.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; }
#resultado-distancia { margin-top: 14px; padding: 12px; background: var(--rosa-bg); border-radius: var(--radio-sm); font-size: .9rem; }
.ubicacion-mapa iframe { width: 100%; height: 320px; border: 0; border-radius: var(--radio-sm); }

/* ============ CARRITO FLOTANTE ============ */
.cart-flotante {
  position: fixed; bottom: 20px; right: 20px; z-index: 500;
  background: var(--rosa); color: #fff; border: none;
  padding: 14px 22px; border-radius: 50px; cursor: pointer;
  font-weight: 700; font-size: 1rem; box-shadow: 0 8px 24px rgba(214,51,108,.4);
  display: flex; align-items: center; gap: 10px;
  transition: transform .2s;
}
.cart-flotante:hover { transform: scale(1.05); }
.cart-flotante .badge {
  background: #fff; color: var(--rosa); font-size: .75rem;
  border-radius: 50%; width: 22px; height: 22px;
  display: grid; place-items: center; font-weight: 700;
}
@media (min-width: 768px) { .cart-flotante { display: none; } }

/* ============ MODAL ============ */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: grid; place-items: center; z-index: 1000;
  padding: 20px; animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
  background: #fff; border-radius: var(--radio);
  width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--sombra-fuerte); animation: slideUp .25s;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-paso { padding: 22px; }
.modal-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--borde);
}
.modal-header h2 { flex: 1; font-size: 1.15rem; }
.btn-cerrar, .btn-atras {
  background: var(--gris-bg); border: none; width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer; font-size: 1rem;
}
.btn-cerrar:hover, .btn-atras:hover { background: #e8e4e6; }

/* Carrito items */
.carrito-items { margin-bottom: 16px; }
.carrito-item {
  display: grid; grid-template-columns: 1fr auto auto auto;
  align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--borde);
  font-size: .9rem;
}
.item-nombre { font-weight: 500; }
.item-cant { display: flex; align-items: center; gap: 6px; }
.item-cant button {
  background: var(--gris-bg); border: none; width: 26px; height: 26px;
  border-radius: 50%; cursor: pointer; font-weight: 700;
}
.item-cant button:hover { background: var(--rosa); color: #fff; }
.item-subtotal { font-weight: 700; color: var(--rosa); }
.item-eliminar { background: none; border: none; cursor: pointer; font-size: 1rem; }
.carrito-vacio { text-align: center; padding: 30px 0; color: var(--texto-suave); }
.carrito-vacio p { margin-bottom: 16px; }

/* Totales */
.carrito-totales {
  padding: 14px 0; border-top: 2px dashed var(--borde); margin-bottom: 14px;
}
.linea { display: flex; justify-content: space-between; padding: 4px 0; font-size: .92rem; color: var(--texto-suave); }
.linea.total { font-weight: 700; color: var(--texto); font-size: 1.1rem; padding-top: 10px; border-top: 1px solid var(--borde); margin-top: 8px; }
.aviso-minimo {
  background: #fff3cd; color: #856404; padding: 10px 14px;
  border-radius: var(--radio-sm); font-size: .85rem; margin-bottom: 14px;
}

/* Opciones entrega */
.opciones-entrega { display: flex; flex-direction: column; gap: 12px; }
.opcion-entrega {
  display: flex; align-items: center; gap: 16px;
  padding: 18px; border: 2px solid var(--borde); border-radius: var(--radio);
  background: #fff; cursor: pointer; text-align: left; transition: all .2s;
}
.opcion-entrega:hover { border-color: var(--rosa); background: var(--rosa-bg); }
.opcion-entrega .icono { font-size: 2rem; }
.opcion-entrega strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.opcion-entrega small { color: var(--texto-suave); font-size: .82rem; }

/* Form */
.form-grupo { margin-bottom: 14px; }
.form-grupo label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--texto); }
.form-grupo input, .form-grupo select, .form-grupo textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--borde);
  border-radius: var(--radio-sm); font-size: .92rem; font-family: inherit;
  outline: none; transition: border .2s; background: #fff;
}
.form-grupo input:focus, .form-grupo select:focus, .form-grupo textarea:focus { border-color: var(--rosa); }
.form-grupo textarea { resize: vertical; min-height: 60px; }

/* Ubicación picker */
.ubicacion-picker { margin-bottom: 14px; }
.separador { text-align: center; color: var(--texto-suave); font-size: .82rem; margin: 14px 0; position: relative; }
.separador::before, .separador::after { content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--borde); }
.separador::before { left: 0; } .separador::after { right: 0; }

.info-envio { margin: 14px 0; }
.envio-info-box {
  background: var(--rosa-bg); padding: 14px; border-radius: var(--radio-sm);
  font-size: .88rem; color: #6b3a4d;
}
.envio-info-box p { margin-bottom: 4px; }
.envio-info-box .gratis { color: #2e7d32; font-weight: 700; }
.envio-info-box .alerta { color: #a1490e; font-weight: 600; margin-top: 8px; }

/* Seña */
.sena-info { text-align: center; padding: 20px 0; }
.sena-info p { color: var(--texto-suave); margin-bottom: 8px; }
.sena-monto { font-size: 2.2rem; font-weight: 700; color: var(--rosa); margin: 8px 0; }
.sena-nota { font-size: .82rem; }
.sena-datos { background: var(--gris-bg); border-radius: var(--radio-sm); padding: 16px; margin-bottom: 16px; }
.dato { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--borde); font-size: .88rem; }
.dato:last-child { border-bottom: none; }
.dato span { color: var(--texto-suave); min-width: 60px; }
.dato strong { flex: 1; font-weight: 600; word-break: break-all; }
.btn-copiar { background: var(--blanco); border: 1px solid var(--borde); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.check-sena {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px;
  background: #e7f5e8; border-radius: var(--radio-sm); cursor: pointer;
  margin-bottom: 14px; font-size: .9rem;
}
.check-sena input { margin-top: 3px; }
.nota-seguridad { text-align: center; color: var(--texto-suave); font-size: .82rem; margin-top: 10px; }

/* Aviso retiro */
.aviso-retiro {
  background: #e7f5e8; padding: 14px; border-radius: var(--radio-sm);
  font-size: .88rem; color: #1e6b28; margin-bottom: 16px; line-height: 1.5;
}

/* ============ FOOTER ============ */
.site-footer {
  background: #1a1a1a; color: #eee; padding: 26px 20px;
  text-align: center; font-size: .85rem; margin-top: 40px;
}
.footer-links { margin-top: 12px; display: flex; gap: 20px; justify-content: center; }
.footer-links a { color: var(--rosa-soft); text-decoration: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .pedido-layout { grid-template-columns: 1fr; }
  .filtros { position: static; }
  .filtros ul { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
  .filtros li { white-space: nowrap; }
  .info-minimo { display: none; }
  .ubicacion-container { grid-template-columns: 1fr; }
  .top-nav { display: none; }
}
@media (max-width: 560px) {
  .grid-productos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .producto-info { padding: 10px; }
  .producto-info h3 { font-size: .88rem; }
  .producto-info p { font-size: .75rem; }
  .btn-agregar { padding: 6px 10px; font-size: .72rem; }
  #buscador { width: 100%; }
  .carrito-item { grid-template-columns: 1fr auto; gap: 6px; }
  .item-cant { grid-column: 1 / -1; justify-content: flex-end; }
}