/* ═══════════════════════════════════════════════════════════
   CALESAN — BASE CSS
   Incluir en TODAS las páginas
   <link rel="stylesheet" href="/css/calesan.base.css">
═══════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg:          #F5F3EF;
  --bg2:         #FFFFFF;
  --bg3:         #EEEBe4;
  --border:      #DDD9D0;
  --border2:     #C8C3B8;
  --text:        #1A1814;
  --text2:       #5A5650;
  --text3:       #9A968F;
  --red:         #C0281A;
  --red-h:       #A82015;
  --red-light:   #FDF1F0;
  --red-mid:     #F3C4BF;
  --steel:       #2C5F8A;
  --steel-l:     #EDF4FA;
  --webpay:      #C0281A;
  --webpay-l:    #FDF1F0;
  --gold:        #9A7A20;
  --green:       #1E6E3C;
  --green-l:     #E8F5EE;
  --f-display:   'Fraunces', serif;
  --f-body:      'Plus Jakarta Sans', sans-serif;
  --r:           8px;
  --r-lg:        14px;
  --r-xl:        20px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.07);
  --shadow:      0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
  --max:         1200px;
  --ease:        0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── TOPBAR ── */
.topbar { background: var(--text); padding: 8px 0; }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar-left { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}
.topbar-item svg { width: 13px; height: 13px; opacity: 0.8; }
.topbar-item a { color: rgba(255,255,255,0.75); transition: color var(--ease); }
.topbar-item a:hover { color: #fff; }
.topbar-wa {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  transition: opacity var(--ease);
}
.topbar-wa:hover { opacity: 0.9; }
.topbar-wa svg { width: 14px; height: 14px; }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon {
  width: 40px; height: 40px;
  background: var(--red);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 22px; height: 22px; color: #fff; }
.logo-text {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1;
}
.logo-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  line-height: 1;
  margin-top: 2px;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  padding: 6px 12px;
  border-radius: var(--r);
  transition: color var(--ease), background var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--red);
  background: var(--red-light);
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease);
}
.nav-cart:hover { border-color: var(--red); color: var(--red); }
.nav-cart svg { width: 18px; height: 18px; }
.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}
.cart-badge.has-items { display: flex; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.bc-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text3);
}
.bc-inner a { color: var(--text3); transition: color var(--ease); }
.bc-inner a:hover { color: var(--red); }
.bc-sep { opacity: 0.4; }
.bc-current { color: var(--text2); font-weight: 500; }

/* ── BOTONES GLOBALES ── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  white-space: nowrap;
}
.btn-cta:hover {
  background: var(--red-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(192,40,26,0.28);
}
.btn-cta svg { width: 16px; height: 16px; }

/* ── WHATSAPP FAB ── */
.whatsapp-fab {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 200;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease);
}
.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}
.whatsapp-fab svg { width: 28px; height: 28px; color: #fff; }

/* ── FOOTER ── */
footer {
  background: var(--text);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo-icon {
  width: 36px; height: 36px;
  background: var(--red);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
}
.footer-logo-icon svg { width: 20px; height: 20px; color: #fff; }
.footer-logo-text {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.footer-desc { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.65; margin-bottom: 20px; }
.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color var(--ease); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 13px; color: rgba(255,255,255,0.4); transition: color var(--ease); }
.footer-legal a:hover { color: rgba(255,255,255,0.8); }
.footer-webpay {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r);
  padding: 8px 14px;
  margin-top: 20px;
}
.footer-webpay svg { width: 16px; height: 16px; color: #fff; }

/* ── SCROLL REVEAL UTILITARIO ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE BASE ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }
  .nav-toggle { display: block; }
  .topbar-left .topbar-item:nth-child(n+3) { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── NAV JS ── */
/* El script de hamburger es siempre el mismo: */
/*
  const toggle = document.getElementById('navToggle');
  const navLinks = document.getElementById('navLinks');
  toggle.addEventListener('click', () => {
    const open = navLinks.classList.toggle('open');
    toggle.setAttribute('aria-expanded', open);
  });
  window.addEventListener('scroll', () => {
    document.querySelector('.nav').style.boxShadow =
      window.scrollY > 10 ? '0 2px 20px rgba(0,0,0,0.1)' : '';
  }, { passive: true });
*/
