/* =========================================
   CROQUETERÍA HUELLITA — Estilos (demo de Isekai Web)
   ========================================= */
:root {
  --bg: #F6F7F2;
  --surface: #FFFFFF;
  --ink: #1D2A30;
  --muted: #55636A;
  --line: #E1E5DD;
  --brand: #0F4C5C;       /* verde petróleo */
  --brand-dark: #0A3642;
  --accent: #F28C28;      /* naranja */
  --accent-ink: #8A4300;  /* naranja oscuro para texto legible */
  --soft: #FFF1E2;
  --whatsapp: #1B8A4C;

  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(15, 76, 92, .08);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; }
p { margin: 0; }
.container { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.eyebrow { font-weight: 800; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.section-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(32px, 4vw, 46px); font-weight: 800; color: var(--brand-dark); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); box-shadow: 0 6px 16px rgba(15, 76, 92, .25); }
.btn--ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn--ghost:hover { background: var(--brand); color: #fff; }
.btn--whatsapp { background: var(--whatsapp); color: #fff; width: 100%; }
.btn--whatsapp:hover { background: #156E3C; }
.btn svg, .cart-btn svg, .icon-btn svg, .perks svg, .search svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none;
}

/* ---------- Barra de demo ---------- */
.demo-bar { background: var(--brand-dark); color: #E6F0F2; font-size: 14px; text-align: center; padding: 8px 20px; }
.demo-bar a { color: #FFD3A6; font-weight: 700; }

/* ---------- Encabezado ---------- */
.header { position: sticky; top: 0; z-index: 40; background: rgba(246, 247, 242, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-dark); font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.brand strong { font-weight: 800; color: var(--accent-ink); }
.brand img { transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-15deg) scale(1.1); }
.nav { display: flex; gap: 28px; font-weight: 700; }
.nav a { text-decoration: none; color: var(--ink); }
.nav a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }

.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 0;
  background: var(--accent); color: #2B1500; font: inherit; font-weight: 800; cursor: pointer;
  transition: transform .15s ease;
}
.cart-btn:hover { transform: translateY(-2px); }
.cart-btn__count {
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
  background: var(--brand-dark); color: #fff; font-size: 14px; display: inline-flex; align-items: center; justify-content: center;
}
.cart-btn__count.is-bump { animation: bump .4s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---------- Hero ---------- */
.hero { padding-block: 64px 72px; }
.hero__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.hero__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(42px, 6vw, 72px); font-weight: 800; color: var(--brand-dark); }
.hero h1 span { color: var(--accent-ink); }
.lead { font-size: 19px; color: var(--muted); max-width: 520px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.perks { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 700; font-size: 15px; color: var(--brand-dark); }
.perks li { display: flex; align-items: center; gap: 8px; }
.perks svg { color: var(--accent-ink); }

.hero__art { flex: 1 1 340px; min-width: 0; position: relative; height: 340px; }
.hero__art::before {
  content: ""; position: absolute; inset: 8% 6%; border-radius: 50%;
  background: var(--soft); border: 2px dashed #F6C18E;
}
.hero__bag { position: absolute; filter: drop-shadow(0 10px 18px rgba(15, 76, 92, .18)); }
.hero__bag--1 { width: 56%; left: 8%; top: 6%; animation: bob 5s ease-in-out infinite; }
.hero__bag--2 { width: 46%; right: 6%; top: 26%; animation: bob 5s ease-in-out -1.6s infinite; }
.hero__bag--3 { width: 30%; left: 38%; bottom: 0; animation: bob 5s ease-in-out -3.2s infinite; }
@keyframes bob { 50% { transform: translateY(-12px) rotate(-3deg); } }

/* ---------- Catálogo ---------- */
.catalog { padding-block: 72px; background: var(--surface); border-block: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 16px; }
.filters__group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-weight: 700; font-size: 15px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px; min-height: 48px;
  padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--bg); color: var(--muted);
}
.search:focus-within { border-color: var(--brand); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink); padding: 10px 0; }
.search input:focus { outline: none; }
.results { color: var(--muted); font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--bg); border-radius: var(--radius); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: pop-in .4s ease both;
}
.product:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15, 76, 92, .14); }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px); } }
.product__img { background: var(--soft); padding: 18px; display: flex; justify-content: center; }
.product__img img { width: 150px; height: 150px; transition: transform .3s ease; }
.product:hover .product__img img { transform: scale(1.06) rotate(-2deg); }
.product__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: #EEF1EA; color: var(--muted); }
.tag--perro { background: #FFE7CF; color: var(--accent-ink); }
.tag--gato { background: #ECE5FA; color: #4E3591; }
.product__line { font-size: 14px; font-weight: 800; color: var(--muted); }
.product__name { font-size: 22px; font-weight: 700; color: var(--brand-dark); }
.product__desc { font-size: 15px; color: var(--muted); }
.product__buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.product__size select {
  min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--bg); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer;
}
.product__price { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--brand-dark); }
.product__add { width: 100%; }
.product__add.is-added { animation: added .5s ease; }
@keyframes added { 30% { transform: scale(.94); background: var(--whatsapp); } }

