/* =========================================================================
   AlmaCamper — Sistema de diseño (port de senda/styles.css)
   Estética: outdoor / aventura / editorial · verde pino + ocre sobre crema
   Fuentes self-hosted en assets/fonts/ (ver inc/enqueue.php).
   ========================================================================= */

/* ============================ TOKENS ============================ */
:root {
  /* Tipografía */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'Spline Sans Mono', ui-monospace, monospace;

  /* Paleta FOREST · marca AlmaCamper (verde pino + ocre, del logo) */
  --paper:      #faf5ef;
  --paper-2:    #f1e9dd;
  --card:       #fffdf9;
  --ink:        #18302e;
  --ink-soft:   #3f5654;
  --ink-faint:  #6a807d;
  --line:       oklch(0.235 0.022 175 / 0.13);
  --line-soft:  oklch(0.235 0.022 175 / 0.07);

  --primary:    #123736;   /* pino profundo (logo) */
  --primary-d:  #0b2625;
  --primary-ink:#faf5ef;
  --accent:     #a86a34;   /* ocre / cobre (logo) */
  --accent-d:   #804e26;
  --clay:       #9a5a2f;   /* terracota */

  --shadow-sm: 0 1px 2px oklch(0.235 0.022 150 / 0.08), 0 2px 8px oklch(0.235 0.022 150 / 0.05);
  --shadow-md: 0 4px 16px oklch(0.235 0.022 150 / 0.10), 0 12px 36px oklch(0.235 0.022 150 / 0.08);
  --shadow-lg: 0 18px 48px oklch(0.235 0.022 150 / 0.16);

  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --maxw: 1240px;
  --nav-h: 76px;
}

/* ============================ BASE ============================ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--ink); }

.app-root { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--font-mono); font-size: 0.74em; letter-spacing: 0.06em; text-transform: uppercase; }

/* eyebrow / kicker */
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-d);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--accent-d);
  display: inline-block;
}

/* ============================ BOTONES ============================ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: 100px;
  padding: 13px 24px;
  display: inline-flex; align-items: center; gap: 9px;
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-d); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: oklch(0.24 0.03 60); }
.btn-accent:hover { background: var(--accent-d); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: var(--line-soft); }
.btn-lg { padding: 16px 30px; font-size: 17px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

/* chips */
.chip {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 100px;
  padding: 8px 15px;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .15s ease;
  cursor: pointer;
}
.chip:hover { border-color: var(--ink-faint); }
.chip[aria-pressed="true"], .chip.active {
  background: var(--primary); color: var(--primary-ink);
  border-color: var(--primary);
}

/* cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* tag pill */
.tag {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 7px;
  background: var(--paper-2); color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 5px;
}
.tag-accent { background: oklch(0.72 0.125 72 / 0.18); color: var(--accent-d); }

/* ============================ PLACEHOLDER IMG ============================ */
.ph {
  position: relative;
  background-color: var(--paper-2);
  background-image:
    repeating-linear-gradient(135deg,
      oklch(0.235 0.022 150 / 0.045) 0 2px,
      transparent 2px 11px);
  display: flex; align-items: flex-end; justify-content: flex-start;
  overflow: hidden;
  color: var(--ink-faint);
}
.ph > .ph-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--card);
  color: var(--ink-soft);
  padding: 5px 9px; border-radius: 7px;
  margin: 12px;
  border: 1px solid var(--line);
}
.ph-warm {
  background-color: oklch(0.72 0.125 72 / 0.14);
  background-image: repeating-linear-gradient(135deg,
    oklch(0.50 0.13 45 / 0.10) 0 2px, transparent 2px 12px);
}
/* La escena SVG de respaldo llena el contenedor */
.ph > svg, .ac-scene > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ac-scene { position: relative; overflow: hidden; }

/* ============================ UTILIDADES ============================ */
.muted { color: var(--ink-faint); }
.soft  { color: var(--ink-soft); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.divider { height: 1px; background: var(--line); border: none; margin: 0; }
.sr, .screen-reader-text { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0); }
.ac-icon { flex-shrink: 0; vertical-align: middle; }

/* secciones */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

/* grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* reveal */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .6s cubic-bezier(.2,.7,.3,1) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen { animation: screenIn .35s ease both; }

/* hide scrollbars on horizontal strips */
.no-sb::-webkit-scrollbar { display: none; }
.no-sb { scrollbar-width: none; }

/* focus */
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* form inputs (checkout) */
.ck-input, .ck-select {
  font-family: var(--font-body); font-size: 15.5px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 11px; padding: 12px 14px; width: 100%; transition: border-color .15s ease;
}
.ck-input:focus, .ck-select:focus { border-color: var(--primary); outline: none; }
.ck-input::placeholder { color: var(--ink-faint); }
.ck-select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}

/* mobile reserve bar */
.mobile-reserve {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  justify-content: space-between; align-items: center;
}

