/* Tolimás web — estilos. Paleta de la marca: rojo, amarillo, crema. */
:root {
  --rojo: #b3101e;
  --rojo-osc: #6e0409;
  --rojo-prof: #4d0206;
  --amarillo: #f5b400;
  --amarillo-claro: #ffd54a;
  --crema: #fff7e6;
  --fondo: #fbf6ee;
  --blanco: #fff;
  --texto: #221a17;
  --texto-2: #6b5a52;
  --linea: #ead9c4;
  --verde-wa: #25d366;
  --verde-osc: #128c4a;
  --radio: 16px;
  --sombra: 0 6px 20px rgba(80, 20, 10, .10);
  --fuente: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --titulos: 'Baloo 2', 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--fuente); color: var(--texto); background: var(--fondo); line-height: 1.45; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--rojo); }
h1, h2, h3 { font-family: var(--titulos); line-height: 1.1; margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }
[hidden] { display: none !important; }

/* ── Header ─────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 50; background: var(--rojo); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.top-inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.logo img { height: 56px; width: auto; border-radius: 12px; }
.buscador { display: flex; background: #fff; border-radius: 999px; overflow: hidden; border: 3px solid var(--amarillo); max-width: 620px; width: 100%; }
.buscador input { flex: 1; border: 0; padding: 10px 16px; font-size: 16px; outline: none; min-width: 0; background: transparent; }
.buscador button { border: 0; background: var(--amarillo); padding: 0 16px; font-size: 18px; }
.top-acciones { display: flex; align-items: center; gap: 12px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 13px; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch-pista { width: 40px; height: 22px; background: rgba(255,255,255,.35); border-radius: 999px; position: relative; transition: .2s; }
.switch-pista::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; }
.switch input:checked + .switch-pista { background: var(--amarillo); }
.switch input:checked + .switch-pista::after { left: 20px; background: var(--rojo-osc); }
.btn-carrito { background: var(--amarillo); color: var(--rojo-osc); border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; gap: 6px; }
.carrito-contador { background: var(--rojo-osc); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 13px; padding: 0 6px; }
.cats-barra { background: var(--rojo-osc); display: flex; gap: 4px; overflow-x: auto; padding: 6px 12px; scrollbar-width: none; }
.cats-barra::-webkit-scrollbar { display: none; }
.cats-barra button { flex: 0 0 auto; background: transparent; color: #ffe9b0; border: 0; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.cats-barra button.activa, .cats-barra button:hover { background: var(--amarillo); color: var(--rojo-osc); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 100% at 15% 20%, #a30c18 0%, var(--rojo-osc) 55%, var(--rojo-prof) 100%); color: #fff; }
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ccircle cx='60' cy='60' r='1.5' fill='%23ffffff' fill-opacity='.08'/%3E%3C/svg%3E"); }
.hero-texto { position: relative; max-width: 1240px; margin: 0 auto; padding: 56px 16px 64px; width: 100%; }
.hero-kicker { color: var(--amarillo); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 62px); font-weight: 800; max-width: 11ch; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.hero-sub { font-size: clamp(16px, 1.6vw, 19px); max-width: 520px; margin: 16px 0 24px; color: #ffe9d0; }
.hero-botones { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-mascota { position: absolute; right: 2%; bottom: -8px; width: clamp(220px, 28vw, 380px); pointer-events: none; }
.hero-mascota img { width: 100%; height: auto; -webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 50%, #000 55%, transparent 98%); mask-image: radial-gradient(ellipse 70% 75% at 50% 50%, #000 55%, transparent 98%); filter: drop-shadow(0 20px 30px rgba(0,0,0,.35)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 22px; font-weight: 800; font-size: 15px; border: 2px solid transparent; text-decoration: none; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn-amarillo { background: var(--amarillo); color: var(--rojo-osc); }
.btn-amarillo:hover { filter: brightness(1.05); }
.btn-borde { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-rojo { background: var(--rojo); color: #fff; }
.btn-verde { background: var(--verde-osc); color: #fff; }
.btn-ancho { width: 100%; }

.franja { background: var(--amarillo); color: var(--rojo-osc); display: flex; justify-content: center; gap: 10px 36px; flex-wrap: wrap; padding: 12px 16px; font-size: 14px; }

/* ── Categorías ──────────────────────────────────────────── */
.categorias, .catalogo { max-width: 1240px; margin: 0 auto; padding: 36px 16px 8px; }
.categorias h2, .catalogo h2 { font-size: clamp(24px, 3vw, 32px); color: var(--rojo-osc); }
.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.cat-card { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px 12px; text-align: center; cursor: pointer; transition: transform .12s, box-shadow .12s; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--sombra); border-color: var(--amarillo); }
.cat-card .ico { font-size: 34px; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--crema); }
.cat-card b { font-size: 14px; line-height: 1.2; }
.cat-card small { color: var(--texto-2); font-size: 12px; }

