/* ================== ReciclaCAT escaparate · estilos ================== */

:root {
  /* Paleta ReciclaCAT */
  --green:          #2E9E47;   /* verde principal */
  --green-bright:   #34B051;   /* verde un poco más claro para hover */
  --green-dark:     #1f6f33;
  --green-darker:   #14471f;
  --teal:           #1E88A8;
  --teal-dark:      #186e8b;

  /* Neutros */
  --ink:            #1a1f1f;
  --ink-soft:       #4a5658;
  --muted:          #7a8588;
  --line:           #e1e6e4;
  --line-strong:    #c5cdca;

  /* Fondos */
  --bg:             #f4f7f3;
  --bg-card:        #ffffff;
  --bg-soft:        #ebf0ea;
  --bg-darker:      #1a2a1d;
  --bg-topbar:      #2a3a30;

  /* WhatsApp oficial */
  --wa:             #25D366;
  --wa-dark:        #1ebe5a;

  /* Tipografía */
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 6px;
  --radius-lg: 12px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1400px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ================== Cabecera principal verde con título ================== */
.site-header {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  min-height: 110px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  height: 78px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

.header-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.header-title .hero-kicker {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: rgba(255,255,255,.85);
}
.header-title .hero-kicker strong {
  color: #ffd84d;
  font-weight: 700;
}
.header-title h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-title h1 em {
  font-style: normal;
  color: #ffd84d;
}

.header-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-shrink: 0;
}
.header-nav > a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.header-nav > a:hover { border-bottom-color: #fff; }

.header-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: var(--wa);
  color: #fff !important;
  padding: 10px 18px !important;
  border-radius: 100px;
  font-weight: 700 !important;
  border-bottom: none !important;
  transition: background .15s, transform .15s;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.header-cta:hover {
  background: var(--wa-dark);
  border-bottom: none !important;
  transform: translateY(-1px);
}

/* ================== Hero compacto: solo búsqueda y stats ================== */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
  padding: 36px var(--gutter) 48px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(20,71,31,.92) 0%, rgba(31,111,51,.85) 50%, rgba(30,136,168,.82) 100%),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="p" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M0 30h60M30 0v60" stroke="rgba(255,255,255,0.04)" stroke-width="1"/><circle cx="30" cy="30" r="1" fill="rgba(255,255,255,0.06)"/></pattern></defs><rect width="200" height="200" fill="url(%23p)"/></svg>'),
    radial-gradient(ellipse at top right, rgba(46,158,71,.4), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(30,136,168,.3), transparent 60%),
    var(--green-darker);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,.92);
  margin: 0 auto 24px;
  max-width: 600px;
  line-height: 1.5;
}

.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 640px;
  margin: 0 auto 28px;
  background: #fff;
  border-radius: 100px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.hero-search-icon {
  color: var(--muted);
  flex-shrink: 0;
}
.hero-search #q {
  flex: 1;
  border: none;
  padding: 14px 12px;
  font-family: var(--sans);
  font-size: 16px;
  background: transparent;
  color: var(--ink);
  min-width: 0;
}
.hero-search #q:focus { outline: none; }
.hero-search #q::placeholder { color: var(--muted); }
.search-clear {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-soft);
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-clear:hover { background: var(--line); color: var(--ink); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 60px);
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat strong {
  font-family: var(--sans);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat span {
  font-family: var(--sans);
  font-size: 12px;
  color: rgba(255,255,255,.7);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ================== Banda de beneficios ================== */
.benefits {
  background: var(--bg-darker);
  color: #fff;
  padding: 24px var(--gutter);
}
.benefits-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 24px;
}
.benefit {
  display: flex;
  align-items: center;
  gap: 14px;
}
.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(46,158,71,.18);
  color: var(--green-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.benefit > div { display: flex; flex-direction: column; gap: 2px; }
.benefit strong {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.benefit span {
  font-size: 12px;
  color: rgba(255,255,255,.65);
}

/* ================== Filtros ================== */
.filters {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
}
.filters-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: grid;
  gap: 14px;
}

.select-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.select { display: flex; flex-direction: column; gap: 5px; }
.select > span {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.select select, .year-inputs input {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-family: var(--sans);
  font-size: 14px;
  border-radius: var(--radius);
  color: var(--ink);
  width: 100%;
  transition: border-color .15s;
}
.select select:focus, .year-inputs input:focus {
  outline: none; border-color: var(--green);
}
.select select:disabled {
  opacity: .55; cursor: not-allowed; background: var(--bg-soft);
}
.year-inputs { display: flex; align-items: center; gap: 6px; }
.year-inputs span { color: var(--muted); }
.year-inputs input { font-family: var(--mono); text-align: center; font-size: 13px; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
#sort {
  margin-left: auto;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-family: var(--sans);
  font-size: 13px;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink);
}
#sort:focus { outline: none; border-color: var(--green); }

.reset {
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius);
  color: var(--ink-soft);
  transition: all .15s;
}
.reset:hover {
  border-color: var(--green);
  color: var(--green);
}

.results-count {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}
.results-count strong {
  color: var(--green-dark);
  font-weight: 700;
}

/* ================== Grid ================== */
.grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px 16px;
}
.card {
  background: var(--bg-card);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  animation: rise .4s cubic-bezier(.2,.7,.2,1) backwards;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(20,71,31,.12);
  border-color: var(--green);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
  position: relative;
  border-bottom: 1px solid var(--line);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card-media img { transform: scale(1.04); }

.badge-ref {
  position: absolute; top: 8px; left: 8px;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-cat {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0;
}
.card-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-vehicle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin: 0;
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: auto;
  padding-top: 8px;
}
.card-price {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--green-dark);
}
.card-year {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ================== Cargar más ================== */
.load-more-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--gutter) 56px;
  text-align: center;
}
.load-more {
  padding: 14px 32px;
  border: none;
  background: var(--green);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 100px;
  color: #fff;
  transition: all .15s;
  box-shadow: 0 4px 12px rgba(46,158,71,.25);
}
.load-more:hover {
  background: var(--green-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46,158,71,.35);
}

