/* ==========================================================================
   cuídate hoy · hoja de estilos compartida
   Móvil primero. Dos temas: .t-dark (portada) y .t-light (catálogo y legales).
   ========================================================================== */

/* ---------- Fuentes (servidas desde el propio dominio) ---------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/bricolage-grotesque-latin.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: 'Figtree';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/figtree-latin.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;
}

/* ---------- Temas ---------- */
:root {
  --font-display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  --ink: #140C08;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1240px;
  --gutter: 20px;
}

.t-dark {
  --bg: #150D08;
  --bg-image:
    radial-gradient(1150px 720px at 6% -10%, #C96A2E 0%, rgba(201,106,46,.6) 26%, rgba(201,106,46,0) 62%),
    radial-gradient(900px 620px at 100% 10%, #9E4A3C 0%, rgba(158,74,60,.55) 28%, rgba(158,74,60,0) 64%),
    radial-gradient(1050px 720px at -8% 54%, #8A5A22 0%, rgba(138,90,34,.5) 30%, rgba(138,90,34,0) 64%),
    radial-gradient(1200px 820px at 70% 104%, #B55C2E 0%, rgba(181,92,46,.52) 30%, rgba(181,92,46,0) 66%),
    radial-gradient(760px 540px at 92% 70%, #7A3F52 0%, rgba(122,63,82,.36) 34%, rgba(122,63,82,0) 70%);
  --text: #F6EDE2;
  --body: #DCC9B6;
  --muted: #BFA893;
  --accent: #E2763F;
  --accent-hover: #F08C57;
  --on-accent: #140C08; /* texto oscuro sobre el naranja: 6,4:1 (el blanco solo daba 3,0:1) */
  --card: rgba(36,22,14,.58);
  --block: rgba(12,7,4,.78);
  --tag-text: #FFE7D4;
  --tag-bg: #5A3420;
  --tag-border: #8A5636;
  --shadow: rgba(10,6,4,.45);
  --focus: #F0B89A;
  color-scheme: dark;
}

.t-light {
  --bg: #F2E7D7;
  --bg-image:
    radial-gradient(1100px 620px at 8% -14%, #F6D2B2 0%, rgba(246,210,178,.75) 26%, rgba(246,210,178,0) 62%),
    radial-gradient(880px 560px at 100% 6%, #EDCFC4 0%, rgba(237,207,196,.7) 28%, rgba(237,207,196,0) 64%),
    radial-gradient(980px 620px at -8% 46%, #F4DCB8 0%, rgba(244,220,184,.7) 30%, rgba(244,220,184,0) 64%),
    radial-gradient(1100px 680px at 72% 96%, #F3D0B0 0%, rgba(243,208,176,.7) 30%, rgba(243,208,176,0) 66%),
    radial-gradient(700px 480px at 94% 62%, #FCF5EC 0%, rgba(252,245,236,.6) 34%, rgba(252,245,236,0) 70%);
  --text: #2A211B;
  --body: #4A3F36;
  --muted: #5E5248;
  --accent: #A9472A;
  --accent-hover: #7E3219;
  --on-accent: #FFFFFF;
  --card: rgba(255,252,246,.78);
  --block: #F4EEE4;
  --tag-text: #6B2F15;
  --tag-bg: #F6DFCF;
  --tag-border: #DDAE8E;
  --shadow: rgba(42,33,27,.4);
  --focus: #A9472A;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
svg { flex-shrink: 0; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.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: 12px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 12px 18px; border-radius: 12px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}
.accent { color: var(--accent); }

.eyebrow { font-weight: 600; color: var(--accent); }
.overline { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 28px; border-radius: 14px; border: 0;
  font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background-color .3s ease, color .3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--ink { background: var(--ink); color: #F6EDE2; }
.btn--ink:hover { color: #FFFFFF; }
.btn--sm { padding: 13px 20px; }

/* ---------- Barra superior de identificación (Norma 6.6) ---------- */
/* Siempre clara, en los dos temas: el logo oficial no se puede alterar en color (indicación de MPC)
   y tiene que verse con facilidad, así que va sobre fondo claro y sin pastilla. */
.topbar {
  --text: #2A211B;
  --topbar-muted: #5E5248;
  --focus: #A9472A;
  background: #F6EDE2; color: var(--text); font-size: 14px;
  border-bottom: 1px solid rgba(42,33,27,.12);
}
.topbar__inner {
  display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between;
  padding-top: 12px; padding-bottom: 12px;
}
.topbar__id { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.topbar__logo { display: inline-flex; align-items: center; }
/* El PNG oficial trae margen transparente: se compensa con margen negativo, sin recortar la imagen.
   max-width: none para que el max-width general no lo estreche y se mantengan sus proporciones. */
.topbar__logo img { height: 92px; width: auto; max-width: none; margin: -24px -28px; }
.topbar__name { font-weight: 600; }
.topbar__contact { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--topbar-muted); }
.topbar__contact a { color: inherit; text-decoration: none; }
.topbar__contact a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Cabecera ---------- */
.header__inner {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between;
  padding-top: 22px; padding-bottom: 22px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 24px;
  color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand__dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); }

.nav-toggle {
  display: none;
  align-items: center; gap: 8px;
  font: inherit; font-weight: 600; color: var(--text);
  background: transparent; border: 1.5px solid currentColor; border-radius: 14px; padding: 10px 16px; cursor: pointer;
}
.nav-toggle__bars { width: 18px; height: 12px; position: relative; display: inline-block; }
.nav-toggle__bars::before, .nav-toggle__bars::after, .nav-toggle__bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 5px; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav .nav__cta { border: 1.5px solid var(--ink); padding: 11px 20px; border-radius: 14px; font-weight: 600; }

/* Menú plegable en móvil, solo si hay JavaScript (sin JS el menú se ve desplegado) */
@media (max-width: 759px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    display: none; width: 100%;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding-top: 8px;
  }
  .js .nav.is-open { display: flex; }
  .js .nav a { padding: 12px 4px; font-size: 18px; border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent); }
  .js .nav .nav__cta { margin-top: 10px; text-align: center; border-bottom: 1.5px solid var(--ink); padding: 13px 20px; }
}

/* ---------- Portada (hero) ---------- */
.hero { display: flex; flex-direction: column; gap: 40px; padding-top: 24px; padding-bottom: 64px; }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 9vw, 136px); line-height: .95; letter-spacing: -0.035em;
}
.hero__row { display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: flex-end; justify-content: space-between; }
.hero__lead { flex: 1 1 420px; max-width: 560px; font-size: 19px; color: var(--body); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__ctas .btn { flex: 1 1 auto; }

/* ---------- Explora por categoría ---------- */
.explore { display: flex; flex-direction: column; gap: 20px; }
.cat-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.cat-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  min-height: 260px; padding: 28px; border-radius: 28px; text-decoration: none;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.cat-card:hover { transform: translateY(-6px) scale(1.015); box-shadow: 0 28px 50px -28px var(--shadow); }
.cat-card svg { opacity: .85; }
.cat-card__body { display: flex; flex-direction: column; gap: 14px; }
.cat-card__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; letter-spacing: -0.025em; }
.cat-card__list { font-size: 16px; opacity: .85; }
.cat-card__more { font-size: 16px; font-weight: 600; }
.cat-card--internal { background: #4A2E1C; border: 1px solid #6E4A30; color: #F6EDE2; }
.cat-card--internal:hover { color: #F6EDE2; }
.cat-card--internal .cat-card__more { color: #F0B89A; }
.cat-card--external { background: var(--accent); color: var(--on-accent); }
.cat-card--external:hover { color: var(--on-accent); }

/* ---------- Buscador ---------- */
.search { display: flex; flex-direction: column; gap: 8px; }
.search__label { font-weight: 600; }
.search__field {
  position: relative; display: flex; align-items: center;
}
.search__icon { position: absolute; left: 18px; pointer-events: none; color: var(--muted); }
.search__input {
  width: 100%; min-width: 0;
  font: inherit; font-size: 17px; color: var(--text);
  padding: 16px 132px 16px 52px;
  border-radius: 999px;
  border: 1.5px solid var(--search-border, #6E4A30);
  background: var(--search-bg, rgba(12,7,4,.55));
  -webkit-appearance: none; appearance: none;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.search__input::placeholder { color: var(--muted); opacity: 1; }
.search__input:hover { border-color: var(--accent); }
.search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search__submit {
  position: absolute; right: 6px; top: 6px; bottom: 6px;
  padding: 0 20px; border-radius: 999px;
}
.search__submit:hover { transform: none; }
.search__hint { font-size: 14px; color: var(--muted); }
.t-light .search { --search-bg: rgba(255,252,246,.9); --search-border: #D8C3AE; }

/* ---------- Secciones ---------- */
.section { padding-top: 72px; padding-bottom: 72px; }
.section-title { font-size: clamp(36px, 5vw, 64px); }
.section-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.section-head__text { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.section-head__text p { color: var(--body); }

/* ---------- Franja de confianza ---------- */
.trust { background: var(--ink); color: #F6EDE2; }
.trust__list {
  list-style: none; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 16px 32px;
  padding-top: 28px; padding-bottom: 28px; font-size: 16px;
}
.trust__list li { display: flex; gap: 12px; align-items: center; }

/* ---------- Tres pasos ---------- */
.steps-band { background: rgba(21,13,8,.22); }
.stack { display: flex; flex-direction: column; gap: 48px; }
.steps__title { max-width: 760px; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 36px; }
.step {
  display: flex; flex-direction: column; gap: 12px;
  border-top: 3px solid var(--accent); padding-top: 22px;
  transition: transform .5s var(--ease), border-color .3s ease;
}
.step:hover { transform: translateY(-4px); }
.step__num { font-family: var(--font-display); font-weight: 700; font-size: 46px; line-height: 1; color: var(--accent); }
.step__title { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.15; }
.step p { color: var(--body); }

/* ---------- Tarjetas de producto (compartidas portada/catálogo) ---------- */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.product-card {
  background: var(--card); border-radius: 28px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -28px var(--shadow); }
.product-card__media {
  height: 240px; border-radius: 20px; overflow: hidden;
  background: #F7F2EA; border: 1px solid rgba(94,67,48,.25);
  display: flex; align-items: center; justify-content: center;
}
/* Imagen oficial completa: se adapta el hueco, nunca se recorta la imagen (Norma 3.2) */
.product-card__media img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform .5s var(--ease);
}
.product-card:hover .product-card__media img { transform: scale(1.04); }
.product-card__name { font-size: 19px; font-weight: 600; line-height: 1.3; }
.product-card__name a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.product-card__name a:hover { color: var(--accent); text-decoration-color: currentColor; }
.product-card__label { color: var(--body); font-size: 15px; }
.product-card__more { font-size: 14px; font-weight: 600; }
.product-card__buy { margin-top: auto; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tag {
  font-size: 12px; font-weight: 600; line-height: 1.4;
  color: var(--tag-text); background: var(--tag-bg); border: 1px solid var(--tag-border);
  padding: 5px 11px; border-radius: 999px;
}
.fine-print { color: var(--body); font-size: 14px; }

/* ---------- Sobre mí ---------- */
.about {
  background: var(--block); border-radius: 32px; padding: 36px 24px;
  display: flex; flex-wrap: wrap; gap: 36px; align-items: center;
}
.about__photo {
  flex: 0 1 360px; width: 360px; max-width: 100%; margin: 0 auto;
  aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.about__photo:hover { transform: translateY(-6px) scale(1.015); box-shadow: 0 28px 50px -28px var(--shadow); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__text { flex: 1 1 460px; display: flex; flex-direction: column; gap: 18px; }
.about__title { font-size: clamp(34px, 4vw, 54px); line-height: 1.02; letter-spacing: -0.02em; }
.about__quote {
  margin: 0; font-family: var(--font-display); font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; color: var(--text);
}
.about__body { color: #C9B6A2; }
.about__sign { margin-top: 8px; width: 200px; height: auto; }

/* ---------- Preguntas frecuentes ---------- */
.faq-wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.faq-intro { flex: 1 1 320px; display: flex; flex-direction: column; gap: 20px; }
.faq-intro p { color: var(--body); }
.faq-intro .btn { align-self: flex-start; }
.faq-list { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.faq {
  background: var(--card); border-radius: 20px; padding: 20px 20px;
  transition: background-color .3s ease, box-shadow .4s ease, transform .4s var(--ease);
}
.faq:hover { transform: translateY(-2px); }
.faq[open] { background: rgba(58,36,23,.9); box-shadow: 0 24px 44px -30px rgba(10,6,4,.6); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq__q { display: flex; align-items: baseline; gap: 14px; }
.faq__num { font-size: 15px; font-weight: 600; color: var(--accent); min-width: 26px; }
.faq__title { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.faq__plus {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: #45281C; color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 24px; line-height: 1;
  transition: transform .3s ease;
}
.faq[open] .faq__plus { transform: rotate(45deg); }
.faq__a { margin-top: 14px; padding-left: 40px; color: var(--body); }

/* ---------- Contacto ---------- */
.contact { background: var(--accent); color: var(--on-accent); }
.contact__inner { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 72px; padding-bottom: 72px; }
.contact__intro { flex: 1 1 380px; display: flex; flex-direction: column; gap: 20px; }
.contact__title { font-size: clamp(40px, 6vw, 80px); line-height: .98; letter-spacing: -0.03em; }
.contact__lead { font-size: 19px; }
.contact a:not(.btn) { color: inherit; }
.contact .btn { align-self: flex-start; }
.chat { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin: 8px 0; }
.chat__bubble { max-width: 85%; color: #F6EDE2; padding: 13px 18px; font-size: 16px; line-height: 1.4; }
.chat__bubble--in { align-self: flex-start; background: #2E1F16; border-radius: 20px 20px 20px 6px; }
.chat__bubble--out { align-self: flex-end; background: var(--ink); border-radius: 20px 20px 6px 20px; }
.btn--chat { background: #2E1F16; color: #F6EDE2; }
.btn--chat:hover { color: #FFFFFF; }

.form {
  flex: 1 1 480px; min-width: 0;
  background: #2E1F16; color: #F6EDE2; border-radius: 28px; padding: 28px 20px;
  display: flex; flex-direction: column; gap: 18px;
}
.form a { color: #F0B89A; }
.form a:hover { color: #FFFFFF; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.field input, .field textarea {
  font: inherit; font-weight: 400; color: #F6EDE2;
  padding: 14px 16px; border: 1px solid #5E4330; border-radius: 12px; background: #20150F;
  width: 100%; min-width: 0;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: #F0B89A; box-shadow: 0 0 0 3px rgba(240,184,154,.35); }
.field__hint { font-size: 13px; font-weight: 400; color: #BFA893; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #DCC9B6; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: #E2763F; }
.form .btn { align-self: flex-start; }
.form-wrap { flex: 1 1 480px; min-width: 0; }
.form[hidden] { display: none; }
.field__error { font-size: 14px; font-weight: 600; color: #FFB59A; }
.field__error::before { content: "⚠ "; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #FF9A73; box-shadow: 0 0 0 1px #FF9A73; }
.form__legal { font-size: 13px; line-height: 1.5; color: #BFA893; }
.form__status { font-size: 15px; font-weight: 600; }
.form__status:empty { display: none; }
.form__status.is-error { color: #FFB59A; }
.form button[disabled] { opacity: .7; cursor: progress; }
.form--done { gap: 12px; }
.form--done:focus { outline: none; }
.form__done-title { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.1; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Catálogo ---------- */
.catalog { display: flex; flex-direction: column; gap: 32px; padding-top: 32px; padding-bottom: 72px; }
.catalog__title { max-width: 640px; }
.catalog__intro { max-width: 380px; color: var(--body); font-size: 15px; }
.catalog__tabs { display: flex; flex-wrap: wrap; gap: 20px 40px; }
.tabgroup { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tabgroup__label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.tabgroup__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.25; text-align: left;
  padding: 11px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid #E0C3B4; background: #FBF8F3; color: var(--accent);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}
.tab:hover { background: #E2D6C4; border-color: #C98C70; transform: translateY(-2px); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.panel { scroll-margin-top: 16px; }
.panel:focus { outline: none; }
.panel__title { font-family: var(--font-display); font-size: 28px; margin-bottom: 16px; }
.js .panel { display: none; }
.js .panel.is-active { display: block; }
.js .panel__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html:not(.js) .panel + .panel { margin-top: 48px; }

.t-light .product-card__media { height: 260px; }
.t-light .product-card__name { font-size: 20px; }
.t-light .product-card__name a { color: var(--accent); text-decoration-color: currentColor; }
.t-light .product-card__name a:hover { color: var(--accent-hover); }
.product-card__variant { font-weight: 500; }
.product-card__meta { color: var(--muted); font-size: 13px; }
.product-card__meta:empty { display: none; }
.product-card__label:empty { display: none; }

.chips { display: flex; flex-direction: column; gap: 8px; }
.chips__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.chips__list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: left;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid #9C8E7C; background: transparent; color: var(--text);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: #2A211B; color: #F6EDE2; border-color: #2A211B; }

/* ---------- Búsqueda en el catálogo ---------- */
.search__submit[hidden] { display: none; }
.search__input:placeholder-shown ~ .search__submit[type="reset"] { display: none; }
.search-empty {
  background: var(--card); border-radius: 24px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.search-empty[hidden] { display: none; }
.search-empty__title { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.search-empty p { color: var(--body); }
.search-empty .search-empty__title { color: var(--text); }
.js .catalog.is-searching .panel { display: block; }
.js .catalog.is-searching .panel[hidden] { display: none; }
.js .catalog.is-searching .panel__title {
  position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
  font-size: 22px; margin-bottom: 16px;
}
.catalog.is-searching .panel + .panel { margin-top: 40px; }
/* Mientras se busca, los resultados van agrupados por categoría y las pestañas sobran */
.js .catalog.is-searching .catalog__tabs { display: none; }
.product-card[hidden] { display: none; }

/* ---------- Ficha emergente ---------- */
.ficha {
  width: min(900px, calc(100% - 16px)); max-width: none; max-height: calc(100dvh - 16px);
  margin: auto; padding: 0; border: 0; border-radius: 24px;
  background: #F4EEE4; color: var(--text);
  overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 40px 80px -30px rgba(42,33,27,.6);
}
.ficha::backdrop { background: rgba(42,33,27,.55); }
.ficha[open] { animation: ficha-in .35s var(--ease); }
@keyframes ficha-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.ficha__box { position: relative; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding: 56px 20px 24px; }
.ficha__close {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: #E2D6C4; color: #2A211B; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.ficha__close:hover { background: #D4C4AE; }
.ficha__col { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ficha__col--main { flex: 1 1 360px; gap: 16px; }
.ficha__media {
  height: 300px; border-radius: 20px; overflow: hidden;
  background: #F7F2EA; border: 1px solid rgba(94,67,48,.25);
  display: flex; align-items: center; justify-content: center;
}
.ficha__media img { width: 100%; height: 100%; object-fit: contain; }
.ficha__usage {
  background: #2A211B; color: #F2EAE0; border-radius: 20px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px; font-size: 15px;
}
.ficha__usage:empty { display: none; }
.ficha__usage h3 { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: #E8B99F; margin-bottom: 6px; }
.ficha__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4vw, 30px); line-height: 1.05; letter-spacing: -0.02em; padding-right: 8px; }
.ficha__row h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.ficha__row p { color: var(--body); }
.ficha__row + .ficha__row { margin-top: 14px; }
.ficha__note { color: var(--muted); font-size: 13px; }
.ficha__help {
  background: #2A211B; color: #F4EEE4; border-radius: 20px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; font-size: 15px;
}
.ficha__help .btn { align-self: flex-start; font-size: 15px; }
html.ficha-abierta { overflow: hidden; }
/* En móvil, el nombre y los distintivos encabezan la ficha; después imagen, modo de uso y compra */
@media (max-width: 639px) {
  .ficha__box { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px; }
  .ficha__col { display: contents; }
  .ficha__name { order: -2; padding-right: 48px; }
  #ficha-tags { order: -1; }
  .ficha__media { height: 240px; }
}

/* ---------- Páginas legales ---------- */
.legal { max-width: 820px; padding-top: 32px; padding-bottom: 72px; color: var(--body); }
.legal h1 { color: var(--text); margin-bottom: 32px; }
.legal h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--text); margin: 36px 0 10px; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 4px; }
.legal a { overflow-wrap: anywhere; }
.legal code { font-size: 15px; background: rgba(255,252,246,.85); border: 1px solid #E0C3B4; border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.legal__table { margin: 8px 0 20px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--card); border-radius: 16px; overflow: hidden; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid #E5D3C2; }
.legal th { color: var(--text); font-weight: 600; background: #EFE2D2; }
.legal tr:last-child td { border-bottom: 0; }
/* En móvil, cada fila de la tabla se lee como una ficha */
@media (max-width: 639px) {
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal table, .legal tbody, .legal tr, .legal td { display: block; }
  .legal tr { padding: 6px 0; border-bottom: 1px solid #E5D3C2; }
  .legal tr:last-child { border-bottom: 0; }
  .legal td { border: 0; padding: 6px 14px; }
  .legal td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
}
@media (min-width: 760px) { .legal { padding-top: 56px; padding-bottom: 96px; } }

/* ---------- Pie ---------- */
.footer { font-size: 14px; color: var(--body); }
.footer__inner { display: flex; flex-direction: column; gap: 18px; padding-top: 48px; padding-bottom: 48px; }
.footer__top { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.footer__brand { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Botón flotante de WhatsApp (solo móvil) ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 14px 30px -10px rgba(10,6,4,.6);
  transition: transform .4s var(--ease), opacity .4s ease, background-color .3s ease;
}
.wa-float:hover { color: var(--on-accent); background: var(--accent-hover); transform: translateY(-3px); }
.wa-float.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
@media (max-width: 759px) { .footer__inner { padding-bottom: 96px; } }
@media (min-width: 760px) { .wa-float { display: none; } }

/* ---------- Aparición al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Pantallas medianas y grandes ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .cat-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
  .cat-card { min-height: 340px; padding: 36px; border-radius: 32px; gap: 40px; }
  .hero__ctas .btn { flex: 0 0 auto; }
  .trust__list { grid-template-columns: repeat(2, 1fr); padding-top: 32px; padding-bottom: 32px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .faq { padding: 22px 26px; }
  .faq__title { font-size: 21px; }
  .faq__a { padding-left: 42px; }
  .form { padding: 36px; }
  .catalog { padding-top: 56px; padding-bottom: 96px; gap: 48px; }
  .tab { padding: 13px 20px; font-size: 17px; }
  .ficha__box { padding: 32px; gap: 28px; }
  .ficha { border-radius: 28px; max-height: 88vh; }
}

@media (min-width: 1000px) {
  .trust__list { grid-template-columns: repeat(4, 1fr); }
  .steps__list { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

@media (min-width: 760px) {
  .header__inner { gap: 16px 32px; }
  .hero { gap: 48px; padding-top: 40px; padding-bottom: 88px; }
  .hero__lead { font-size: 20px; }
  .section { padding-top: 96px; padding-bottom: 96px; }
  .stack { gap: 56px; }
  .about { padding: 64px 48px; border-radius: 36px; gap: 48px; }
  .faq-wrap { gap: 48px; }
  .contact__inner { gap: 56px; padding-top: 96px; padding-bottom: 96px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .btn:hover, .cat-card:hover, .wa-float:hover, .step:hover, .product-card:hover,
  .product-card:hover .product-card__media img, .about__photo:hover, .faq:hover { transform: none; box-shadow: none; }
  .faq[open] .faq__plus { transform: rotate(45deg); }
  .js .reveal { opacity: 1; transform: none; }
  .tab:hover { transform: none; }
  .ficha[open] { animation: none; }
}
