/* ============================================================
   LA BODEGA MODERNA — Estilo EDEKA (claro, luminoso, elegante)
   Amarillo + azul · fondo blanco · fotos grandes lifestyle
   ============================================================ */
:root {
  --yellow:   #ffd200;
  --yellow-d: #f5c400;
  --blue:     #0b4f9e;
  --blue-d:   #073b78;
  --blue-l:   #1e6fd0;
  --bg:       #f3f5f7;
  --card:     #ffffff;
  --text:     #1a1d21;
  --muted:    #687480;
  --line:     #e3e7ec;
  --green:    #1a8f4c;
  --red:      #c0392b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
button { cursor: pointer; font-family: inherit; transition: filter .15s, transform .1s, box-shadow .2s; }
button:active { transform: translateY(1px); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
img { display: block; }

.section-title {
  max-width: 1200px; margin: 26px auto 6px; padding: 0 18px;
  font-size: 22px; font-weight: 800; color: var(--blue-d); letter-spacing: .2px;
}

/* ===== Topbar ===== */
.topbar {
  background: var(--card); color: var(--text);
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 10px rgba(11,79,158,0.08); border-bottom: 3px solid var(--yellow);
}
.brand { display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.logo-box {
  background: var(--yellow); color: var(--blue-d);
  font-weight: 900; font-size: 16px; letter-spacing: .3px;
  padding: 6px 12px; border-radius: 10px; line-height: 1;
  box-shadow: 0 2px 6px rgba(245,196,0,0.45); white-space: nowrap;
}
.brand-loc { font-size: 11px; color: var(--blue); font-weight: 600; padding-left: 2px; }
.search { flex: 1; display: flex; max-width: 720px; }
.search input {
  flex: 1; border: 2px solid var(--line); border-right: none;
  background: #fff; color: var(--text);
  border-radius: 10px 0 0 10px; padding: 10px 14px; font-size: 15px; outline: none;
  transition: border-color .2s;
}
.search input:focus { border-color: var(--blue-l); }
.search button {
  background: var(--blue); border: 2px solid var(--blue); color: #fff;
  border-radius: 0 10px 10px 0; padding: 0 16px; font-size: 17px;
}
.search button:hover { filter: brightness(1.08); }
.cart-btn {
  background: var(--blue); border: none; color: #fff; position: relative;
  font-size: 14px; display: flex; align-items: center; gap: 6px; font-weight: 700;
  padding: 10px 14px; border-radius: 10px;
}
.cart-btn:hover { filter: brightness(1.08); }
.account-btn {
  background: #fff; border: 2px solid var(--blue); color: var(--blue);
  font-weight: 700; border-radius: 10px; padding: 9px 12px;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.account-btn:hover { background: var(--blue); color: #fff; }
.acc-label { display: none; }
@media (min-width: 640px) { .acc-label { display: inline; } }

.auth-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.btn-register { background: var(--yellow); color: var(--blue-d); border: none; border-radius: 26px; padding: 13px; font-weight: 800; font-size: 15px; }
.btn-register:hover { filter: brightness(1.04); }
.btn-login { background: var(--blue); color: #fff; border: none; border-radius: 26px; padding: 13px; font-weight: 700; font-size: 14px; }
.btn-login:hover { filter: brightness(1.08); }
.btn-logout { width: 100%; background: #687480; color: #fff; border: none; border-radius: 26px; padding: 13px; font-weight: 700; font-size: 14px; margin-top: 6px; }
.loyalty-box { background: #fff7d6; border: 1px solid #ffe066; border-radius: 12px; padding: 14px; margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--text); }

.cart-label { display: none; }
.cart-count {
  background: var(--yellow); color: var(--blue-d); border-radius: 50%;
  min-width: 20px; height: 20px; display: grid; place-items: center;
  font-size: 12px; font-weight: 900; padding: 0 5px;
}
@media (min-width: 640px) { .cart-label { display: inline; } }

/* ===== Category nav ===== */
.catnav {
  background: var(--card); display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 16px; position: sticky; top: 64px; z-index: 19;
  border-bottom: 1px solid var(--line);
}
.catnav::-webkit-scrollbar { display: none; }
.cat-chip {
  background: #fff; color: var(--blue-d); border: 2px solid var(--line);
  border-radius: 22px; padding: 7px 16px; white-space: nowrap; font-size: 13px; font-weight: 700;
}
.cat-chip:hover { border-color: var(--blue-l); }
.cat-chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ===== Hero (foto grande estilo EDEKA) ===== */
.hero {
  position: relative; max-width: 1200px; margin: 16px auto 0; padding: 0 18px;
}
.hero-img {
  width: 100%; height: 340px; object-fit: cover; border-radius: 20px;
  box-shadow: 0 14px 36px rgba(11,79,158,0.18);
}
.hero-overlay {
  position: absolute; inset: 0 18px; border-radius: 20px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 30px 34px; color: #fff;
  background: linear-gradient(90deg, rgba(7,40,80,0.82) 0%, rgba(7,40,80,0.5) 45%, rgba(7,40,80,0.05) 100%);
}
.hero-kicker {
  display: inline-block; background: var(--yellow); color: var(--blue-d);
  font-weight: 800; font-size: 12px; padding: 5px 12px; border-radius: 20px; width: max-content;
}
.hero-overlay h1 { margin: 12px 0 6px; font-size: 34px; font-weight: 900; max-width: 520px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero-overlay p { margin: 0 0 18px; font-size: 15px; max-width: 440px; color: #eaf1fb; }
.hero-overlay b { color: var(--yellow); }
.hero-cta {
  background: var(--yellow); color: var(--blue-d); text-decoration: none;
  font-weight: 800; font-size: 15px; padding: 12px 26px; border-radius: 26px; width: max-content;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
.hero-cta:hover { filter: brightness(1.05); }
@media (max-width: 640px) {
  .hero-img { height: 280px; }
  .hero-overlay { padding: 22px; background: linear-gradient(0deg, rgba(7,40,80,0.9) 0%, rgba(7,40,80,0.45) 60%, rgba(7,40,80,0.15) 100%); justify-content: flex-end; }
  .hero-overlay h1 { font-size: 26px; }
}

/* ===== Barra de contacto ===== */
.promo-bar { max-width: 1200px; margin: 18px auto 0; padding: 0 18px; }
.contact-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cbtn {
  text-decoration: none; color: #fff; font-weight: 700; font-size: 14px;
  padding: 11px 20px; border-radius: 26px; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12); transition: transform .12s, filter .2s;
}
.cbtn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.cbtn.wa { background: #25d366; }
.cbtn.ig { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.cbtn.tel { background: var(--blue); }
.install-btn {
  margin: 16px auto 0; display: block; background: var(--yellow); color: var(--blue-d); border: none;
  border-radius: 26px; padding: 13px 24px; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 14px rgba(245,196,0,.5);
}
.install-btn:hover { filter: brightness(1.05); }

/* ===== Banda de fidelidad ===== */
.loyalty-band {
  max-width: 1200px; margin: 20px auto 0; padding: 16px 22px;
  background: linear-gradient(90deg, var(--yellow), #ffe066);
  border-radius: 16px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 6px 18px rgba(245,196,0,.3);
}
.loyalty-band .loyalty-emoji { font-size: 34px; }
.loyalty-band b { color: var(--blue-d); }
.loyalty-band .muted { color: #7a6a12; display: block; margin-top: 2px; }
@media (max-width: 1240px) { .loyalty-band { margin: 20px 18px 0; } }

/* ===== Inspiración ===== */
.inspo { max-width: 1200px; margin: 0 auto; }
.inspo-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; padding: 8px 18px 0;
}
.inspo-card {
  position: relative; border-radius: 18px; overflow: hidden; cursor: default;
  box-shadow: 0 8px 22px rgba(11,79,158,0.12); transition: transform .18s, box-shadow .2s;
}
.inspo-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(11,79,158,0.22); }
.inspo-card img { width: 100%; height: 170px; object-fit: cover; }
.inspo-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px;
  background: linear-gradient(0deg, rgba(7,40,80,0.85), transparent); color: #fff;
}
.inspo-cap b { display: block; font-size: 16px; }
.inspo-cap span { font-size: 12px; color: #dbe6f5; }

/* ===== Catálogo ===== */
.catalog-title { margin-top: 28px; }
.catalog {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px; padding: 10px 18px 8px; max-width: 1200px; margin: 0 auto;
}
.cat-title {
  grid-column: 1/-1; font-size: 18px; font-weight: 800; color: var(--blue-d);
  margin: 12px 4px 0; display: flex; align-items: center; gap: 8px;
}
.cat-title::before { content: ""; width: 7px; height: 20px; border-radius: 4px; background: var(--yellow); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px;
  display: flex; flex-direction: column; box-shadow: 0 4px 14px rgba(11,79,158,0.07);
  transition: transform .16s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(11,79,158,0.16); border-color: #d7e3f3; }
.card-img {
  height: 150px; display: flex; align-items: center; justify-content: center;
  font-size: 56px; line-height: 1; overflow: hidden; padding: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px;
}
.card-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card-name { font-size: 14px; font-weight: 700; line-height: 1.3; min-height: 36px; }
.card-desc { font-size: 12px; color: var(--muted); margin: 2px 0 8px; min-height: 16px; }
.card-price { font-size: 20px; font-weight: 900; color: var(--blue-d); }
.card-price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.add-btn {
  margin-top: 11px; background: var(--yellow); border: 1px solid var(--yellow-d); color: var(--blue-d);
  border-radius: 22px; padding: 10px; font-weight: 800; font-size: 14px;
}
.add-btn:hover { filter: brightness(1.04); }
.in-cart-controls { margin-top: 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qty-btn { background: #eef4fc; border: 1px solid var(--line); color: var(--blue-d); border-radius: 9px; width: 36px; height: 36px; font-size: 18px; font-weight: 800; }
.qty-btn:hover { background: #e1ecfa; }
.qty-num { font-weight: 800; font-size: 15px; min-width: 24px; text-align: center; }
.empty-catalog { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 44px; }

/* ===== Footer ===== */
.footer { background: var(--blue-d); color: #cfe0f5; text-align: center; padding: 34px 16px; margin-top: 28px; font-size: 13px; }
.footer p { margin: 5px 0; }
.footer-brand { font-size: 18px; font-weight: 900; color: var(--yellow); }
.footer-title { font-size: 15px; color: #fff; margin: 18px 0 12px; letter-spacing: .4px; }
.footer .contact-bar { margin: 0 auto 14px; max-width: 520px; }

/* ===== Cart drawer ===== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(7,28,56,.45); z-index: 30; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(410px, 92vw);
  background: #fff; z-index: 31; display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(7,28,56,.28); animation: slidein .2s ease;
}
@keyframes slidein { from { transform: translateX(100%); } to { transform: none; } }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 18px; background: var(--blue); color: #fff; }
.cart-head h2 { margin: 0; font-size: 18px; }
.cart-head button { background: none; border: none; color: #fff; font-size: 20px; }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 18px; }
.cart-row { display: flex; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-row .ci-img { font-size: 30px; width: 44px; text-align: center; }
.cart-row .ci-img img { max-width: 44px; max-height: 44px; object-fit: contain; }
.ci-info { flex: 1; }
.ci-name { font-size: 14px; font-weight: 700; }
.ci-price { font-size: 13px; color: var(--muted); }
.ci-qty { display: flex; align-items: center; gap: 6px; }
.ci-qty button { width: 30px; height: 30px; border: 1px solid var(--line); background: #eef4fc; color: var(--blue-d); border-radius: 7px; font-weight: 800; }
.cart-empty { text-align: center; color: var(--muted); padding: 54px 20px; }
.cart-foot { padding: 18px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 900; margin-bottom: 14px; color: var(--blue-d); }
.checkout-btn, .wa-btn { width: 100%; border: none; border-radius: 26px; padding: 14px; font-size: 16px; font-weight: 800; }
.checkout-btn { background: var(--yellow); color: var(--blue-d); }
.checkout-btn:hover { filter: brightness(1.04); }

/* ===== Checkout modal ===== */
.modal { position: fixed; inset: 0; background: rgba(7,28,56,.55); z-index: 40; display: grid; place-items: center; padding: 14px; overflow-y: auto; }
.checkout-card { background: #fff; border-radius: 18px; width: 100%; max-width: 460px; padding: 20px; box-shadow: 0 20px 60px rgba(7,28,56,.4); }
.checkout-head { display: flex; justify-content: space-between; align-items: center; }
.checkout-head h2 { margin: 0; font-size: 19px; color: var(--blue-d); }
.checkout-head button { background: none; border: none; color: var(--muted); font-size: 20px; }
.checkout-body label { display: block; font-size: 13px; font-weight: 700; margin: 13px 0 5px; }
.checkout-body input, .checkout-body select {
  width: 100%; padding: 12px; border: 2px solid var(--line); border-radius: 10px; font-size: 15px; outline: none; transition: border-color .2s;
}
.checkout-body input:focus, .checkout-body select:focus { border-color: var(--blue-l); }
.pay-options { display: flex; gap: 10px; }
.pay-opt { flex: 1; border: 2px solid var(--line); border-radius: 10px; padding: 12px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.zelle-box { background: #eef4fc; border: 1px solid #cfe0f5; border-radius: 10px; padding: 12px; margin-top: 12px; font-size: 14px; }
.zelle-box b { color: var(--blue); }
.order-summary { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 14px; }
.order-summary .os-row { display: flex; justify-content: space-between; padding: 3px 0; }
.order-summary .os-total { font-weight: 900; font-size: 16px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; color: var(--blue-d); }
.wa-btn { background: #25d366; color: #fff; margin-top: 16px; }
.wa-btn:hover { filter: brightness(1.05); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--blue-d); color: #fff; padding: 12px 20px; border-radius: 26px;
  font-size: 14px; font-weight: 700; z-index: 50; box-shadow: 0 8px 24px rgba(7,28,56,.4);
}
