/* 
 * TodoReseña - Estilos Premium Rediseñados
 * Arquitectura Mobile-First con Glassmorphism y Microinteracciones
 */

/* ==========================================================================
   Variables y CSS Custom Properties
   ========================================================================== */
   :root {
    /* Colores Primarios - Ajustados para un look más vibrante */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    
    /* Grises y Fondos */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Semánticos */
    --success: #10b981;
    --star-gold: #fbbf24;
    
    /* Categorías */
    --cat-hogar: #ec4899;
    --cat-tech: #3b82f6;
    --cat-deporte: #10b981;
    --cat-belleza: #a855f7;
    --cat-bricolaje: #f97316;
    --cat-mascotas: #84cc16;
    --cat-bebes: #fbbf24;
    --cat-oficina: #6366f1;
  
    /* Tipografía */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
  
    /* Espaciado */
    --container-padding: 2rem;
    --container-max-width: 1280px; /* Aumentado para look premium */
    
    /* Sombras y Transiciones - Más suaves y modernas */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.025);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.025);
    --shadow-lg: 0 15px 35px rgba(0,0,0,0.05), 0 5px 15px rgba(0,0,0,0.025);
    --shadow-hover: 0 20px 40px rgba(79, 70, 229, 0.15); /* Sombra teñida */
    --transition-base: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  /* ==========================================================================
     Reset & Global (Scoping a custom-home-main para no romper el tema)
     ========================================================================== */
  
  .custom-home-main {
    font-family: var(--font-body);
    color: var(--gray-800);
    line-height: 1.6;
    background-color: var(--gray-50); /* Fondo ligeramente gris para que destaquen las cards blancas */
    -webkit-font-smoothing: antialiased;
  }
  
  .custom-home-main h1, 
  .custom-home-main h2, 
  .custom-home-main h3, 
  .custom-home-main h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.02em; /* Títulos más compactos */
  }
  
  .custom-home-main a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
  }
  
  .custom-home-main a:hover {
    color: var(--primary-dark);
  }
  
  .custom-home-main img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  .custom-home-main ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .custom-home-main .container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
  }
  
  .custom-home-main .text-center { text-align: center; }
  .custom-home-main .mt-4 { margin-top: 2rem; }
  
  .custom-home-main .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  
  /* Animaciones Básicas */
  .custom-home-main .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);
  }
  .custom-home-main .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
  @media (prefers-reduced-motion: reduce) {
    .custom-home-main .fade-in {
      transition: none;
      transform: none;
      opacity: 1;
    }
  }
  
  /* ==========================================================================
     Layout Utilities (Grid)
     ========================================================================== */
  .custom-home-main .grid {
    display: grid;
    gap: 2.5rem; /* Gap más amplio para respirar */
  }
  
  @media (min-width: 768px) {
    .custom-home-main .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .custom-home-main .grid-3 { grid-template-columns: repeat(2, 1fr); } 
    .custom-home-main .grid-4 { grid-template-columns: repeat(2, 1fr); } 
  }
  
  @media (min-width: 1024px) {
    .custom-home-main .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .custom-home-main .grid-4 { grid-template-columns: repeat(4, 1fr); }
  }
  
  /* ==========================================================================
     Componentes Reutilizables
     ========================================================================== */
  
  /* Botones Premium */
  .custom-home-main .btn-primary, 
  .custom-home-main .btn-primary-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px; /* Botones más redondeados */
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  
  /* Efecto shine en botones */
  .custom-home-main .btn-primary::after,
  .custom-home-main .btn-primary-sm::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    transition: all 0.6s ease;
  }

  .custom-home-main .btn-primary:hover::after,
  .custom-home-main .btn-primary-sm:hover::after {
    left: 150%;
  }
  
  .custom-home-main .btn-primary {
    padding: 14px 28px;
    font-size: 1.05rem;
  }
  
  .custom-home-main .btn-primary-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
  }
  
  .custom-home-main .btn-primary:hover, 
  .custom-home-main .btn-primary-sm:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    color: white;
  }
  
  .custom-home-main .btn-text {
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .custom-home-main .btn-text:hover {
    color: var(--accent);
    gap: 8px; /* Animación de la flecha separándose */
  }
  
  /* Tarjetas Premium */
  .custom-home-main .card {
    background: white;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; /* Más redondeadas */
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
  }
  
  .custom-home-main .card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-hover);
    border-color: rgba(79, 70, 229, 0.2);
  }
  
  /* Badges Modernos */
  .custom-home-main .badge {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
  }
  .custom-home-main .badge-hogar { background: linear-gradient(135deg, var(--cat-hogar), #f472b6); }
  .custom-home-main .badge-tech { background: linear-gradient(135deg, var(--cat-tech), #60a5fa); }
  
  /* ==========================================================================
     1. HERO SECTION (GLASSMORPHISM & PREMIUM IMG)
     ========================================================================== */
  .custom-home-main .hero {
    height: 90vh;
    min-height: 700px;
    /* Usamos una imagen de Unsplash de alta calidad orientada a tech/home office */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.8) 100%), 
                url('https://images.unsplash.com/photo-1499951360447-b19be8fe80f5?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
    margin-top: -1px; 
  }
  
  .custom-home-main .hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  
  .custom-home-main .hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 3.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Buscador Principal Glassmorphism */
  .custom-home-main .search-container {
    position: relative;
    max-width: 650px;
    margin: 0 auto 3rem;
  }
  
  .custom-home-main .search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: var(--transition-base);
  }
  .custom-home-main .search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
  }
  
  .custom-home-main .search-icon {
    position: absolute;
    left: 1.5rem;
    color: white;
  }
  
  .custom-home-main .search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    font-size: 1.1rem;
    font-family: var(--font-body);
    border: none;
    background: transparent;
    color: white;
    outline: none;
  }
  .custom-home-main .search-input::placeholder {
    color: rgba(255,255,255,0.7);
  }
  
  .custom-home-main .search-suggestions {
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: left;
    overflow: hidden;
    z-index: 20;
    margin: 0;
  }
  
  .custom-home-main .search-suggestions li {
    padding: 1rem 1.5rem;
    color: var(--gray-800);
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
  }
  .custom-home-main .search-suggestions li:last-child {
    border-bottom: none;
  }
  .custom-home-main .search-suggestions li:hover {
    background-color: var(--gray-50);
  }
  .custom-home-main .suggestion-match {
    font-weight: 700;
    color: var(--primary);
  }
  
  /* Pills */
  .custom-home-main .category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
  }
  
  .custom-home-main .pill {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-base);
  }
  
  .custom-home-main .pill:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255,255,255,0.4);
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  }
  
  /* ==========================================================================
     Secciones Generales
     ========================================================================== */
  .custom-home-main .section {
    padding: 6rem 0; /* Más respiro */
  }
  .custom-home-main .section-gray {
    background-color: #f1f5f9;
    /* Magia Visual: Grid topográfico premium MÁS VISIBLE */
    background-image: 
        linear-gradient(rgba(79, 70, 229, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, 0.12) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    position: relative;
  }
  .custom-home-main .section-header {
    margin-bottom: 3.5rem;
  }
  .custom-home-main .icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 16px;
    margin-bottom: 1rem;
  }
  .custom-home-main .section-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--gray-900);
  }
  
  .custom-home-main .section-subtitle {
    font-size: 1.15rem;
    color: var(--gray-600);
    margin-top: 0;
    margin-bottom: 0;
  }
  
  /* ==========================================================================
     2. REVIEWS
     ========================================================================== */
  .custom-home-main .review-card {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .custom-home-main .card-image-wrapper {
    position: relative;
    padding-top: 65%; /* 3:2 Aspect Ratio, un poco más panorámico */
    background-color: var(--gray-200);
    overflow: hidden;
  }
  
  .custom-home-main .card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .custom-home-main .review-card:hover .card-image-wrapper img {
    transform: scale(1.08); /* Zoom in effect */
  }
  
  .custom-home-main .card-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }
  
  .custom-home-main .card-title {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .custom-home-main .rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
  }
  
  .custom-home-main .stars {
    color: var(--star-gold);
    letter-spacing: 3px;
  }
  .custom-home-main .half-star {
    opacity: 0.5; 
  }
  
  .custom-home-main .rating-text {
    font-weight: 700;
    color: var(--gray-800);
  }
  
  .custom-home-main .card-desc {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
    line-height: 1.7;
  }
  
  .custom-home-main .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1.2rem;
    border-top: 1px solid var(--gray-100);
  }
  
  .custom-home-main .price-badge {
    font-weight: 800;
    color: var(--gray-900);
    background: var(--gray-100);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
  }
  
  /* ==========================================================================
     3. COMPARATIVAS POPULARES
     ========================================================================== */
  .custom-home-main .comp-card .comp-images {
    display: flex;
    position: relative;
    height: 220px;
  }
  .custom-home-main .comp-images img {
    width: 50%;
    object-fit: cover;
    transition: var(--transition-base);
  }
  .custom-home-main .comp-card:hover .comp-images img:first-child {
    transform: scale(1.05) translateX(-2%);
  }
  .custom-home-main .comp-card:hover .comp-images img:last-child {
    transform: scale(1.05) translateX(2%);
  }
  
  .custom-home-main .vs-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
    color: white;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1rem;
    border: 4px solid white;
    z-index: 2;
    box-shadow: var(--shadow-md);
  }
  
  .custom-home-main .features-list {
    margin-bottom: 2rem;
    color: var(--gray-600);
    font-size: 0.95rem;
  }
  .custom-home-main .features-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .custom-home-main .social-proof {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 600;
  }
  
  /* ==========================================================================
     4. PROBLEMAS
     ========================================================================== */
  .custom-home-main #problemas {
    position: relative;
  }
  /* Magia visual: resplandor de fondo MÁS INTENSO */
  .custom-home-main #problemas::before {
    content: '';
    position: absolute;
    top: 50%; left: 30%;
    transform: translate(-50%, -50%);
    width: 1000px; height: 1000px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
  }
  .custom-home-main #problemas::after {
    content: '';
    position: absolute;
    top: 50%; right: -20%;
    transform: translate(-50%, -50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
  }
  .custom-home-main .problems-wrapper {
    max-width: 1000px;
    margin: 0 auto; /* Centrado absoluto */
    position: relative;
    z-index: 1;
  }
  .custom-home-main .search-container-light .search-input {
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--gray-200);
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    border-radius: 12px;
  }
  .custom-home-main .search-container-light .search-input:focus {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
  }
  .custom-home-main .problem-card {
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border: 1px solid var(--gray-200);
  }
  .custom-home-main .problem-card:hover {
    border-color: var(--primary);
  }
  .custom-home-main .svg-icon-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(236, 72, 153, 0.05));
    border-radius: 50%;
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
  }
  .custom-home-main .problem-card:hover .svg-icon-large {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(236, 72, 153, 0.1));
  }
  .custom-home-main .problem-card h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    font-weight: 700;
  }
  .custom-home-main .solutions-count {
    font-size: 0.9rem;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    padding: 4px 12px;
    border-radius: 9999px;
    font-weight: 700;
  }
  
  /* ==========================================================================
     5. CATEGORÍAS (Rediseño a Cards Inmersivas)
     ========================================================================== */
  .custom-home-main .grid-categories .cat-card {
    position: relative;
    text-align: center;
    padding: 3rem 1.5rem;
    border: none;
    overflow: hidden;
    z-index: 1;
  }
  
  /* Gradientes de fondo para las categorías */
  .custom-home-main .cat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    opacity: 0.05;
    transition: var(--transition-base);
  }
  
  .custom-home-main .hover-hogar::before { background: linear-gradient(135deg, var(--cat-hogar), transparent); }
  .custom-home-main .hover-tech::before { background: linear-gradient(135deg, var(--cat-tech), transparent); }
  .custom-home-main .hover-deporte::before { background: linear-gradient(135deg, var(--cat-deporte), transparent); }
  .custom-home-main .hover-belleza::before { background: linear-gradient(135deg, var(--cat-belleza), transparent); }
  .custom-home-main .hover-bricolaje::before { background: linear-gradient(135deg, var(--cat-bricolaje), transparent); }
  .custom-home-main .hover-mascotas::before { background: linear-gradient(135deg, var(--cat-mascotas), transparent); }
  .custom-home-main .hover-bebes::before { background: linear-gradient(135deg, var(--cat-bebes), transparent); }
  .custom-home-main .hover-oficina::before { background: linear-gradient(135deg, var(--cat-oficina), transparent); }
  
  .custom-home-main .cat-card:hover::before {
    opacity: 0.15;
  }
  
  .custom-home-main .cat-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
  }
  .custom-home-main .cat-card:hover .cat-svg {
    transform: scale(1.1) translateY(-5px);
    color: var(--accent);
  }
  
  .custom-home-main .cat-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
  }
  .custom-home-main .cat-count {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 500;
  }
  
  /* ==========================================================================
     6. NEWSLETTER (Ultra Premium Dark)
     ========================================================================== */
  .custom-home-main .newsletter {
    background: var(--gray-900);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
    color: white;
  }
  /* Gradientes de fondo decorativos */
  .custom-home-main .newsletter::before {
    content: '';
    position: absolute;
    top: -50%; left: -10%;
    width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.2) 0%, transparent 60%);
    z-index: 0;
  }
  .custom-home-main .newsletter::after {
    content: '';
    position: absolute;
    bottom: -50%; right: -10%;
    width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, transparent 60%);
    z-index: 0;
  }
  
  .custom-home-main .newsletter-inner {
    max-width: 600px;
    position: relative;
    z-index: 1;
  }
  .custom-home-main .newsletter h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  .custom-home-main .newsletter p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
  }
  
  .custom-home-main .input-group input[type="email"] {
    flex-grow: 1;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: white;
    transition: var(--transition-base);
  }
  .custom-home-main .input-group input[type="email"]:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
    outline: none;
  }
  .custom-home-main .input-group input[type="email"]::placeholder {
    color: rgba(255,255,255,0.5);
  }
