*{
  box-sizing:border-box;
}

body{
  margin:0;
  background:#020617;
  color:white;
  font-family:Arial;
  transition:.3s;
  position:relative;
  isolation:isolate;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(650px circle at 8% 15%, rgba(var(--primary-light-rgb),.28), transparent 60%),
    radial-gradient(550px circle at 92% 10%, rgba(59,130,246,.22), transparent 60%),
    radial-gradient(600px circle at 15% 85%, rgba(147,51,234,.2), transparent 60%),
    radial-gradient(700px circle at 90% 80%, rgba(59,130,246,.16), transparent 60%);
}

/* HEADER (mismo patrón que product.php / quienes-somos.php) */
.header{
  background:rgba(15,23,42,.45);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  padding:16px 28px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border:1px solid rgba(255,255,255,.1);
  border-radius:20px;
  margin:20px 25px 0;
  box-shadow:0 8px 32px rgba(0,0,0,.35);
  position:relative;
  z-index:2;
}

.logo{
  font-size:28px;
  font-weight:bold;
  color:var(--primary);
  text-decoration:none;
  text-shadow:0 0 12px rgba(var(--primary-rgb),.6);
  display:flex;
  align-items:center;
  gap:10px;
}

.logo-img{
  width:38px;
  height:38px;
  object-fit:contain;
  border-radius:8px;
}

.nav-links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.nav-links a{
  color:white;
  text-decoration:none;
  font-weight:600;
  padding:10px 16px;
  border-radius:12px;
  background:rgba(var(--primary-rgb),.08);
  border:1px solid rgba(var(--primary-rgb),.15);
  transition:.25s;
}

.nav-links a:hover{
  background:rgba(var(--primary-rgb),.18);
  box-shadow:0 0 15px rgba(var(--primary-rgb),.25);
}

@media(max-width:700px){
  .header{
    flex-direction:column;
    align-items:center;
    gap:12px;
    padding:16px 20px;
    margin:14px 14px 0;
    border-radius:18px;
  }

  .logo{
    font-size:24px;
  }

  .nav-links{
    width:100%;
    justify-content:center;
    gap:8px;
  }

  .nav-links a{
    padding:8px 12px;
    font-size:13px;
  }
}

.container{
  max-width:1200px;
  margin:auto;
  padding:30px 20px;
}

/* HERO */
.hero-home{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  margin-bottom:50px;
  padding:55px 50px;
  border:1px solid rgba(var(--primary-rgb),.2);
}

.hero-slides{
  position:absolute;
  inset:0;
  z-index:0;
}

.hero-slide{
  position:absolute;
  inset:0;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  opacity:0;
  transition:opacity 1.2s ease;
}

.hero-slide::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(2,6,23,.4), rgba(2,6,23,.6));
}

.hero-slide.active{
  opacity:1;
}

.hero-dots{
  position:absolute;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  z-index:2;
}

.hero-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(255,255,255,.35);
  cursor:pointer;
  transition:.25s;
  border:none;
  padding:0;
}

.hero-dot.active{
  background:var(--primary);
  width:26px;
  border-radius:5px;
  box-shadow:0 0 10px rgba(var(--primary-rgb),.6);
}

.hero-home-content{
  position:relative;
  z-index:1;
  max-width:640px;
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(var(--primary-rgb),.15);
  border:1px solid rgba(var(--primary-rgb),.3);
  margin-bottom:22px;
  font-size:14px;
  font-weight:600;
}

.hero-home h1{
  font-size:48px;
  line-height:1.1;
  margin:0 0 18px;
  text-shadow:0 2px 12px rgba(0,0,0,.6);
}

.hero-home p{
  font-size:17px;
  line-height:1.8;
  color:#e2e8f0;
  margin-bottom:30px;
  text-shadow:0 1px 8px rgba(0,0,0,.5);
}

.hero-buttons{
  display:flex;
  gap:15px;
  flex-wrap:wrap;
}

.hero-btn{
  background:var(--primary);
  padding:15px 24px;
  border-radius:14px;
  text-decoration:none;
  color:white;
  font-weight:600;
  transition:.25s;
}

.hero-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 0 18px rgba(var(--primary-rgb),.45);
}

.hero-btn.secondary{
  background:#111827;
  border:1px solid rgba(255,255,255,.1);
}