/* ---------- Cómo pedir ---------- */
.how { padding-block: 72px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.steps__num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #2B1500;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center;
}
.steps h3 { font-size: 24px; color: var(--brand-dark); }
.steps p { color: var(--muted); }

/* ---------- Preguntas ---------- */
.faq { padding-block: 0 72px; }
.faq__inner { max-width: 820px; }
.faq__list { display: flex; flex-direction: column; gap: 10px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
summary { cursor: pointer; font-weight: 800; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent-ink); transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 16px; color: var(--muted); }

/* ---------- Ubicación ---------- */
.visit { background: var(--brand-dark); color: #E6F0F2; padding-block: 72px; }
.visit__inner { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.visit__inner > div:first-child { flex: 1 1 360px; display: flex; flex-direction: column; gap: 12px; }
.visit .eyebrow { color: #FFC488; }
.visit h2 { font-size: clamp(30px, 4vw, 42px); color: #fff; }
.visit__list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.visit__map {
  flex: 1 1 360px; min-height: 240px; border-radius: var(--radius); border: 2px dashed #5C8C98;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #B9D3D9;
}

.footer { padding-block: 24px; font-size: 14px; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- Carrito (panel lateral) ---------- */
.cart {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(440px, 100vw); max-width: 100vw;
  border: 0; padding: 0; background: var(--surface); color: var(--ink);
  display: none; flex-direction: column;
}
.cart[open] { display: flex; animation: slide-in .3s cubic-bezier(.2, .8, .2, 1); }
.cart::backdrop { background: rgba(10, 54, 66, .45); }
@keyframes slide-in { from { transform: translateX(100%); } }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart__head h2 { font-size: 28px; color: var(--brand-dark); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--line); }
.cart__items { list-style: none; margin: 0; padding: 8px 20px; overflow-y: auto; flex: 1 1 auto; min-height: 80px; }
.cart__empty { padding: 32px 20px; color: var(--muted); text-align: center; flex: 1; }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "img info total" "img qty qty"; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { grid-area: img; background: var(--soft); border-radius: 12px; padding: 4px; }
.cart-item__info { grid-area: info; min-width: 0; }
.cart-item__name { font-weight: 800; font-size: 15px; line-height: 1.3; }
.cart-item__meta { font-size: 14px; color: var(--muted); }
.cart-item__total { grid-area: total; font-weight: 800; }
.qty { grid-area: qty; display: inline-flex; align-items: center; gap: 4px; justify-self: start; border: 2px solid var(--line); border-radius: 999px; }
.qty__btn { width: 44px; height: 40px; border: 0; background: transparent; font: inherit; font-size: 20px; font-weight: 800; color: var(--brand); cursor: pointer; border-radius: 999px; }
.qty__btn:hover { background: var(--bg); }
.qty__value { min-width: 24px; text-align: center; font-weight: 800; }

.cart__summary { border-top: 1px solid var(--line); padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 62dvh; }
.cart__summary dl { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cart__summary dl div { display: flex; justify-content: space-between; }
.cart__summary dt { color: var(--muted); }
.cart__summary dd { margin: 0; font-weight: 700; }
.cart__total { font-size: 20px; }
.cart__total dt, .cart__total dd { color: var(--brand-dark); font-weight: 800; }
.cart__hint { font-size: 14px; font-weight: 700; color: var(--accent-ink); }

.order { display: flex; flex-direction: column; gap: 12px; }
.order fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.order legend { font-weight: 800; margin-bottom: 6px; padding: 0; }
.radio { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 15px; }
.radio:has(input:checked) { border-color: var(--brand); background: #E7F0F2; }
.radio input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.order > label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 15px; }
.order input[type="text"] {
  font: inherit; font-size: 16px; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--bg); color: var(--ink);
}
.order input[type="text"]:focus { outline: none; border-color: var(--brand); }
.order input[aria-invalid="true"] { border-color: #C2410C; }
.order__error { color: #B42318; font-weight: 700; font-size: 14px; min-height: 1em; }

/* ---------- Aviso flotante ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: 20px; z-index: 60;
  width: fit-content; max-width: 480px; margin-inline: auto;
  transform: translateY(160%); opacity: 0; visibility: hidden;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, visibility 0s linear .3s;
  background: var(--brand-dark); color: #fff; padding: 12px 20px; border-radius: 16px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2); text-align: center; pointer-events: none;
}
.toast.is-visible { transform: translateY(0); opacity: 1; visibility: visible; transition-delay: 0s; }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  .nav { display: none; }
  .cart-btn__label { display: none; }
  .brand { font-size: 18px; gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .demo-bar { font-size: 13px; }
  .hero { padding-block: 36px 48px; }
  .hero__art { height: 240px; order: -1; flex-basis: 100%; }
  .catalog, .how, .visit { padding-block: 52px; }
  .faq { padding-bottom: 52px; }
  /* En celular cada grupo de filtros es una fila que se desliza de lado */
  .filters__group { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .search { flex: 1 1 100%; min-width: 0; }
  .chip { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
