/* ============================================
   3txo — Global Design System
   ============================================ */

/* Google Fonts — loaded via <link> in HTML for performance */

/* ---- Custom Properties ---- */
:root {
  --color-primary: #C41E1E;
  --color-primary-dark: #8B1515;
  --color-primary-light: #E85D5D;
  --color-primary-glow: rgba(196, 30, 30, 0.3);
  --color-white: #FFFFFF;
  --color-off-white: #F8F5F2;
  --color-black: #0A0A0A;
  --color-gray-900: #1A1A1A;
  --color-gray-700: #374151;
  --color-gray-500: #6B7280;
  --color-gray-400: #9CA3AF;
  --color-gray-300: #D1D5DB;
  --color-gray-200: #E5E7EB;
  --color-gray-100: #F3F4F6;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 50%;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 30px var(--color-primary-glow);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  --header-height: 72px;
  --z-header: 1000;
  --z-cart: 1100;
  --z-overlay: 1050;
  --z-cart: 1100;
  --z-cookie: 1200;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(16px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);

  --glass-dark-bg: rgba(10, 10, 10, 0.7);
  --glass-dark-border: rgba(255, 255, 255, 0.1);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-gray-900);
  background-color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-white);
}
::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-white);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.5rem); }

p {
  line-height: 1.7;
  color: var(--color-gray-700);
}

/* ---- Utility Classes ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-white { color: var(--color-white); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.btn-outline {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  background: var(--color-off-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25D366;
  color: white;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}

/* ---- Scroll-triggered Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.2s; }
.stagger > *:nth-child(4) { transition-delay: 0.3s; }
.stagger > *:nth-child(5) { transition-delay: 0.4s; }
.stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* ---- Color Swatches ---- */
.color-swatches {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 3px solid transparent;
  cursor: pointer;
  transition: all var(--transition-bounce);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.color-swatch:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-md);
}

.color-swatch.active {
  border-color: var(--color-primary);
  transform: scale(1.15);
}

.color-swatch.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.swatch-negro { background: #0A0A0A; }
.swatch-verde { background: #2D5A3D; }
.swatch-azul { background: #5B8BA0; }
.swatch-blanco { background: #F0F0F0; border: 2px solid #D1D5DB; }
.swatch-blanco.active::after { color: #333; text-shadow: none; }

.color-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-gray-500);
  min-width: 60px;
}

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-heading);
}

.badge-available {
  background: #10B981;
  color: var(--color-white);
}

.badge-coming {
  background: var(--color-primary);
  color: var(--color-white);
  animation: pulse-badge 2s infinite;
}

.badge-new {
  background: linear-gradient(135deg, var(--color-primary), #FF6B35);
  color: var(--color-white);
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 var(--color-primary-glow); }
  50% { box-shadow: 0 0 0 12px transparent; }
}

/* ---- Price ---- */
.price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--color-black);
  letter-spacing: -0.02em;
}

.price-small {
  font-size: 1.25rem;
}

/* ---- Footer ---- */
.footer {
  background: var(--color-gray-900);
  color: var(--color-gray-300);
  padding: 60px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.footer-section h4 {
  color: var(--color-white);
  margin-bottom: 16px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-section a {
  display: block;
  padding: 5px 0;
  color: var(--color-gray-300);
  font-size: 0.9rem;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.footer-section a:hover {
  color: var(--color-primary-light);
  padding-left: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--color-gray-500);
}

.footer-bottom a {
  color: var(--color-gray-500);
}

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

/* ---- Cookie Banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--color-white);
  padding: 24px;
  z-index: var(--z-cookie);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 260px;
}

.cookie-banner-text p {
  color: var(--color-gray-300);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cookie-banner-text a {
  color: var(--color-primary-light);
  text-decoration: underline;
}

.cookie-banner-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cookie-btn-accept {
  background: var(--color-primary);
  color: white;
  border: none;
}

.cookie-btn-accept:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.cookie-btn-reject {
  background: transparent;
  color: var(--color-gray-300);
  border: 1px solid var(--color-gray-500);
}

.cookie-btn-reject:hover {
  border-color: var(--color-white);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* ---- Glassmorphism Utilities ---- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-dark {
  background: var(--glass-dark-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-dark-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* ---- Loading Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg,
    var(--color-gray-100) 25%,
    var(--color-gray-300) 50%,
    var(--color-gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Global Keyframe Animations ---- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .container {
    padding: 0 16px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.85rem;
  }

  .btn-lg {
    padding: 14px 30px;
    font-size: 0.95rem;
  }

  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner-buttons {
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 11px 20px;
    font-size: 0.8rem;
  }

  .color-swatch {
    width: 30px;
    height: 30px;
  }
}
