/* ═══════════════════════════════════════════════════════════════════════════
   style.css — Repuestos Ruta 12 II
   Industrial neon-on-black aesthetic — Oswald (display) + Inter (body)
   Dark-only, single-language (es). No theme or language toggles.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1. Reset / Box-sizing ─────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* CRITICAL: [hidden] must be display:none !important.
   Without this, display:flex on parent rules would override [hidden] attribute
   and prevent loading/error state transitions from working correctly. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── 2. CSS Custom Properties ──────────────────────────────────────────── */

:root {
  /* ── Brand colors (dark-only — no light theme) ── */
  --bg-primary:     #0A0A0A;
  --bg-secondary:   #141414;
  --bg-card:        #1A1A1A;
  --bg-card-hover:  #1F1F1F;
  --text-primary:   #F5F5F5;
  --text-secondary: #C8C8C8;
  --text-muted:     #888888;
  --accent:         #FF7A00;
  --accent-hover:   #FF8C1A;
  --accent-glow:    rgba(255, 122, 0, 0.30);
  --accent-tint:    rgba(255, 122, 0, 0.08);
  --border:         rgba(255, 255, 255, 0.08);
  --border-accent:  rgba(255, 122, 0, 0.35);

  /* ── Catalog-specific ── */
  --color-price:           #FF8C1A;
  --color-price-bg:        rgba(255, 140, 26, 0.10);
  --color-whatsapp:        #25D366;
  --color-whatsapp-hover:  #1EBE5A;
  --color-whatsapp-glow:   rgba(37, 211, 102, 0.30);
  --color-badge:           var(--accent);
  --color-success:         #2E7D4F;
  --color-success-text:    #4ADE80;
  --color-featured:        #008DFF;
  --color-featured-bg:     rgba(0, 141, 255, 0.12);
  --color-featured-border: rgba(0, 141, 255, 0.35);
  --color-consultar:       var(--text-secondary);

  /* ── Typography ── */
  --font-display: 'Oswald', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* ── Layout ── */
  --header-height:            64px;
  --cart-drawer-width:        420px;
  --cart-drawer-width-mobile: 100vw;
  --section-padding:          clamp(3rem, 8vw, 6rem);
  --container-max:            1280px;
  --container-pad:            1.5rem;
  --gap:                      1.5rem;
  --radius:                   0.5rem;
  --radius-lg:                0.875rem;
  --radius-xl:                1.25rem;
  --transition:               0.25s ease;
  --transition-slow:          0.45s ease;
}

/* ─── 3. Typography scale ────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }

p  { font-size: clamp(0.9375rem, 1.5vw, 1.0625rem); }

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 2rem;
  color: var(--text-primary);
}

/* ─── 4. Utilities ───────────────────────────────────────────────────────── */

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  z-index: 9999;
  border-radius: var(--radius);
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  min-height: 44px;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--accent);
  color: #000;
}
.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 18px var(--accent-glow);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 122, 0, 0.4);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  box-shadow: 0 4px 16px var(--color-whatsapp-glow);
}
.btn--whatsapp:hover {
  background: var(--color-whatsapp-hover);
  box-shadow: 0 6px 24px var(--color-whatsapp-glow);
}

.btn--lg { padding: 17px 38px; font-size: 1rem; letter-spacing: 0.06em; }
.btn--sm { padding: 0.5rem 0.875rem; font-size: 0.8125rem; min-height: 44px; }

/* ─── 5. Header / Nav ────────────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid var(--border);
  /* backdrop-filter creates a stacking context — child menus use height-based
     positioning (not bottom:0) to avoid iOS Safari fixed-child clipping */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1rem;
}

/* Logo — SVG text mark */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-right: auto;
  text-decoration: none;
}
.nav__logo-img {
  height: 40px;
  width: auto;
  display: block;
}

/* Cart button — always visible, outside hamburger */
.nav__cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  color: var(--text-primary);
  transition: color var(--transition);
  flex-shrink: 0;
}
.nav__cart-btn:hover { color: var(--accent); }
.nav__cart-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav__cart-btn svg { width: 22px; height: 22px; }

.nav__cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--color-badge);
  color: #000;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  pointer-events: none;
}

