/* =========================================================
   Gallegos Trailer Sales — global stylesheet
   System-font, dependency-free, responsive, fast-loading.
   ========================================================= */

:root {
  --navy: #26292e;        /* graphite (matches logo dark ribbon) */
  --navy-800: #2f333a;
  --navy-700: #3a3f47;
  --steel: #6b7280;       /* neutral gray */
  --steel-100: #f1f2f4;
  --steel-200: #dfe2e7;
  --accent: #d81f27;      /* Gallegos red */
  --accent-dark: #b0141a;
  --ink: #1e2126;
  --muted: #5c626b;
  --line: #e4e6ea;
  --white: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, .07), 0 2px 6px rgba(20, 22, 26, .07);
  --shadow-md: 0 6px 24px rgba(20, 22, 26, .12);
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.3px; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: .6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  line-height: 1;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--steel); color: var(--navy); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(30, 33, 38, .97);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: .3px;
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-logo { height: 52px; width: auto; display: block; }
@media (max-width: 420px) { .brand-logo { height: 44px; } }
.brand .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 900; font-size: 1rem;
  flex: none;
}
.brand small { display: block; font-size: .68rem; font-weight: 600; color: var(--steel-200); letter-spacing: .5px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: #d7dfea;
  font-weight: 600;
  font-size: .95rem;
  padding: .5rem .7rem;
  border-radius: 8px;
  text-decoration: none;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-links a.active { color: #fff; background: rgba(255,255,255,.10); }
.nav-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  color: #fff; font-weight: 800; font-size: .95rem;
  padding: .55rem .95rem; border-radius: 8px;
  background: var(--accent); text-decoration: none; white-space: nowrap;
}
.nav-cta:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

.nav-toggle {
  display: none;
  background: transparent; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 0; color: #fff;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; position: relative;
  width: 24px; height: 2px; background: #fff; margin: 0 auto;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top: 7px; }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); padding: .5rem 12px 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .8rem .7rem; font-size: 1rem; }
  .nav-links .nav-cta { justify-content: center; margin-top: .5rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(216,31,39,.28), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-800) 55%, #1a1c20 100%);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-home { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero-lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #cdd8e6; max-width: 60ch; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; margin-top: 2.4rem;
  color: #b9c6d8; font-size: .95rem;
}
.hero-trust span { display: inline-flex; align-items: center; gap: .5rem; }
.hero-trust strong { color: #fff; }

/* Page hero (interior) */
.page-hero { padding: clamp(2.6rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 2.6rem); }
.page-hero .hero-lead { margin-bottom: .4rem; }
.breadcrumb { font-size: .85rem; color: #9fb0c6; margin-bottom: 1rem; }
.breadcrumb a { color: #cdd8e6; }
.breadcrumb span { color: #7f92ab; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 60ch; margin-bottom: 2.2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { font-size: 1.12rem; color: var(--muted); }

/* ---------- Category cards (home) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.2rem;
}
.cat-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
  text-decoration: none; color: inherit;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--steel-200); text-decoration: none; }
.cat-card .thumb { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: var(--steel-100); }
.cat-card .body { padding: 1.25rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.cat-card h3 { margin-bottom: .35rem; }
.cat-card p { color: var(--muted); font-size: .96rem; margin-bottom: 1rem; }
.cat-card .more { margin-top: auto; color: var(--accent-dark); font-weight: 700; font-size: .95rem; }
.cat-card:hover .more { text-decoration: underline; }

/* ---------- Product blocks (category pages) ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.6rem, 4vw, 2.4rem) 0;
}
.product + .product { border-top: 1px solid var(--line); }
.product.reverse .product-media { order: 2; }
.product-media img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  background: var(--steel-100);
}
.product-body h2 { margin-bottom: .4rem; }
.product-body .tagline { color: var(--muted); margin-bottom: 1.1rem; }

.specs { list-style: none; margin: 0 0 1.3rem; padding: 0; display: grid; gap: .55rem; }
.specs li { display: flex; gap: .7rem; align-items: baseline; font-size: .98rem; }
.specs li::before {
  content: ""; flex: none; width: 8px; height: 8px; margin-top: .45rem;
  border-radius: 2px; background: var(--accent);
}
.specs li b { color: var(--navy); font-weight: 700; }

.spec-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.3rem; padding: 0; list-style: none; }
.spec-pills li {
  background: var(--steel-100); color: var(--navy-700);
  border: 1px solid var(--steel-200);
  font-size: .85rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 999px;
}

@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; }
  .product.reverse .product-media { order: 0; }
}

/* ---------- Feature / value rows ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem;
}
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
}
.feature .ico {
  width: 42px; height: 42px; border-radius: 10px; margin-bottom: .9rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--steel-100); color: var(--accent);
}
.feature h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(216,31,39,.28), transparent 60%),
    linear-gradient(120deg, var(--navy) 0%, var(--navy-800) 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem;
}
.cta-band h2 { color: #fff; margin: 0 0 .3rem; }
.cta-band p { color: #cdd8e6; margin: 0; max-width: 46ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-md);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; color: var(--navy); font-size: .92rem; margin-bottom: .4rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .9rem; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--steel);
  box-shadow: 0 0 0 3px rgba(74,103,135,.18);
}
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: .2rem; }
.form-status { margin-top: 1rem; font-weight: 600; display: none; }
.form-status.ok { display: block; color: #1a7f45; }
.form-status.err { display: block; color: #b3341f; }

.contact-info { display: grid; gap: 1rem; }
.info-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm);
  display: flex; gap: .9rem; align-items: flex-start;
}
.info-card .ico {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  background: var(--steel-100); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.info-card h3 { font-size: 1rem; margin: 0 0 .15rem; }
.info-card p, .info-card a { margin: 0; color: var(--muted); font-size: .96rem; }
.info-card a { color: var(--navy-700); font-weight: 600; }
.wa-card { border-color: #25d36633; background: #f2fdf6; }
.wa-card .ico { background: #dff7e6; color: #128c3e; }

/* ---------- About ---------- */
.prose { max-width: 68ch; }
.prose p { color: var(--ink); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; text-align: center; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 1.8rem; color: var(--navy); font-weight: 900; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: .8rem; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.05rem 1.25rem;
  font-weight: 700; color: var(--navy); font-size: 1.05rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--accent);
  line-height: 1; transition: transform .2s ease; flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent-dark); }
.faq-answer { padding: 0 1.25rem 1.2rem; color: var(--muted); }
.faq-answer p { margin: 0; }
.faq-answer a { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3cfdd; padding: 3rem 0 1.4rem; margin-top: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .9rem; }
.site-footer a { color: #c3cfdd; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-brand p { color: #9fb0c6; font-size: .95rem; max-width: 40ch; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.2rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: space-between;
  color: #8ea0b6; font-size: .85rem;
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  display: inline-flex; align-items: center; gap: .55rem;
  background: #25d366; color: #fff; font-weight: 700; font-size: .95rem;
  padding: .7rem .95rem .7rem .8rem; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(18,140,62,.4); text-decoration: none;
}
.wa-float:hover { background: #1eb85a; color: #fff; text-decoration: none; transform: translateY(-1px); }
.wa-float svg { flex: none; }
.wa-float .label { }
@media (max-width: 520px) { .wa-float .label { display: none; } .wa-float { padding: .8rem; } }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.product-thumbs { display: flex; gap: .6rem; margin-top: .6rem; }
.product-thumbs img { flex: 1 1 0; min-width: 0; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--steel-100); }

.steel-section { background: #f5f7fa; }
.steel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 1.8rem); margin-top: 1.6rem; }
.steel-card { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.steel-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--steel-100); }
.steel-body { padding: 1.1rem 1.25rem 1.4rem; }
.steel-body h3 { margin-bottom: .4rem; }
@media (max-width: 640px) { .steel-grid { grid-template-columns: 1fr; } }
