/* css/styles.css — Corregido: estructura consistente, responsive mejorado */

/* Variables */
:root{
  --accent: #0B8A3E;
  --accent-2: #00B8F4;
  --bg-light: #FFFFFF;
  --bg-dark: #0B0B0B;
  --text-light: #0B0B0B;
  --text-dark: #FFFFFF;
  --card-bg: rgba(255,255,255,0.02);
  --input-bg: rgba(255,255,255,0.03);
  --input-border: rgba(255,255,255,0.06);
  --radius: 12px;
  --max-width: 1100px;
  --gap: 16px;
  --fast: 140ms;
  --mid: 240ms;
  --led-width: 52px;
  --led-dot-height: 14px;
  --shadow: 0 18px 60px rgba(2,6,23,0.06);
}

/* Reset & base */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Inter", "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background:var(--bg-light);
  color:var(--text-light);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
  transition:background var(--fast), color var(--fast);
}
body.dark{ background:var(--bg-dark); color:var(--text-dark); }

/* Global containers */
.container-inner{ max-width:var(--max-width); margin:0 auto; padding:1rem; }
.page-center{ max-width:var(--max-width); margin:0 auto; padding:1rem; }

/* Visually hidden */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0,); border:0; }

/* Links: no blue / no underline default */
a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; text-decoration-thickness:1px; }