/* Hamburger */
.nav__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  border-radius: var(--radius);
  color: var(--text-primary);
  flex-shrink: 0;
  transition: color var(--transition);
}
.nav__hamburger:hover { color: var(--accent); }
.nav__hamburger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Collapsible nav menu (mobile) */
.nav__menu {
  display: none;
  position: absolute;
  /* Use height-based positioning because backdrop-filter on .header
     creates a containing block that breaks position:fixed children in Safari.
     top = var(--header-height); height = 100vh - header */
  top: var(--header-height);
  left: 0;
  right: 0;
  height: calc(100vh - var(--header-height));
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  padding: 1.5rem var(--container-pad) 2rem;
}
.nav__menu.nav--open { display: flex; }

.nav__links {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav__link {
  display: block;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.nav__link:hover,
.nav__link--active { color: var(--accent); }
.nav__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Desktop nav */
@media (min-width: 900px) {
  .nav__hamburger { display: none; }
  .nav__menu {
    display: flex;
    position: static;
    height: auto;
    background: none;
    border: none;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 0;
    overflow: visible;
  }
  .nav__links {
    flex-direction: row;
    gap: 0.25rem;
  }
  .nav__link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: none;
  }
}

/* ─── 6. Hero section ────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Layer 1 — decorative neon grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 122, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 122, 0, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Layer 2 — neon glow that covers logo AND tagline as one luminous unit.
   Taller than the previous version so the orange falloff radiates behind the
   tagline text. Center shifted down (-46% instead of -50%) so the bottom
   half of the gradient bleeds into the tagline region.
   rgba values computed directly (no color-mix) — stays visible on #0A0A0A. */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  width: 640px;
  height: 520px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 122, 0, 0.34)  0%,
    rgba(255, 122, 0, 0.14) 34%,
    rgba(0, 141, 255, 0.06) 55%,
    rgba(255, 122, 0, 0)    75%
  );
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

/* Content sits above all decorative layers (grid z:0, streaks z:1, embers z:2) */
.hero__content {
  position: relative;
  z-index: 3;
  /* Full container width — NOT shrink-to-content. Text spans its own measure,
     independent of the logo's width. */
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 52px 24px 46px;
  text-align: center;
}

/* Hero H1 wrapper — semantic weight only; layout driven by the img inside */
.hero__title {
  /* No extra margin — vertical rhythm is set on the logo itself */
  margin: 0;
}

/* Real logo image — respects natural (non-square) proportion.
   No border, no border-radius, no box-shadow on the img. */
.hero__logo {
  display: block;
  margin: 16px auto 0;   /* eyebrow → logo gap (~16px keeps it tight) */
  width: min(400px, 72vw);
  height: auto;
  /* No aspect-ratio override — natural crop proportion is preserved */
}

/* Eyebrow / brand-mark — centered on its own full width */
.hero__brand-mark {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.8vw, 0.9375rem);
  font-weight: 600;
  letter-spacing: 0.25em;
  padding-left: 0.25em; /* compensate trailing letter-spacing so optical center aligns */
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Tagline — its own max-width, independent of the logo's width.
   6px gap pulls tagline tight against the logo so it sits inside
   the orange glow the logo radiates. */
.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.1875rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 6px auto 0;    /* logo → tagline gap (tight — inside the glow) */
  line-height: 1.65;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 30px;      /* tagline → CTAs gap */
}

/* ─── Hero animated layers ──────────────────────────────────────────────── */

