/* ============================================================
   Abarrotes Don Pepe — hoja de estilo unica
   Tipografias: Space Grotesk (titulares) + Inter (cuerpo),
   servidas por Google Fonts bajo licencia SIL Open Font License 1.1.
   Ilustraciones: originales, propiedad de Abarrotes Don Pepe.
   Marcas de terceros mencionadas = propiedad de sus titulares.
   Mezcla de estilos: Zero Interface/Text-Only (base) + Snug Simple
   (componentes calidos) + Wabi-Sabi (detalles imperfectos).
   ============================================================ */

:root {
  --primary: hsl(301, 68%, 42%);
  --primary-strong: hsl(301, 72%, 33%);
  --primary-soft: hsl(301, 50%, 95%);
  --secondary: hsl(93, 55%, 36%);
  --secondary-strong: hsl(96, 60%, 24%);
  --secondary-soft: hsl(93, 42%, 93%);
  --accent: hsl(159, 80%, 58%);
  --accent-strong: hsl(161, 72%, 28%);
  --bg: hsl(301, 25%, 97%);
  --surface: #ffffff;
  --text: hsl(0, 0%, 10%);
  --muted: hsl(300, 4%, 33%);
  --sand: hsl(37, 38%, 91%);
  --sand-ink: hsl(28, 28%, 26%);
  --asphalt: hsl(30, 7%, 20%);
  --maize: hsl(44, 86%, 54%);
  --line: hsl(301, 16%, 85%);
  --shadow-sm: 0 1px 2px rgba(30, 12, 28, .08);
  --shadow: 0 2px 6px rgba(30, 12, 28, .07), 0 14px 32px rgba(30, 12, 28, .08);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 3px;
  --r-snug: 18px;
  --r-pill: 999px;
  --wrap: 1120px;
  --tap: 44px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(60rem 40rem at 108% -10%, hsla(159, 80%, 58%, .10), transparent 60%),
    radial-gradient(50rem 36rem at -10% 0%, hsla(301, 68%, 55%, .08), transparent 55%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--primary-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; color: var(--text); font-weight: 600; }
h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); letter-spacing: -.015em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.15rem); margin: 0 0 .45em; }
h3 { font-size: 1.22rem; margin: 0 0 .4em; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin: .25rem 0; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; border-radius: 2px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: .75rem; top: -3rem; z-index: 1200;
  background: var(--primary); color: #fff; padding: .55rem .9rem; border-radius: var(--r);
  text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: .75rem; color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(2.4rem, 6vw, 4.2rem) 0; }
.section--tint { background: var(--secondary-soft); }
.section--sand { background: var(--sand); }
.section--primary-soft { background: var(--primary-soft); }
.section__head { max-width: 46rem; margin-bottom: 1.8rem; }
.section__eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary-strong); margin-bottom: .5rem;
  transform: rotate(-1.2deg); /* wabi-sabi: leve desnivel */
}
.section__title { margin-bottom: .35em; }
.section__lead { color: var(--muted); font-size: 1.1rem; margin: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.note { font-size: .92rem; color: var(--muted); }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.16rem; color: var(--sand-ink); }

/* Wabi-sabi: regla dibujada a mano */
.rule {
  height: 10px; border: 0; margin: 2.2rem 0; background-repeat: repeat-x;
  background-position: left center; opacity: .8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='10'%3E%3Cpath d='M0 6 Q 18 1 36 5 T 72 5 T 108 5 T 140 5' fill='none' stroke='%23B422B2' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- Header / navegacion (text-only) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: hsla(301, 30%, 98%, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding: .6rem 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); margin-right: auto; }
.brand__mark { width: 38px; height: 38px; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; line-height: 1; }
.brand__name small { display: block; font-size: .64rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--primary-strong); margin-top: 2px; }

