@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --blue-primary: #2e8eff;
  --blue-dark: #2e8eff;
  --white: #ffffff;
  --gray-light: #f8fafc;
  --gray-mid: #e2e8f0;
  --text-dark: #1e293b;
  --text-muted: #64748b;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
#navbar {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#navbar.scrolled {
  background: white !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
#navbar.scrolled .nav-link {
  color: var(--text-dark) !important;
}
#navbar.scrolled .nav-link.active {
  color: var(--blue-primary) !important;
}
#navbar.scrolled #menu-toggle {
  color: var(--text-dark) !important;
}
#navbar.scrolled img {
  content: url('Imagenes/logo.png');
}
.nav-link {
  position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--blue-primary);
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--blue-primary) !important; }

/* ── MOBILE MENU ── */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
#mobile-menu.open { max-height: 400px; }

/* ── HERO ── */
.hero-overlay {
  background: linear-gradient(135deg, rgba(37,42,62,0.88) 0%, rgba(46,142,255,0.55) 100%);
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--blue-primary);
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary:hover {
  background: #1a7de8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,142,255,0.35);
}
.btn-outline {
  border: 2px solid white;
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-outline:hover {
  background: white;
  color: var(--blue-dark);
  transform: translateY(-2px);
}
.btn-outline-blue {
  border: 2px solid var(--blue-primary);
  color: var(--blue-primary);
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-outline-blue:hover {
  background: var(--blue-primary);
  color: white;
  transform: translateY(-2px);
}

/* ── CARDS ── */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(46,142,255,0.15);
}

/* ── SECTION HEADING ── */
.section-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 2rem;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.2;
}
.section-divider {
  width: 3.5rem;
  height: 4px;
  background: var(--blue-primary);
  border-radius: 2px;
  margin: 1rem 0 1.5rem;
}

/* ── BREADCRUMB HERO ── */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #1a3a6b 100%);
  padding: 7rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(46,142,255,0.18) 0%, transparent 70%);
  border-radius: 50%;
}
.breadcrumb-link {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb-link:hover { color: white; }
.breadcrumb-sep { color: rgba(255,255,255,0.4); }

/* ── FORM ── */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-mid);
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(46,142,255,0.12);
}
.form-input.error { border-color: #ef4444; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue-dark);
  margin-bottom: 0.4rem;
}
.form-error {
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 0.25rem;
  display: none;
}
.form-error.visible { display: block; }

/* ── FOOTER ── */
footer h4 { color: white !important; }
footer a { transition: color 0.2s; }
footer a:hover { color: var(--blue-primary); }

/* ── FADE-IN ANIMATION ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── STICKY CTA BAR ── */
#sticky-cta {
  transition: transform 0.35s ease;
}

/* ── PRODUCT FILTER ── */
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 2px solid var(--blue-primary);
  color: var(--blue-primary);
  background: white;
  transition: background 0.2s, color 0.2s;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--blue-primary);
  color: white;
}

/* ── STAT COUNTER ── */
.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--blue-primary);
  line-height: 1;
}

/* ── E-COMMERCE CARDS ── */
.ec-card {
  display: flex; flex-direction: column; background: white;
  border-radius: 1rem; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07); border: 1px solid #f1f5f9;
  transition: box-shadow 0.25s, transform 0.25s;
}
.ec-card:hover { box-shadow: 0 10px 30px rgba(46,142,255,0.14); transform: translateY(-4px); }
.ec-header { height: 140px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.ec-badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 10px; font-weight: 700; padding: 4px 10px;
  border-radius: 9999px; text-transform: uppercase; letter-spacing: .05em;
}
.ec-icon-wrap { display: none; }
.ec-card:hover .ec-icon-wrap { transform: scale(1.08); }
.ec-body { padding: 1.2rem; display: flex; flex-direction: column; flex: 1; }
.ec-title { font-weight: 700; color: var(--blue-dark); font-size: 1rem; margin-bottom: 2px; }
.ec-subtitle { font-size: .75rem; color: #9ca3af; margin-bottom: 10px; font-weight: 500; }
.ec-desc {
  font-size: .875rem; color: #6b7280; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: .875rem;
}
.ec-features { list-style: none; padding: 0; margin: 0 0 .875rem; display: flex; flex-direction: column; gap: 4px; }
.ec-features li { font-size: .72rem; color: #9ca3af; display: flex; align-items: center; gap: 5px; }
.ec-features li::before { content: ''; width: 6px; height: 6px; background: #22c55e; border-radius: 50%; flex-shrink: 0; }
.ec-price-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 10px 0; border-top: 1px solid #f8fafc; margin-top: auto; margin-bottom: 10px;
}
.ec-price-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; margin-bottom: 2px; }
.ec-price { font-size: 1.1rem; font-weight: 800; color: var(--blue-dark); }
.ec-stock {
  display: flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600;
  color: #16a34a; background: #f0fdf4; padding: 4px 10px; border-radius: 9999px;
}
.ec-stock::before { content: ''; width: 6px; height: 6px; background: #22c55e; border-radius: 50%; }
.ec-actions { display: flex; gap: 8px; align-items: center; }
.ec-wa-btn {
  width: 40px; height: 40px; flex-shrink: 0; background: #f0fdf4;
  color: #16a34a; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s; text-decoration: none;
}
.ec-wa-btn:hover { background: #22c55e; color: white; }
.ec-actions .btn-primary { flex: 1; justify-content: center; padding: .65rem 1rem; font-size: .875rem; }

/* ── SIDEBAR FILTERS ── */
.sidebar-btn {
  width: 100%; text-align: left; display: flex; align-items: center;
  justify-content: space-between; padding: 7px 12px; border-radius: 10px;
  font-size: .875rem; color: #4b5563; background: none; border: none; cursor: pointer; transition: background 0.15s;
}
.sidebar-btn:hover { background: #f9fafb; }
.sidebar-btn.active-sidebar { background: rgba(46,142,255,.1); color: var(--blue-primary); font-weight: 700; }

/* ── MOBILE CHIPS ── */
.mobile-chip {
  font-size: .72rem; font-weight: 600; padding: 5px 12px; border-radius: 9999px;
  border: 2px solid #e5e7eb; background: white; color: #4b5563; cursor: pointer; transition: all 0.15s;
}
.mobile-chip.active-chip, .mobile-chip:hover { border-color: var(--blue-primary); background: var(--blue-primary); color: white; }

/* ── DRAWER ── */
.drawer-btn {
  width: 100%; text-align: left; display: flex; align-items: center;
  justify-content: space-between; padding: 12px 16px; border-radius: 12px;
  font-size: .875rem; color: #374151; background: none; border: 2px solid transparent; cursor: pointer;
}
.drawer-btn:hover { background: #f9fafb; }
.drawer-btn.active-drawer { background: rgba(46,142,255,.06); border-color: var(--blue-primary); color: var(--blue-primary); font-weight: 600; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--blue-primary); border-radius: 3px; }

/* ── MOBILE ── */
@media (max-width: 640px) {
  .page-hero { padding: 5.5rem 0 3rem; }
  .btn-primary, .btn-outline, .btn-outline-blue {
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
  }
}