/* Streaks container — rotated plane, clipped by hero overflow */
.hero__streaks {
  position: absolute;
  inset: -20% -10%;
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

@keyframes streakMove {
  0%   { transform: translateX(-60vw); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(60vw); opacity: 0; }
}

.hero__streaks span {
  position: absolute;
  height: 2px;
  border-radius: 2px;
  animation: streakMove linear infinite;
}

.hero__streaks span:nth-child(1) {
  top: 18%; width: 280px;
  background: linear-gradient(90deg, transparent, rgba(255,122,0,0.55), transparent);
  animation-duration: 7s; animation-delay: 0s;
}
.hero__streaks span:nth-child(2) {
  top: 34%; width: 200px;
  background: linear-gradient(90deg, transparent, rgba(0,141,255,0.50), transparent);
  animation-duration: 9s; animation-delay: 2s;
}
.hero__streaks span:nth-child(3) {
  top: 52%; width: 340px;
  background: linear-gradient(90deg, transparent, rgba(255,122,0,0.55), transparent);
  animation-duration: 6.5s; animation-delay: 1s;
}
.hero__streaks span:nth-child(4) {
  top: 70%; width: 220px;
  background: linear-gradient(90deg, transparent, rgba(255,122,0,0.55), transparent);
  animation-duration: 8.5s; animation-delay: 3s;
}
.hero__streaks span:nth-child(5) {
  top: 84%; width: 260px;
  background: linear-gradient(90deg, transparent, rgba(0,141,255,0.50), transparent);
  animation-duration: 7.5s; animation-delay: 0.5s;
}

/* Embers container */
.hero__embers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

@keyframes emberRise {
  0%   { transform: translateY(20px); opacity: 0; }
  20%  { opacity: 0.9; }
  100% { transform: translateY(-160px); opacity: 0; }
}

.hero__embers span {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(255,140,26,0.8);
  animation: emberRise linear infinite;
}

.hero__embers span:nth-child(1) { bottom: 30%; left: 15%; animation-duration: 6.5s; animation-delay: 0s; }
.hero__embers span:nth-child(2) { bottom: 25%; left: 30%; animation-duration: 8s;   animation-delay: 1.2s; }
.hero__embers span:nth-child(3) { bottom: 35%; left: 50%; animation-duration: 7s;   animation-delay: 0.4s; }
.hero__embers span:nth-child(4) { bottom: 28%; left: 65%; animation-duration: 8.5s; animation-delay: 2s; }
.hero__embers span:nth-child(5) { bottom: 32%; left: 80%; animation-duration: 6s;   animation-delay: 0.8s; }
.hero__embers span:nth-child(6) { bottom: 22%; left: 42%; animation-duration: 7.5s; animation-delay: 1.8s; }

/* Screen-reader only utility */
.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;
}

/* ─── 7. About / Historia section ───────────────────────────────────────── */

.about {
  padding-block: var(--section-padding);
  background: var(--bg-secondary);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

.about__paragraphs {
  max-width: 720px;
  margin-bottom: 3rem;
}
.about__paragraphs p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

/* Values grid */
.values__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap);
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.value-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 20px var(--accent-tint);
}

.value-card__icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 1rem;
}
.value-card__icon svg {
  width: 100%;
  height: 100%;
}

.value-card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.value-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── 7b. Cómo cotizar / How-to-quote section ──────────────────────────── */

.how-to-quote {
  padding-block: var(--section-padding);
  background: var(--bg-primary);
  position: relative;
}
.how-to-quote::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

.how-to-quote__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.how-to-quote__step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.how-to-quote__step:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 20px var(--accent-tint);
}

.how-to-quote__step-icon {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-tint);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  color: var(--accent);
}
.how-to-quote__step-icon svg {
  width: 24px;
  height: 24px;
}
.how-to-quote__step-number {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.how-to-quote__step-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.how-to-quote__step-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (min-width: 640px) {
  .how-to-quote__steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── 8. Catalog section ─────────────────────────────────────────────────── */

.catalog {
  padding-block: var(--section-padding);
  background: var(--bg-primary);
}

.catalog__controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Search */
.catalog__search {
  position: relative;
}
.catalog__search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 44px;
}
.catalog__search-input::placeholder { color: var(--text-muted); }
.catalog__search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.catalog__search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

/* Category filters */
.catalog__filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.catalog__filters::-webkit-scrollbar { height: 3px; }
.catalog__filters::-webkit-scrollbar-track { background: transparent; }
.catalog__filters::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.catalog__filter {
  flex-shrink: 0;
  padding: 0.4375rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  min-height: 44px;
  cursor: pointer;
}
.catalog__filter:hover { border-color: var(--accent); color: var(--accent); }
.catalog__filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.catalog__filter--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* Loading state */
.catalog__loading {
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Spinner */
.catalog__loading::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Error state */
.catalog__error {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-secondary);
}
.catalog__error p { margin-bottom: 1.25rem; }
.catalog__retry { margin-inline: auto; }

/* Empty state */
.catalog__empty {
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

/* Pagination footer (counter + load-more) */
.catalog__pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.catalog__counter {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.catalog__load-more {
  min-width: 180px;
  min-height: 44px;
}

/* Product grid */
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* ─── 9. Product cards ───────────────────────────────────────────────────── */

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  position: relative;
}
.product-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(255, 122, 0, 0.12);
}
.product-card:focus-within { border-color: var(--accent); }

/* Badge */
.product-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 1;
}
.product-card__badge svg { width: 10px; height: 10px; }

.product-card__badge--featured {
  background: var(--color-featured-bg);
  border: 1px solid var(--color-featured-border);
  color: var(--color-featured);
}

.product-card__badge--cat {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Product image */
.product-card__image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  background: var(--bg-secondary);
  transition: opacity var(--transition);
}
.product-card:hover .product-card__image { opacity: 0.9; }