/* ── Catálogo ────────────────────────────────────────────── */
.catalogo-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.catalogo-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.catalogo-filtros select { border: 1px solid var(--linea); background: #fff; border-radius: 10px; padding: 8px 10px; }
.chk { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.resultado { color: var(--texto-2); font-size: 14px; margin: 8px 0 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .12s; position: relative; }
.card:hover { box-shadow: var(--sombra); transform: translateY(-2px); }
.card-foto { aspect-ratio: 1; background: #fff; display: grid; place-items: center; cursor: pointer; overflow: hidden; border-bottom: 1px solid var(--linea); }
.card-foto img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.card-foto.placeholder { background: linear-gradient(160deg, var(--crema), #ffe7b8); flex-direction: column; }
.card-foto.placeholder .ico { font-size: 54px; }
.card-foto.placeholder small { color: var(--texto-2); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-top: 6px; }
.card-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .marca { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rojo); margin: 0; min-height: 14px; }
.card .nombre { font-size: 14px; font-weight: 700; margin: 0; line-height: 1.25; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.card .pres { font-size: 12px; color: var(--texto-2); margin: 0; }
.precio { font-family: var(--titulos); font-size: 20px; font-weight: 800; color: var(--texto); margin: 4px 0 0; }
.precio-neg { font-size: 12px; color: var(--verde-osc); font-weight: 800; margin: 0; }
.precio-neg b { font-size: 14px; }
.etiqueta { position: absolute; top: 8px; left: 8px; background: var(--amarillo); color: var(--rojo-osc); font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.card-acciones { margin-top: auto; padding-top: 8px; }
.btn-agregar { width: 100%; background: var(--rojo); color: #fff; border: 0; border-radius: 10px; padding: 9px; font-weight: 800; font-size: 14px; }
.btn-agregar:hover { background: #d0162a; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--rojo); border-radius: 10px; overflow: hidden; width: 100%; }
.stepper button { border: 0; background: var(--rojo); color: #fff; width: 38px; height: 36px; font-size: 20px; font-weight: 800; }
.stepper span { flex: 1; text-align: center; font-weight: 800; font-size: 16px; }
.mas { text-align: center; padding: 24px 0 40px; }

/* ── Modal / Drawer ──────────────────────────────────────── */
.modal, .drawer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal-fondo { position: absolute; inset: 0; background: rgba(40, 10, 5, .55); backdrop-filter: blur(2px); }
.modal-caja { position: relative; background: #fff; border-radius: 20px; width: min(920px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.modal-x { position: absolute; top: 10px; right: 10px; z-index: 2; border: 0; background: var(--crema); width: 36px; height: 36px; border-radius: 50%; font-weight: 800; font-size: 16px; }
.modal-foto { background: #fff; display: grid; place-items: center; min-height: 320px; border-right: 1px solid var(--linea); }
.modal-foto img { max-height: 440px; object-fit: contain; padding: 20px; }
.modal-foto.placeholder { background: linear-gradient(160deg, var(--crema), #ffe7b8); font-size: 110px; }
.modal-info { padding: 32px 28px 24px; display: flex; flex-direction: column; gap: 8px; }
.modal-info .marca { color: var(--rojo); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; margin: 0; }
.modal-info h3 { font-size: 26px; }
.modal-info .presentacion { color: var(--texto-2); margin: 0; }
.modal-info .precios .precio { font-size: 30px; }
.modal-info .desc { font-size: 14px; color: var(--texto-2); max-height: 150px; overflow: auto; }
.modal-info .mini, .mini { font-size: 12px; color: var(--texto-2); }
.modal-form { display: block; padding: 28px; width: min(480px, calc(100% - 24px)); }
.modal-form h3 { font-size: 24px; color: var(--rojo-osc); }
.modal-form label { display: block; font-weight: 700; font-size: 13px; margin: 12px 0 0; }
.modal-form input, .modal-form textarea { width: 100%; border: 1px solid var(--linea); border-radius: 10px; padding: 10px 12px; margin-top: 4px; font-weight: 400; }
.modal-form .btn { margin-top: 18px; }
.error { color: #b00020; font-weight: 700; font-size: 14px; }

.drawer { place-items: stretch end; }
.drawer-caja { position: relative; margin-left: auto; width: min(440px, 100%); height: 100%; background: #fff; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.3); }
.drawer-cab { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--linea); background: var(--crema); }
.drawer-cab h3 { font-size: 22px; color: var(--rojo-osc); }
.drawer-cab .modal-x { position: static; }
.drawer-items { flex: 1; overflow: auto; padding: 10px 18px; }
.item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.item img, .item .ph { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; border: 1px solid var(--linea); background: #fff; display: grid; place-items: center; font-size: 26px; }
.item .n { font-size: 13px; font-weight: 700; line-height: 1.2; }
.item .p { font-size: 12px; color: var(--texto-2); }
.item .stepper { width: 112px; }
.item .stepper button { width: 32px; height: 30px; font-size: 16px; }
.item .quitar { border: 0; background: none; color: var(--texto-2); font-size: 12px; text-decoration: underline; padding: 0; margin-top: 4px; }
.drawer-pie { padding: 16px 18px; border-top: 1px solid var(--linea); background: var(--crema); }
.drawer-pie .total { display: flex; justify-content: space-between; font-family: var(--titulos); font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.vacio { text-align: center; color: var(--texto-2); padding: 40px 10px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--texto); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 200; box-shadow: var(--sombra); font-size: 14px; }

/* ── Pie ─────────────────────────────────────────────────── */
.pie { background: var(--rojo-prof); color: #ffe9d0; margin-top: 30px; }
.pie-inner { max-width: 1240px; margin: 0 auto; padding: 36px 16px 90px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; font-size: 14px; }
.pie a { color: var(--amarillo); font-weight: 700; }
.pie img { border-radius: 10px; margin-bottom: 10px; }
.pie-mini { font-size: 12px; opacity: .75; }
.wa-flotante { position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; background: var(--verde-wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.3); z-index: 60; }

/* ── Móvil ───────────────────────────────────────────────── */
@media (max-width: 760px) {
  .top-inner { grid-template-columns: auto 1fr; grid-template-rows: auto auto; padding: 8px 12px; gap: 8px; }
  .logo img { height: 44px; }
  .buscador { grid-column: 1 / -1; grid-row: 2; order: 3; }
  .top-acciones { justify-self: end; }
  .switch-texto { display: none; }
  .hero-texto { padding: 32px 16px 40px; }
  .hero h1 { max-width: 12ch; font-size: 36px; }
  .hero-sub { max-width: 60%; font-size: 15px; position: relative; z-index: 1; }
  .hero-botones { position: relative; z-index: 1; flex-direction: column; align-items: flex-start; }
  .hero-mascota { width: 150px; height: 250px; overflow: hidden; right: -4px; bottom: 0; }
  .hero-mascota img { width: 100%; height: auto; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
  .franja { font-size: 12px; gap: 6px 18px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .nombre { font-size: 13px; }
  .precio { font-size: 18px; }
  .modal-caja { grid-template-columns: 1fr; }
  .modal-foto { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--linea); }
  .modal-foto img { max-height: 260px; }
  .modal-info { padding: 20px 18px 24px; }
  .cats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-card { padding: 12px 6px; }
  .cat-card .ico { width: 50px; height: 50px; font-size: 26px; }
  .cat-card small { display: none; }
}
.card-foto, .modal-foto { position: relative; }
.ref { position: absolute; right: 6px; bottom: 6px; background: rgba(255,255,255,.9); color: var(--texto-2); font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px; border: 1px solid var(--linea); }
