:root {
  --primary: #1f4e8c; --accent: #f2a93d; --fondo: #f4f6f9; --texto: #1a2330;
  --header-bg: #ffffff; --header-txt: #1a2330; --nav-bg: #1f4e8c; --nav-txt: #ffffff;
  --footer-bg: #14202f; --footer-txt: #cbd5e1; --body-font: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body-font); background: var(--fondo); color: var(--texto); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
a { color: inherit; }

.hero-cta { display: inline-block; margin-top: 18px; background: var(--accent); color: #fff; padding: 12px 26px; border-radius: 26px; font-weight: 700; text-decoration: none; }
.envio-bar { background: #16a34a; color: #fff; text-align: center; padding: 8px; font-weight: 600; font-size: 13.5px; }
.blk-texto { padding: 24px 18px; }
.blk-cta { color: #fff; text-align: center; padding: 44px 18px; margin: 8px 0; }
.blk-cta h2 { font-family: 'Poppins', sans-serif; margin: 0 0 8px; font-size: 26px; }
.blk-cta p { margin: 0; opacity: .92; }

/* ---------- Header ---------- */
.hdr { background: var(--header-bg); color: var(--header-txt); box-shadow: 0 1px 8px #0000000f; position: sticky; top: 0; z-index: 20; }
.hdr-row { display: flex; align-items: center; gap: 22px; padding: 14px 18px; }
.buscador { flex: 1; display: flex; max-width: 460px; }
.buscador input { flex: 1; padding: 11px 16px; border: 1.5px solid #e2e8f0; border-right: 0; border-radius: 24px 0 0 24px; font-size: 15px; outline: none; }
.buscador input:focus { border-color: var(--primary); }
.buscador button { border: 0; background: var(--primary); color: #fff; padding: 0 22px; border-radius: 0 24px 24px 0; font-weight: 600; cursor: pointer; }
.logo { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 26px; color: var(--primary); letter-spacing: -0.5px; text-decoration: none; white-space: nowrap; }
.hdr-right { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.envio { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #475569; }
.envio b { color: var(--primary); }
.tel { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primary); text-decoration: none; font-size: 14px; }
.cart { position: relative; background: var(--accent); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.cart .badge { position: absolute; top: -4px; right: -4px; background: #e02424; color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

.nav { background: var(--nav-bg); }
.nav-row { display: flex; gap: 6px; }
.nav a { color: var(--nav-txt); text-decoration: none; padding: 12px 18px; font-weight: 600; font-size: 14px; opacity: .92; }
.nav a:hover, .nav a.act { background: #ffffff22; opacity: 1; }
.promo { background: #14385f; color: #fff; text-align: center; padding: 9px; font-size: 13.5px; font-weight: 600; letter-spacing: .3px; }

/* ---------- Hero ---------- */
.hero { color: #fff; padding: 54px 18px; text-align: center; }
.hero h2 { font-family: 'Poppins', sans-serif; margin: 0 0 10px; font-size: clamp(26px, 4vw, 40px); }
.hero p { margin: 0; opacity: .92; font-size: 17px; }

/* ---------- Categorías ---------- */
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 24px 0 6px; }
.cat { flex: 0 0 auto; background: #fff; border: 1px solid #e6ebf1; border-radius: 24px; padding: 9px 18px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.cat.on { background: var(--primary); color: #fff; border-color: var(--primary); }

.sec-title { font-family: 'Poppins', sans-serif; font-size: 22px; margin: 26px 0 6px; }
.estado { padding: 8px 0 14px; color: #64748b; }

/* ---------- Grilla productos ---------- */
.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; padding: 8px 0 70px; }
.card { background: #fff; border: 1px solid #e8ecf1; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 5px; transition: .15s; }
.card:hover { box-shadow: 0 6px 18px #00000012; transform: translateY(-2px); }
.card .foto { height: 120px; background: #f1f5f9; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #cbd5e1; margin-bottom: 4px; }
.card .nom { font-weight: 600; font-size: 14px; min-height: 38px; line-height: 1.3; }
.card .meta { font-size: 12px; color: #94a3b8; }
.card .precio { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 700; color: var(--primary); margin-top: 4px; }
.card .stock { font-size: 11px; color: #16a34a; font-weight: 600; }
.card .stock.no { color: #b91c1c; }
.card button { margin-top: 8px; background: var(--primary); color: #fff; border: 0; border-radius: 8px; padding: 9px; font-weight: 700; cursor: pointer; }
.card button:disabled { background: #cbd5e1; cursor: default; }

/* ---------- Footer ---------- */
.foot { background: var(--footer-bg); color: var(--footer-txt); padding: 34px 0; margin-top: 20px; }
.foot-logo { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px; color: #fff; }
.foot-copy { font-size: 12px; color: #64748b; margin-top: 14px; }

.wsp { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; font-size: 27px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px #0005; text-decoration: none; z-index: 30; }

/* ---------- Carrito ---------- */
.overlay { position: fixed; inset: 0; background: #0007; display: flex; justify-content: flex-end; z-index: 40; }
.overlay.oculto { display: none; }
.carrito { width: 400px; max-width: 94vw; background: #fff; height: 100%; padding: 18px; display: flex; flex-direction: column; }
.carrito-head { display: flex; justify-content: space-between; align-items: center; }
.carrito-head .x { border: 0; background: none; font-size: 20px; cursor: pointer; }
.carrito-items { flex: 1; overflow: auto; margin: 12px 0; }
.citem { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.citem .cn { flex: 1; }
.citem button { border: 1px solid #d1d5db; background: #fff; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; }
.carrito-total { text-align: right; font-size: 17px; margin: 8px 0; }
.form-pedido { display: flex; flex-direction: column; gap: 8px; }
.form-pedido input, .form-pedido textarea { padding: 10px; border: 1px solid #d7dee7; border-radius: 8px; font-size: 14px; font-family: inherit; }
.form-pedido .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.confirmar { background: #16a34a; color: #fff; border: 0; border-radius: 8px; padding: 13px; font-size: 15px; font-weight: 700; cursor: pointer; }
.msg { font-size: 13px; text-align: center; }
.msg.ok { color: #166534; } .msg.err { color: #b91c1c; }

@media (max-width: 780px) {
  .hdr-row { flex-wrap: wrap; }
  .buscador { order: 3; max-width: none; width: 100%; }
  .envio { display: none; }
}
