/* =========================
   GLOBAL (style.css)
   ========================= */

/* Variables y reset */
:root{
  --gc-primary:#00BCD4;
  --gc-primary-dark:#0097A7;
  --gc-secondary:#1976D2;
  --gc-secondary-dark:#1565C0;
  --gc-dark:#212121;
  --gc-gray:#757575;
  --gc-light:#F5F5F5;
  --gc-white:#FFFFFF;
  --gc-gradient:linear-gradient(135deg, #00BCD4 0%, #1976D2 100%);
  --gc-gradient-reverse:linear-gradient(135deg, #1976D2 0%, #00BCD4 100%);
}

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

html, body{
  width:100%;
  overflow-x:hidden;
}

body{
  font-family:'Inter', system-ui, -apple-system, sans-serif;
  color:#1a1a1a;
  line-height:1.6;
  padding-top:80px; /* espacio para navbar fijo */
}

h1,h2,h3,h4,h5,h6{
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:700;
  line-height:1.2;
}

/* Navbar base */
.navbar-modern{
  background:rgba(255,255,255,0.98);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  box-shadow:0 1px 20px rgba(0,0,0,0.05);
  transition:all .3s ease;
  padding:1rem 0;
}
.navbar-modern.scrolled{
  padding:.5rem 0;
  box-shadow:0 4px 30px rgba(0,0,0,0.1);
}
.navbar-brand img{ transition:transform .3s ease; }
.navbar-brand:hover img{ transform:scale(1.05); }

.nav-link{
  font-weight:500; font-size:.95rem; color:#333 !important;
  position:relative; padding:.5rem 1rem !important; transition:color .3s ease;
}
.nav-link::after{
  content:''; position:absolute; bottom:0; left:50%; width:0; height:2px;
  background:var(--gc-gradient); transition:width .3s ease, left .3s ease;
}
.nav-link:hover::after, .nav-link.active::after{ width:60%; left:20%; }
.nav-link:hover{ color:var(--gc-primary) !important; }

/* Botones */
.btn-modern{
  padding:14px 32px; font-weight:600; font-size:1rem; border-radius:50px;
  transition:all .3s ease; position:relative; overflow:hidden;
  text-transform:uppercase; letter-spacing:.5px; border:none;
}
.btn-modern-primary{
  background:var(--gc-gradient); color:#fff; box-shadow:0 4px 15px rgba(0,188,212,0.3);
}
.btn-modern-primary:hover{
  transform:translateY(-2px); box-shadow:0 6px 25px rgba(0,188,212,0.4); color:#fff;
}
.btn-modern-outline{
  background:transparent; color:#fff; border:2px solid #fff;
}
.btn-modern-outline:hover{
  background:#fff; color:var(--gc-secondary); transform:translateY(-2px);
}

/* Tarjetas genéricas */
.card-modern{
  border:none; border-radius:20px; overflow:hidden; transition:all .3s ease;
  background:#fff; box-shadow:0 5px 20px rgba(0,0,0,0.08); height:100%;
}
.card-modern:hover{
  transform:translateY(-10px); box-shadow:0 15px 40px rgba(0,0,0,0.15);
}
.card-icon{
  width:70px; height:70px; background:var(--gc-gradient); border-radius:20px;
  display:flex; align-items:center; justify-content:center; font-size:1.8rem; color:#fff; margin-bottom:1.5rem;
  transition:transform .3s ease;
}
.card-modern:hover .card-icon{ transform:rotate(10deg) scale(1.1); }

/* Grids genéricos reutilizables */
.feature-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
  gap:2rem; padding:2rem 0;
}

/* Footer */
.footer-modern{
  background:var(--gc-dark); color:#fff; padding:80px 0 30px; position:relative;
}
.footer-modern::before{
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg, transparent, var(--gc-primary), transparent);
}
.footer-link{
  color:rgba(255,255,255,0.7); text-decoration:none; transition:color .3s ease;
}
.footer-link:hover{ color:var(--gc-primary); }

.footer-credit{
  white-space: nowrap;
}

/* ===== Footer fixes (contraste, colores y espaaciado) ===== */
.footer-modern{
  background: var(--gc-dark);
  color: #fff;
}

/* Texto general y enlaces del footer */
.footer-modern p,
.footer-modern li {
  color: rgba(255,255,255,.75);
}

.footer-modern a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
}
.footer-modern a:hover {
  color: var(--gc-primary);
}

/* Marca (logo + textos) dentro del footer */
.footer-modern .logo-footer{
  height: 40px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  margin-right: 8px;
}

