/* =========================================================
   VivaStore — styles.css (estable)
   ========================================================= */
:root{
  --bg:#0b0d13;
  --panel:#0f1118;
  --panel-2:#11131b;
  --line:#202433;
  --text:#e7eaf1;
  --muted:#b8bcc6;
  --accent:#e11d2f;
  --accent-2:#f43f5e;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --transition:.18s ease;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:"Poppins",system-ui,Segoe UI,Roboto,Helvetica,Arial;
  background:var(--bg); color:var(--text);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
img{max-width:100%;display:block}
a{color:#fff;text-underline-offset:3px}
p{line-height:1.7}
.container{width:min(1100px,92%);margin-inline:auto}

/* Header */
.site-header{
  position:sticky;top:0;z-index:60;border-bottom:1px solid var(--line);
  background:rgba(11,13,19,.9);backdrop-filter:saturate(160%) blur(6px);
}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:12px 0}
.brand{font-weight:800;color:#fff;text-decoration:none;font-size:28px;letter-spacing:.3px}
.brand span{color:var(--accent)}
.nav{display:flex;gap:24px;align-items:center}
.nav a{color:var(--muted);text-decoration:none;font-weight:600;padding:8px 6px;border-radius:10px;transition:var(--transition)}
.nav a:hover{color:#fff;background:rgba(255,255,255,.03)}

.icon-btn{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;border-radius:14px;border:1px solid var(--line);
  background:var(--panel);color:#d6d9e3;cursor:pointer;transition:var(--transition)
}
.icon-btn:hover{transform:translateY(-1px);box-shadow:var(--shadow)}
.badge{
  position:absolute;top:-6px;right:-6px;min-width:22px;height:22px;border-radius:999px;
  background:var(--accent);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:700;
  padding:0 6px;border:2px solid var(--panel)
}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;height:46px;padding:0 18px;
  border-radius:14px;font-weight:700;letter-spacing:.2px;border:1px solid transparent;transition:var(--transition);cursor:pointer
}

/* FIX: quitar subrayado en enlaces que usan clase .btn */
a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active,
.btn a {
  text-decoration: none !important;
}

.btn-primary{background:linear-gradient(180deg,var(--accent),var(--accent-2));color:#fff;box-shadow:0 8px 20px rgba(225,29,47,.25)}
.btn-primary:hover{transform:translateY(-1px)}
.btn-ghost{background:transparent;color:var(--text);border-color:var(--line)}
.btn-ghost:hover{background:rgba(255,255,255,.04)}

/* Hero */
.hero{
  background:
    radial-gradient(1200px 400px at 30% -10%, rgba(225,29,47,.18), transparent 60%),
    radial-gradient(1000px 300px at 80% -20%, rgba(148,163,184,.12), transparent 60%);
  border-bottom:1px solid var(--line)
}
.hero-inner{padding:56px 0 40px}
.hero-copy h1{font-size:42px;line-height:1.1;margin:0 0 10px}
.hero-copy p{color:var(--muted);margin:0 0 18px}

/* Productos */
.productos-section{padding:28px 0 12px}
.productos-section h2{margin:0 0 14px}
.products-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.product-card,.card-flat{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:14px}
/* Efecto de sombra luminosa al pasar el mouse */
.product-card {
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 22px rgba(225, 29, 47, 0.35);
  border-color: rgba(225, 29, 47, 0.5);
}

.card-flat{background:var(--panel-2)}
.product-media{
  border-radius:12px;overflow:hidden;background:#0a0c12;aspect-ratio:16/9;
  display:grid;place-items:center;color:#7b8193;font-weight:600;border:1px solid var(--line);margin-bottom:10px
}
.product-title{font-weight:700;margin:0 0 6px}
.product-price{color:#9ee3a1;font-weight:800;margin-bottom:10px}
.product-actions{display:flex;gap:10px}.product-actions .btn{flex:1}

/* Carrito */
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);opacity:0;pointer-events:none;transition:var(--transition);z-index:70}
.overlay.show{opacity:1;pointer-events:auto}
.cart-panel{
  position:fixed;top:0;right:0;height:100%;width:min(420px,92%);background:var(--panel);border-left:1px solid var(--line);
  transform:translateX(100%);transition:var(--transition);z-index:80;display:flex;flex-direction:column
}
.cart-panel.open{transform:none}
.cart-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--line);background:var(--panel-2)}
.icon-x{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;border:1px solid var(--line);background:transparent;color:#d1d5e0;cursor:pointer}
.icon-x:hover{background:rgba(255,255,255,.04)}
.cart-items{padding:10px 12px;overflow:auto;flex:1}
.cart-row{
  display:flex;align-items:center;justify-content:space-between;background:var(--panel-2);
  border:1px solid var(--line);border-radius:14px;padding:12px;gap:10px;margin-bottom:10px
}
.cart-name{font-weight:700}
.cart-ops{display:flex;align-items:center;gap:10px}
.qty{display:flex;align-items:center;gap:8px;background:#0e1017;border:1px solid var(--line);border-radius:12px;padding:6px 8px;min-width:92px;justify-content:space-between}
.qty-btn{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:#0d0f15;border:1px solid var(--line);color:#d7dbe6;cursor:pointer}
.qty-btn:hover{background:#121421}
.cart-remove{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:#291016;border:1px solid #3a1a23;color:#ff7a88;cursor:pointer}
.cart-remove:hover{background:#3a1a23}
.cart-footer{border-top:1px solid var(--line);background:linear-gradient(180deg,rgba(15,17,24,.7),var(--panel));padding:12px;position:sticky;bottom:0}
.cart-total{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.cart-total span{color:var(--muted)}
.cart-actions{display:flex;gap:10px}

/* Opiniones */
.reviews-section{padding:24px 0 10px}
.section-wrap.narrow{width:min(980px,100%);margin-inline:auto}
.review-shell{display:grid;grid-template-columns:320px 1fr;gap:14px}
.review-left{display:flex;flex-direction:column;gap:12px}
.mini-title{margin:0 0 8px}
.rating-summary,.rating-distribution,.review-form{background:var(--panel-2);border:1px solid var(--line);border-radius:var(--radius);padding:14px}
.rating-summary .big{font-size:40px;font-weight:800;line-height:1}
.stars-wrap{display:flex;align-items:center;gap:10px}
.stars{display:inline-flex;gap:2px;font-size:28px;cursor:pointer;user-select:none}
.stars span{color:#6b7280}
.stars span.active{color:#fbbf24}
.bar{height:8px;background:#0e1017;border:1px solid var(--line);border-radius:999px;overflow:hidden}
.bar>i{display:block;height:100%;background:linear-gradient(90deg,#fbbf24,#22c55e);width:0%}
.review-form .form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field{display:flex;flex-direction:column;gap:8px}
.lbl{font-weight:700}
input[type="text"],input[type="email"],textarea{
  background:#0e1017;border:1px solid var(--line);border-radius:12px;color:#fff;padding:12px 12px;outline:none;transition:var(--transition)
}
input:focus,textarea:focus{border-color:#3a4566;box-shadow:0 0 0 3px rgba(81,123,255,.12)}
.form-hint{display:flex;justify-content:flex-end}
.reviews-list{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.review-item{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px}
.review-item .meta{display:flex;gap:10px;align-items:center;color:var(--muted);font-size:14px}
.review-item .body{margin-top:6px}

/* Contacto (página) */
.contact-section{padding:24px 0 16px}
.section-wrap{width:100%}
.contact-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:14px;align-items:start}
.contact-blurb{border-radius:var(--radius)}
.contact-list{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
.contact-list li{display:flex;align-items:center;gap:10px;color:var(--muted)}
.contact-card .form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.contact-card .form-actions{display:flex;align-items:center;gap:12px}
.feedback{margin:0;color:#9ee3a1;font-weight:700}

/* Política */
.policy-hero{padding:26px 0 4px;border-bottom:1px solid var(--line);background:radial-gradient(1000px 280px at 20% -10%, rgba(148,163,184,.1), transparent 60%)}
.policy-wrap{padding:18px 0}
.policy-grid{display:grid;grid-template-columns:1fr;gap:14px}
.policy-card{background:var(--panel-2);border:1px solid var(--line);border-radius:var(--radius);padding:14px}
.policy-card h2{margin:0 0 8px}
.policy-card ul{margin:0;padding-left:18px}
.policy-card li{margin:.35rem 0}

/* Footer (3 enlaces centrado, sin viñetas) */
.site-footer{background:#0f1118;border-top:1px solid var(--line);margin-top:24px}
.footer-nav{padding:18px 0;text-align:center}
.footer-links{list-style:none;margin:0;padding:0;display:flex;gap:18px;justify-content:center;flex-wrap:wrap}
.footer-links li{list-style:none}
.footer-links a{color:var(--muted);text-decoration:none;padding:.25rem .5rem;display:inline-block}
.footer-links a:hover{color:#fff}
.footer-legal{border-top:1px solid var(--line);text-align:center;padding:16px 0}
.footer-legal p{margin:.35rem 0}
.site-footer ul,.site-footer li{list-style:none}
.site-footer li::marker{content:''}

/* Utils */
.muted{color:var(--muted)}

/* Responsive */
@media (max-width:980px){
  .review-shell{grid-template-columns:1fr}
  .contact-grid{grid-template-columns:1fr}
}
@media (max-width:768px){
  .nav{display:none}
  .hero-copy h1{font-size:34px}
  .review-form .form-row,.contact-card .form-row{grid-template-columns:1fr}
}
@media (max-width:420px){
  .btn{height:44px}.icon-btn{width:42px;height:42px}.cart-panel{width:100%}
}
/* ===== Menú hamburguesa móvil ===== */
#menu-toggle {
  display: none;
  font-size: 1.4rem;
  color: #fff;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

@media (max-width: 768px) {
  #menu-toggle {
    display: inline-block;
  }
  .nav {
    display: none;
    flex-direction: column;
    background: var(--panel);
    position: absolute;
    top: 60px;
    right: 10px;
    border-radius: 12px;
    padding: 10px 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    z-index: 100;
  }
  .nav a {
    display: block;
    padding: 10px 20px;
    color: #fff;
    text-align: right;
  }
  .nav.nav-open {
    display: flex;
  }
}
/* =========================================================
   Ajustes para imágenes de productos
   ========================================================= */
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-img {
  width: 100%;
  max-width: 180px;
  border-radius: 12px;
  margin-bottom: 10px;
  background-color: #0a0c12;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  transition: transform 0.3s ease;
  border: 1px solid var(--line);
}

.product-img:hover {
  transform: scale(1.05);
}

.product-title {
  text-align: center;
  font-weight: 700;
  margin: 8px 0 4px;
}

.product-price {
  text-align: center;
  font-size: 1.1rem;
  color: #9ee3a1;
  font-weight: 800;
  margin-bottom: 8px;
}

.product-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.add-btn {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-btn:hover {
  background: var(--accent-2);
}
/* Aparición suave de las imágenes (lazy loading) */
.product-img {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-img[src] {
  opacity: 1;
  transform: scale(1);
}
/* ===== Botón flotante de carrito (solo móvil) ===== */
@media (max-width: 768px) {
  #btn-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid var(--line);
    background: var(--accent);
    color: #fff;
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
  #btn-cart .badge {
    background: #fff;
    color: var(--accent);
    border: 2px solid var(--accent);
    top: 2px;
    right: 2px;
  }
}
/* --- Ajustes específicos para móvil --- */
@media (max-width: 480px) {
  .hero-inner {
    padding: 40px 0 24px;
  }

  .hero-copy h1 {
    font-size: 30px;
    line-height: 1.2;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .productos-section h2 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .product-card {
    padding: 12px;
  }

  .product-title {
    font-size: 18px;
  }

  .product-price {
    font-size: 16px;
  }

  .btn {
    height: 44px;
    font-size: 15px;
  }

  .cart-panel {
    width: 100%;
    border-radius: 16px 16px 0 0;
  }

  .toast {
    bottom: 18px;
    right: 18px;
    font-size: 14px;
    padding: 0.8rem 1rem;
  }
}
@media (max-width: 480px) {
  .site-header {
    padding: 6px 0;
  }

  .brand {
    font-size: 24px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }
}
.hero-copy {
  text-align: center;
}

.hero-copy .btn {
  margin-top: 12px;
}
.cart-row,
.btn {
  transition: all 0.25s ease-in-out;
}
.btn:hover {
  transform: scale(1.02);
}
/* --- Corrección: Hero solo centrado en móvil --- */
.hero-copy {
  text-align: left;
}

@media (max-width: 480px) {
  .hero-copy {
    text-align: center;
  }
}
@media (max-width: 480px) {
  .cart-panel {
    width: 100%;
    bottom: 0;
    border-radius: 16px 16px 0 0;
    padding-bottom: 20px;
  }
  .cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    border-top: 1px solid var(--line);
    background: var(--panel);
    padding: 10px 14px;
  }
  .cart-items {
    margin-bottom: 90px; /* deja espacio para footer fijo */
  }
}
/* === ANIMACIÓN DE CARGA VIVASTORE === */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a; /* negro elegante */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.logo-loader {
  width: 90px;
  height: 90px;
  animation: pulseZoom 2s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.5));
}

@keyframes pulseZoom {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 50, 50, 0.5));
  }
  50% {
    transform: scale(1.2);
    opacity: 0.9;
    filter: drop-shadow(0 0 20px rgba(0, 100, 255, 0.8));
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 50, 50, 0.5));
  }
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}
