:root {
  /* PALETA JOIN DATA */
  --primario:#00ACC1;
  --primario-osc:#00889A;
  --secundario:#0C2D48;
  --secundario-claro:#145DA0;
  --bg:#F4FAFC;
  --gris:#4a4a4a;
  --borde:#C8E4EA;
}

/* === RESET === */
*{box-sizing:border-box;margin:0;padding:0;}
body {
  font-family:'Inter',sans-serif;
  background:var(--bg);
  color:var(--secundario);
  line-height:1.4;
}

/* === HEADER === */
header {
  text-align:center;
  padding:24px 10px;
}
header img {
  max-width:220px;
  display:block;
  margin:0 auto 8px;
}
header h2 {
  color:var(--secundario);
  font-size:1.5rem;
  font-weight:700;
}

/* === SECCIONES === */
.view {
  display:none;
  padding:16px;
  animation:fade .25s ease;
}
.view.active { display:block; }

@keyframes fade {
  from{ opacity:.3; transform:translateY(4px); }
  to{ opacity:1; transform:none; }
}

/* === CATÁLOGO === */
.catalogo {
  display:grid;
  gap:16px;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  max-width:1100px;
  margin:0 auto;
}
.card {
  background:#fff;
  border:1px solid var(--borde);
  border-radius:18px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  overflow:hidden;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  transition:transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(0,0,0,.09);
}
.card img {
  width:100%;
  height:260px;
  object-fit:cover;
  object-position:center;
  background:#E8F9FB;
}
.card .body {
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  text-align:center;
  padding:12px 10px 16px;
}
.name {font-weight:700;font-size:.95rem;min-height:40px;color:var(--secundario);}
.price {color:var(--gris);font-size:.9rem;margin:6px 0 12px;}
.btn-add {
  width:100%;
  padding:10px;
  border:none;
  border-radius:10px;
  background:var(--primario);
  color:#fff;
  font-weight:700;
  cursor:pointer;
  transition:background .2s ease;
}
.btn-add:hover{background:var(--primario-osc);}

/* === BOTÓN FLOTANTE (FAB) === */
.cart-fab {
  position:fixed;
  right:16px;
  bottom:16px;
  background:var(--primario);
  color:#fff;
  border:none;
  border-radius:9999px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
  box-shadow:0 10px 24px rgba(0,0,0,.15);
  z-index:900;
}
#cartCount {
  background:#fff;
  color:var(--primario);
  border-radius:999px;
  padding:2px 8px;
  font-weight:800;
  min-width:24px;
  text-align:center;
}

/* === DRAWER CARRITO === */
.drawer {
  position:fixed;
  top:0;
  right:0;
  height:100vh;
  width:380px;
  max-width:92vw;
  background:#fff;
  border-left:2px solid var(--borde);
  box-shadow:-10px 0 30px rgba(0,0,0,.15);
  transform:translateX(100%);
  transition:transform .25s ease;
  z-index:1000;
  display:flex;
  flex-direction:column;
}
.drawer.open { transform:translateX(0); }

.drawer-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  border-bottom:1px solid var(--borde);
  background:#e2f4f8;
}
.drawer-header strong {
  color:var(--secundario);
  font-size:1.1rem;
}
.icon-btn {
  background:#f3f3f3;
  border:1px solid #ddd;
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
}

.drawer-body {
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  height:100%;
}
.cart-list {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:auto;
}
.cart-item {
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center;
  border:1px solid var(--borde);
  border-radius:12px;
  padding:10px;
}
.cart-item .name {
  font-weight:700;
  color:var(--secundario);
}
.qty {
  display:flex;
  align-items:center;
  gap:6px;
  border:1px solid #ddd;
  border-radius:10px;
  padding:4px 6px;
}
.qty button {
  border:none;
  background:#f3f3f3;
  padding:4px 8px;
  border-radius:8px;
  cursor:pointer;
  font-weight:800;
}
.qty button:hover {
  background:#d8faff;
}

.drawer-footer {
  margin-top:auto;
  border-top:1px solid var(--borde);
  padding-top:10px;
}
.subtotal {
  font-weight:800;
  margin-bottom:10px;
  color:var(--secundario);
}
.drawer-actions {
  display:flex;
  gap:8px;
}
.btn-outline {
  background:#fff;
  border:1px solid var(--primario);
  color:var(--primario);
  border-radius:10px;
  padding:10px 12px;
  font-weight:700;
  cursor:pointer;
  width:50%;
  text-align:center;
}
.btn-outline:hover {
  background:var(--primario);
  color:#fff;
}
.btn-primary {
  background:var(--primario);
  color:#fff;
  border:none;
  border-radius:10px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
  width:50%;
  text-align:center;
}
.btn-primary:hover {
  background:var(--primario-osc);
}

/* === FORMULARIO === */
form {
  background:#fff;
  border:1px solid var(--borde);
  border-radius:20px;
  max-width:800px;
  margin:20px auto;
  padding:28px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}
h3 {
  border-bottom:2px solid var(--primario);
  padding-bottom:6px;
  margin:20px 0 16px;
  color:var(--secundario);
  font-weight:700;
}
label {
  font-weight:600;
  color:var(--secundario);
}
input, select, textarea {
  width:100%;
  padding:10px 14px;
  border:1px solid #c7dfe6;
  border-radius:10px;
  font-size:.95rem;
  background:#fff;
  transition:border-color .25s ease, box-shadow .25s ease;
}
input:focus, select:focus, textarea:focus {
  border-color:var(--primario);
  box-shadow:0 0 0 3px rgba(0,172,193,0.25);
  outline:none;
}
textarea {
  min-height:90px;
  resize:vertical;
}
.grid {
  display:grid;
  gap:16px;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}
.pedido-summary {
  background:#e2f7fa;
  border:1px solid var(--borde);
  border-radius:12px;
  padding:10px 16px;
  margin-bottom:16px;
  font-weight:600;
  color:var(--secundario-claro);
}
.actions {
  display:flex;
  justify-content:space-between;
  margin-top:20px;
  gap:12px;
}

/* WhatsApp y Wompi mantienen sus colores oficiales */
#btnPagarWompi { background:#2a8ef8; color:#fff; }
#btnPagarWompi:hover { background:#1b6fd1; }

#btnConfirmarWhatsapp { background:#25D366; color:#fff; border:none; }
#btnConfirmarWhatsapp:hover { background:#1da851; }

/* === RESPONSIVE === */
@media (max-width: 1199px) {
  .catalogo {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}