.footer-modern .brand-title{
  color: #fff;              /* blanco para GLOBAL */
  letter-spacing: 1.5px;
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-modern .brand-subtitle{
  color: #90CAF9;           /* azul claro para commerce */
  font-size: .85rem;
  font-weight: 600;
}

/* Línea divisoria del footer con mejor contraste */
.footer-modern hr{
  border-color: rgba(255,255,255,.15) !important;
  opacity: 1;
}

/* Botones sociales outline sobre fondo oscuro */
.footer-modern .btn-outline-light{
  border-color: rgba(255,255,255,.45);
  color: #fff;
}
.footer-modern .btn-outline-light:hover{
  background: #fff;
  color: var(--gc-secondary);
}

/* Ajustes responsivos suaves */
@media (max-width: 992px){
  .footer-modern .d-flex.align-items-center.mb-3{
    margin-bottom: 1rem !important;
  }
}


/* Logos y marca */
.logo-navbar{
  height:64px; width:auto; margin-right:6px; transition:height .3s ease;
}
.navbar-modern.scrolled .logo-navbar{ height:50px; }

@media (max-width: 991.98px){
  .navbar-modern{ padding:.5rem 0; }
  .navbar-modern{ width:100%; overflow-x:clip; }
  .navbar-modern .container{ max-width:100%; overflow-x:clip; }
  .navbar-modern .container{ flex-wrap:wrap; }
  .navbar-brand{ flex:0 1 auto; min-width:0; max-width:calc(100% - 64px); }
  .logo-navbar{ height:44px; max-width:140px; width:100%; }
  .navbar-toggler{ margin-left:auto; flex:0 0 auto; }
  .navbar-collapse{ padding-top:.5rem; width:100%; flex-basis:100%; }
  .navbar-nav{
    margin-left:0 !important;
    align-items:center !important;
    width:100%;
    text-align:center;
  }
  .nav-link{ padding:.5rem 0 !important; }
  .navbar-nav .nav-item{ width:100%; }
  .navbar-nav .nav-item.ms-3{
    margin-left:0 !important;
    margin-top:.5rem;
  }
  .navbar-nav .btn{ width:100%; justify-content:center; }
  .nav-link::after{
    display:block;
    bottom:-6px;
    height:2px;
  }
  .nav-link:hover::after, .nav-link.active::after{
    width:40% !important;
    left:30% !important;
  }
  .nav-link.active{ color:var(--gc-primary) !important; }
}

.logo-footer{ height:48px; width:auto; }

.brand-title{
  font-weight:700; font-size:1.2rem; letter-spacing:2px; color:#0D47A1; /* azul oscuro */
}
.brand-subtitle{
  font-size:.8rem; font-weight:600; color:#64B5F6; text-transform:none;
}
/* Variantes en footer (sobre fondo oscuro) */
.brand-title--light{ color:#ffffff; }
.brand-subtitle--footer{ color:#90CAF9; }

/* Barra de progreso de scroll */
.scroll-progress{
  position:fixed; top:0; left:0; height:3px; background:var(--gc-gradient);
  z-index:9999; transition:width .2s ease;
}

/* Seguidor del mouse */
.mouse-follower{
  display:none !important;
}

/* Animaciones base */
.animate-in{ animation:slideInUp .6s ease-out; }
@keyframes slideInUp{
  from{ opacity:0; transform:translateY(30px); }
  to{ opacity:1; transform:translateY(0); }
}

/* Utilidades de delay */
.delay-200{ animation-delay:.2s !important; }
.delay-400{ animation-delay:.4s !important; }
.delay-600{ animation-delay:.6s !important; }

/* Boton flotante carrito (solo mobile) */
.cart-float{
  position:fixed; bottom:90px; right:20px;
  width:56px; height:56px; border:none; border-radius:50%;
  background:var(--gc-gradient); color:#fff; display:none;
  align-items:center; justify-content:center; z-index:1001;
  box-shadow:0 8px 24px rgba(0,0,0,0.2);
  transition:transform .2s ease, box-shadow .2s ease;
}
.cart-float i{ font-size:22px; }
.cart-float .cart-float-count{
  position:absolute; top:-6px; right:-6px; font-size:12px;
  padding:4px 6px; border-radius:999px;
}
.cart-float:hover{
  color:#fff; transform:scale(1.05); box-shadow:0 10px 28px rgba(0,0,0,0.25);
}
@media (max-width: 991.98px){
  .cart-float{ display:flex; }
}

/* Botón flotante WhatsApp */
.whatsapp-float{
  position:fixed; bottom:20px; right:20px; background:#25D366; color:#fff;
  font-size:28px; width:60px; height:60px; display:flex; align-items:center; justify-content:center;
  border-radius:50%; box-shadow:0 4px 15px rgba(0,0,0,0.3);
  z-index:1000; transition:transform .3s ease, box-shadow .3s ease; animation:pulse-whatsapp 2s infinite;
}
.whatsapp-float:hover{ transform:scale(1.1); box-shadow:0 6px 25px rgba(0,0,0,0.4); color:#fff; }
@keyframes pulse-whatsapp{
  0%{ box-shadow:0 0 0 0 rgba(37,211,102,.6); }
  70%{ box-shadow:0 0 0 20px rgba(37,211,102,0); }
  100%{ box-shadow:0 0 0 0 rgba(37,211,102,0); }
}

/* ============ CART MODAL (global y robusto) ============ */
.cart-modal .modal-header{
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.cart-modal .modal-title{ font-weight: 800; }
.cart-modal .modal-body{ padding: 0; }

/* Contenedor que pinta cart.js */
#cart-items-container{ padding: 8px 16px 0; }

/* Fila de producto (lo que cart.js genera: .cart-item) */
#cart-items-container .cart-item{
  display: grid;
  grid-template-columns: 90px 1fr auto;      /* thumb | info | precio */
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px dashed rgba(0,0,0,.08);
}

/* Miniatura */
#cart-items-container .cart-item .cart-thumb,
#cart-items-container .cart-item img{
  width: 90px; height: 90px; object-fit: cover;
  border-radius: 12px; background: #f7f9fc;
}

/* Título y metadatos */
#cart-items-container .cart-title{ margin:0 0 4px; font-weight:700; }
#cart-items-container .cart-meta{ color:#6b7280; font-size:.85rem; }

/* Grupo cantidad (cart.js usa .cart-qty con .btn-qty y <input>) */
#cart-items-container .cart-qty{
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: nowrap;
}
#cart-items-container .cart-qty .btn-qty{
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
#cart-items-container .cart-qty input{
  width: 64px; height: 38px; text-align: center; border-radius: 10px;
}

/* Eliminar */
#cart-items-container .cart-remove{ background:transparent; border:none; color:#9aa4b2; }
#cart-items-container .cart-remove:hover{ color:#ef4444; }

/* Precio (columna derecha de la fila) */
#cart-items-container .cart-item > :last-child{
  justify-self: end; font-weight: 800; color: #111827;
}

