/* ==========================================================================
   nviizshop - CSS Design System (Premium Glassmorphism & Cyber Dark)
   ========================================================================== */

/* Typography & Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --bg-color: #06070d;
  --panel-bg: rgba(15, 17, 28, 0.75);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  
  /* Neon Accents */
  --primary: #6366f1; /* Indigo */
  --primary-glow: rgba(99, 102, 241, 0.5);
  --accent: #10b981; /* Emerald/Mint */
  --accent-glow: rgba(16, 185, 129, 0.3);
  --warning: #f59e0b; /* Amber */
  --danger: #ef4444; /* Rose */
  
  /* Fonts */
  --font-title: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(6, 7, 13, 0.75);
  border-bottom: 1px solid var(--panel-border);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

header.scrolled {
  padding: 0.9rem 2rem;
  background: rgba(6, 7, 13, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.logo {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  font-weight: 400;
  opacity: 0.9;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cart-trigger {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.cart-trigger:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.cart-icon-wrapper {
  position: relative;
}

.cart-counter {
  position: absolute;
  top: -12px;
  right: -12px;
  background: linear-gradient(135deg, #ef4444, #e11d48);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  transition: var(--transition-smooth);
}

.cart-counter.bump {
  animation: counter-bump 0.3s ease-out;
}

@keyframes counter-bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Main Container */
main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
  padding: 4rem 2rem;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero h1 span {
  background: linear-gradient(135deg, #818cf8, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

.features-banner {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.feature-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  padding: 0.5rem 1rem;
  border-radius: 50px;
}

.feature-tag svg {
  color: var(--accent);
}

/* Categories Filter */
.categories-container {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.category-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.category-btn.active {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Catalog Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.25rem;
}

/* Product Card */
.product-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-lg);
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(99, 102, 241, 0.05);
}

/* Official SVG Brand Container inside Product Cards */
.svg-brand-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #101221 0%, #080911 100%) !important;
}

.brand-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 2.25rem;
  transition: var(--transition-smooth);
}

.product-card:hover .brand-logo-wrapper {
  transform: scale(1.08) rotate(-2deg);
}

.brand-logo-wrapper svg {
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.08));
  max-width: 90px;
  max-height: 90px;
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(6, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
  transition: var(--transition-fast);
}

.product-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.product-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* Duration Selector Tiers Stylings */
.duration-selector-wrapper {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.duration-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.duration-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.duration-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 0.2rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-fast);
}

.duration-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.duration-pill.active {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.product-features {
  list-style: none;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.product-features li svg {
  color: var(--accent);
  flex-shrink: 0;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.price-box {
  display: flex;
  flex-direction: column;
}

.original-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: -0.1rem;
  transition: var(--transition-fast);
}

.price {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  transition: var(--transition-fast);
}

.price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.15rem;
}

.btn-add {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  border: none;
  color: #fff;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
  transition: var(--transition-smooth);
}

.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, #7678ed, var(--primary));
}

.btn-add:active {
  transform: translateY(0);
}

/* Off-canvas Cart Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Cart Panel */
.cart-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: rgba(10, 11, 20, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid var(--panel-border);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
  transition: cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.cart-panel.open {
  right: 0;
}

.cart-header {
  padding: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
}

.btn-close-cart {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.btn-close-cart:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--danger);
  transform: rotate(90deg);
}

/* Cart items list */
.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Empty cart state */
.cart-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 60%;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

.cart-empty svg {
  margin-bottom: 1.5rem;
  opacity: 0.5;
  color: var(--primary);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.cart-empty p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.btn-start-shopping {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-start-shopping:hover {
  background: var(--primary);
  border-color: transparent;
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Individual Cart Item Card */
.cart-item {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1rem;
  border-radius: var(--radius-md);
  align-items: center;
  transition: var(--transition-smooth);
}

.cart-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.cart-item-logo-mini {
  flex-shrink: 0;
}

.cart-item-logo-mini svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.15rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 50px;
  border: 1px solid var(--panel-border);
}

.btn-qty {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.btn-qty:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.qty-val {
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 14px;
  text-align: center;
}

.btn-remove-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.btn-remove-item:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* Cart Footer Checkout */
.cart-footer {
  padding: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(8, 9, 16, 0.98);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.cart-summary-row.total {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-checkout {
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: #fff;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
  transition: var(--transition-smooth);
}

.btn-checkout:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-checkout:active {
  transform: translateY(0);
}

/* Footer Section */
footer {
  border-top: 1px solid var(--panel-border);
  padding: 3rem 2rem;
  text-align: center;
  background: rgba(10, 11, 20, 0.5);
}

.footer-logo {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  header.scrolled {
    padding: 0.75rem 1rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .cart-trigger span {
    display: none; /* Oculta texto 'Carrito' en movil, solo deja icono y contador */
  }

  .cart-trigger {
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
  }

  .hero {
    padding: 2.5rem 1rem;
    margin-bottom: 2.5rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .features-banner {
    gap: 1rem;
  }

  .feature-tag {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .categories-container {
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .category-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-card {
    border-radius: var(--radius-md);
  }
  
  .duration-pills {
    grid-template-columns: repeat(2, 1fr); /* 2x2 en movil para mejor espacio */
    gap: 0.25rem;
  }
  
  .duration-pill {
    padding: 0.4rem 0.1rem;
  }

  .cart-panel {
    max-width: 100%;
    right: -100%;
  }
}

/* Shopify Checkout loading spinner styles */
.btn-checkout.loading {
  opacity: 0.8;
  cursor: wait;
  background: linear-gradient(135deg, #1f2937, #111827) !important;
  box-shadow: none !important;
  pointer-events: none;
}

.btn-checkout.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
  display: inline-block;
  margin-left: 10px;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}