/* Card body */
.product-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-card__description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex: 1;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}

/* Price — orange when present */
.product-card__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--color-price);
  white-space: nowrap;
}

/* "Consultar precio" — intentional, metallic gray */
.product-card__price--consultar {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  font-style: italic;
  color: var(--color-consultar);
  letter-spacing: 0;
}

/* Add button */
.product-card__add {
  flex-shrink: 0;
}
.product-card__add--added {
  background: var(--color-success) !important;
  color: var(--color-success-text) !important;
  pointer-events: none;
}

/* ─── 8b. FAQ section ────────────────────────────────────────────────────── */

.faq {
  padding-block: var(--section-padding);
  background: var(--bg-secondary);
  position: relative;
}
.faq::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

.faq__list {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq__item {
  border-bottom: 1px solid var(--border);
}
.faq__item:first-child {
  border-top: 1px solid var(--border);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
  min-height: 44px;
}
.faq__question:hover { color: var(--accent); }
.faq__question:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.faq__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}
.faq__item--open .faq__chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq__answer {
  padding-bottom: 1.25rem;
}
.faq__answer p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: clamp(0.9rem, 1.4vw, 1rem);
}

/* ─── 10. Cart / Quote drawer ─────────────────────────────────────────────── */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1999;
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.cart-overlay.active { opacity: 1; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--cart-drawer-width-mobile);
  max-width: var(--cart-drawer-width);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}
.cart-drawer.active { transform: translateX(0); }

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-drawer__header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.cart-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}
.cart-drawer__close:hover { color: var(--accent); background: var(--accent-tint); }
.cart-drawer__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cart-drawer__close svg { width: 20px; height: 20px; }

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 200px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.cart-drawer__empty-icon {
  font-size: 2.5rem;
}

/* Cart items */
.cart-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }

.cart-item__image {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-card);
  flex-shrink: 0;
}

.cart-item__info {
  flex: 1;
  min-width: 0;
}
.cart-item__name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}
.cart-item__price {
  font-size: 0.8125rem;
  color: var(--color-price);
  font-weight: 600;
}
.cart-item__price--confirm {
  font-style: italic;
  color: var(--text-muted);
  font-weight: 400;
}

/* Qty controls */
.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}
.cart-item__qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
.cart-item__qty-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }
.cart-item__qty-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cart-item__qty-btn svg { width: 14px; height: 14px; }
.cart-item__qty {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 20px;
  text-align: center;
}

.cart-item__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.cart-item__remove:hover { color: #ef4444; background: rgba(239, 68, 68, 0.10); }
.cart-item__remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cart-item__remove svg { width: 16px; height: 16px; }

/* Cart drawer footer */
.cart-drawer__footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cart-drawer__total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
}
#cart-total-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
#cart-total-amount {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.cart-drawer__whatsapp {
  width: 100%;
  background: var(--color-whatsapp);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px var(--color-whatsapp-glow);
  min-height: 48px;
}
.cart-drawer__whatsapp:hover {
  background: var(--color-whatsapp-hover);
  box-shadow: 0 6px 24px var(--color-whatsapp-glow);
}
.cart-drawer__whatsapp:focus-visible { outline: 2px solid var(--color-whatsapp); outline-offset: 3px; }
.cart-drawer__whatsapp svg { width: 20px; height: 20px; flex-shrink: 0; }

.cart-drawer__clear {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: color var(--transition), border-color var(--transition);
  min-height: 44px;
  min-width: 44px;
}
.cart-drawer__clear:hover { color: var(--text-primary); border-color: var(--text-muted); }
.cart-drawer__clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── 11. Contact section ────────────────────────────────────────────────── */

.contact {
  padding-block: var(--section-padding);
  background: var(--bg-secondary);
  position: relative;
}
.contact::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

.contact__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact__content { max-width: 560px; }
.contact__text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Map pin button */
.contact__map-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  min-height: 44px;
}
.contact__map-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-tint);
}
.contact__map-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact__map-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Contact info block */
.contact__info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact__info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.contact__info-label {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.contact__info-value {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
/* ─── 12. WhatsApp floating button ──────────────────────────────────────── */

.maps-float {
  position: fixed;
  bottom: 4.75rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(234, 67, 53, 0.4);
  z-index: 999;
  transition: transform var(--transition), box-shadow var(--transition);
}
.maps-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(234, 67, 53, 0.6);
}
.maps-float:focus-visible {
  outline: 3px solid #EA4335;
  outline-offset: 3px;
}
.maps-float svg { width: 20px; height: 20px; }

.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--color-whatsapp-glow);
  z-index: 999;
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
}
.whatsapp-float:focus-visible {
  outline: 3px solid var(--color-whatsapp);
  outline-offset: 3px;
}
.whatsapp-float svg { width: 20px; height: 20px; }

