/* =====================================================================
   ARTEX & NEWIFT — Hoja de estilos
   Version 1.0 — sin dependencias, CSS plano moderno
   ===================================================================== */

/* --- Tipografias (mismas que la web original) ---------------------- */
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@300;400;500;600;700;800&family=Kumbh+Sans:wght@300;400;500;600;700&display=swap');

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

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

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

ul[role='list'],
ol[role='list'] { list-style: none; padding: 0; margin: 0; }

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

img, picture, svg, video {
  max-width: 100%;
  display: block;
  height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

button { background: none; border: 0; cursor: pointer; padding: 0; }

/* --- Variables (cambia aqui los colores de toda la web) ------------ */
:root {
  /* Colores extraidos de la web original */
  --c-accent:       #E1872D;
  --c-accent-hover: #C26E19;
  --c-text:         #161616;
  --c-text-soft:    #54595F;
  --c-text-muted:   #6b6b6b;
  --c-text-light:   #A5A6AA;
  --c-bg:           #FFFFFF;
  --c-bg-soft:      #F5F5F5;
  --c-bg-dark:      #141212;
  --c-border:       #DDDDDD;
  --c-link-3:       #70798C;
  --c-success:      #23A455;
  --c-danger:       #D33B3B;

  /* Tipografia */
  --ff-heading: 'Lexend Deca', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-body:    'Kumbh Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Escala tipografica */
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  2rem;
  --fs-3xl:  2.5rem;
  --fs-4xl:  3.25rem;
  --fs-5xl:  4rem;

  /* Espaciado */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.5rem;
  --sp-6:  2rem;
  --sp-7:  3rem;
  --sp-8:  4rem;
  --sp-9:  6rem;

  /* Layout */
  --container:    1280px;
  --container-sm: 720px;
  --radius-sm:    8px;
  --radius:       16px;
  --radius-lg:    30px;
  --radius-full:  9999px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(20, 18, 18, .04), 0 1px 3px rgba(20, 18, 18, .06);
  --shadow:    0 4px 12px rgba(20, 18, 18, .06), 0 2px 4px rgba(20, 18, 18, .04);
  --shadow-md: 0 10px 30px rgba(20, 18, 18, .08), 0 4px 8px rgba(20, 18, 18, .04);
  --shadow-lg: 0 20px 50px rgba(20, 18, 18, .12);

  /* Transiciones */
  --t-fast: 150ms ease;
  --t:      250ms ease;
  --t-slow: 400ms cubic-bezier(.2,.7,.2,1);
}

/* --- Tipografia base ---------------------------------------------- */
body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  color: var(--c-text);
  background: var(--c-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-text);
}

h1 { font-size: var(--fs-4xl); font-weight: 700; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p { color: var(--c-text-soft); }

a:hover { color: var(--c-accent); transition: color var(--t-fast); }

::selection { background: var(--c-accent); color: #fff; }

/* --- UX global ----------------------------------------------------- */
html {
  scroll-behavior: smooth;
  /* Previene el tap-highlight gris en iOS */
  -webkit-tap-highlight-color: transparent;
}
/* Evita scroll horizontal por culpa de elementos que se desbordan en móvil */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
/* Inputs: quita el redondeado de iOS y el shadow raro */
input, select, textarea, button {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
}

/* --- Utilities ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.container-sm { max-width: var(--container-sm); }

.section { padding-block: var(--sp-9); }
.section-sm { padding-block: var(--sp-7); }
.section-bg { background: var(--c-bg-soft); }
.section-dark {
  background: var(--c-bg-dark);
  color: #fff;
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,.78); }

.text-accent { color: var(--c-accent); }
.text-muted  { color: var(--c-text-muted); }
.text-center { text-align: center; }
.uppercase   { text-transform: uppercase; letter-spacing: .08em; }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--c-accent);
  margin-bottom: var(--sp-3);
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--c-accent);
  border-radius: var(--radius-full);
  margin-block: var(--sp-4);
}

.divider-center { margin-inline: auto; }

.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;
}

/* --- Botones ------------------------------------------------------- */
/* Forzar que el atributo [hidden] gane sobre .btn (display: inline-flex).
   Sin esto, el botón "Cargar más" no se oculta nunca aunque JS le ponga hidden. */
.btn[hidden] { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  transition: all var(--t);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--c-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--c-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-text);
}
.btn-outline:hover {
  background: var(--c-text);
  color: #fff;
}

/* Botón "¿Eres cliente?" en la nav: destaca con borde naranja */
.nav-cliente {
  color: #fff;
  border-color: #E1872D;
}
.nav-cliente:hover {
  background: #E1872D;
  border-color: #E1872D;
  color: #fff;
}

.btn-ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.4);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: #fff;
  color: var(--c-text);
}

.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: var(--fs-xs); }

/* Etiqueta tipo "chip" — para tiempo de respuesta, tags, etc. */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.35em 0.85em;
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.2;
    background: rgba(225, 135, 45, 0.10);
    color: var(--c-accent);
    border: 1px solid rgba(225, 135, 45, 0.30);
    white-space: nowrap;
}
.chip svg {
    flex-shrink: 0;
}
.chip-accent {
    background: var(--c-accent);
    color: #fff;
    border-color: var(--c-accent);
}

