/*
Theme Name: CheBox — Un mundo de productos
Theme URI: https://chebox.com
Author: CheBox Studio
Description: Ecommerce tech premium — gadgets virales, tecnología y productos innovadores
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: chebox
*/

/* ═══════════════════════════════════════════════
   CHEBOX — CUSTOM UTILITIES (NO Tailwind aquí)
═══════════════════════════════════════════════ */

:root {
  --cb-black:       #03040a;
  --cb-dark:        #080c18;
  --cb-navy:        #0a0f1e;
  --cb-blue:        #0d6efd;
  --cb-blue-bright: #3b82f6;
  --cb-blue-glow:   #60a5fa;
  --cb-cyan:        #06b6d4;
  --cb-white:       #f0f4ff;
  --cb-gray:        #8b9cbf;
  --cb-glass-bg:    rgba(255,255,255,0.04);
  --cb-glass-border:rgba(255,255,255,0.10);
  --cb-glass-shadow:0 8px 32px rgba(0,0,0,0.5);
  --cb-glow-blue:   0 0 40px rgba(59,130,246,0.3);
  --cb-glow-cyan:   0 0 40px rgba(6,182,212,0.2);
  --cb-radius:      16px;
  --cb-radius-sm:   8px;
  --cb-transition:  0.4s cubic-bezier(0.16,1,0.3,1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--cb-black);
  color: var(--cb-white);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
}

/* ── GLASSMORPHISM ── */
.cb-glass {
  background: var(--cb-glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--cb-glass-border);
  box-shadow: var(--cb-glass-shadow);
}

.cb-glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--cb-radius);
  transition: var(--cb-transition);
}

.cb-glass-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(59,130,246,0.4);
  box-shadow: 0 0 30px rgba(59,130,246,0.15), var(--cb-glass-shadow);
  transform: translateY(-4px);
}

/* ── GRADIENTS ── */
.cb-gradient-text {
  background: linear-gradient(135deg, #f0f4ff 0%, #60a5fa 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cb-gradient-bg {
  background: linear-gradient(135deg, var(--cb-black) 0%, #050d20 50%, #070514 100%);
}

.cb-gradient-blue {
  background: linear-gradient(135deg, #0d6efd, #06b6d4);
}

/* ── GLOW EFFECTS ── */
.cb-glow-text {
  text-shadow: 0 0 30px rgba(96,165,250,0.5);
}

.cb-glow-box {
  box-shadow: 0 0 60px rgba(59,130,246,0.2), 0 0 120px rgba(6,182,212,0.1);
}

/* ── MESH BACKGROUND ── */
.cb-mesh {
  background-color: var(--cb-black);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(59,130,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(6,182,212,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(13,110,253,0.05) 0%, transparent 60%);
}

/* ── ANIMATED BORDER ── */
.cb-border-glow {
  position: relative;
  border-radius: var(--cb-radius);
  overflow: hidden;
}

.cb-border-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59,130,246,0.6), rgba(6,182,212,0.3), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

/* ── SITE HEADER ── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: var(--cb-transition);
}

#site-header.scrolled {
  background: rgba(3,4,10,0.85);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 40px rgba(0,0,0,0.6);
}

.cb-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #f0f4ff, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

/* ── NAVIGATION ── */
.cb-nav a {
  color: rgba(240,244,255,0.7);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
  position: relative;
}

.cb-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.cb-nav a:hover { color: var(--cb-white); }
.cb-nav a:hover::after { transform: scaleX(1); }

/* ── BUTTONS ── */
.cb-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #0d6efd, #06b6d4);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: var(--cb-transition);
  position: relative;
  overflow: hidden;
}

.cb-btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  opacity: 0;
  transition: opacity 0.3s;
}

.cb-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(13,110,253,0.5); }
.cb-btn-primary:hover::before { opacity: 1; }

.cb-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  background: transparent;
  color: var(--cb-white);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--cb-transition);
}

.cb-btn-ghost:hover {
  border-color: rgba(59,130,246,0.6);
  background: rgba(59,130,246,0.1);
  color: var(--cb-blue-glow);
}

/* ── FADE IN ANIMATIONS ── */
.cb-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}

.cb-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.cb-fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}

.cb-fade-in-left.visible { opacity: 1; transform: translateX(0); }

.cb-fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}

.cb-fade-in-right.visible { opacity: 1; transform: translateX(0); }

/* Delay helpers */
.cb-delay-1 { transition-delay: 0.1s !important; }
.cb-delay-2 { transition-delay: 0.2s !important; }
.cb-delay-3 { transition-delay: 0.3s !important; }
.cb-delay-4 { transition-delay: 0.4s !important; }
.cb-delay-5 { transition-delay: 0.5s !important; }