/* Header */
.site-header{ 
  position:sticky; 
  top:0; 
  z-index:120; 
  backdrop-filter: blur(12px); 
  border-bottom:1px solid rgba(0,0,0,0.06); 
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.92)); 
}
body.dark .site-header{ 
  background: linear-gradient(180deg, rgba(11,11,11,0.92), rgba(11,11,11,0.86)); 
  border-bottom-color: rgba(255,255,255,0.06); 
}
.header-inner{ 
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  gap:.75rem; 
  padding:.8rem 1.25rem; 
  max-width:var(--max-width); 
  margin:0 auto; 
}
.brand{ display:flex; align-items:center; gap:.6rem; color:inherit; text-decoration:none; }
.brand:hover{ text-decoration:none; }
.brand-logo{ height:36px; width:auto; display:block; }
.nav{ display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.nav a{ 
  padding:.5rem .75rem; 
  border-radius:8px; 
  transition:background var(--fast); 
  text-decoration:none;
}
.nav a:hover{ background:rgba(0,0,0,0.04); text-decoration:none; }
body.dark .nav a:hover{ background:rgba(255,255,255,0.06); }

/* Hamburger */
.hamburger{ 
          color: #0AD15A;
  display:none; 
  width:40px; 
  height:40px; 
  align-items:center; 
  justify-content:center; 
  border-radius:8px; 
  background:transparent; 
  border:none; 
  cursor:pointer; 
  padding:0;
}
.hamburger .bar{ 
  width:20px; 
  height:2px; 
  background:currentColor; 
  border-radius:2px; 
  position:relative; 
  display:block; 
}
.hamburger .bar::before, .hamburger .bar::after{ 
  content:""; 
  position:absolute; 
  left:0; 
  right:0; 
  height:2px; 
  background:currentColor; 
  border-radius:2px; 
}
.hamburger .bar::before{ top:-6px; } 
.hamburger .bar::after{ top:6px; }

/* Mobile nav panel */
.mobile-nav{ 
  display:none; 
  position:fixed; 
  top:64px; 
  right:12px; 
  background:var(--bg-light); 
  border:1px solid rgba(0,0,0,0.1); 
  border-radius:10px; 
  padding:8px; 
  z-index:130; 
  box-shadow:var(--shadow); 
}
body.dark .mobile-nav{ background:var(--bg-dark); border-color:rgba(255,255,255,0.1); }
.mobile-nav.open{ display:block; }

/* LEDs */
.led-strip{ 
  position:fixed; 
  top:0; 
  bottom:0; 
  width:var(--led-width); 
  padding:16px; 
  display:grid; 
  grid-auto-rows:var(--led-dot-height); 
  gap:10px; 
  z-index:9999; 
  pointer-events:none; 
}
.led-strip.left{ left:0; } 
.led-strip.right{ right:0; transform:scaleX(-1); }
.led-dot{ 
  border-radius:8px; 
  background:transparent; 
  filter:blur(10px); 
  opacity:.98; 
  box-shadow:0 12px 46px rgba(0,0,0,0.22); 
  transition:background var(--fast); 
}

/* Buttons & inputs */
.btn{ 
  display:inline-flex; 
  align-items:center; 
  gap:8px; 
  padding:.56rem .9rem; 
  border-radius:10px; 
  border:none; 
  cursor:pointer; 
  font-weight:800; 
  transition: transform var(--fast), box-shadow var(--fast), background var(--fast); 
  font-size:0.9rem;
  text-decoration:none;
}
.btn:hover{ text-decoration:none; }
.btn.primary{ 
  background:var(--accent); 
  color:#fff; 
  box-shadow:0 8px 24px rgba(11,138,62,0.14); 
}
.btn.primary:hover{ 
  box-shadow:0 12px 32px rgba(11,138,62,0.22); 
  transform:translateY(-1px); 
}
.btn.secondary{ 
  background:rgba(0,0,0,0.04); 
  color:inherit; 
  border:1px solid rgba(0,0,0,0.08); 
}
body.dark .btn.secondary{ 
  background:rgba(255,255,255,0.04); 
  border-color:rgba(255,255,255,0.08); 
}
.btn.secondary:hover{ 
  background:rgba(0,0,0,0.08); 
  transform:translateY(-1px); 
}
body.dark .btn.secondary:hover{ background:rgba(255,255,255,0.08); }
.btn.icon{ padding:.44rem .6rem; border-radius:8px; }
.btn.remove{ 
  background:rgba(255,0,0,0.06); 
  color:#d32f2f; 
  border:1px solid rgba(255,0,0,0.12); 
  padding:.4rem .6rem;
}
.btn.remove:hover{ background:rgba(255,0,0,0.12); }

input, textarea, select{ 
  width:100%; 
  padding:.9rem 1rem; 
  border-radius:10px; 
  border:1px solid var(--input-border); 
  background:var(--input-bg); 
  color:inherit; 
  font-family:inherit;
}
body.dark input, body.dark textarea, body.dark select{ 
  border-color:rgba(255,255,255,0.1); 
  background:rgba(255,255,255,0.03); 
}

/* Hero section para index.php */
.hero{ 
  position:relative; 
  width:100%; 
  height:60vh; 
  min-height:400px;
  max-height:700px;
  overflow:hidden; 
  background:#000; 
}
.hero-video{ 
  width:100%; 
  height:100%; 
  object-fit:cover; 
  display:block; 
}
.hero-cta{ 
  padding:2rem 1rem; 
  margin-top:-80px;
  position:relative;
  z-index:10;
}
.hero-cta-card{ 
  max-width:800px;
  margin:0 auto;
  padding:2rem; 
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.88)); 
  backdrop-filter:blur(12px);
  border-radius:16px; 
  border:1px solid rgba(0,0,0,0.06); 
  box-shadow: 0 24px 80px rgba(2,6,23,0.12); 
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
}
body.dark .hero-cta-card{ 
  background: linear-gradient(135deg, rgba(11,11,11,0.95), rgba(11,11,11,0.88)); 
  border-color:rgba(255,255,255,0.06); 
}
.hero-title{ 
  font-size:2.5rem; 
  font-weight:800; 
  margin:0 0 .5rem 0; 
  font-family: "Unbounded", sans-serif; 
  letter-spacing:-0.02em;
}
.tagline{ 
  font-size:1.1rem; 
  opacity:0.8; 
  margin:0;
}
.hero-actions{ 
  display:flex; 
  gap:.75rem; 
  flex-shrink:0;
}