/* --- Banner de sugerencia de idioma ------------------------------- */
.lang-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: var(--c-bg-dark);
    color: #fff;
    padding: 0.85rem 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    font-size: var(--fs-sm);
    border-bottom: 2px solid var(--c-accent);
}
.lang-banner.is-visible {
    transform: translateY(0);
}
.lang-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    flex-wrap: wrap;
}
.lang-banner-text {
    flex: 1 1 auto;
    min-width: 240px;
    line-height: 1.4;
}
.lang-banner-actions {
    display: flex;
    gap: var(--sp-2);
    flex-shrink: 0;
}
.lang-banner-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border: 1px solid transparent;
    line-height: 1.2;
    white-space: nowrap;
}
.lang-banner-btn-primary {
    background: var(--c-accent);
    color: #fff;
    border-color: var(--c-accent);
}
.lang-banner-btn-primary:hover {
    background: #c8741f;
    color: #fff;
}
.lang-banner-btn-ghost {
    background: transparent;
    color: rgba(255,255,255,.85);
    border-color: rgba(255,255,255,.25);
}
.lang-banner-btn-ghost:hover {
    color: #fff;
    border-color: rgba(255,255,255,.5);
}
/* Cuando el banner está visible, deja un margen arriba al topbar/header para que no se solape */
body:has(.lang-banner.is-visible) .site-header {
    margin-top: 60px;
}
@media (max-width: 600px) {
    .lang-banner { padding: 0.7rem 0.85rem; font-size: var(--fs-xs); }
    .lang-banner-inner { gap: var(--sp-2); }
    .lang-banner-actions { width: 100%; justify-content: stretch; }
    .lang-banner-btn { flex: 1; justify-content: center; }
    body:has(.lang-banner.is-visible) .site-header { margin-top: 100px; }
}

/* --- Header (top bar + nav) ---------------------------------------- */
.topbar {
  background: var(--c-bg-dark);
  color: rgba(255,255,255,.85);
  font-size: var(--fs-xs);
  padding-block: 0.5rem;
  position: relative;
  z-index: 52;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-shrink: 0;
}
.topbar a { color: inherit; }
.topbar a:hover { color: var(--c-accent); }
.topbar .topbar-marquee {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.topbar .topbar-marquee span {
  display: inline-block;
  animation: marquee 22s linear infinite;
  padding-left: 100%;
}
.topbar .topbar-social {
  display: flex; gap: var(--sp-3);
  font-size: 0.95rem;
  flex-shrink: 0;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* --- Language switcher (topbar / footer) --- */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.lang-switcher a {
  color: rgba(255, 255, 255, .65);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  transition: color var(--t-fast), background var(--t-fast);
}
.lang-switcher a:hover { color: #fff; }
.lang-switcher a.is-active {
  color: #fff;
  background: var(--c-accent);
}
.lang-switcher .lang-sep {
  color: rgba(255, 255, 255, .35);
}
.site-footer .lang-switcher a {
  color: rgba(255, 255, 255, .6);
}
.site-footer .lang-switcher a:hover { color: #fff; }
.site-footer .lang-switcher a.is-active {
  color: #fff;
  background: var(--c-accent);
}

/* Header principal: fondo NEGRO solido con logos blancos (estilo original Artex) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-bg-dark);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background var(--t), box-shadow var(--t);
}
.site-header.scrolled {
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--sp-4);
  gap: var(--sp-6);
}
.nav-logo {
  display: flex; align-items: center; gap: var(--sp-3);
  flex-shrink: 0;
}
.nav-logo img { height: 32px; width: auto; }
.nav-logo-divider { width: 1px; height: 24px; background: rgba(255,255,255,.2); }
.nav-logo-2 { height: 22px; width: auto; opacity: .85; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-menu a {
  font-weight: 500;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.85);
  padding-block: 0.5rem;
  position: relative;
  transition: color var(--t-fast);
}
.nav-menu a:hover { color: #fff; }
.nav-menu a::after {
  content: '';
  position: absolute;
  inset: auto 0 -2px 0;
  height: 2px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.nav-menu a:hover::after,
.nav-menu a.is-active::after { transform: scaleX(1); }
.nav-menu a.is-active { color: #fff; }

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.nav-icon {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-icon:hover { background: rgba(255,255,255,.08); color: #fff; }

.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  color: rgba(255,255,255,.85);
}
.nav-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-toggle svg { width: 22px; height: 22px; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(14, 10, 6, .65);
  backdrop-filter: blur(4px);
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  background: var(--c-bg-dark);
  color: #fff;
  padding: var(--sp-6);
  transform: translateX(100%);
  transition: transform var(--t-slow);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-panel a {
  font-size: var(--fs-lg);
  padding-block: var(--sp-2);
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.9);
}
.mobile-menu-panel a:hover { color: var(--c-accent); }
.mobile-menu-panel button { color: rgba(255,255,255,.85); }
.mobile-menu-panel button:hover { color: #fff; }

/* --- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(14,10,6,.85) 0%, rgba(14,10,6,.55) 45%, rgba(14,10,6,.25) 100%),
    linear-gradient(0deg, rgba(14,10,6,.55) 0%, rgba(14,10,6,.15) 50%, transparent 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
.hero-content {
  max-width: 820px;
  padding-block: var(--sp-8);
}
.hero-tagline {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: var(--sp-5);
  backdrop-filter: blur(8px);
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: var(--sp-5);
}
.hero h1 em {
  font-style: normal;
  color: var(--c-accent);
}
.hero p {
  color: rgba(255,255,255,.85);
  font-size: var(--fs-md);
  margin-bottom: var(--sp-6);
  margin-inline: auto;
  max-width: 640px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}
.hero-scroll {
  position: absolute;
  bottom: var(--sp-5); left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: var(--fs-xs);
  letter-spacing: .15em;
  text-transform: uppercase;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}

/* --- Section heading ---------------------------------------------- */
.section-head { margin-bottom: var(--sp-7); max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* --- Sobre nosotros / About us ------------------------------------ */
.sobre-header {
  padding-block: var(--sp-8) var(--sp-7);
  background: var(--c-bg-dark) url('../images/sobre-nosotros.jpg') center/cover no-repeat;
}
.sobre-header h1 { color: #fff; margin-bottom: var(--sp-3); font-size: clamp(2.5rem, 5vw, 4rem); }
.sobre-header p { color: rgba(255,255,255,.85); max-width: 720px; margin-inline: auto; }

.lead {
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--c-text);
  font-weight: 500;
  margin-bottom: var(--sp-5);
}
.sobre-intro {
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}
.sobre-intro p,
.sobre-intro .lead {
  text-align: center;
  font-size: var(--fs-md);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
  color: var(--c-text-soft);
  max-width: 760px;
  margin-inline: auto;
}
.sobre-intro p strong,
.sobre-intro .lead strong { color: var(--c-text); }

.section-soft { background: var(--c-bg-soft); }

/* Why grid */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-5);
}
.why-item {
  background: #fff;
  padding: var(--sp-6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--c-accent);
  transition: transform var(--t), box-shadow var(--t);
}
.why-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.why-item h3 {
  color: var(--c-text);
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-2);
  font-weight: 700;
}
.why-item p { color: var(--c-text-soft); font-size: var(--fs-md); line-height: 1.6; }

/* Timeline (sobre nosotros) */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-4);
  position: relative;
}
@media (max-width: 1024px) { .timeline { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
}
.timeline::before {
  content: '';
  position: absolute;
  top: 38px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--c-accent) 15%, var(--c-accent) 85%, transparent);
  z-index: 0;
}
.timeline-item {
  background: #fff;
  padding: var(--sp-5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  z-index: 1;
  border-top: 3px solid var(--c-accent);
  transition: transform var(--t), box-shadow var(--t);
}
.timeline-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.timeline-year {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  padding: 0.35em 1em;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-3);
  letter-spacing: .05em;
}
.timeline-item h3 {
  color: var(--c-text);
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
  font-weight: 700;
}
.timeline-item p {
  color: var(--c-text-soft);
  font-size: var(--fs-sm);
  line-height: 1.55;
  margin: 0;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-5);
  text-align: center;
}
.stat {
  padding: var(--sp-4);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-1);
}
.stat-num {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--c-accent);
  font-family: var(--ff-heading);
  line-height: 1;
}
.stat-label {
  font-size: var(--fs-sm);
  color: var(--c-text-soft);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
}