.nav { display: inline-block; }
.nav__list { list-style: none; display: flex; gap: 1.15rem; margin: 0; padding: 0; flex-wrap: wrap; }
.nav__link {
  display: inline-block; text-decoration: none; color: var(--text);
  font-weight: 500; padding: .35rem 0; border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.nav__link:hover { color: var(--primary-strong); border-bottom-color: currentColor; }
.nav__link[aria-current="page"] { color: var(--primary-strong); border-bottom-color: var(--primary); font-weight: 600; }
.nav__toggle {
  display: none; align-items: center; gap: .45rem;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: .5rem .8rem; border-radius: var(--r); cursor: pointer; min-height: var(--tap);
}
.nav__toggle .bars { width: 18px; height: 2px; background: currentColor; position: relative; display: inline-block; }
.nav__toggle .bars::before, .nav__toggle .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav__toggle .bars::before { top: -6px; } .nav__toggle .bars::after { top: 6px; }

/* Buscador global (header) */
.search { display: flex; align-items: stretch; }
.search--header { margin-left: .25rem; }
.search__input {
  font: inherit; font-size: .95rem; padding: .45rem .65rem; min-height: var(--tap);
  border: 1px solid var(--line); border-right: 0; border-radius: var(--r) 0 0 var(--r);
  background: var(--surface); color: var(--text); width: 9.5rem;
}
.search__btn {
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  padding: 0 .7rem; border-radius: 0 var(--r) var(--r) 0; cursor: pointer; min-height: var(--tap);
  display: inline-flex; align-items: center;
}
.search__btn:hover { background: var(--primary-strong); border-color: var(--primary-strong); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: .7rem 1.25rem; border-radius: var(--r-snug); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; min-height: var(--tap); line-height: 1.1;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-strong); color: #fff; }
.btn--wa { background: var(--secondary-strong); color: #fff; }
.btn--wa:hover { background: hsl(96, 62%, 20%); color: #fff; }
.btn--ghost { background: transparent; color: var(--primary-strong); border-color: var(--primary); }
.btn--ghost:hover { background: var(--primary-soft); color: var(--primary-strong); }
.btn--block { display: flex; width: 100%; }
.btn--sm { padding: .5rem .85rem; font-size: .92rem; }

/* Enlace de texto fuerte (estilo text-only) */
.textlink {
  font-family: var(--font-display); font-weight: 600; color: var(--primary-strong);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .22em;
}
.textlink::after { content: " \2192"; text-decoration: none; display: inline-block; }
.linklist { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.linklist li { margin: .35rem 0; break-inside: avoid; }
.linklist a { font-weight: 500; }

/* ---------- Hero / escaparate ---------- */
.hero { padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(2rem, 4vw, 3rem); }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: clamp(1.6rem, 4vw, 2.6rem); align-items: center; }
.hero__intro { max-width: 40rem; }
.hero__kicker {
  font-family: var(--font-display); font-weight: 600; color: var(--primary-strong);
  letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; margin-bottom: .6rem;
}
.hero__intro p { font-size: 1.16rem; color: var(--sand-ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin-top: 1.2rem; }
.hero__showcase { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.showcase__item { margin: 0; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.showcase__item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.showcase__item figcaption { padding: .6rem .75rem; font-size: .92rem; color: var(--muted); }
.showcase__item:first-child { grid-column: 1 / -1; }
.showcase__item:nth-child(2) { transform: rotate(-.8deg); } /* wabi-sabi asimetria */
.showcase__item:nth-child(3) { transform: rotate(.8deg); }

/* ---------- Tarjetas de categoria ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.cat-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .12s ease;
}
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.cat-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--sand); }
.cat-card__body { padding: .85rem 1rem 1.1rem; }
.cat-card__body h3 { margin-bottom: .25em; }
.cat-card__body p { margin: 0; color: var(--muted); font-size: .95rem; }
.cat-card__more { display: inline-block; margin-top: .6rem; font-weight: 600; color: var(--primary-strong); }

/* ---------- Pasos (proceso de compra) ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { counter-increment: step; background: var(--surface); border: 1px solid var(--line); padding: 1.2rem 1.1rem; position: relative; }
.step::before {
  content: counter(step); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  display: inline-flex; width: 2.1rem; height: 2.1rem; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; border-radius: var(--r-pill); margin-bottom: .7rem;
}
.step h3 { margin-bottom: .3em; font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted); font-size: .97rem; }

/* ---------- Precios ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.price-card { background: var(--surface); border: 1px solid var(--line); padding: 1.1rem 1.2rem; }
.price-card h3 { font-size: 1.05rem; margin-bottom: .2em; }
.price-card .price { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: var(--primary-strong); display: block; }
.price-card .unit { color: var(--muted); font-size: .9rem; }

.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); }
table.data caption { text-align: left; color: var(--muted); font-size: .92rem; padding: .5rem 0; }
table.data th, table.data td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); }
table.data th { font-family: var(--font-display); background: var(--secondary-soft); }
table.data td.price-col { font-weight: 600; white-space: nowrap; }

/* ---------- Catalogo ---------- */
.catalog-controls {
  display: grid; gap: .8rem; grid-template-columns: 1fr; margin-bottom: 1.4rem;
  background: var(--surface); border: 1px solid var(--line); padding: 1rem; border-radius: var(--r);
}
.control { display: flex; flex-direction: column; gap: .3rem; }
.control label { font-weight: 600; font-size: .9rem; }
.control input, .control select {
  font: inherit; padding: .55rem .65rem; min-height: var(--tap);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text);
}
.catalog-meta { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.product { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-sm); }
.product__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sand); }
.product__body { padding: .9rem 1rem .4rem; flex: 1; }
.product__cat { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-strong); font-weight: 600; margin: 0 0 .25rem; }
.product__name { font-size: 1.08rem; margin: 0 0 .3rem; }
.product__desc { margin: 0; color: var(--muted); font-size: .93rem; }
.product__foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 1rem 1rem; }
.product__price { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--text); }
.product__price .cur { font-size: .85rem; color: var(--muted); font-weight: 600; }
.tag { display: inline-block; font-size: .76rem; font-weight: 600; padding: .15rem .5rem; border-radius: var(--r-pill); }
.tag--ok { background: var(--secondary-soft); color: var(--secondary-strong); }
.catalog-empty { background: var(--sand); border: 1px dashed var(--primary); padding: 1.2rem; text-align: center; }