/* ── HERO SECTION ── */
.cb-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.cb-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orb-float 8s ease-in-out infinite;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(30px,-20px) scale(1.05); }
  66%       { transform: translate(-20px,10px) scale(0.98); }
}

/* ── PRODUCT CARDS ── */
.cb-product-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--cb-radius);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  transition: var(--cb-transition);
  cursor: pointer;
}

.cb-product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(59,130,246,0.15);
}

.cb-product-card .cb-product-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: linear-gradient(135deg, #0a1628, #0d1f3c);
  display: block;
}

.cb-product-img-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3c 50%, #091525 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(59,130,246,0.3);
}

.cb-product-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.cb-badge-new    { background: rgba(13,110,253,0.7); color: #fff; }
.cb-badge-hot    { background: rgba(239,68,68,0.7); color: #fff; }
.cb-badge-viral  { background: rgba(168,85,247,0.7); color: #fff; }
.cb-badge-sale   { background: rgba(16,185,129,0.7); color: #fff; }

.cb-product-info { padding: 16px; }

.cb-product-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cb-white);
  margin-bottom: 6px;
  line-height: 1.3;
}

.cb-product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cb-blue-bright);
}

.cb-product-price-old {
  font-size: 0.8rem;
  color: var(--cb-gray);
  text-decoration: line-through;
  margin-left: 6px;
}

.cb-add-cart {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(13,110,253,0.2), rgba(6,182,212,0.1));
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 8px;
  color: var(--cb-blue-glow);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--cb-transition);
  letter-spacing: 0.05em;
}

.cb-add-cart:hover {
  background: linear-gradient(135deg, #0d6efd, #06b6d4);
  border-color: transparent;
  color: #fff;
}

/* ── HERO PRODUCT CARD (grande) ── */
.cb-product-card-hero {
  border-radius: var(--cb-radius);
  overflow: hidden;
  position: relative;
  min-height: 420px;
  background: linear-gradient(135deg, #080d1c, #0a1629);
  border: 1px solid rgba(59,130,246,0.15);
  transition: var(--cb-transition);
}

.cb-product-card-hero:hover {
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(59,130,246,0.12);
  transform: translateY(-4px);
}

.cb-product-card-hero .cb-hero-product-img {
  height: 260px;
  background: linear-gradient(135deg, #0a1832 0%, #0f2040 60%, #061020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(59,130,246,0.25);
  position: relative;
  overflow: hidden;
}

.cb-product-card-hero .cb-hero-product-img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to top, #080d1c, transparent);
}

/* ── CARRUSEL ── */
.cb-carousel-wrapper {
  overflow: hidden;
  position: relative;
}

.cb-carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}

.cb-carousel-track::-webkit-scrollbar { display: none; }

.cb-carousel-track > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.cb-carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--cb-white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--cb-transition);
}

.cb-carousel-btn:hover {
  background: rgba(13,110,253,0.5);
  border-color: rgba(59,130,246,0.5);
}

.cb-carousel-btn-prev { left: -22px; }
.cb-carousel-btn-next { right: -22px; }

/* ── TRUST BADGES ── */
.cb-trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  transition: var(--cb-transition);
}

.cb-trust-badge:hover {
  border-color: rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.05);
}

.cb-trust-badge i {
  font-size: 1.3rem;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── CATEGORY CHIPS ── */
.cb-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(240,244,255,0.75);
  cursor: pointer;
  transition: var(--cb-transition);
  white-space: nowrap;
}

.cb-category-chip:hover,
.cb-category-chip.active {
  background: linear-gradient(135deg, rgba(13,110,253,0.25), rgba(6,182,212,0.15));
  border-color: rgba(59,130,246,0.5);
  color: var(--cb-white);
}

/* ── SECTION TITLES ── */
.cb-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cb-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cb-section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--cb-cyan);
}

/* ── COUNTDOWN TIMER ── */
.cb-countdown {
  display: flex;
  gap: 10px;
}

.cb-countdown-unit {
  text-align: center;
  min-width: 52px;
}

.cb-countdown-number {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--cb-white);
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.cb-countdown-label {
  display: block;
  font-size: 0.6rem;
  color: var(--cb-gray);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── REVIEW STARS ── */
.cb-stars { color: #fbbf24; font-size: 0.8rem; }

/* ── MARQUEE ── */
.cb-marquee-wrapper {
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cb-marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.cb-marquee-track:hover { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── FOOTER ── */
#site-footer {
  background: var(--cb-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── MOBILE MENU ── */
#mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(3,4,10,0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu a {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--cb-white);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

#mobile-menu a:hover { color: var(--cb-blue-bright); }

/* ── UTILITIES ── */
.cb-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.3), transparent);
  margin: 0;
}

.cb-section { padding: 80px 0; }
.cb-section-sm { padding: 50px 0; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error { border-top-color: #3b82f6; }

.woocommerce-message::before { color: #3b82f6; }