/* Card genérica para secciones */
.card{ 
  padding:2rem; 
  margin:2rem 0; 
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.01)); 
  border-radius:14px; 
  border:1px solid rgba(0,0,0,0.04); 
  box-shadow:0 12px 40px rgba(2,6,23,0.04); 
}
body.dark .card{ 
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00)); 
  border-color:rgba(255,255,255,0.04); 
}
.card h2{ 
  margin:0 0 1rem 0; 
  font-size:1.6rem; 
  font-weight:800; 
}
.card label{ 
  display:block; 
  margin-bottom:1rem; 
  font-weight:600; 
}

/* Products grid - universal para catálogo y home */
.products-grid{
  display:grid; 
  gap:var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-items:start;
}

/* Product card - estructura unificada */
.product-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.01));
  border-radius:12px;
  padding:14px;
  border:1px solid rgba(0,0,0,0.04);
  box-shadow: 0 8px 28px rgba(2,6,23,0.04);
  display:flex; 
  flex-direction:column; 
  gap:10px;
  transition: transform var(--mid), box-shadow var(--mid);
  height:100%;
}
body.dark .product-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border-color:rgba(255,255,255,0.04);
}
.product-card:hover{ 
  transform:translateY(-4px); 
  box-shadow: 0 20px 60px rgba(2,6,23,0.12); 
}
.product-card-link{
  text-decoration:none;
  color:inherit;
  display:block;
}
.product-card-link:hover{ text-decoration:none; }

/* product-thumb mejorado */
.product-thumb{ 
  width:100%; 
  height:240px; 
  display:flex; 
  align-items:center; 
  justify-content:center; 
  background:var(--input-bg); 
  border-radius:10px; 
  padding:16px; 
  overflow:hidden;
}
body.dark .product-thumb{ background:rgba(255,255,255,0.02); }
.product-thumb img{ 
  max-width:100%; 
  max-height:100%; 
  object-fit:contain; 
  display:block; 
}

/* meta and actions */
.product-meta{ 
  display:flex; 
  flex-direction:column; 
  gap:6px; 
  flex:1;
}
.product-meta h3{ 
  margin:0; 
  font-size:1.05rem; 
  font-weight:700; 
  line-height:1.3;
}
.product-meta .price{ 
  color:var(--accent); 
  font-weight:900; 
  font-size:1.1rem; 
  margin-top:auto;
}
.product-actions{ 
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  gap:8px; 
  margin-top:8px; 
}

/* Catalog section */
.catalog-section{ padding:2rem 0; }
.catalog-inner{ display:block; }
.catalog-header{ 
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  gap:12px; 
  margin-bottom:1.5rem; 
  flex-wrap:wrap;
}
.catalog-title{ 
  font-size:1.8rem; 
  font-weight:800; 
  margin:0;
}

/* ---------------------------
   Cart styles
   --------------------------- */
.cart-page{ padding:2rem 0; }
.cart-inner{ 
  max-width:var(--max-width); 
  margin:0 auto; 
  padding:0 1rem; 
}
.cart-inner h1{ 
  font-size:2rem; 
  font-weight:800; 
  margin:0 0 1.5rem 0; 
}
.cart-wrapper{ 
  display:flex; 
  gap:24px; 
  align-items:flex-start; 
}
.cart-list{ 
  flex:1; 
  min-width:0; 
}
.cart-sidebar{ 
  width:340px; 
  flex:0 0 340px; 
}
.cart-empty{
  padding:3rem 2rem;
  text-align:center;
  opacity:0.65;
  font-size:1.1rem;
}

/* cart-row */
.cart-row{ 
  display:grid; 
  grid-template-columns: 96px 1fr 140px 180px; 
  gap:16px; 
  align-items:center; 
  padding:16px; 
  margin-bottom:12px; 
  border-radius:12px; 
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.008)); 
  border:1px solid rgba(0,0,0,0.04); 
  transition: transform var(--mid), box-shadow var(--mid), opacity var(--mid); 
}
body.dark .cart-row{ 
  border-color: rgba(255,255,255,0.04); 
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00)); 
}
.cart-row:hover{ 
  box-shadow:0 8px 24px rgba(2,6,23,0.06); 
}
.cart-thumb{ 
  width:96px; 
  height:96px; 
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--input-bg); 
  border-radius:10px; 
  padding:8px;
}
.cart-thumb img{ 
  max-width:100%; 
  max-height:100%; 
  object-fit:contain; 
  display:block;
}