/* ---------- Valores / nosotros ---------- */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; }
.value { background: var(--surface); border: 1px solid var(--line); padding: 1.2rem; border-radius: var(--r); }
.value .ico { width: 2.4rem; height: 2.4rem; color: var(--primary); margin-bottom: .5rem; }
.value h3 { font-size: 1.1rem; }
.value p { margin: 0; color: var(--muted); font-size: .96rem; }
.split { display: grid; grid-template-columns: 1fr; gap: 1.6rem; align-items: center; }
.split img { border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ---------- Blog ---------- */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-sm); }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; }
.post-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.post-card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--primary-strong); text-decoration: underline; }
.post-card p { color: var(--muted); font-size: .96rem; flex: 1; }
.article { max-width: 46rem; margin-inline: auto; }
.article__meta { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.article figure { margin: 1.5rem 0; }
.article figure img { width: 100%; border: 1px solid var(--line); }
.article figcaption { font-size: .88rem; color: var(--muted); margin-top: .4rem; }
.article h2 { margin-top: 1.6rem; }

/* ---------- Galeria + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.gallery__item { margin: 0; }
.gallery__btn { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: var(--surface); cursor: zoom-in; overflow: hidden; }
.gallery__btn img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; transition: transform .2s ease; }
.gallery__btn:hover img { transform: scale(1.04); }
.gallery__item figcaption { font-size: .86rem; color: var(--muted); margin-top: .35rem; }
.lightbox {
  position: fixed; inset: 0; z-index: 1400; display: none; align-items: center; justify-content: center;
  background: rgba(20, 8, 18, .86); padding: 1.2rem;
}
.lightbox.is-open { display: flex; }
.lightbox__fig { margin: 0; max-width: min(92vw, 1000px); text-align: center; }
.lightbox__img { max-height: 78vh; width: auto; margin-inline: auto; border: 3px solid #fff; }
.lightbox__cap { color: #fff; margin-top: .7rem; font-size: .95rem; }
.lightbox__close, .lightbox__nav {
  position: absolute; top: 1rem; right: 1rem; width: 2.8rem; height: 2.8rem;
  background: #fff; color: var(--text); border: 0; border-radius: var(--r-pill);
  font-size: 1.4rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 1rem; right: auto; }
.lightbox__nav--next { right: 1rem; }

/* ---------- FAQ (acordeon) ---------- */
.faq { max-width: 50rem; }
.faq__item { border: 1px solid var(--line); background: var(--surface); margin-bottom: .6rem; }
.faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text);
  padding: 1rem 1.1rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: var(--tap);
}
.faq__q .chev { transition: transform .2s ease; color: var(--primary-strong); flex: none; }
.faq__q[aria-expanded="true"] .chev { transform: rotate(180deg); }
.faq__a { padding: 0 1.1rem; max-height: 0; overflow: hidden; }
.faq__a > div { padding-bottom: 1.1rem; color: var(--muted); }
.faq__item.is-open .faq__a { max-height: 600px; }