/* Proveedor block */
.proveedor-block {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}
.proveedor-block p {
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--c-text-soft);
  margin-bottom: var(--sp-4);
}
.proveedor-block .btn { margin-top: var(--sp-3); }

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}
.review {
  background: #fff;
  border-radius: var(--radius);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  margin: 0;
  border: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: transform var(--t), box-shadow var(--t);
}
.review:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.review-stars {
  color: #f5a623;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  line-height: 1;
}
.review p {
  color: var(--c-text);
  font-size: var(--fs-md);
  line-height: 1.55;
  font-style: italic;
  flex: 1;
  margin: 0;
}
.review-author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-top: 1px solid var(--c-border);
  padding-top: var(--sp-3);
  font-size: var(--fs-sm);
}
.review-author strong {
  color: var(--c-text);
  font-weight: 700;
}
.review-author span {
  color: var(--c-text-soft);
  font-size: var(--fs-xs);
}

/* Address block */
.sobre-address {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-7);
  align-items: center;
}
.sobre-address-text {
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--c-text-soft);
  margin-top: var(--sp-2);
}
.sobre-address-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: stretch;
}
.sobre-address-actions .btn { width: 100%; justify-content: center; }
.btn-email { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); }

@media (max-width: 768px) {
  .sobre-address { grid-template-columns: 1fr; gap: var(--sp-5); }
  .sobre-address-actions { flex-direction: row; flex-wrap: wrap; }
  .sobre-address-actions .btn { width: auto; flex: 1 1 200px; }
}
@media (max-width: 480px) {
  .sobre-address-actions { flex-direction: column; }
}
.section-head h2 { margin-bottom: var(--sp-3); }
.section-head p  { font-size: var(--fs-md); }

