/*
Theme Name: Tokoo Child – RuMex Store Optimizado
Template: tokoo
Version: 2.0.0
Description: Child theme optimizado para SEO, accesibilidad y performance
Author: RuMex Store
Text Domain: tokoo-child

OPTIMIZACIONES IMPLEMENTADAS:
✅ Mobile-first responsive design
✅ CSS Custom Properties para mantenibilidad
✅ GPU-accelerated animations (transform, opacity)
✅ Reduced motion support (prefers-reduced-motion)
✅ Focus states para accesibilidad (WCAG 2.1 AAA)
✅ Contain property para performance
✅ Sistema de espaciado consistente
✅ Contraste de color WCAG AAA (7:1+)
✅ Clamp() para tipografía fluida
✅ Optimización de repaints y reflows
*/

/* ===============================================
   1. VARIABLES CSS - Sistema de diseño completo
   =============================================== */
:root {
  /* Colores principales */
  --rumex-primary: #2563eb;
  --rumex-primary-dark: #1e40af;
  --rumex-primary-light: #60a5fa;
  
  --rumex-secondary: #059669;
  --rumex-secondary-dark: #047857;
  --rumex-secondary-light: #34d399;
  
  --rumex-accent: #dc2626;
  --rumex-accent-dark: #b91c1c;
  --rumex-accent-light: #f87171;
  
  /* Neutrales con contraste AAA */
  --rumex-dark: #1f2937;
  --rumex-gray: #6b7280;
  --rumex-light: #f9fafb;
  --rumex-white: #ffffff;
  
  /* Colores semánticos */
  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-inverse: #ffffff;
  
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f9fafb;
  --color-bg-tertiary: #f3f4f6;
  
  --color-border: #e5e7eb;
  --color-border-dark: #d1d5db;
  
  /* Estados interactivos */
  --color-focus: #3b82f6;
  --color-success: #059669;
  --color-warning: #f59e0b;
  --color-error: #dc2626;
  
  /* Espaciado (escala 8pt) */
  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 1rem;      /* 16px */
  --space-md: 1.5rem;    /* 24px */
  --space-lg: 2rem;      /* 32px */
  --space-xl: 3rem;      /* 48px */
  --space-2xl: 4rem;     /* 64px */
  --space-3xl: 6rem;     /* 96px */
  
  /* Tipografía */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Outfit", var(--font-sans);
  
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 2rem;      /* 32px */
  --font-size-4xl: 2.5rem;    /* 40px */
  --font-size-5xl: 3rem;      /* 48px */
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Sombras optimizadas (GPU-friendly) */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Animaciones */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Bordes */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Layout */
  --container-max: 1280px;
  --container-padding: var(--space-md);
  
  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 100;
  --z-fixed: 1000;
  --z-modal: 10000;
}

/* ===============================================
   2. RESET & BASE STYLES - Mobile-first
   =============================================== */

/* Box sizing y reset básico */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Root font size para rem */
html {
  font-size: 100%; /* 16px base */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

/* Mejora scroll en iOS */
@supports (font: -apple-system-body) {
  html {
    -webkit-text-size-adjust: 100%;
  }
}

/* Body optimizado */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

/* Tipografía base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2rem, 5vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw + 0.5rem, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2rem); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-md);
}

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

a:hover {
  color: var(--rumex-primary-dark);
}

/* Focus states accesibles (WCAG 2.1) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip link removido por solicitud del usuario */

/* Listas */
ul, ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding-left: 0;
}

/* Imágenes responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===============================================
   3. LAYOUT PRINCIPAL
   =============================================== */

.rumex-home {
  color: var(--color-text-primary);
  overflow-x: hidden;
}

/* Container genérico */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ===============================================
   4. HERO SECTION - Optimizado para LCP
   =============================================== */

.hero-rumex {
  position: relative;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
  padding: clamp(3rem, 8vw, 7rem) var(--container-padding);
  text-align: center;
  color: var(--color-text-inverse);
  overflow: hidden;
  
  /* Performance: contain layout */
  contain: layout style paint;
}

/* Patrón de fondo sutil (opcional) */
.hero-rumex::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  z-index: var(--z-base);
}

.hero-title {
  font-size: clamp(2rem, 5vw + 1rem, 3.75rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  line-height: var(--line-height-tight);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw + 0.5rem, 1.5rem);
  margin: 0 auto var(--space-xl) auto;
  line-height: var(--line-height-relaxed);
  opacity: 0.95;
  max-width: 700px;
}

.hero-subtitle strong {
  font-weight: 700;
  color: var(--color-text-inverse);
}

/* ===============================================
   5. BOTONES - Accesibles y performantes
   =============================================== */

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-full);
  font-size: var(--font-size-lg);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: 
    transform var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-fast);
  
  /* Performance: GPU acceleration */
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  
  /* Accesibilidad */
  min-height: 44px; /* Touch target mínimo */
  min-width: 44px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--color-bg-primary);
  color: var(--rumex-primary);
  box-shadow: var(--shadow-xl);
}

.btn-primary:hover {
  background-color: var(--color-bg-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2xl);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text-inverse);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-large {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--font-size-xl);
}