/* ---------- Formulario de contacto ---------- */
.form { max-width: 38rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.field label { font-weight: 600; }
.field input, .field textarea {
  font: inherit; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--text); min-height: var(--tap);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:invalid, .field textarea:invalid { box-shadow: none; }
.field.has-error input, .field.has-error textarea { border-color: #b00020; }
.field__error { color: #b00020; font-size: .88rem; min-height: 1em; }
.form-status { margin-top: .8rem; font-weight: 600; }
.form-status.ok { color: var(--secondary-strong); }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 1.8rem; }
.contact-info dl { margin: 0; }
.contact-info dt { font-family: var(--font-display); font-weight: 600; margin-top: .9rem; color: var(--primary-strong); }
.contact-info dd { margin: 0; }
.map-embed { border: 1px solid var(--line); width: 100%; aspect-ratio: 16 / 10; background: var(--sand); }

/* ---------- Footer ---------- */
.site-footer { background: var(--asphalt); color: hsl(40, 20%, 90%); margin-top: 2rem; padding: 2.6rem 0 1.4rem; }
.site-footer a { color: hsl(159, 60%, 72%); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
.footer-col h3 { color: #fff; font-size: 1.02rem; margin-bottom: .6rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: .3rem 0; }
.footer-col p { margin: .2rem 0; color: hsl(40, 16%, 82%); font-size: .95rem; }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__name small { color: hsl(159, 55%, 70%); }
.footer-social { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.social {
  display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem;
  background: hsla(0, 0%, 100%, .08); border: 1px solid hsla(0, 0%, 100%, .18); border-radius: var(--r-snug);
  color: hsl(40, 20%, 92%);
}
.social:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.social svg { width: 1.2rem; height: 1.2rem; }
.footer-bottom { border-top: 1px solid hsla(0, 0%, 100%, .14); margin-top: 1.8rem; padding-top: 1.1rem; font-size: .9rem; color: hsl(40, 14%, 78%); display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: space-between; }

/* ---------- Botones flotantes (snug) ---------- */
.fab-group { position: fixed; right: 1rem; bottom: 1rem; z-index: 1100; display: flex; flex-direction: column; gap: .6rem; }
.fab {
  width: 3.4rem; height: 3.4rem; border-radius: var(--r-pill); border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: var(--shadow); text-decoration: none;
}
.fab svg { width: 1.7rem; height: 1.7rem; }
.fab--wa { background: #1faa54; }
.fab--wa:hover { background: #17863f; color: #fff; }
.fab--tel { background: var(--primary); }
.fab--tel:hover { background: var(--primary-strong); color: #fff; }
.fab--chat { background: var(--asphalt); }
.fab--chat:hover { background: #000; color: #fff; }

/* ---------- Chat / asistente (snug) ---------- */
.chat-panel {
  position: fixed; right: 1rem; bottom: 5.4rem; z-index: 1150; width: min(92vw, 340px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-snug);
  box-shadow: var(--shadow); overflow: hidden; display: none; flex-direction: column; max-height: 72vh;
}
.chat-panel.is-open { display: flex; }
.chat-head { background: var(--primary); color: #fff; padding: .9rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.chat-head strong { font-family: var(--font-display); }
.chat-head small { display: block; font-weight: 400; opacity: .9; font-size: .8rem; }
.chat-close { background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.chat-body { padding: 1rem; overflow-y: auto; }
.chat-msg { background: var(--secondary-soft); border-radius: var(--r-snug) var(--r-snug) var(--r-snug) 4px; padding: .7rem .85rem; margin-bottom: .8rem; font-size: .95rem; }
.chat-q { display: block; width: 100%; text-align: left; margin: .35rem 0; padding: .55rem .75rem; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-snug); cursor: pointer; font: inherit; font-size: .92rem; color: var(--text); }
.chat-q:hover { border-color: var(--primary); color: var(--primary-strong); }
.chat-a { font-size: .95rem; background: var(--primary-soft); border-radius: var(--r-snug); padding: .7rem .85rem; margin: .4rem 0 .8rem; }
.chat-foot { padding: .8rem 1rem; border-top: 1px solid var(--line); }

/* ---------- Cookie consent (snug) ---------- */
.cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1300; max-width: 40rem; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-snug);
  box-shadow: var(--shadow); padding: 1rem 1.1rem; display: none;
}
.cookie.is-open { display: block; }
.cookie p { margin: 0 0 .7rem; font-size: .95rem; }
.cookie__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: clamp(3rem, 10vw, 6rem) 0; }
.error-page .code { font-family: var(--font-display); font-size: clamp(4rem, 16vw, 8rem); color: var(--primary); line-height: 1; margin: 0; }

/* ---------- Hero media card helper ---------- */
.media-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.media-card img { width: 100%; object-fit: cover; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { order: 5; width: 100%; }
  .nav__list { display: none; flex-direction: column; gap: 0; padding: .4rem 0; }
  .nav.is-open .nav__list { display: flex; }
  .nav__link { padding: .7rem .2rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link[aria-current="page"] { border-bottom-color: var(--primary); }
  .nav__toggle { display: inline-flex; }
  .search--header { order: 4; }
  .search__input { width: 100%; }
  .search--header { flex: 1; min-width: 60%; }
}
@media (min-width: 720px) {
  .hero__showcase { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1.1fr 1fr; }
  .contact-grid { grid-template-columns: 1.05fr 1fr; }
  .catalog-controls { grid-template-columns: 2fr 1fr 1fr 1fr; align-items: end; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; }
  .hero__showcase .showcase__item:first-child { grid-column: 1 / -1; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .section__eyebrow, .showcase__item:nth-child(2), .showcase__item:nth-child(3) { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .fab-group, .chat-panel, .cookie, .site-header .nav__toggle, .search { display: none !important; }
  body { background: #fff; }
}