/* details */
.cart-details{ 
  display:flex; 
  flex-direction:column; 
  gap:4px; 
}
.cart-details strong{ 
  font-size:1rem; 
  font-weight:700;
}
.cart-details .sku{ 
  font-size:0.86rem; 
  opacity:0.65; 
}

/* price column */
.cart-price{ 
  text-align:right; 
  font-weight:800; 
  display:flex;
  flex-direction:column;
  gap:6px;
}
.cart-price .unit{ 
  font-size:0.86rem;
  font-weight:600;
  opacity:0.65; 
}
.cart-price .subtotal{
  color:var(--accent);
  font-size:1.05rem;
}

/* qty controls */
/* Mejorado contraste de botones qty en dark mode */
.qty-controls{ 
  display:flex; 
  align-items:center; 
  justify-content:flex-end; 
  gap:10px; 
}
.qty-box{ 
  display:inline-flex; 
  align-items:center; 
  gap:8px; 
  padding:6px 8px; 
  border-radius:10px; 
  background:var(--input-bg); 
  border:1px solid var(--input-border); 
}
body.dark .qty-box{ 
  background:rgba(255,255,255,0.03); 
  border-color:rgba(255,255,255,0.08); 
}
.qty-btn{ 
  min-width:32px; 
  height:32px; 
  display:inline-grid; 
  place-items:center; 
  border-radius:8px; 
  cursor:pointer; 
  background:rgba(0,0,0,0.02); 
  border:1px solid rgba(0,0,0,0.12); 
  font-weight:800; 
  transition:all var(--fast);
  color:rgba(0,0,0,0.8);
}
body.dark .qty-btn{ 
  border-color: rgba(255,255,255,0.25); 
  background: rgba(255,255,255,0.08); 
  color:rgba(255,255,255,0.95);
}
.qty-btn:hover{
  background:rgba(0,0,0,0.08);
  transform:scale(1.05);
  border-color:rgba(0,0,0,0.2);
}
body.dark .qty-btn:hover{ 
  background:rgba(255,255,255,0.14); 
  border-color:rgba(255,255,255,0.35);
}
.qty-btn svg{
  opacity:0.9;
}
body.dark .qty-btn svg{
  opacity:1;
}

/* summary */
.summary-card{ 
  padding:20px; 
  border-radius:12px; 
  background:var(--card-bg); 
  border:1px solid rgba(0,0,0,0.04); 
  box-shadow: var(--shadow); 
  position:sticky;
  top:80px;
}
body.dark .summary-card{ 
  border-color: rgba(255,255,255,0.04); 
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00)); 
}
.total-line{ 
  display:flex; 
  justify-content:space-between; 
  align-items:center; 
  font-weight:900; 
  font-size:1.3rem; 
  margin:1rem 0; 
  padding-top:1rem;
  border-top:1px solid rgba(0,0,0,0.06);
}
body.dark .total-line{ border-top-color:rgba(255,255,255,0.06); }
#cart-total{ color:var(--accent); }

/* ---------------------------
   Product detail page
   --------------------------- */
.product-page{ padding:2rem 0; }
.product-inner{ 
  max-width:var(--max-width); 
  margin:0 auto; 
  padding:0 1rem; 
}
.product-card-detail{ 
  display:grid; 
  grid-template-columns: 1fr 420px; 
  gap:32px; 
  padding:24px; 
  border-radius:14px; 
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.01)); 
  border:1px solid rgba(0,0,0,0.04); 
  box-shadow: 0 20px 60px rgba(2,6,23,0.06); 
}
body.dark .product-card-detail{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00)); 
  border-color:rgba(255,255,255,0.04);
}
.product-gallery{ display:flex; flex-direction:column; gap:12px; }
.product-main-img{ 
  width:100%; 
  height:500px; 
  object-fit:contain; 
  border-radius:12px; 
  padding:24px; 
  background:var(--input-bg); 
  display:block;
}
body.dark .product-main-img{ background:rgba(255,255,255,0.02); }
.product-thumbs{ 
  display:flex; 
  gap:8px; 
  flex-wrap:wrap;
}
.product-thumb.active{ 
  border-color:var(--accent); 
  box-shadow:0 0 0 2px var(--accent); 
}