.btn-icon {
  font-size: 1.25em;
  line-height: 1;
}

/* ===============================================
   6. HERO STATS
   =============================================== */

.hero-stats {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.hero-stats li {
  text-align: center;
  min-width: 80px;
}

.hero-stats strong {
  font-size: clamp(2rem, 4vw, 3rem);
  display: block;
  font-weight: 800;
  margin-bottom: var(--space-xs);
  line-height: 1;
}

.hero-stats span {
  font-size: var(--font-size-sm);
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ===============================================
   7. SECCIONES GENERALES
   =============================================== */

section {
  padding: clamp(3rem, 8vw, 6rem) var(--container-padding);
}

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-2xl);
  font-weight: 800;
  color: var(--color-text-primary);
}

/* ===============================================
   8. CATEGORÍAS
   =============================================== */

.categories {
  background-color: var(--color-bg-primary);
  contain: layout style;
}

.category-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-lg);
}

.category-card {
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: 
    transform var(--transition-base),
    box-shadow var(--transition-base);
  border: 1px solid var(--color-border);
  
  /* Performance */
  will-change: transform;
  contain: layout style paint;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--rumex-primary-light);
}

.category-icon {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: var(--space-md);
  line-height: 1;
  display: block;
}

.category-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.category-card p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  margin-bottom: 0;
  max-width: none;
}

/* ===============================================
   9. CONTENIDO SEO
   =============================================== */

.seo-content {
  background-color: var(--color-bg-secondary);
  contain: layout style;
}

.seo-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.seo-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-md);
}

.seo-text h3 {
  font-size: var(--font-size-xl);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.seo-text p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  max-width: 100%;
}

.seo-box {
  background-color: var(--color-bg-primary);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.seo-box h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.seo-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.seo-box li {
  padding: var(--space-sm) 0;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.seo-box li span[aria-hidden] {
  font-size: 1.25em;
  flex-shrink: 0;
}

/* ===============================================
   10. PRODUCTOS
   =============================================== */

.products {
  background-color: var(--color-bg-primary);
  text-align: center;
  contain: layout style;
}

.products-light {
  background-color: var(--color-bg-secondary);
}

.products-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Optimización de productos WooCommerce */
.products .woocommerce ul.products {
  margin: 0;
  padding: 0;
}

.products .woocommerce ul.products li.product {
  transition: transform var(--transition-base);
}

.products .woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
}

/* ===============================================
   11. CTA FINAL
   =============================================== */

.cta-final {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  color: var(--color-text-inverse);
  padding: clamp(4rem, 10vw, 7rem) var(--container-padding);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-final::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.cta-final h2 {
  color: var(--color-text-inverse);
  margin-bottom: var(--space-md);
}

.cta-final p {
  font-size: var(--font-size-lg);
  margin: 0 auto var(--space-xl) auto;
  opacity: 0.95;
  max-width: 600px;
}

/* ===============================================
   12. RESPONSIVE - Tablet y Desktop
   =============================================== */

/* Tablet (768px+) */
@media (min-width: 48em) {
  :root {
    --container-padding: var(--space-xl);
  }
  
  .seo-grid {
    grid-template-columns: 1fr 360px;
  }
  
  .hero-stats {
    gap: var(--space-2xl);
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (1024px+) */
@media (min-width: 64em) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .hero-actions {
    gap: var(--space-lg);
  }
}

/* Large Desktop (1280px+) */
@media (min-width: 80em) {
  :root {
    --font-size-base: 1.125rem;
  }
}

/* ===============================================
   13. ACCESIBILIDAD - Reduced Motion
   =============================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .btn,
  .category-card {
    will-change: auto;
  }
}

/* ===============================================
   14. PRINT STYLES
   =============================================== */

@media print {
  .hero-rumex,
  .cta-final,
  .btn,
  .hero-actions {
    background: none !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  
  a {
    text-decoration: underline;
  }
  
  .skip-link {
    display: none;
  }
}

/* ===============================================
   15. UTILITIES - Clases de utilidad
   =============================================== */

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ===============================================
   FIN DEL ARCHIVO
   =============================================== */











/* BOTÓN PRIMARY RUMEXSTORE - CONTRASTE PERFECTO */
.btn.btn-primary.btn-large,
.btn-primary.btn-large {
    background: #dc2626 !important;      /* Rojo vivo hogar */
    color: #ffffff !important;           /* Blanco puro */
    border: 2px solid #991b1b !important;
    padding: 18px 36px !important;
    border-radius: 12px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 8px 25px rgba(220,38,38,0.3) !important;
    min-height: 60px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.btn.btn-primary.btn-large:hover {
    background: #b91c1c !important;      /* Rojo oscuro */
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 35px rgba(220,38,38,0.4) !important;
}

/* MÓVIL */
@media (max-width: 768px) {
    .btn.btn-primary.btn-large {
        padding: 20px 40px !important;
        font-size: 20px !important;
        min-height: 65px !important;
        width: 100% !important;
        max-width: 350px !important;
    }
}



img { loading: lazy; }