/* Si cart.js trae un bloque .cart-summary dentro del body, lo ocultamos
   (porque usamos un footer uniforme con botones). */
.cart-modal .modal-body .cart-summary{ display: none !important; }

/* Footer uniforme */
.cart-footer{
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  background:#fff; border-top:1px solid rgba(0,0,0,.06);
}

/* Responsive */
@media (max-width: 576px){
  #cart-items-container .cart-item{
    grid-template-columns: 64px 1fr;        /* precio baja abajo */
  }
  #cart-items-container .cart-item > :last-child{
    grid-column: 1 / -1; justify-self: end; margin-top: 6px;
  }
  #cart-items-container .cart-thumb,
  #cart-items-container .cart-item img{
    width: 64px; height: 64px;
  }
  .cart-footer{ flex-direction: column; align-items: stretch; }
}

/* Footer del carrito: botones izq + totales der */
.cart-footer{
  display:flex; align-items:center; gap:1rem;
  background:#fff; border-top:1px solid rgba(0,0,0,.06);
}

/* Subtotal a la derecha */
.cart-summary-right{
  margin-left:auto;            /* empuja a la derecha */
  min-width:220px;
  text-align:right;
}

/* Móvil: apilar (totales abajo) */
@media (max-width:576px){
  .cart-footer{ flex-direction:column; align-items:stretch; }
  .cart-summary-right{ width:100%; margin-left:0; text-align:right; }
}

/* ==== Carrito: más espacio para el resumen y acciones ==== */

/* Padding lateral del resumen (incluye los botones generados por cart.js) */
#cart-items-container .cart-summary{
  padding: 12px 16px 16px;   /* top 12, lados 16, bottom 16 */
}

/* Línea/respiración antes de los botones (Vaciar / Seguir / Finalizar) */
#cart-items-container .cart-summary .d-flex.gap-2.flex-wrap.mt-3{
  margin-top: 1rem !important;
  padding-top: .75rem;
  border-top: 1px solid rgba(0,0,0,.06);
  gap: .5rem !important;     /* un poco más de separación entre botones */
}

/* (opcional) Un poco más de padding al body del modal en móvil */
@media (max-width: 576px){
  .modal-content .modal-body{ padding-bottom: 8px; }
}

/* Icono del header del carrito */
.cart-modal .cart-header-icon{
  font-size: 1.35rem;
  color: var(--gc-primary-dark); /* #0097A7 */
  line-height: 1;
}

