*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #dc0000;
  --primary-dark: #a80000;
  --primary-light: #ff2a2a;
  --bg-dark: #0a1e3d;
  --bg-card: #102a4d;
  --bg-elevated: #183660;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --shadow: 0 25px 50px -12px rgba(0,0,0,.5);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── LOADER ─── */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 1.5rem;
  transition: opacity .6s ease, visibility .6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }
#loader .spinner {
  width: 60px; height: 60px;
  border: 4px solid rgba(220,0,0,.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loader p { color: var(--text-muted); font-weight: 500; letter-spacing: 2px; text-transform: uppercase; font-size: .85rem; }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .4s, padding .4s, box-shadow .4s;
}
nav.scrolled { background: rgba(10,30,61,.92); backdrop-filter: blur(18px); padding: .6rem 2rem; box-shadow: 0 4px 30px rgba(0,0,0,.3); }
.nav-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.nav-logo img { height: 44px; transition: transform .3s; }
.nav-logo img:hover { transform: scale(1.05); }
.nav-logo span { font-weight: 800; font-size: 1.15rem; color: #fff; letter-spacing: -.5px; }
.nav-links { display: flex; align-items: center; gap: .5rem; list-style: none; }
.nav-links a {
  padding: .5rem 1rem; border-radius: 8px; text-decoration: none;
  color: var(--text-muted); font-weight: 500; font-size: .9rem;
  transition: color .3s, background .3s; position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; background: rgba(220,0,0,.15); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* ─── HERO ─── */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: var(--bg-dark);
}
#canvas-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(220,0,0,.08) 0%, transparent 60%);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  max-width: 880px; padding: 0 2rem;
  animation: fadeUp 1s ease forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.hero-badge {
  display: inline-block; padding: .4rem 1.2rem; border-radius: 50px;
  background: rgba(220,0,0,.12); border: 1px solid rgba(220,0,0,.25);
  color: var(--primary-light); font-size: .8rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 900;
  line-height: 1.05; letter-spacing: -1.5px;
  color: #fff;
  margin-bottom: 1.2rem;
}
.hero p {
  font-size: 1.15rem; color: var(--text-muted);
  max-width: 620px; margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 2rem; border-radius: 12px;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: all .35s cubic-bezier(.4,0,.2,1); cursor: pointer; border: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff; box-shadow: 0 8px 32px rgba(220,0,0,.35);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 40px rgba(220,0,0,.5); }
.btn-outline {
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.2);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); }
.hero-stats {
  display: flex; justify-content: center; gap: 3rem; margin-top: 3.5rem;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.hero-stat .label { font-size: .85rem; color: var(--text-muted); margin-top: .2rem; }

/* ─── SECTION SHARED ─── */
section { padding: 6rem 2rem; position: relative; }
.section-label {
  display: inline-block; padding: .35rem 1rem; border-radius: 50px;
  background: rgba(220,0,0,.1); color: var(--primary-light);
  font-size: .8rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800;
  letter-spacing: -.75px; margin-bottom: 1rem;
}
.section-desc {
  color: var(--text-muted); max-width: 600px; font-size: 1.05rem;
  margin-bottom: 3rem;
}
.container { max-width: 1200px; margin: 0 auto; }

/* ─── CATEGORÍAS ─── */
#categorias { background: var(--bg-card); }
.cats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.cat-card {
  background: var(--bg-elevated); border-radius: 20px; padding: 2rem 1.5rem;
  text-align: center; transition: all .4s cubic-bezier(.4,0,.2,1);
  border: 1px solid rgba(255,255,255,.04); position: relative; overflow: hidden;
  cursor: default;
}
.cat-card::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(220,0,0,.06);
  opacity: 0; transition: opacity .4s;
}
.cat-card:hover::before { opacity: 1; }
.cat-card:hover { transform: translateY(-8px); border-color: rgba(220,0,0,.2); box-shadow: var(--shadow); }
.cat-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: rgba(220,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.2rem; font-size: 1.6rem; color: var(--primary);
  transition: transform .4s;
}
.cat-card:hover .cat-icon { transform: scale(1.1) rotate(-5deg); }
.cat-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.cat-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }

/* ─── NOSOTROS ─── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.about-visual {
  position: relative; border-radius: 24px; overflow: hidden;
  aspect-ratio: 4/3;
}
.about-visual img { width: 100%; height: 100%; object-fit: cover; }
.about-visual::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(220,0,0,.15);
}
.about-badge {
  position: absolute; bottom: 1.5rem; left: 1.5rem; z-index: 2;
  background: rgba(10,30,61,.85); backdrop-filter: blur(12px);
  padding: 1rem 1.5rem; border-radius: 16px; border: 1px solid rgba(255,255,255,.08);
}
.about-badge strong { display: block; font-size: .9rem; color: var(--primary); }
.about-badge span { font-size: .8rem; color: var(--text-muted); }
.about-features { display: flex; flex-direction: column; gap: 1.2rem; margin-top: 2rem; }
.about-feat {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem; background: var(--bg-elevated);
  border-radius: 14px; border: 1px solid rgba(255,255,255,.04);
}
.about-feat i { color: var(--primary); font-size: 1.2rem; width: 28px; }
.about-feat p { font-size: .9rem; }

/* ─── PRODUCTOS DESTACADOS ─── */
#productos { background: var(--bg-card); }
.prods-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.prod-card {
  background: var(--bg-elevated); border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.04);
  transition: all .4s cubic-bezier(.4,0,.2,1);
}
.prod-card:hover { transform: translateY(-8px); border-color: rgba(220,0,0,.15); box-shadow: var(--shadow); }
.prod-img {
  height: 200px; background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; position: relative; overflow: hidden;
}
.prod-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--bg-elevated));
}
.prod-body { padding: 1.5rem; }
.prod-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.prod-body p { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.prod-price { font-size: 1.15rem; font-weight: 800; color: var(--primary); }

/* ─── TESTIMONIOS ─── */
.test-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.test-card {
  background: var(--bg-elevated); border-radius: 20px; padding: 2rem;
  border: 1px solid rgba(255,255,255,.04);
  transition: all .4s;
}
.test-card:hover { transform: translateY(-5px); border-color: rgba(220,0,0,.15); }
.test-stars { color: var(--primary); font-size: .9rem; margin-bottom: 1rem; }
.test-card blockquote { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.5rem; font-style: italic; }
.test-author { display: flex; align-items: center; gap: .75rem; }
.test-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.1rem;
}
.test-author strong { font-size: .9rem; }
.test-author span { font-size: .8rem; color: var(--text-muted); }

/* ─── CONTACTO ─── */
#contacto { background: var(--bg-card); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
}
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.2rem; background: var(--bg-elevated); border-radius: 16px;
  border: 1px solid rgba(255,255,255,.04);
}
.contact-item i { color: var(--primary); font-size: 1.3rem; margin-top: 2px; width: 28px; }
.contact-item h4 { font-size: .9rem; font-weight: 600; margin-bottom: .2rem; }
.contact-item p, .contact-item a { font-size: .85rem; color: var(--text-muted); text-decoration: none; }
.contact-item a:hover { color: var(--primary); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%; padding: 1rem 1.2rem; border-radius: 12px;
  background: var(--bg-elevated); border: 1px solid rgba(255,255,255,.06);
  color: #fff; font-family: inherit; font-size: .9rem;
  transition: border-color .3s, box-shadow .3s; outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(220,0,0,.12); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form select option { background: var(--bg-dark); color: #fff; }

/* ─── WHATSAPP FLOAT ─── */
.whatsapp-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; text-decoration: none;
  box-shadow: 0 8px 30px rgba(37,211,102,.4);
  transition: all .3s; animation: pulse-wa 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 12px 40px rgba(37,211,102,.55); }
@keyframes pulse-wa { 0%,100% { box-shadow: 0 8px 30px rgba(37,211,102,.4); } 50% { box-shadow: 0 8px 50px rgba(37,211,102,.6); } }

/* ─── FOOTER ─── */
footer {
  background: var(--bg-dark); padding: 3rem 2rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.04);
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand img { height: 40px; margin-bottom: .75rem; }
.footer-brand p { font-size: .85rem; color: var(--text-muted); line-height: 1.7; max-width: 320px; }
.footer-col h4 { font-size: .9rem; font-weight: 700; margin-bottom: 1rem; }
.footer-col a {
  display: block; font-size: .85rem; color: var(--text-muted);
  text-decoration: none; padding: .3rem 0; transition: color .3s;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.04);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: .8rem; color: var(--text-muted); }
.footer-socials { display: flex; gap: .75rem; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-elevated); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); text-decoration: none; transition: all .3s;
}
.footer-socials a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: rgba(10,30,61,.98); backdrop-filter: blur(20px);
    flex-direction: column; padding: 5rem 2rem 2rem; gap: .25rem;
    transition: right .4s ease; box-shadow: -10px 0 40px rgba(0,0,0,.3);
  }
  .nav-links.open { right: 0; }
  .nav-toggle { display: block; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat .num { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  nav { padding: .75rem 1rem; }
  section { padding: 4rem 1rem; }
  .hero h1 { font-size: 2.2rem; }
  .btn { padding: .75rem 1.4rem; font-size: .85rem; }
}

/* ─── SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