/* ================== Estado ================== */
.status {
  text-align: center;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  padding: 32px 16px 64px;
}

/* ================== Modal ================== */
.product-modal {
  border: none;
  padding: 0;
  background: #fff;
  width: min(1000px, 94vw);
  max-height: 92vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.product-modal::backdrop {
  background: rgba(20,71,31,.6);
  backdrop-filter: blur(4px);
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 22px; cursor: pointer; z-index: 5; line-height: 1;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.modal-close:hover { background: var(--bg-soft); color: var(--green-dark); }
.modal-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 460px;
  max-height: 92vh;
  overflow: auto;
}
.modal-media {
  background: var(--bg-soft);
  position: relative;
  min-height: 320px;
}
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumbs {
  position: absolute; bottom: 12px; left: 12px;
  display: flex; gap: 6px;
}
.modal-thumbs button {
  width: 50px; height: 38px;
  border: 2px solid #fff;
  padding: 0; cursor: pointer;
  background: var(--bg-soft); overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.modal-thumbs button.active { border-color: var(--green); }
.modal-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.modal-info {
  padding: clamp(20px, 3vw, 36px);
  display: flex; flex-direction: column;
}
.modal-info .card-cat {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 11px;
}
.modal-info h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}
.modal-vehicle {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}
.modal-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
  font-family: var(--sans);
  font-size: 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin-bottom: 18px;
}
.modal-meta dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  font-weight: 600;
}
.modal-meta dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 500;
}

.modal-note {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #fff8e8;
  border-left: 3px solid #f5b73c;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.modal-price-line {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.modal-price {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 28px;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}
.modal-price-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.cta-wa {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 10px;
  padding: 16px 22px;
  background: var(--wa);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background .15s, transform .15s;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37,211,102,.3);
}
.cta-wa:hover {
  background: var(--wa-dark);
  color: #fff;
  transform: translateY(-1px);
}
.cta-wa svg { width: 20px; height: 20px; }

.cta-note {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

/* ================== Pie ================== */
.site-footer {
  background: var(--bg-darker);
  color: #cbd5d8;
  padding: 56px var(--gutter) 28px;
  margin-top: 0;
  border-top: 4px solid var(--green);
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-footer h3 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: #fff;
}
.site-footer p {
  margin: 0;
  color: #9aa5a8;
  font-size: 13px;
  line-height: 1.6;
}
.site-footer a { color: #6ee0a4; }
.site-footer a:hover { color: var(--wa); }
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #9aa5a8;
}
.contact-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(46,158,71,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-bright);
  flex-shrink: 0;
}
.contact-list a {
  color: #cbd5d8;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color .15s, color .15s;
}
.contact-list a:hover {
  color: var(--green-bright);
  border-bottom-color: var(--green-bright);
}
.copyleft {
  max-width: var(--max); margin: 0 auto; padding-top: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: #6c787c;
}

/* ================== Mobile ================== */
@media (max-width: 900px) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 14px;
    min-height: 0;
    padding: 14px var(--gutter);
  }
  .header-title {
    order: 3;
    flex-basis: 100%;
    text-align: center;
  }
  .header-title h1 {
    font-size: 22px;
  }
  .header-title .hero-kicker {
    font-size: 11px;
  }
}

@media (max-width: 720px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-media { min-height: 240px; aspect-ratio: 4/3; }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px 10px;
    padding: 16px var(--gutter);
  }

  .brand-logo { height: 56px; }
  .header-nav { gap: 12px; }
  .header-nav > a { font-size: 13px; }
  .header-cta { padding: 8px 14px !important; font-size: 12px !important; }
  .header-cta svg { width: 14px; height: 14px; }

  .hero { padding: 28px var(--gutter) 36px; }
  .hero-sub { font-size: 14px; margin-bottom: 18px; }
  .hero-search { padding: 4px 4px 4px 16px; }
  .hero-search #q { padding: 11px 8px; font-size: 14px; }
  .hero-stats { gap: 16px; }
  .stat strong { font-size: 20px; }
  .stat span { font-size: 11px; }

  .benefits-inner { gap: 14px 16px; }
  .benefit { gap: 10px; }
  .benefit-icon { width: 38px; height: 38px; }
  .benefit-icon svg { width: 20px; height: 20px; }
  .benefit strong { font-size: 13px; }
  .benefit span { font-size: 11px; }

  #sort, .reset { width: 100%; margin-left: 0; }
  .toolbar { flex-direction: column; align-items: stretch; }

  .modal-meta { grid-template-columns: 1fr; gap: 10px; }
  .card-title { font-size: 13px; }
  .card-price { font-size: 14px; }
}