/* product info */
.product-info{ display:flex; flex-direction:column; gap:16px; }
.product-info h1{ 
  margin:0; 
  font-size:2rem; 
  font-weight:800; 
  line-height:1.2;
}
.product-price{ 
  color:var(--accent); 
  font-weight:900; 
  font-size:1.8rem; 
}
.product-desc{ 
  line-height:1.6; 
  opacity:0.85; 
  font-size:1rem;
}
.product-actions{ 
  display:flex; 
  gap:12px; 
  align-items:center; 
  margin-top:1rem;
}
.product-quantity{ 
  display:inline-flex; 
  align-items:center; 
  gap:8px; 
  padding:8px 12px; 
  border-radius:10px; 
  background:var(--input-bg); 
  border:1px solid var(--input-border); 
}
body.dark .product-quantity{ 
  background:rgba(255,255,255,0.03); 
  border-color:rgba(255,255,255,0.08); 
}
.product-quantity .qty-btn{
  background:rgba(0,0,0,0.04);
  border-color:rgba(0,0,0,0.12);
}
body.dark .product-quantity .qty-btn{
  background:rgba(255,255,255,0.10);
  border-color:rgba(255,255,255,0.25);
  color:rgba(255,255,255,0.95);
}
.product-add{ flex:1; }

/* Auth/Register page */
.auth-wrapper{
  min-height:60vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:2rem 1rem;
}
.auth-card{
  max-width:480px;
  width:100%;
  padding:2rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.01));
  border-radius:14px;
  border:1px solid rgba(0,0,0,0.04);
  box-shadow: 0 20px 60px rgba(2,6,23,0.08);
  opacity:0;
  transform:translateY(20px);
  transition: opacity var(--mid), transform var(--mid);
}
body.dark .auth-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border-color:rgba(255,255,255,0.04);
}
.auth-card.is-visible{
  opacity:1;
  transform:translateY(0);
}
.auth-card h2{
  margin:0 0 1rem 0;
  font-size:1.6rem;
  font-weight:800;
}
.auth-note{
  opacity:0.7;
  font-size:0.9rem;
  margin-bottom:1.5rem;
}
#auth-form label{
  display:block;
  margin-bottom:1rem;
  font-weight:600;
}

/* Responsive adjustments */
@media (max-width:980px){
  .products-grid{ 
    grid-template-columns: repeat(2, 1fr); 
  }
  .hamburger{ display:flex; }
  .nav{ display:none; }
  .cart-wrapper{ 
    flex-direction:column; 
  }
  .cart-sidebar{ 
    width:100%; 
    flex:1 1 auto;
  }
  .cart-row{
    grid-template-columns: 80px 1fr 120px 140px;
    gap:12px;
    padding:12px;
  }
  .product-card-detail{ 
    grid-template-columns: 1fr; 
    gap:24px;
  }
  .product-main-img{ height:400px; }
  .hero-cta-card{
    flex-direction:column;
    text-align:center;
  }
  .hero-title{ font-size:2rem; }
  .tagline{ font-size:1rem; }
}

@media (max-width:640px){
  .products-grid{ 
    grid-template-columns: 1fr; 
  }
  .product-thumb{ height:200px; }
  .mobile-nav{ 
    left:12px; 
    right:12px; 
    top:70px; 
  }
  .mobile-nav.open{ 
    display:flex; 
    flex-direction:column;
    gap:4px;
  }
  .mobile-nav a{
    padding:.75rem 1rem;
    border-radius:8px;
  }
  .mobile-nav a:hover{
    background:rgba(0,0,0,0.04);
  }
  body.dark .mobile-nav a:hover{ background:rgba(255,255,255,0.06); }
  .product-card{ 
    padding:12px; 
  }
  .cart-row{ 
    grid-template-columns: 72px 1fr; 
    grid-template-rows: auto auto auto;
