/* Supermercado Braga — estilos de la tienda (valores tomados del diseño de Claude Design). */

/* Fuentes propias (licencia SIL OFL, ver /fonts): variables, un archivo para todos los grosores. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/montserrat-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('/fonts/nunito-sans-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --blue: #0b47a0;
  --blue-dark: #08357a;
  --navy: #10213f;
  --muted: #5a6b8c;
  --bg: #f4f6fa;
  --line: #e1e7f2;
  --line-strong: #d3dceb;
  --img-bg: #f2f5fb;
  --red: #d72638;
  --yellow: #ffc72c;
  --green: #25d366;
  --green-dark: #1da851;
  --hero-text: #e3ecfa;
  --footer-text: #c9d8f2;
  --font-display: Montserrat, system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
  --header-h: 82px;
}

*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* El scroll a las anclas lo anima site.js; esto deja lugar al header si se salta sin JS. */
html { scroll-padding-top: calc(var(--header-h) + 8px); }
html:has(dialog[open]) { overflow: hidden; }
/* Las secciones reciben el foco al llegar por un ancla (como un link común), sin recuadro. */
[tabindex='-1']:focus { outline: none; }
/* Entrada suave del título de la sección a la que se llegó. */
.is-landed { animation: landed .55s cubic-bezier(.2, .7, .2, 1); }
@keyframes landed { from { opacity: .3; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .is-landed { animation: none; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.sr-only {
  position: absolute; 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: 16px; top: -60px; z-index: 100;
  background: var(--yellow); color: var(--navy); padding: 10px 16px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 800;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 12px; border: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.2;
  text-decoration: none; transition: filter .15s, background-color .15s, color .15s;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn--block { width: 100%; }
.btn--yellow { background: var(--yellow); color: var(--navy); }
.btn--yellow:hover { color: var(--navy); }
.btn--outline-light {
  background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .6);
  padding: 13px 24px; font-weight: 700;
}
.btn--outline-light:hover { color: #fff; border-color: #fff; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { color: #fff; background: var(--blue-dark); }
.btn--wa { background: var(--green); color: #fff; }
.btn--wa:hover { color: #fff; background: var(--green-dark); filter: none; }
.btn--ghost { background: #fff; color: var(--blue); border: 2px solid var(--line-strong); padding: 13px 24px; }
.btn--ghost:hover { border-color: var(--blue); }
.btn--ghost.is-done { border-color: var(--green-dark); color: var(--green-dark); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; border: 0;
  background: var(--bg); color: var(--navy);
}
.icon-btn:hover { background: var(--line); }
.icon-btn--sm { width: 36px; height: 36px; border-radius: 10px; background: transparent; color: var(--muted); }
.icon-btn--sm:hover { background: var(--bg); color: var(--red); }

.link-btn {
  border: 0; background: none; padding: 4px 2px; color: var(--blue);
  font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn--muted { color: var(--muted); font-weight: 600; font-size: 14px; }
.link-btn.is-armed { color: var(--red); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 12px rgba(6, 30, 70, .25);
}
.site-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: block; width: 220px; height: 62px; overflow: hidden; flex-shrink: 0; }
.brand img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transform: scale(1.02); }
.main-nav {
  display: flex; gap: 28px; flex: 1; justify-content: center; flex-wrap: wrap;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.main-nav a { color: #fff; }
.main-nav a:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.wa-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--green); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; white-space: nowrap;
}
.wa-pill:hover { color: #fff; text-decoration: none; background: var(--green-dark); }
.cart-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--navy); border: 0; padding: 10px 12px 10px 16px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; white-space: nowrap;
}
.cart-pill:hover { filter: brightness(1.05); }
.cart-pill__count {
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 900;
}
.cart-pill.is-bumped .cart-pill__count { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- Hero ---------- */
.hero { background: var(--blue); color: #fff; overflow: hidden; }
.hero__inner {
  max-width: 1200px; margin: 0 auto; padding: 56px 24px 72px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px; align-items: center;
}
.hero__copy { display: flex; flex-direction: column; gap: 20px; }
.hero__badge {
  align-self: flex-start; background: rgba(255, 255, 255, .14); padding: 6px 14px; border-radius: 999px;
  font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
}
.hero h1 {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(38px, 6vw, 64px); line-height: 1.02; letter-spacing: -.02em; text-wrap: balance;
}
.hero p { margin: 0; font-size: 19px; line-height: 1.5; max-width: 480px; color: var(--hero-text); text-wrap: pretty; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.featured {
  background: #fff; color: var(--navy); border-radius: 24px; padding: 28px;
  display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.featured__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.featured__label {
  font-family: var(--font-display); font-weight: 800; font-size: 14px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--red);
}
.featured__off {
  background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 900;
  font-size: 18px; padding: 6px 12px; border-radius: 10px;
}
.featured__img { height: 200px; border-radius: 16px; overflow: hidden; background: var(--img-bg); }
.featured__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.featured__name { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.featured__unit { color: var(--muted); font-size: 15px; }
.featured__prices { text-align: right; }
.featured__old { color: var(--muted); text-decoration: line-through; font-size: 16px; }
.featured__price { font-family: var(--font-display); font-weight: 900; font-size: 40px; color: var(--blue); line-height: 1; }

/* ---------- Imágenes de producto ---------- */
/* Las fotos de producto suelen ser de estudio con fondo blanco: se muestran enteras y
   "multiply" hace que ese blanco tome el color de fondo de la tarjeta, como en el diseño. */
.card__img img,
.featured__img img,
.cart-item__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card__img img,
.featured__img img { padding: 6px; }
.img-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--img-bg); color: #b9c7de;
}

/* ---------- Secciones ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 64px 24px; }
#ofertas + .section--catalog { padding-top: 8px; }
.section__head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  flex-wrap: wrap; margin-bottom: 28px;
}
.section h2,
.contact h2 {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(30px, 4vw, 42px); letter-spacing: -.01em;
}
.section__sub { margin: 6px 0 0; color: var(--muted); font-size: 17px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 10px 16px; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  background: #fff; color: var(--navy); border: 1px solid var(--line-strong);
}
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed='true'] { background: var(--blue); color: #fff; border-color: var(--blue); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 20px; }

/* ---------- Tarjeta de producto ---------- */
.card {
  background: #fff; border-radius: 18px; padding: 16px; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px; position: relative;
}
.card__off {
  position: absolute; top: 24px; left: 24px; z-index: 1;
  background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 900;
  font-size: 15px; padding: 4px 10px; border-radius: 8px;
}
.card__img { display: block; height: 150px; border-radius: 12px; overflow: hidden; background: var(--img-bg); }
.card__name a,
.featured__name { color: inherit; }
.card__name a:hover,
.featured__name:hover { color: var(--blue); text-decoration: underline; }
.featured__name { display: block; }
.featured__img { display: block; }
.card__cat { font-size: 13px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; }
.card__name { margin: -6px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.2; }
.card__unit { color: var(--muted); font-size: 14px; margin-top: -6px; }
.card__prices { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.card__price { font-family: var(--font-display); font-weight: 900; font-size: 28px; color: var(--blue); }
.card__old { color: var(--muted); text-decoration: line-through; font-size: 15px; }
.card--out .card__img { opacity: .55; }

.add-btn {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--blue); background: #fff; color: var(--blue);
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  transition: background-color .15s, color .15s;
}
.add-btn:hover { background: var(--blue); color: #fff; }
.add-btn--solid { background: var(--blue); color: #fff; min-height: 52px; font-size: 16px; }
.add-btn--solid:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.add-btn:disabled { border-color: var(--line-strong); background: var(--bg); color: var(--muted); cursor: not-allowed; }

.stepper {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 46px; padding: 4px; border-radius: 12px; background: var(--blue); color: #fff;
}
.stepper button {
  width: 38px; height: 38px; border-radius: 9px; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .16); color: #fff;
}
.stepper button:hover { background: rgba(255, 255, 255, .28); }
.stepper__qty { font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.featured__order .stepper { min-height: 52px; }
.featured__order .stepper button { width: 44px; height: 44px; }

/* ---------- Catálogo ---------- */
.catalog-tools {
  position: sticky; top: var(--header-h); z-index: 5;
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  margin: 0 -24px 8px; padding: 12px 24px;
  background: rgba(244, 246, 250, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.search { position: relative; flex: 0 1 360px; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; padding: 12px 16px 12px 44px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #fff; font-size: 16px;
}
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 71, 160, .15); }
.chips--scroll {
  flex: 1 1 320px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  padding: 2px; margin: -2px;
}
.chips--scroll::-webkit-scrollbar { display: none; }
.cat-block { margin-top: 28px; }
.cat-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.cat-block__title {
  display: flex; align-items: baseline; gap: 10px; margin: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 24px;
}
.cat-block__title a { color: inherit; }
.cat-block__title span { color: var(--muted); font-size: 15px; font-weight: 700; }
.cat-block__more { font-family: var(--font-display); font-weight: 800; font-size: 15px; white-space: nowrap; }
.cat-block__more::after { content: ' →'; }
.results-note { margin: 20px 0 16px; color: var(--muted); font-weight: 700; }
.empty-note {
  grid-column: 1 / -1; margin: 20px 0; padding: 28px; border-radius: 18px;
  background: #fff; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center;
}

/* ---------- Preguntas frecuentes ---------- */
.faq { background: #fff; border-top: 1px solid var(--line); }
.faq__inner { max-width: 1200px; margin: 0 auto; padding: 64px 24px 16px; display: flex; flex-direction: column; gap: 24px; }
.faq h2 {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(30px, 4vw, 42px); letter-spacing: -.01em;
}
.faq__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 12px; align-items: start; }
.faq__item { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1.3;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 700; color: var(--blue);
}
.faq__item[open] summary::after { content: '–'; }
.faq__item p { margin: -4px 0 18px; color: #33415f; line-height: 1.55; }

/* ---------- Contacto ---------- */
.contact { background: #fff; border-top: 1px solid var(--line); }
.faq + .contact { border-top: 0; }
address.contact__grid { font-style: normal; }
.hours { margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.hours div { display: flex; justify-content: space-between; gap: 12px; }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; font-family: var(--font-display); font-weight: 800; white-space: nowrap; }
.contact__inner { max-width: 1200px; margin: 0 auto; padding: 64px 24px; display: flex; flex-direction: column; gap: 28px; }
.contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.contact-card--hours { grid-column: 1 / -1; }
.contact-card--hours .hours { flex-direction: row; flex-wrap: wrap; gap: 12px 40px; }
.contact-card--hours .hours div { flex-direction: column; justify-content: flex-start; gap: 2px; }
.contact-card--hours .hours dt { color: var(--muted); font-size: 15px; }
.contact-card--hours .hours dd { font-size: 20px; }
.contact-card {
  background: var(--bg); color: var(--navy); border-radius: 18px; padding: 26px;
  display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line);
  transition: border-color .15s, transform .15s;
}
.contact-card:hover { color: var(--navy); text-decoration: none; border-color: var(--line-strong); transform: translateY(-2px); }
.contact-card__label { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.contact-card__value { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.25; }
.contact-card__value--email { word-break: break-all; }
.contact-card__detail { font-size: 16px; color: var(--muted); }
.contact-card--wa { background: var(--green); border-color: var(--green); color: #fff; }
.contact-card--wa:hover { color: #fff; border-color: var(--green); }
.contact-card--wa .contact-card__label { color: #fff; }
.contact-card--wa .contact-card__value { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 30px; }
.review-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 12px;
  background: #fff6db; color: #6b4e00; font-family: var(--font-display); font-weight: 800; font-size: 15px;
}
.review-link span { color: #e0a800; font-size: 18px; }
.review-link:hover { color: #4d3800; text-decoration: none; background: #ffefc2; }
.map { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); height: 380px; background: #e8eef8; }
.map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-dark); color: var(--footer-text); }
.site-footer__inner {
  max-width: 1200px; margin: 0 auto; padding: 28px 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 15px;
}
.site-footer strong { font-family: var(--font-display); font-weight: 800; color: #fff; }
.site-footer__links {
  max-width: 1200px; margin: 0 auto; padding: 0 24px 28px;
  display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; font-weight: 700;
}
.site-footer__links a { color: var(--footer-text); }
.site-footer__links a:hover { color: #fff; }

/* ---------- Páginas de categoría y de producto ---------- */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; font-weight: 700; }
.crumbs li { color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--blue); }
.crumbs--light li { color: #fff; }
.crumbs--light li + li::before { color: rgba(255, 255, 255, .5); }
.crumbs--light a { color: var(--hero-text); }
.crumbs--light a:hover { color: #fff; }

.page-hero { background: var(--blue); color: #fff; }
.page-hero__inner { max-width: 1200px; margin: 0 auto; padding: 32px 24px 40px; display: flex; flex-direction: column; gap: 14px; }
.page-hero h1 {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.02em;
}
.page-hero p { margin: 0; font-size: 18px; color: var(--hero-text); max-width: 640px; }
.section--page { padding-top: 28px; }
.chips--nav { margin-bottom: 24px; }
.chips--nav .chip:hover { text-decoration: none; color: var(--navy); }
.chips--nav .chip[aria-current='page'] { background: var(--blue); color: #fff; border-color: var(--blue); }

.pdp { background: #fff; border-bottom: 1px solid var(--line); }
.pdp__inner { max-width: 1200px; margin: 0 auto; padding: 24px 24px 56px; }
.pdp__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-top: 20px; }
.pdp__media { position: relative; border-radius: 24px; overflow: hidden; background: var(--img-bg); aspect-ratio: 3 / 2; }
.pdp__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 16px; }
.pdp__media .img-ph svg { width: 80px; height: 80px; }
.pdp__off { top: 18px; left: 18px; font-size: 18px; padding: 6px 12px; border-radius: 10px; }
.pdp__info { display: flex; flex-direction: column; gap: 12px; }
.pdp__cat { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.pdp__name {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.01em;
}
.pdp__unit { margin: -4px 0 0; color: var(--muted); font-size: 18px; }
.pdp__prices { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.pdp__price { font-family: var(--font-display); font-weight: 900; font-size: 48px; color: var(--blue); line-height: 1; }
.pdp__price small { font-size: 20px; font-weight: 800; }
.pdp__old { color: var(--muted); text-decoration: line-through; font-size: 20px; }
.pdp__stock { margin: 0; font-weight: 700; color: var(--green-dark); }
.pdp__stock--out { color: var(--red); }
.pdp__order { margin-top: 6px; }
.pdp__facts { margin: 8px 0 0; padding: 16px 16px 16px 34px; border-radius: 16px; background: var(--bg); color: #33415f; line-height: 1.5; }
.pdp__facts li + li { margin-top: 6px; }
.btn--wa-soft { background: #e9f9ef; color: #137a3c; border: 2px solid #b9ebcb; padding: 13px 24px; }
.btn--wa-soft:hover { color: #0f6431; border-color: var(--green); }
.section--related .section__head { align-items: baseline; }

.legal { max-width: 820px; padding-top: 40px; }
.legal h2 { margin: 28px 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0; color: #33415f; line-height: 1.65; font-size: 17px; }

.notfound { text-align: center; padding-top: 80px; padding-bottom: 96px; }
.notfound h1 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 4vw, 42px); }
.notfound p { margin: 0 0 24px; color: var(--muted); font-size: 18px; }

/* ---------- Flotantes ---------- */
.floating {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  display: flex; align-items: center; gap: 12px; pointer-events: none;
}
.floating > * { pointer-events: auto; }
.wa-fab {
  width: 62px; height: 62px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  transition: transform .15s, box-shadow .15s;
}
.wa-fab:hover { color: #fff; transform: scale(1.08); box-shadow: 0 10px 28px rgba(0, 0, 0, .34); }
.cart-bar {
  display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 22px 0 14px;
  border: 0; border-radius: 999px; background: var(--yellow); color: var(--navy);
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22); animation: rise .25s ease-out;
}
.cart-bar[hidden] { display: none; }
.cart-bar__icon { position: relative; display: flex; }
.cart-bar__count {
  position: absolute; top: -9px; right: -11px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900;
}
.cart-bar__total { font-weight: 900; }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: 104px; z-index: 200; transform: translate(-50%, 20px);
  max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 12px;
  background: var(--navy); color: #fff; font-weight: 700; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.noscript { margin: 0; padding: 12px; background: var(--yellow); text-align: center; font-weight: 700; }

/* ---------- Pedido (panel lateral) ---------- */
.drawer {
  margin: 0 0 0 auto; padding: 0; border: 0;
  width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  background: #fff; color: var(--navy); box-shadow: -12px 0 40px rgba(6, 30, 70, .25);
}
.drawer[open] { display: flex; flex-direction: column; animation: slide-in .24s ease-out; }
.drawer::backdrop { background: rgba(6, 30, 70, .45); }
@keyframes slide-in { from { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .drawer[open], .cart-bar { animation: none; } }

.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--line);
}
.drawer__head h2 { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 26px; }
.drawer__summary { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 20px 20px; overscroll-behavior: contain; }
.drawer__foot {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; background: #fff;
}
.drawer__rows { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--muted); }
.drawer__rows div { display: flex; justify-content: space-between; gap: 12px; }
.drawer__rows span:last-child { font-weight: 700; color: var(--navy); }
.drawer__warn {
  margin: 0; padding: 10px 12px; border-radius: 12px; background: #fdecee; color: var(--red);
  font-size: 14px; font-weight: 700; line-height: 1.4;
}
.drawer__warn.is-shaking { animation: shake .4s ease-in-out; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .drawer__warn.is-shaking { animation: none; } }
.btn--wa[aria-disabled='true'] { background: #9ddfb5; cursor: not-allowed; }
.drawer__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.drawer__total span { font-weight: 700; color: var(--muted); }
.drawer__total strong { font-family: var(--font-display); font-weight: 900; font-size: 28px; color: var(--blue); }
.drawer__hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; text-align: center; }
.drawer__after {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px; background: #e9f9ef; font-size: 14px; font-weight: 600;
}
.cart-clear { display: flex; justify-content: flex-end; padding-top: 6px; }

.cart-empty { padding: 48px 12px; text-align: center; color: var(--muted); }
.cart-empty[hidden] { display: none; }
.cart-empty__icon {
  width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--img-bg); color: #9fb2d3;
}
.cart-empty__title { margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--navy); }
.cart-empty p { margin-top: 0; }
.cart-empty .btn { margin-top: 12px; }

.cart-items { list-style: none; margin: 0; padding: 0; }
.cart-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item__img { width: 60px; height: 60px; border-radius: 12px; overflow: hidden; background: var(--img-bg); }
.cart-item__img .img-ph svg { width: 26px; height: 26px; }
.cart-item__name { font-family: var(--font-display); font-weight: 800; font-size: 15px; line-height: 1.25; }
.cart-item__meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.cart-item__row .stepper { min-height: 38px; padding: 3px; gap: 4px; flex: 0 0 150px; }
.cart-item__row .stepper button { width: 32px; height: 32px; border-radius: 8px; }
.cart-item__row .stepper__qty { font-size: 14px; }
.cart-item__total { font-family: var(--font-display); font-weight: 900; font-size: 17px; white-space: nowrap; }

.order-form { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.order-form[hidden] { display: none; }
.order-form h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.order-form h3 span { color: var(--muted); font-weight: 600; font-size: 14px; font-family: var(--font-body); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field[hidden] { display: none; }
.field__label { font-weight: 700; font-size: 14px; padding: 0; }
.field input,
.field select,
.field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 16px;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 71, 160, .15); }
.field input[aria-invalid='true'] { border-color: var(--red); }
.field__error { color: var(--red); font-size: 13px; font-weight: 700; }
.field__error[hidden] { display: none; }
.field-note { margin: -4px 0 0; color: var(--muted); font-size: 14px; }
.field-note[hidden] { display: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 10px;
  border-radius: 12px; border: 1px solid var(--line-strong); text-align: center;
  font-weight: 700; font-size: 14px; line-height: 1.2;
}
.seg input:checked + span { border-color: var(--blue); background: #eaf1fc; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.seg input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .main-nav { display: none; }
}
@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .site-header__inner { padding: 10px 16px; gap: 12px; }
  .brand { width: 170px; height: 48px; }
  .wa-pill { padding: 10px; }
  .wa-pill__number,
  .cart-pill__label { display: none; }
  .cart-pill { padding: 8px 10px; gap: 6px; }
  .hero__inner { padding: 36px 16px 48px; gap: 28px; }
  .hero p { font-size: 17px; }
  .featured { padding: 20px; border-radius: 20px; }
  .featured__img { height: 170px; }
  .featured__price { font-size: 34px; }
  .section { padding: 44px 16px; }
  #ofertas + .section--catalog { padding-top: 4px; }
  .catalog-tools { margin: 0 -16px 8px; padding: 10px 16px; }
  .search { flex-basis: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { padding: 10px; gap: 8px; border-radius: 14px; }
  .card__off { top: 16px; left: 16px; font-size: 13px; padding: 3px 7px; border-radius: 7px; }
  .card__img { height: 118px; border-radius: 10px; }
  .card__cat { font-size: 11px; }
  .card__name { font-size: 15px; margin-top: -4px; }
  .card__unit { font-size: 13px; margin-top: -4px; }
  .card__prices { gap: 6px; }
  .card__price { font-size: 22px; }
  .card__old { font-size: 13px; }
  .add-btn { min-height: 42px; padding: 8px; font-size: 14px; gap: 4px; }
  .stepper { min-height: 42px; padding: 3px; gap: 2px; }
  .stepper button { width: 34px; height: 34px; }
  .stepper__qty { font-size: 14px; }
  .contact__inner { padding: 44px 16px; }
  .faq__inner { padding: 44px 16px 8px; }
  .faq__item summary { font-size: 16px; }
  .page-hero__inner { padding: 24px 16px 30px; }
  .page-hero p { font-size: 16px; }
  .pdp__inner { padding: 16px 16px 40px; }
  .pdp__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 14px; }
  .pdp__price { font-size: 40px; }
  .site-footer__links { padding: 0 16px 24px; }
  .contact-card--wa .contact-card__value { font-size: 26px; }
  .map { height: 300px; }
  .site-footer { padding-bottom: 80px; } /* lugar para la barra "Ver mi pedido" */
  .site-footer__inner { padding: 24px 16px; }
  .floating { left: 16px; right: 16px; bottom: 16px; justify-content: flex-end; }
  .cart-bar { flex: 1; height: 58px; justify-content: space-between; }
  .wa-fab { width: 58px; height: 58px; }
  .toast { bottom: 90px; }
}
@media (max-width: 380px) {
  .grid { gap: 8px; }
  .card__price { font-size: 20px; }
}