@media(max-width:700px){
  .hero-home{
    padding:22px 20px;
    border-radius:16px;
    margin-bottom:35px;
  }
  .hero-home-content{
    max-width:100%;
  }
  .hero-home h1{
    font-size:19px;
    margin-bottom:8px;
    line-height:1.25;
  }
  .hero-home p{
    font-size:12px;
    line-height:1.5;
    margin-bottom:16px;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
  .hero-badge{
    font-size:11px;
    padding:6px 11px;
    margin-bottom:12px;
  }
  .hero-buttons{
    gap:8px;
    flex-wrap:nowrap;
  }
  .hero-btn{
    padding:10px 12px;
    font-size:12px;
    flex:1;
    white-space:nowrap;
    text-align:center;
  }
  .hero-dots{
    bottom:12px;
  }
}


/* SECTION TITLE */
.section-title{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 18px;
  border-radius:999px;
  margin-bottom:20px;
  background:rgba(var(--primary-rgb),.08);
  border:1px solid rgba(var(--primary-rgb),.2);
  font-size:16px;
  font-weight:700;
}

.section{
  margin-bottom:55px;
}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

.see-all{
  color:var(--primary-light);
  text-decoration:none;
  font-weight:600;
  font-size:14px;
}

.see-all:hover{
  text-shadow:0 0 10px var(--primary);
}

/* CATEGORÍAS */
.cat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:20px;
}

.cat-card{
  position:relative;
  height:150px;
  border-radius:16px;
  overflow:hidden;
  text-decoration:none;
  display:flex;
  align-items:flex-end;
  border:1px solid rgba(var(--primary-rgb),.2);
  background-color:#0b1220;
  background-position:center;
  background-size:contain;
  background-repeat:no-repeat;
}

.cat-card::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, transparent 30%, rgba(2,6,23,.9) 100%);
}

.cat-card-label{
  position:relative;
  z-index:2;
  padding:16px;
  color:white;
}

.cat-card-label h4{
  margin:0 0 4px;
  font-size:16px;
}

.cat-card-label span{
  font-size:12px;
  color:var(--primary-light);
}

.cat-card:hover{
  transform:translateY(-4px);
  box-shadow:0 0 20px var(--primary);
  transition:.3s;
}

/* PRODUCTOS (idéntico a shop.php para mantener consistencia visual) */
.products{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
}

.card{
  position:relative;
  background:rgba(255,255,255,0.04);
  backdrop-filter:blur(12px);
  border-radius:16px;
  padding:15px;
  border:1px solid rgba(var(--primary-rgb),0.2);
  transition:0.3s;
}

.card:hover{
  transform:translateY(-6px);
  box-shadow:0 0 20px var(--primary);
}

.card img{
  width:94%;
  aspect-ratio:1/1;
  object-fit:contain;
  background:#fff;
  border-radius:14px;
  padding:10px;
  display:block;
}

.card a{
  text-decoration:none;
  color:inherit;
  display:block;
  position:relative;
  z-index:2;
}

.card-footer{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
  margin-top:18px;
}

.card-price{
  padding:8px 14px;
  border-radius:999px;
  font-size:15px;
  font-weight:700;
  background:rgba(var(--primary-rgb),.12);
  border:1px solid rgba(var(--primary-rgb),.22);
  color:var(--primary-light);
}

.card-stock{
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
  border:1px solid rgba(255,255,255,.06);
}

.stock-ok{
  background:rgba(34,197,94,.12);
  border-color:rgba(34,197,94,.25);
  color:#22c55e;
}

.stock-no{
  background:rgba(239,68,68,.12);
  border-color:rgba(239,68,68,.25);
  color:#ef4444;
}

.out-badge{
  position:absolute;
  top:12px;
  left:12px;
  z-index:999;
  background:#ef4444;
  color:#fff;
  padding:7px 14px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.5px;
  box-shadow:0 4px 12px rgba(239,68,68,.35);
}

/* CTA WHATSAPP */
.promo-band{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:20px;
  padding:40px;
  border-radius:20px;
  background:linear-gradient(135deg, rgba(34,197,94,.12), rgba(2,6,23,.9));
  border:1px solid rgba(34,197,94,.25);
  margin-bottom:20px;
}

.promo-band h3{
  margin:0 0 8px;
}

.promo-band p{
  margin:0;
  color:#cbd5e1;
}

.promo-btn{
  background:#22c55e;
  color:white;
  text-decoration:none;
  padding:14px 22px;
  border-radius:12px;
  font-weight:700;
  white-space:nowrap;
  transition:.25s;
}

.promo-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 0 18px rgba(34,197,94,.4);
}

/* THEME TOGGLE */
#themeToggle{
  position:fixed;
  right:20px;
  bottom:20px;
  width:58px;
  height:58px;
  border-radius:50%;
  background:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:24px;
  z-index:9999;
  box-shadow:0 0 20px rgba(var(--primary-rgb),0.6);
}

/* LIGHT MODE */
body.light{
  background:#f8fafc !important;
  color:#0f172a !important;
}

body.light .header{
  background:#ffffff !important;
  border-bottom:1px solid #e2e8f0;
}

body.light .nav-links a{
  color:#0f172a;
  background:#fff;
  border:1px solid #e2e8f0;
}

body.light .hero-home{
  border:1px solid #e2e8f0;
}

body.light .card,
body.light .cat-card-label,
body.light .promo-band{
  color:#0f172a;
}

body.light .card{
  background:#ffffff !important;
  border:1px solid #e2e8f0;
}

body.light .footer{
  background:#ffffff !important;
  color:#0f172a !important;
  border-top:1px solid #e2e8f0;
}