/* ─── 13. Footer ─────────────────────────────────────────────────────────── */

.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding-block: 1.75rem;
}
.footer__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
#footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}
#footer-developer {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer__dev-link {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
.footer__dev-link:hover { color: var(--accent-hover); text-decoration: underline; }
.footer__dev-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.footer__links {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer__policy-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer__policy-link:hover { color: var(--accent); text-decoration: underline; }
.footer__policy-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── 14. Noscript fallback ──────────────────────────────────────────────── */

.noscript-fallback {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-family: sans-serif;
}
.noscript-fallback h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.noscript-fallback p { margin-bottom: 0.75rem; }
.noscript-fallback a { color: var(--color-whatsapp); font-weight: 700; }

/* ─── 15. Animations ─────────────────────────────────────────────────────── */

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  /* Hide decorative hero animation layers entirely */
  .hero__streaks span,
  .hero__embers span {
    animation: none;
    opacity: 0;
  }
  .faq__chevron { transition: none; }
}

/* ─── 16. Quote-confirm modal ────────────────────────────────────────────── */

/* Dimmed backdrop — covers entire viewport */
.quote-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 3000;
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.quote-confirm-overlay.active { opacity: 1; }

/* Centered dialog card */
.quote-confirm-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  z-index: 3001;
  width: min(420px, calc(100vw - 2rem));
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border);
  opacity: 0;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.quote-confirm-dialog.active {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.quote-confirm__title {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.625rem;
}

.quote-confirm__helper {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.quote-confirm__actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.quote-confirm__btn-yes {
  /* Primary orange — inherits .btn--primary */
}

.quote-confirm__btn-no {
  /* Subtle — inherits .btn--outline */
}

/* ─── 17. Media queries (mobile-first) ──────────────────────────────────── */

/* ≤640px — two-column card internals tuning
   The grid is already 2-col from the base rule; this block tightens the
   internal layout so cards remain readable in the narrower columns. */
@media (max-width: 640px) {
  /* Card padding */
  .product-card__body {
    padding: 0.625rem;
    min-width: 0;
  }

  /* Square image fills card width */
  .product-card__image {
    aspect-ratio: 1 / 1;
  }

  /* Name: smaller font, clamp to 2 lines */
  .product-card__name {
    font-size: clamp(0.875rem, 3.4vw, 1rem);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.375rem;
    min-width: 0;
  }

  /* Description: hidden on narrow mobile — keeps cards even and uncluttered */
  .product-card__description {
    display: none;
  }

  /* Footer: stack price above button to prevent overflow on very narrow columns */
  .product-card__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding-top: 0.5rem;
    min-width: 0;
  }

  /* Price / Consultar: legible, stays orange */
  .product-card__price {
    font-size: 1rem;
    white-space: normal;
    word-break: break-word;
  }
  .product-card__price--consultar {
    font-size: 0.8125rem;
  }

  /* Add button: full card width, tappable */
  .product-card__add {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.5rem 0.5rem;
    min-height: 44px;
    letter-spacing: 0.03em;
  }

  /* Featured badge: slightly smaller */
  .product-card__badge {
    font-size: 0.625rem;
    padding: 0.2rem 0.5rem;
    top: 0.5rem;
    left: 0.5rem;
  }
}

/* ≤360px — reduce gap slightly on very narrow phones */
@media (max-width: 360px) {
  .catalog__grid {
    gap: 8px;
  }
}

/* 480px — mobile landscape: restore standard gap now cards have more room */
@media (min-width: 480px) {
  .catalog__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
  }
}

/* 640px */
@media (min-width: 640px) {
  .catalog__search-input {
    max-width: 420px;
  }
  .catalog__controls {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .catalog__search { flex: 1; min-width: 240px; }
  .catalog__filters {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* 768px — tablet */
@media (min-width: 768px) {
  .contact__layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .catalog__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer__layout {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* 1024px — tablet landscape */
@media (min-width: 1024px) {
  .catalog__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .cart-drawer {
    max-width: 420px;
  }
}

/* 1280px — desktop */
@media (min-width: 1280px) {
  .catalog__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