/* ============================ HEADER / NAV ============================ */
.site-header {
  position: sticky; top: 0; z-index: 80; height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: all .3s ease;
}
.site-header.is-scrolled {
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand img { height: 40px; width: auto; display: block; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; line-height: 1; }
.brand-word .a { color: var(--accent-d); }
.brand-word .c { color: var(--primary); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { padding: 9px 14px; border-radius: 100px; font-size: 15.5px; font-weight: 500; color: var(--ink-soft); }
.nav-links a:hover, .nav-links a.current { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; background: none; border: none; color: var(--ink); padding: 6px; }

/* menú móvil */
.nav-mobile { position: fixed; inset: 0; z-index: 200; background: var(--paper); padding: 24px; display: none; }
.nav-mobile.open { display: block; }
.nav-mobile-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.nav-mobile-links { display: flex; flex-direction: column; gap: 6px; }
.nav-mobile-links a { padding: 16px 0; font-family: var(--font-display); font-weight: 700; font-size: 32px; color: var(--ink); border-bottom: 1px solid var(--line); }

/* ============================ FOOTER ============================ */
.site-footer { background: var(--primary); color: var(--primary-ink); margin-top: auto; }
.site-footer .wrap { padding: 64px 28px 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand-row { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.footer-brand-mark { background: var(--paper); border-radius: 12px; padding: 7px 9px; display: grid; place-items: center; flex-shrink: 0; }
.footer-brand-mark img { height: 34px; width: auto; display: block; }
.footer-brand-word { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; }
.footer-tagline { opacity: .8; max-width: 280px; font-size: 15px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social span { width: 38px; height: 38px; border-radius: 50%; border: 1px solid color-mix(in oklch, var(--primary-ink) 30%, transparent); display: grid; place-items: center; opacity: .9; }
.footer-col-h { font-family: var(--font-mono); font-size: 11px; opacity: .65; margin-bottom: 14px; letter-spacing: .12em; text-transform: uppercase; }
.footer-col a { display: block; opacity: .82; font-size: 15px; padding: 0 0 11px; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; opacity: .7; font-size: 13px; margin-top: 40px; padding-top: 22px; border-top: 1px solid color-mix(in oklch, var(--primary-ink) 22%, transparent); }
.footer-bottom .legal { display: flex; gap: 18px; }

/* ============================ VAN CARD ============================ */
.van-card { display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .25s ease; }
.van-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.van-card h3 a { color: var(--ink); }
.van-card h3 a:hover { color: var(--primary); }
.van-card .van-card-media { border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg); overflow: hidden; }

/* Grid de productos del listado */
ul.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
ul.products li.product { margin: 0; }

/* ============================ BUSCADOR ============================ */
.ac-searchbar { display: flex; align-items: stretch; padding: 6px; border-radius: 100px; box-shadow: var(--shadow-md); flex-wrap: wrap; gap: 2px; }
.ac-sb-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 8px 16px; border-radius: 14px; cursor: pointer; transition: background .15s ease; }
.ac-sb-field:hover { background: var(--paper-2); }
.ac-sb-ico { color: var(--primary); display: inline-flex; }
.ac-sb-label { font-size: 10px; color: var(--ink-faint); }
.ac-sb-input { border: none; background: transparent; font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink); padding: 0; width: 100%; }
.ac-sb-input:focus { outline: none; }
.ac-sb-div { width: 1px; background: var(--line); margin: 8px 0; }
.ac-sb-btn { border-radius: 100px; padding: 0 24px; margin: 2px; }

/* ============================ SORT ============================ */
.ac-sort-select { font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 100px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }

/* ============================ FILTROS ============================ */
.ac-filters { display: flex; flex-direction: column; gap: 22px; }
.ac-filter-group { display: flex; flex-direction: column; }
.ac-filter-h { font-size: 11px; color: var(--ink-faint); margin-bottom: 12px; letter-spacing: .08em; text-transform: uppercase; }
.ac-chip-radio, .ac-chip-check { cursor: pointer; }
.filters-toggle { display: none; }

/* Drawer de filtros (móvil) */
.filters-drawer { position: fixed; inset: 0; z-index: 300; background: oklch(0.22 0.03 150 / 0.45); display: none; justify-content: flex-end; }
.filters-drawer.open { display: flex; }
.filters-drawer-panel { width: min(360px, 90vw); background: var(--paper); height: 100%; padding: 24px; overflow-y: auto; animation: screenIn .3s ease both; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  ul.products { grid-template-columns: repeat(2, 1fr); }
  .detail-layout, .checkout-layout { grid-template-columns: 1fr !important; }
  .booking-sticky, .summary-sticky { position: static !important; }
  .list-layout { grid-template-columns: 1fr !important; }
  .filters-aside { display: none !important; }
  .filters-toggle { display: inline-flex !important; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-help { display: none; }
  .nav-burger { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .how-num { font-size: 40px !important; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  ul.products { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .gallery { grid-template-columns: 1fr !important; height: auto !important; display: block !important; }
  .gallery-side { display: none !important; }
  .specs-grid { grid-template-columns: repeat(2,1fr) !important; }
  .feat-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .booking-sticky { display: none !important; }
  .mobile-reserve { display: flex; }
  .checkout-layout .summary-sticky { order: -1; }
}