/* --- Sobre nosotros (split) --------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-7);
  align-items: center;
}
.split-text { padding-block: var(--sp-4); }
.split-text h2 { margin-bottom: var(--sp-3); }
.split-text p + p { margin-top: var(--sp-4); }
.split-text .btn { margin-top: var(--sp-5); }
.split-image {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.split-image img { width: 100%; height: 100%; object-fit: cover; }

/* --- Categorias (cards grandes) ----------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-4);
}
.cat-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-3);
}
.cat-grid-compact .cat-card {
  aspect-ratio: 5/4;
}
.cat-grid-compact .cat-card-photo svg { width: 50px; height: 50px; }
.cat-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-bg-soft);
  cursor: pointer;
  transition: transform var(--t-slow), box-shadow var(--t);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20,18,18,.75) 0%, rgba(20,18,18,.15) 50%, transparent 100%);
  z-index: 1;
}
.cat-card-photo {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  color: var(--c-accent);
  opacity: .3;
}
.cat-card-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--sp-5);
  color: #fff;
  z-index: 2;
}
.cat-card-label h3 { color: #fff; font-size: var(--fs-xl); margin-bottom: 0.25rem; }
.cat-card-label span { font-size: var(--fs-xs); color: rgba(255,255,255,.7); }

/* --- Categorias: cards con foto (v1 home) -------------------------- */
.section-cats-home { background: var(--c-bg-soft); }
.cat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
}
/* Card con foto — mismo look que v2.cat-photo (icon badge + overlay + flecha) */
.cat-photo {
  position: relative;
  display: block;
  aspect-ratio: 4/5;
  border-radius: 16px;
  overflow: hidden;
  background: var(--c-bg);
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
  box-shadow: 0 4px 14px -8px rgba(0,0,0,.18);
  text-decoration: none;
}
.cat-photo:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -15px rgba(0,0,0,.35);
}
.cat-photo-img {
  position: absolute; inset: 0;
  background-color: var(--c-bg-soft);
  background-size: cover;
  background-position: center;
  transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .35s;
}
.cat-photo:hover .cat-photo-img { transform: scale(1.08); filter: brightness(.92); }
.cat-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(22,19,17,0) 0%,
    rgba(22,19,17,0) 30%,
    rgba(22,19,17,.25) 55%,
    rgba(22,19,17,.7) 100%);
  z-index: 1;
  transition: background .35s;
}
.cat-photo:hover .cat-photo-overlay {
  background: linear-gradient(180deg,
    rgba(22,19,17,0) 0%,
    rgba(22,19,17,0) 18%,
    rgba(22,19,17,.35) 50%,
    rgba(22,19,17,.82) 100%);
}
.cat-photo-icon {
  position: absolute;
  top: 10px; left: 10px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.95);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 10px -4px rgba(0,0,0,.25);
}
.cat-photo-icon svg { width: 18px; height: 18px; stroke: var(--c-accent); fill: none; stroke-width: 1.4; }
.cat-photo-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px 14px;
  z-index: 2;
  color: #fff;
}
.cat-photo-text h3 {
  font-family: var(--ff-heading);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 3px;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
  letter-spacing: -.005em;
}
.cat-photo-text span {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: rgba(255,255,255,.85);
  letter-spacing: .04em;
  text-shadow: 0 1px 6px rgba(0,0,0,.45);
}
.cat-photo-arrow {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: var(--c-accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  z-index: 2;
  opacity: 0;
  transform: translateX(-6px) scale(.9);
  transition: opacity .3s, transform .3s;
  box-shadow: 0 6px 16px -6px rgba(225, 135, 45, .6);
}
.cat-photo:hover .cat-photo-arrow { opacity: 1; transform: translateX(0) scale(1); }
/* Estado activo (card seleccionada como filtro en catalogo.html) */
.cat-photo.is-active {
  outline: 3px solid var(--c-accent);
  outline-offset: -3px;
  box-shadow: 0 0 0 4px rgba(225, 135, 45, .25), 0 18px 40px -15px rgba(0,0,0,.35);
}
.cat-photo.is-active .cat-photo-arrow { opacity: 1; transform: translateX(0) scale(1); }

/* --- Breadcrumb (producto.html) ----------------------------------- */
.breadcrumb {
  background: var(--c-bg-soft, #f7f5f3);
  padding: var(--sp-3) 0;
  font-size: var(--fs-sm, 14px);
  border-bottom: 1px solid var(--c-border, #e8e6e3);
}
.producto-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem 0.5rem 0.7rem;
  margin-bottom: var(--sp-4);
  color: var(--c-text-muted, #6b6b6b);
  text-decoration: none;
  font-size: var(--fs-sm, 14px);
  font-weight: 500;
  border-radius: 999px;
  background: var(--c-bg-soft, #f7f5f3);
  border: 1px solid var(--c-border, #e8e6e3);
  transition: all .15s ease;
}
.producto-back:hover {
  color: var(--c-accent, #E1872D);
  border-color: var(--c-accent, #E1872D);
  background: #fff;
  transform: translateX(-2px);
}
.producto-back svg { flex: 0 0 auto; }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  color: var(--c-text-muted, #6b6b6b);
}
.breadcrumb li + li::before {
  content: '/';
  margin-right: 0.5rem;
  color: var(--c-text-muted, #6b6b6b);
  opacity: 0.5;
}
.breadcrumb a {
  color: var(--c-text-muted, #6b6b6b);
  text-decoration: none;
  transition: color .15s;
}
.breadcrumb a:hover { color: var(--c-accent, #E1872D); }
.breadcrumb [aria-current="page"] {
  color: var(--c-text, #161616);
  font-weight: 600;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  /* IMPORTANTE: este bloque va ANTES de las reglas base de .page-header
     (línea 1886+), así que las reglas base GANAN por source order. Los
     overrides mobile de verdad están al FINAL del archivo. */
  .section { padding-block: 2rem; }
  .section-sm { padding-block: 1.5rem; }
  .catalog-toolbar { margin-bottom: 0.75rem; }
}

/* --- catalogo.html: layout 2 columnas (sidebar + grid) ------------ */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--sp-5);
  align-items: start;
  margin-top: var(--sp-4);
}
.catalog-sidebar {
  position: sticky;
  top: calc(var(--sp-4) + 80px);  /* deja sitio al header sticky */
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: var(--sp-2);
  /* Scroll fino y diseno */
  scrollbar-width: thin;
  scrollbar-color: var(--c-text-muted) transparent;
}
.catalog-sidebar::-webkit-scrollbar { width: 6px; }
.catalog-sidebar::-webkit-scrollbar-track { background: transparent; }
.catalog-sidebar::-webkit-scrollbar-thumb {
  background: var(--c-text-muted);
  border-radius: 3px;
}
.catalog-sidebar-title {
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-3);
  padding-left: 4px;
}
/* En el sidebar, las cards son mas compactas y van en 1 columna */
.cat-cards.cat-sidebar {
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
.cat-cards.cat-sidebar .cat-photo {
  aspect-ratio: 16/7;  /* horizontal: mas info de la imagen */
  border-radius: 12px;
}
.cat-cards.cat-sidebar .cat-photo-text h3 { font-size: 14px; }
.cat-cards.cat-sidebar .cat-photo-text span { font-size: 10.5px; }
.cat-cards.cat-sidebar .cat-photo-icon { width: 28px; height: 28px; }
.cat-cards.cat-sidebar .cat-photo-icon svg { width: 15px; height: 15px; }
.cat-cards.cat-sidebar .cat-photo-arrow { width: 26px; height: 26px; font-size: 13px; }
@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-sidebar { position: static; padding-right: 0; }
  .catalog-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--c-bg-soft, #f7f5f3);
    border: 1px solid var(--c-border, #e8e6e3);
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    color: var(--c-text, #161616);
    margin-bottom: 0.5rem;
  }
  .catalog-sidebar-title {
    margin: 0;
    flex: 1;
    text-align: left;
  }
  .catalog-sidebar-count {
    font-size: var(--fs-xs, 12px);
    color: var(--c-text-muted, #6b6b6b);
    background: var(--c-bg, #fff);
    padding: 2px 8px;
    border-radius: 999px;
    margin-right: 0.6rem;
    border: 1px solid var(--c-border, #e8e6e3);
  }
  .catalog-sidebar-arrow { transition: transform .25s; }
  .catalog-sidebar.is-open .catalog-sidebar-arrow { transform: rotate(180deg); }
}
/* En desktop, ocultar el toggle (el sidebar siempre visible) */
@media (min-width: 901px) {
  .catalog-sidebar-toggle { display: none; }
  .cat-cards.cat-sidebar { display: grid; }
}
/* --- mobile: sidebar plegable SIN transicion (evita parpadeo) ------ */
@media (max-width: 900px) {
  .cat-photo { aspect-ratio: 1/1; }
  .cat-photo-text h3 { font-size: 14px; }
  /* Cierre duro con display, sin transition -> sin parpadeo ni
     re-render intermedio. La animacion con max-height 0->2000px
     producia un re-flicker al combinarse con scrollIntoView. */
  .cat-cards.cat-sidebar { display: none; }
  .catalog-sidebar.is-open .cat-cards.cat-sidebar { display: grid; }
  .cat-cards.cat-sidebar .cat-photo { aspect-ratio: 4/3; }
  /* 2 columnas en TODO el mobile (antes 1 col -> 2 col -> 1 col segun
     breakpoint, que hacia la lista larguisima en iPhone) */
  .cat-cards.cat-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3);
  }
}

/* --- Chip de "categoria seleccionada" (mobile + desktop) ------------ */
.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #FFF1E5;
  color: var(--c-accent, #E1872D);
  padding: 0.5rem 0.5rem 0.5rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  font-size: var(--fs-sm, 14px);
  font-weight: 500;
  border: 1px solid var(--c-accent, #E1872D);
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(225, 135, 45, .08);
}
.active-filter-chip[hidden] { display: none !important; }
.active-filter-chip strong {
  color: var(--c-text, #161616);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.active-filter-clear {
  background: var(--c-accent, #E1872D);
  color: #fff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 0.15rem;
  flex-shrink: 0;
  transition: background .15s;
}
.active-filter-clear:hover { background: #c8761f; }

/* --- Producto card ------------------------------------------------- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}
@media (max-width: 960px) {
  .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
}
.prod-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
.prod-card-body, .prod-card-foot, .prod-card-cat, .prod-card h3, .prod-card-desc { min-width: 0; }
.prod-card h3 { overflow-wrap: anywhere; }
@media (max-width: 380px) {
  /* Pantallas muy estrechas (iPhone SE/mini, 375px) -> 1 columna.
     El resto de moviles (390px+) mantiene 2 cols para que se vean
     dos cards por fila. */
  .prod-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .prod-card-body { padding: var(--sp-3); }
  .prod-card h3 { font-size: var(--fs-sm); }
  .prod-card-foot { flex-direction: column; align-items: flex-start; gap: var(--sp-1); }
  .prod-card-foot .text-accent { display: none; }
  .prod-card-desc { -webkit-line-clamp: 2; }
  .prod-card-price small { font-size: 10px; }
}
.prod-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  display: flex; flex-direction: column;
}
.prod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c-accent); }
.prod-card-media {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--c-bg-soft);
  overflow: hidden;
}
.prod-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.prod-card:hover .prod-card-media img { transform: scale(1.05); }
.prod-card-badge {
  position: absolute;
  top: var(--sp-3); left: var(--sp-3);
  background: var(--c-accent);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}
.prod-card-ref {
  position: absolute;
  top: var(--sp-3); right: var(--sp-3);
  background: rgba(20,18,18,.65);
  color: #fff;
  font-size: var(--fs-xs);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(6px);
}
.prod-card-body { padding: var(--sp-4); flex: 1; display: flex; flex-direction: column; }
.prod-card-cat {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-accent);
  margin-bottom: var(--sp-2);
  font-weight: 600;
}
.prod-card h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
  flex: 1;
}
.prod-card-desc {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-border);
}
.prod-card-price {
  font-family: var(--ff-heading);
  font-weight: 600;
  color: var(--c-text);
}
.prod-card-price small {
  display: block;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* --- Catalogo: filtros (toolbar horizontal con dropdown) ---------- */
.catalog-toolbar {
  display: flex;
  align-items: stretch;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

/* Buscador */
.catalog-search {
  position: relative;
  flex: 1 1 280px;
  min-width: 220px;
  display: flex;
  align-items: center;
}
.catalog-search-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--c-text-muted);
  pointer-events: none;
}
.filter-search {
  width: 100%;
  padding: 0.7rem 0.9rem 0.7rem 2.5rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-bg-soft);
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}
.filter-search:focus {
  outline: none;
  border-color: var(--c-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(225, 135, 45, .12);
}

/* Dropdown de categorías (colapsado por defecto) */
.catalog-cats {
  position: relative;
  flex: 0 0 auto;
}
.catalog-cats-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-text);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
  height: 100%;
  min-height: 44px;
}
.catalog-cats-toggle:hover { border-color: var(--c-accent); }
.catalog-cats-toggle[aria-expanded="true"] {
  border-color: var(--c-accent);
  background: rgba(225, 135, 45, .08);
  color: var(--c-accent);
}
.catalog-cats-toggle[aria-expanded="true"] .catalog-cats-arrow { transform: rotate(180deg); }
.catalog-cats-arrow {
  transition: transform var(--t-fast);
  color: currentColor;
}
.catalog-cats-count {
  display: none;
  background: var(--c-accent);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 0.05rem 0.5rem;
  min-width: 22px;
  text-align: center;
  line-height: 1.4;
}
.catalog-cats-count.is-visible { display: inline-block; }

.catalog-cats-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  list-style: none;
  margin: 0;
  padding: var(--sp-2);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 240px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.catalog-cats-list[hidden] { display: none; }
.catalog-cats-list li button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--c-text);
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
  cursor: pointer;
  background: transparent;
  border: 0;
}
.catalog-cats-list li button:hover { background: var(--c-bg-soft); }
.catalog-cats-list li button.is-active {
  background: var(--c-accent);
  color: #fff;
  font-weight: 600;
}
.catalog-cats-list li button.is-active .filter-count {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.filter-count {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  background: var(--c-bg-soft);
  border-radius: var(--radius-full);
  padding: 0.1rem 0.55rem;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
  margin-left: var(--sp-2);
}

/* Sort */
.catalog-sort {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.catalog-sort select {
  padding: 0.7rem 2.2rem 0.7rem 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23545' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 0.8rem center;
  background-size: 12px;
  font-size: var(--fs-sm);
  color: var(--c-text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  line-height: 1.2;
}
.catalog-sort select:focus { outline: none; border-color: var(--c-accent); }

/* Meta línea (count + clear) */
.catalog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.catalog-count { font-size: var(--fs-sm); color: var(--c-text-muted); }
.catalog-clear {
  font-size: var(--fs-sm);
  color: var(--c-accent);
  text-decoration: underline;
  background: transparent;
  border: 0;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.catalog-clear:hover { color: var(--c-accent-hover); background: rgba(225, 135, 45, .08); }
.catalog-clear[hidden] { display: none; }

.catalog-empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-5);
  background: var(--c-bg-soft);
  border-radius: var(--radius);
  color: var(--c-text-muted);
}

@media (max-width: 600px) {
  .catalog-toolbar { flex-direction: column; align-items: stretch; }
  .catalog-search { width: 100%; }
  .catalog-cats, .catalog-sort { width: 100%; }
  .catalog-cats-toggle, .catalog-sort select { width: 100%; justify-content: space-between; }
  .catalog-cats-list { left: 0; right: 0; width: 100%; min-width: 0; }
}
  color: var(--c-text-muted);
}

/* --- Producto (ficha) --------------------------------------------- */
.producto-layout {
  /* Usamos flex en vez de grid porque algunas versiones de headless Chrome
     se comportaban raro con grid (la imagen desbordaba y se solapaba con
     el texto). Flex es más predecible. */
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-7);
  align-items: flex-start;
}
.producto-galeria,
.producto-info {
  /* min-width: 0 para que flex no se rompa con imagenes anchas */
  min-width: 0;
}
.producto-galeria {
  /* Base: relative (para el badge) + aspect-ratio + max-height SIEMPRE limitado
     para que la imagen nunca desborde. En desktop el sticky se activa via media query. */
  position: relative;
  background: var(--c-bg-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  max-height: min(70vh, 520px);
  margin-inline: auto;
  flex: 1 1 380px;
}
.producto-info {
  flex: 1 1 380px;
}
@media (min-width: 961px) {
  .producto-galeria { position: sticky; top: 90px; }
}
.producto-galeria img { display: block; width: 100%; height: 100%; object-fit: cover; }
.producto-info h1 { font-size: var(--fs-3xl); margin-bottom: var(--sp-3); }
.producto-meta {
  display: flex; gap: var(--sp-3); align-items: center;
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.producto-cat {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
}
.producto-ref {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  background: var(--c-bg-soft);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
}
.producto-desc { font-size: var(--fs-md); margin-bottom: var(--sp-6); }
.producto-attrs {
  list-style: none; margin: 0 0 var(--sp-6); padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3);
}
.producto-attrs li {
  background: var(--c-bg-soft);
  border-radius: var(--radius-sm);
  padding: var(--sp-4);
}
.producto-attrs strong {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.producto-attrs span { font-family: var(--ff-heading); font-size: var(--fs-lg); color: var(--c-text); }
.producto-cta {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--c-bg-soft);
  border-radius: var(--radius);
  align-items: center;
  justify-content: space-between;
}
.producto-cta-text { font-size: var(--fs-sm); color: var(--c-text-soft); }
.producto-cta-text strong { display: block; color: var(--c-text); font-size: var(--fs-md); }

/* --- Por que elegirnos (features grid) ---------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-5);
}
.feature {
  text-align: left;
  padding: var(--sp-5);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: all var(--t);
}
.feature:hover { border-color: var(--c-accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(225, 135, 45, .12);
  color: var(--c-accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4);
  font-size: 1.5rem;
}
.feature h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.feature p { font-size: var(--fs-sm); }

/* --- Stats (numeros grandes) -------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-5);
  text-align: center;
}
.stat-num {
  font-family: var(--ff-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.stat-label {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.7);
}

/* --- Formulario ---------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text);
}
.field label .req { color: var(--c-accent); }
.field input,
.field select,
.field textarea {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: var(--fs-base);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(225, 135, 45, .15);
}
.field textarea { min-height: 140px; resize: vertical; }
.field-help { font-size: var(--fs-xs); color: var(--c-text-muted); }

.form-msg {
  padding: var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  display: none;
}
.form-msg.is-success { background: rgba(35, 164, 85, .12); color: var(--c-success); display: block; }
.form-msg.is-error   { background: rgba(211, 59, 59, .12);  color: var(--c-danger);  display: block; }

.contacto-info {
  display: flex; flex-direction: column; gap: var(--sp-5);
}
.contacto-info-item {
  display: flex; gap: var(--sp-4);
  align-items: flex-start;
}
.contacto-info-item .icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--c-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contacto-info-item strong { display: block; color: var(--c-text); margin-bottom: 0.25rem; }
.contacto-info-item span { color: var(--c-text-soft); font-size: var(--fs-sm); }

/* --- Footer -------------------------------------------------------- */
.site-footer {
  background: var(--c-bg-dark);
  color: rgba(255,255,255,.7);
  padding-block: var(--sp-8) var(--sp-5);
  margin-top: var(--sp-9);
}
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: var(--c-accent); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-7);
}
.footer-brand img { height: 36px; margin-bottom: var(--sp-4); }
.footer-brand p { color: rgba(255,255,255,.65); font-size: var(--fs-sm); max-width: 320px; }
.footer h4 {
  color: #fff;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: var(--sp-4);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--fs-sm); }
/* Footer categorias: grid 2 cols cuando hay muchas (footer-cats.js) */
#footer-cats-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.5);
}
.footer-social { display: flex; gap: var(--sp-2); }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast);
}
.footer-social a:hover { background: var(--c-accent); color: #fff; }

/* --- Page header (para paginas internas) -------------------------- */
.page-header {
  position: relative;
  background: var(--c-bg-dark) url('../images/bg-banner.jpg') center/cover no-repeat;
  color: #fff;
  padding-block: var(--sp-9) var(--sp-8);
  text-align: center;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(20, 18, 18, .6);
}
.page-header > * { position: relative; z-index: 1; }
.page-header h1 { color: #fff; margin-bottom: var(--sp-3); }
.page-header p { color: rgba(255,255,255,.8); max-width: 600px; margin-inline: auto; }
.breadcrumb {
  display: flex; justify-content: center; gap: var(--sp-2);
  font-size: var(--fs-sm); color: rgba(255,255,255,.7);
  margin-bottom: var(--sp-4);
}
.breadcrumb a { color: var(--c-accent); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span[aria-current] { color: rgba(255,255,255,.95); }
.breadcrumb svg { opacity: .5; flex-shrink: 0; }

.page-header-subtitle {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  max-width: 640px;
  margin-inline: auto;
}

.chip-on-dark {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: rgba(255,255,255,.28);
  backdrop-filter: blur(4px);
}
.chip-on-dark:hover { background: rgba(255,255,255,.22); }

/* --- Animations on scroll (respetando reduced motion) ------------ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: translateY(0); }

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

/* --- Responsive ---------------------------------------------------- */
@media (max-width: 960px) {
  :root { --sp-9: 4rem; --sp-8: 3rem; }
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  .nav-menu { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn { display: none; }
  .split { grid-template-columns: 1fr; }
  .split-image { order: -1; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .producto-layout { flex-direction: column; }
  .producto-galeria { position: static; max-width: 480px; max-height: 60vh; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; }
  /* Topbar: deja solo lang switcher + un social, esconde el resto */
  .topbar-inner { gap: var(--sp-3); }
  .topbar .topbar-marquee { display: none; }
}

@media (max-width: 768px) {
  /* El chip del 24h se ve más limpio solo en su línea */
  .chip { font-size: var(--fs-xs); }
  /* Toca-targets más grandes en el form */
  .field input,
  .field select,
  .field textarea {
    min-height: 48px;
    font-size: 16px; /* evita zoom en iOS al hacer focus */
  }
  .field textarea { min-height: 120px; }
  .btn { min-height: 44px; }
  /* Categorias: 2 columnas en tablet, 1 en móvil */
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  /* Reduce padding en cards de categoria */
  .cat-card-label { padding: var(--sp-3); }
  .cat-card-label h3 { font-size: var(--fs-md); }
}

@media (max-width: 600px) {
  :root { --sp-9: 3rem; }
  .container { padding-inline: var(--sp-4); }
  .section { padding-block: var(--sp-7); }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .topbar-marquee { display: none; }
  .topbar .topbar-social { display: none; } /* en movil solo lang switcher */
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .producto-attrs { grid-template-columns: 1fr; }
  /* Hero más corto en móvil */
  .hero { min-height: 60vh; }
  .hero-content { padding-block: var(--sp-7); }
  /* h1 más pequeño */
  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  /* Categorias: 1 columna en móvil pequeño */
  .cat-grid { grid-template-columns: 1fr; }
  /* Form ocupa todo el ancho */
  .form-grid { grid-template-columns: 1fr; }
  .field { width: 100%; }
  /* Mobile menu full width en pantallas pequeñas */
  .mobile-menu-panel { width: 100vw; }
  /* Lang switcher más pequeño */
  .topbar .lang-switcher a { font-size: var(--fs-xs); }
  /* Tabla de presupuesto más limpia */
  .producto-precio-row { flex-direction: column; align-items: flex-start; }
  /* Hero scroll arrow más pequeño */
  .hero-scroll { bottom: var(--sp-3); }
}

@media (max-width: 380px) {
  /* Móviles muy pequeños (iPhone SE 1ª gen, etc.) */
  .container { padding-inline: var(--sp-3); }
  .hero-cta .btn { font-size: var(--fs-sm); padding: 0.75rem 1rem; }
  .btn { padding: 0.75rem 1.25rem; }
}

/* --- Print --------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .mobile-menu { display: none; }
  body { color: #000; background: #fff; }
}

/* --- Páginas legales (aviso, privacidad, cookies, FAQs) ------------ */
.legal-content { max-width: 820px; }
.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: var(--sp-7, 2.5rem);
  margin-bottom: var(--sp-3, 1rem);
  color: var(--c-text, #1a1a1a);
  letter-spacing: -0.01em;
}
.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: var(--sp-5, 1.75rem);
  margin-bottom: var(--sp-2, 0.6rem);
  color: var(--c-text, #1a1a1a);
}
.legal-content p { margin-bottom: var(--sp-3, 1rem); line-height: 1.7; color: var(--c-text, #1a1a1a); }
.legal-content ul { margin: var(--sp-3, 1rem) 0 var(--sp-4, 1.25rem) var(--sp-4, 1.25rem); }
.legal-content li { margin-bottom: var(--sp-2, 0.5rem); line-height: 1.6; }
.legal-content a { color: var(--c-accent, #E1872D); text-decoration: underline; text-underline-offset: 2px; }
.legal-content a:hover { text-decoration: none; }
.legal-content strong { color: var(--c-text, #1a1a1a); }
.legal-updated { margin-top: var(--sp-7, 2.5rem); padding-top: var(--sp-4, 1.25rem); border-top: 1px solid rgba(0,0,0,.08); color: var(--c-muted, #666); font-size: 0.9rem; }

/* =====================================================================
   MOBILE OVERRIDES (max-width: 900px)
   Estos overrides están al FINAL del archivo a propósito, para GANAR
   por source order a las reglas base definidas antes (ej. .page-header
   con padding-block: 6rem 4rem en desktop). Si los pones en medio del
   archivo, las reglas base los sobreescriben silenciosamente.
   ===================================================================== */
@media (max-width: 900px) {
  /* Page header: imagen del almacen muy grande -> compactar */
  .page-header {
    padding-block: 1.25rem 1rem;     /* era 2rem 1.5rem, y la base 6rem 4rem */
    min-height: 0;                    /* por si algo le daba altura */
  }
  .page-header h1 { font-size: 1.5rem; margin-bottom: 0.35rem; }
  .page-header p { font-size: 0.85rem; line-height: 1.35; }
  .breadcrumb { font-size: 0.75rem; margin-bottom: 0.5rem; }

  /* Section: padding mas compacto en mobile */
  .section { padding-block: 1.25rem; }   /* era 2rem */
  .section-sm { padding-block: 1rem; }

  /* Catalog toolbar: el bug del espacio vacio
     .catalog-search tiene `flex: 1 1 280px` que en flex-direction:column
     se interpreta como flex-basis (ALTURA) de 280px. Eso es lo que
     producía el hueco de 280px entre la barra de búsqueda y el select
     de orden. Hay que pisar el flex-basis a auto en mobile. */
  .catalog-toolbar { margin-bottom: 0.75rem; gap: 0.5rem; }
  .catalog-search { width: 100%; flex: 0 0 auto; min-width: 0; }
  .catalog-sort { width: 100%; flex: 0 0 auto; }
  .catalog-sort select { width: 100%; }

  /* Catalog layout: sin margin-top extra */
  .catalog-layout { margin-top: 0.5rem; gap: 0.75rem; }

  /* Catalog main: pegado al sidebar */
  .catalog-meta { margin-bottom: 0.5rem; font-size: 0.85rem; }

  /* Sidebar: sin padding extra entre el toggle y el primer card */
  .catalog-sidebar { margin-bottom: 0; }
  .catalog-sidebar-toggle { margin-bottom: 0.5rem; }
}
