/*
 * Chrome V9 para rutas servidas por PHP (producto, categoría, carrito,
 * checkout, mi cuenta, 404). Los snapshots estáticos traen estos mismos
 * estilos embebidos; acá se replican con los mismos tokens para que no
 * exista una segunda estética en el sitio.
 *
 * Fuente de los valores: <style> de static/home.html (propuesta codex-v9).
 * Si cambia el token en el snapshot, cambiar acá también.
 */

:root {
  --bg: #f4f1ec;
  --bg-quiet: #e8e2d8;
  --surface: #fffdf8;
  --surface-dark: #171714;
  --surface-deep: #10100e;
  --text: #1a1a1a;
  --text-soft: #625e57;
  --text-on-dark: #f8f4ed;
  --text-on-dark-soft: #cbc7bf;
  --line: #d6cfc4;
  --line-dark: rgba(255, 255, 255, .17);
  --accent: #aeed11;
  --accent-dark: #5f8500;
  --green: #34251d;
  --green-bright: #4b3428;
  --danger: #9d3f34;
  --font-sans: "Montserrat", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --text-xs: .72rem;
  --text-sm: .86rem;
  --text-base: 1rem;
  --text-lg: 1.16rem;
  --text-h3: clamp(1.18rem, 2vw, 1.55rem);
  --text-h2: clamp(2.15rem, 5.5vw, 4.9rem);
  --text-hero: clamp(3.1rem, 5.2vw, 5.75rem);
  --space-1: .35rem;
  --space-2: .65rem;
  --space-3: 1rem;
  --space-4: 1.4rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 7rem;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --maxw: 1320px;
  --shadow: 0 24px 70px rgba(23, 23, 20, .14);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* --- Base --------------------------------------------------------------- */

body.andes-chrome *,
body.andes-chrome *::before,
body.andes-chrome *::after { box-sizing: border-box; }

body.andes-chrome {
  margin: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(224, 173, 58, .08), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.andes-chrome.nav-open { overflow: hidden; }
body.andes-chrome a { color: inherit; }
body.andes-chrome button,
body.andes-chrome input,
body.andes-chrome select,
body.andes-chrome textarea { font: inherit; }
body.andes-chrome :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

body.andes-chrome h1,
body.andes-chrome h2,
body.andes-chrome h3 { line-height: 1.08; letter-spacing: -.015em; }

.andes-chrome .wrap { width: min(calc(100% - 2.5rem), var(--maxw)); margin-inline: auto; }

.andes-chrome .skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 1000;
  transform: translateY(-180%);
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  background: white; color: black;
}
.andes-chrome .skip-link:focus { transform: translateY(0); }

/* --- Botones ------------------------------------------------------------ */

.andes-chrome .button {
  display: inline-flex; min-height: 3.25rem;
  align-items: center; justify-content: center; gap: .65rem;
  padding: .8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 700;
  transform: translate3d(0, 0, 0);
  transition: transform .3s var(--ease-out), background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.andes-chrome .button:hover { transform: translate3d(0, -2px, 0); box-shadow: 0 10px 24px rgba(23, 18, 12, .14); }
.andes-chrome .button.primary { background: var(--accent); color: #17120c; }
.andes-chrome .button.primary:hover { background: #c0ff24; }
.andes-chrome .button.ghost { border-color: currentColor; background: transparent; }
.andes-chrome .button.ghost:hover { background: var(--surface); color: var(--text); }
.andes-chrome .button.dark { background: var(--surface-deep); color: white; }
.andes-chrome .button.dark:hover { background: #2f2c27; }

/* --- Header ------------------------------------------------------------- */

.andes-chrome .site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: #171714; color: var(--text-on-dark);
}
.andes-chrome .header-inner {
  min-height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.andes-chrome .brand-zone { display: flex; align-items: center; gap: 1rem; min-width: max-content; }
.andes-chrome .wordmark { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.andes-chrome .wordmark-logo {
  display: block;
  width: clamp(8.9rem, 12vw, 10rem);
  height: auto; max-height: 3.35rem;
  object-fit: contain; object-position: left center;
}
.andes-chrome .wordmark-text { font-weight: 800; letter-spacing: -.02em; color: var(--text-on-dark); }
.andes-chrome .page-context {
  min-height: 2rem; display: inline-flex; align-items: center;
  padding-left: 1rem; border-left: 1px solid var(--line-dark);
  color: var(--accent); font-family: var(--font-mono);
  font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.andes-chrome .desktop-nav { display: flex; align-items: center; gap: 1.7rem; }
.andes-chrome .desktop-nav a:not(.button) {
  color: var(--text-on-dark-soft); font-size: var(--text-sm); text-decoration: none;
}
.andes-chrome .desktop-nav a:not(.button):hover { color: white; }
.andes-chrome .desktop-nav a.is-current { color: var(--accent); }
.andes-chrome .cart-link { display: inline-flex; align-items: center; gap: .45rem; }
.andes-chrome .cart-count {
  display: inline-flex; min-width: 1.5rem; height: 1.5rem;
  align-items: center; justify-content: center;
  padding: 0 .35rem; border-radius: 999px;
  background: var(--accent); color: #17120c;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 800;
}
.andes-chrome .menu-toggle {
  display: none;
  padding: .65rem .8rem;
  border: 1px solid var(--line-dark); border-radius: var(--radius-sm);
  background: transparent; color: white;
}

/* --- Footer ------------------------------------------------------------- */

.andes-chrome .site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--line-dark);
  background: var(--surface-deep); color: var(--text-on-dark-soft);
}
.andes-chrome .footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.andes-chrome .footer-info {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  margin-top: 1.4rem; font-size: var(--text-sm);
}
.andes-chrome .footer-info a { text-underline-offset: 3px; }
.andes-chrome .footer-info .instagram-link { color: var(--accent); }

/* CTA flotante de WhatsApp: el plugin puede variar, por eso se cubren sus
   contenedores conocidos sin afectar enlaces de WhatsApp dentro del contenido. */
.andes-chrome :is(#ht-ctc-chat, .ht-ctc-chat, .joinchat, .qlwapp) :is(a, button, .joinchat__button, .qlwapp-toggle) {
  border: 1px solid rgba(174, 237, 17, .48) !important;
  border-radius: 999px !important;
  background: #171714 !important;
  color: #f8f4ed !important;
  box-shadow: 0 14px 34px rgba(16, 16, 14, .28) !important;
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
}
.andes-chrome :is(#ht-ctc-chat, .ht-ctc-chat, .joinchat, .qlwapp) :is(svg, path) {
  fill: var(--accent) !important;
  color: var(--accent) !important;
}
.andes-chrome .footer-info .instagram-link:hover { color: white; }
.andes-chrome .footer-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-size: var(--text-sm); }
.andes-chrome .footer-nav a { text-decoration: none; }
.andes-chrome .footer-nav a:hover { color: white; }
.andes-chrome .footer-legal {
  margin-top: 2.5rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono); font-size: .65rem;
}

/* --- Encabezado de página genérico -------------------------------------- */

.andes-chrome .page-head { padding: var(--space-7) 0 var(--space-5); }
.andes-chrome .page-head .eyebrow {
  display: inline-flex; margin-bottom: var(--space-3);
  color: var(--accent-dark); font-family: var(--font-mono);
  font-size: var(--text-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.andes-chrome .page-head h1 { margin: 0; font-size: var(--text-h2); }
.andes-chrome .page-head p { max-width: 62ch; margin: var(--space-3) 0 0; color: var(--text-soft); }

.andes-chrome .breadcrumb {
  padding: var(--space-4) 0 0;
  color: var(--text-soft); font-size: var(--text-xs);
}
.andes-chrome .breadcrumb a { text-decoration: none; }
.andes-chrome .breadcrumb a:hover { color: var(--text); text-decoration: underline; }

.andes-chrome .site-main { min-height: 55vh; padding-bottom: var(--space-8); }

.andes-chrome .andes-prose { max-width: 72ch; }
.andes-chrome .andes-prose h2 { margin-top: var(--space-6); font-size: var(--text-h3); }
.andes-chrome .andes-prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); }

.andes-chrome .andes-404 .eyebrow {
  display: inline-flex;
  color: var(--accent-dark); font-family: var(--font-mono);
  font-size: var(--text-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.andes-chrome .andes-404-nav {
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
}
.andes-chrome .andes-404-nav a { color: var(--text); text-underline-offset: 3px; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 820px) {
  .andes-chrome .desktop-nav {
    display: none;
    position: fixed; inset: 72px 0 auto;
    padding: 1.5rem 1.25rem 2rem;
    background: var(--surface-deep);
    flex-direction: column; align-items: stretch;
  }
  .andes-chrome .desktop-nav.open { display: flex; }
  .andes-chrome .desktop-nav .button { margin-top: .5rem; }
  .andes-chrome .menu-toggle { display: inline-flex; }
  .andes-chrome .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 590px) {
  .andes-chrome .wordmark-logo { width: 8.9rem; max-height: 3rem; }
  .andes-chrome .page-context { max-width: 7rem; padding-left: .7rem; font-size: .56rem; }
  .andes-chrome .brand-zone { gap: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .andes-chrome * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
