/* ========================================
   CATALOGO.CSS - Estilos específicos para la página Catálogo
   MK POWER ELECTRI - CSS PURO (Sin Tailwind)
   ======================================== */

/* ========================================
   ESTILOS BASE PARA PÁGINA CATÁLOGO
   ======================================== */

/* Eliminar highlight gris del navegador al hacer tap/click */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Body */
.catalogo-body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Sin efecto gris en click/tap en tarjetas */
.catalogo-product-card:active,
.catalogo-category-card-stylish:active,
.brand-card:active,
.hierarchy-card:active {
    background-color: inherit;
    opacity: 0.95;
}


/* Ajuste exclusivo para PC (Escritorio) */
@media (min-width: 769px) {
    .catalogo-main {
        padding-top: 3.2rem; /* AHORA SÍ: El espacio entre el header y las marcas será de 10rem */
    }
}

@media (max-width: 768px) {
    .catalogo-main {
        padding-top: 0; /* Móvil mantiene su diseño original */
    }
}

.catalogo-body.dark {
    background-color: var(--background-dark);
    color: white;
}

/* ========================================
   HEADER ESPECÍFICO PARA CATÁLOGO
   ======================================== */

.catalogo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
    transition: all 300ms;
}

.catalogo-header.dark {
    background-color: rgba(16, 25, 34, 0.9);
    border-bottom-color: var(--slate-800);
}

.catalogo-header-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalogo-logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Reducido de 0.75rem a 0.5rem para acercar más */
}

.catalogo-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-right: 0.5rem;
}

.catalogo-logo-icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.catalogo-logo-icon-text {
    color: white;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 600;
}

.catalogo-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--slate-900);
}

.catalogo-logo-text.dark {
    color: white;
}

.catalogo-logo-accent {
    color: var(--primary);
    font-weight: 900;
}

/* Navegación desktop */
.catalogo-desktop-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .catalogo-desktop-nav {
        display: flex;
    }
}

.catalogo-nav-link {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--slate-600);
    text-decoration: none;
    transition: color 150ms;
}

.catalogo-nav-link:hover {
    color: var(--primary);
}

.catalogo-nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* Header actions */
.catalogo-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.catalogo-header-cta {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--accent);
    color: var(--slate-900);
    font-size: 0.875rem;
    font-weight: 600;
    height: 2.5rem;
    padding: 0 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 150ms;
}

@media (min-width: 640px) {
    .catalogo-header-cta {
        display: flex;
    }
}

.catalogo-header-cta:hover {
    background-color: var(--accent-dark);
    transform: translateY(-0.125rem);
}

.catalogo-header-cta-icon {
    font-size: 18px;
}

.catalogo-hamburger-btn {
    display: block;
    padding: 0.5rem;
    color: var(--slate-600);
    background: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 150ms;
}

.catalogo-hamburger-btn:hover {
    background-color: var(--slate-100);
}

@media (min-width: 768px) {
    .catalogo-hamburger-btn {
        display: none;
    }
}

/* Menú móvil */
.catalogo-mobile-menu {
    display: none;
    background-color: white;
    border-top: 1px solid var(--slate-200);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 60;
}

.catalogo-mobile-menu.show {
    display: block;
}

@media (min-width: 768px) {
    .catalogo-mobile-menu {
        display: none !important;
    }
}

.catalogo-mobile-nav {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.catalogo-mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--slate-600);
    text-decoration: none;
    border-bottom: 1px solid var(--slate-100);
    transition: color 150ms;
}

.catalogo-mobile-nav-link:hover {
    color: var(--primary);
}

.catalogo-mobile-nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.catalogo-mobile-cta-container {
    padding-top: 1rem;
}

.catalogo-mobile-cta {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 150ms;
}

.catalogo-mobile-cta:hover {
    background-color: var(--primary-dark);
}

/* ========================================
   BANNER DE AUTORIDAD
   ======================================== */

.catalogo-authority-banner {
    background-color: var(--primary);
    color: white;
    padding: 0.375rem 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    margin-top: 5rem;
    margin-bottom: 0;
    margin-left: 16rem; /* Ajustar para el sidebar estático */
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Botón hamburguesa para móvil */
.catalogo-mobile-toggle {
    display: none;
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 150ms;
}

.catalogo-mobile-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.catalogo-mobile-toggle .material-symbols-outlined {
    font-size: 1.25rem;
}

/* En móvil, mostrar botón hamburguesa y ajustar layout */
@media (max-width: 767px) {
    .catalogo-authority-banner {
        margin-left: 0;
        padding-left: 4rem; /* Espacio para el botón hamburguesa */
        margin-top: 4rem; /* Reduced from 5rem to fix top gap */
    }
    
    .catalogo-mobile-toggle {
        display: block;
    }
}

/* Header interno inmediatamente después del banner */
.catalogo-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    background-color: var(--slate-50);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalogo-sidebar-header.dark {
    border-bottom-color: var(--slate-800);
    background-color: var(--slate-800);
}

.catalogo-sidebar-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.catalogo-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 150ms;
    color: var(--slate-600);
    flex-shrink: 0;
}

.catalogo-sidebar-toggle:hover {
    background-color: var(--slate-200);
}

.catalogo-sidebar-toggle.dark:hover {
    background-color: var(--slate-700);
}

.catalogo-sidebar-toggle-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

/* Rotar el icono cuando el sidebar está colapsado */
.catalogo-sidebar.collapsed .catalogo-sidebar-toggle-icon {
    transform: rotate(180deg);
}

.catalogo-sidebar-main-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
    flex: 1;
    min-width: 0;
}

.catalogo-sidebar-main-title.dark {
    color: white;
}

/* ========================================
   BÚSQUEDA DENTRO DEL SIDEBAR
   ======================================== */

.catalogo-sidebar-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    background-color: white;
}

.catalogo-sidebar-search.dark {
    border-bottom-color: var(--slate-800);
    background-color: var(--surface-dark);
}

.catalogo-search-container {
    position: relative;
    width: 100%;
}

.catalogo-search-input {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem 0 2.5rem;
    border: 2px solid var(--slate-200);
    border-radius: 0.5rem;
    background-color: white;
    font-size: 0.875rem;
    color: var(--slate-900);
    transition: all 150ms;
    outline: none;
}

.catalogo-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.catalogo-search-input.dark {
    background-color: var(--slate-800);
    border-color: var(--slate-700);
    color: white;
}

.catalogo-search-input.dark:focus {
    border-color: var(--primary);
}

.catalogo-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    font-size: 1rem;
    pointer-events: none;
}

.catalogo-search-icon.dark {
    color: var(--slate-500);
}

/* ========================================
   LAYOUT PRINCIPAL DEL CATÁLOGO
   ======================================== */

.catalogo-main-layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 10rem);
    width: 100%;
}

/* ========================================
   SIDEBAR DE MARCAS - ESTÁTICO Y SIMPLE
   ======================================== */

.catalogo-sidebar {
    width: 16rem;
    background-color: white;
    border-right: 1px solid var(--slate-200);
    position: fixed;
    top: 5rem;
    left: 0;
    bottom: 0; /* Llega hasta el suelo */
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow: hidden;
}

.catalogo-sidebar.dark {
    background-color: var(--surface-dark);
    border-right-color: var(--slate-800);
}

/* Header del sidebar */
.catalogo-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    background-color: var(--slate-50);
}

.catalogo-sidebar-header.dark {
    border-bottom-color: var(--slate-800);
    background-color: var(--slate-800);
}

.catalogo-sidebar-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
    text-align: center;
}

.catalogo-sidebar-main-title.dark {
    color: white;
}

/* ========================================
   BÚSQUEDA DENTRO DEL SIDEBAR
   ======================================== */

.catalogo-sidebar-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    background-color: white;
}

.catalogo-sidebar-search.dark {
    border-bottom-color: var(--slate-800);
    background-color: var(--surface-dark);
}

.catalogo-search-container {
    position: relative;
    width: 100%;
}

.catalogo-search-input {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem 0 2.5rem;
    border: 2px solid var(--slate-200);
    border-radius: 0.5rem;
    background-color: white;
    font-size: 0.875rem;
    color: var(--slate-900);
    transition: all 150ms;
    outline: none;
    box-sizing: border-box;
}

.catalogo-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.catalogo-search-input.dark {
    background-color: var(--slate-800);
    border-color: var(--slate-700);
    color: white;
}

.catalogo-search-input.dark:focus {
    border-color: var(--primary);
}

.catalogo-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    font-size: 1rem;
    pointer-events: none;
}

.catalogo-search-icon.dark {
    color: var(--slate-500);
}

/* ========================================
   NAVEGACIÓN DE MARCAS - SIMPLE
   ======================================== */

.catalogo-sidebar-nav {
    flex: 1;
    overflow: hidden; /* SIN scroll - completamente estático */
    padding: 1rem; /* Padding aumentado para mejor espaciado */
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Gap aumentado para recuadros más grandes */
}

/* Botones de marca simplificados */
.catalogo-brand-button {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: transparent;
    border: 1px solid transparent;
    color: var(--slate-600);
    text-align: left;
    cursor: pointer;
    transition: all 150ms;
    font: inherit;
    display: flex;
    align-items: center;
}

.catalogo-brand-button:hover {
    background-color: var(--slate-50);
    color: var(--slate-900);
}

.catalogo-brand-button.active {
    background-color: rgba(0, 102, 255, 0.1);
    border-color: rgba(0, 102, 255, 0.2);
    color: var(--primary);
}

.catalogo-brand-button.dark {
    color: var(--slate-400);
}

.catalogo-brand-button.dark:hover {
    background-color: var(--slate-800);
    color: white;
}

.catalogo-brand-content {
    flex: 1;
}

.catalogo-brand-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.catalogo-brand-counter {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
    display: none; /* Oculto por defecto */
}

/* ========================================
   RESPONSIVE DESIGN - MÓVIL
   ======================================== */

@media (max-width: 767px) {
    .catalogo-sidebar {
        height: 100vh;
        width: 80%;
        max-width: 20rem;
        border-right: 1px solid var(--slate-200);
        border-top: none;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        flex-direction: column;
        z-index: 99999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow: hidden; /* Evitar scroll en el contenedor principal */
    }
    
    .catalogo-sidebar.dark {
        border-right-color: var(--slate-800);
    }
    
    .catalogo-sidebar.open {
        transform: translateX(0);
    }
    
    .catalogo-sidebar-header,
    .catalogo-sidebar-search {
        display: block;
        flex-shrink: 0; /* No se comprimen */
    }
    
    .catalogo-sidebar-nav {
        padding: 1rem 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        overflow-y: auto; /* Solo el contenido de navegación hace scroll */
        overflow-x: hidden;
        gap: 0.5rem;
        flex: 1; /* Toma todo el espacio disponible */
        width: 100%;
        /* Scroll suave y oculto */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    /* Ocultar scrollbar en WebKit */
    .catalogo-sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    
    .catalogo-brand-button {
        width: 100%;
        height: auto;
        padding: 1rem;
        border-radius: 0.5rem;
        justify-content: flex-start;
        text-align: left;
        flex-shrink: 0;
    }
    
    .catalogo-brand-name {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
        white-space: normal;
    }
    
    .catalogo-brand-counter {
        display: block;
        font-size: 0.75rem;
    }
}

.catalogo-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalogo-sidebar-header.dark {
    border-bottom-color: var(--slate-800);
}

.catalogo-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
    margin: 0;
}

.catalogo-sidebar-title.dark {
    color: var(--slate-400);
}

.catalogo-sidebar-close {
    display: block;
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--slate-600);
    transition: all 150ms;
}

.catalogo-sidebar-close:hover {
    background-color: var(--slate-100);
    color: var(--slate-900);
}

.catalogo-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.catalogo-sidebar-nav::-webkit-scrollbar {
    display: none;
}

/* Botones de marca - Recuadros más grandes */
.catalogo-brand-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1rem; /* Padding aumentado para recuadros más grandes */
    border-radius: 0.75rem; /* Border radius aumentado */
    background-color: transparent;
    border: 1px solid transparent;
    color: var(--slate-600);
    text-align: left;
    cursor: pointer;
    transition: all 150ms;
    font-size: 0.9375rem; /* Tamaño de fuente ligeramente aumentado */
    position: relative;
    overflow: hidden;
}

.catalogo-brand-button:hover {
    background-color: var(--slate-50);
    color: var(--slate-900);
}

/* Estilo genérico active eliminado - cada marca tiene su propio estilo */

.catalogo-brand-button.dark {
    color: var(--slate-400);
}

.catalogo-brand-button.dark:hover {
    background-color: var(--slate-800);
    color: white;
}

.catalogo-brand-content {
    flex: 1;
    min-width: 0;
}

.catalogo-brand-name {
    font-weight: 600;
    font-size: 0.9375rem; /* Tamaño de fuente aumentado */
    line-height: 1.3;
    margin: 0; /* Sin margin bottom ya que no hay contador */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Contador de productos seleccionados por marca */
.catalogo-brand-counter {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    background-color: rgba(0, 102, 255, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    min-width: 1rem;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 150ms;
}

.catalogo-brand-counter.visible {
    opacity: 1;
    visibility: visible;
}

/* Estilos específicos para móvil */
@media (max-width: 767px) {
    .catalogo-brand-counter {
        font-size: 0.6875rem;
        padding: 0.1rem 0.25rem;
        margin-left: 0.375rem;
    }
}

/* ========================================
   ESTILOS ESPECÍFICOS POR MARCA CUANDO ESTÁN ACTIVAS
   ======================================== */

/* APC - Fondo blanco, letra roja */
.catalogo-brand-button[data-brand="apc"].active {
    background-color: white;
    border-color: #dc2626;
    color: #dc2626;
}

/* General Cable - Fondo blanco, letra verde */
.catalogo-brand-button[data-brand="general-cable"].active {
    background-color: white;
    border-color: #16a34a;
    color: #16a34a;
}

/* ABB - Fondo blanco, letra roja */
.catalogo-brand-button[data-brand="abb"].active {
    background-color: white;
    border-color: #dc2626;
    color: #dc2626;
}

/* Schneider Electric - Fondo blanco, letra verde */
.catalogo-brand-button[data-brand="schneider"].active {
    background-color: white;
    border-color: #16a34a;
    color: #16a34a;
}

/* SICK Sensor Intelligence - Fondo blanco, letra azul */
.catalogo-brand-button[data-brand="sick"].active {
    background-color: white;
    border-color: #2563eb;
    color: #2563eb;
}

/* DEWALT - Fondo amarillo, letra negra */
.catalogo-brand-button[data-brand="dewalt"].active {
    background-color: #fbbf24;
    border-color: #f59e0b;
    color: #000000;
}

/* Allen-Bradley - Fondo blanco, letra negra */
.catalogo-brand-button[data-brand="allen-bradley"].active {
    background-color: white;
    border-color: #374151;
    color: #000000;
}

/* 3M - Fondo blanco, letra roja */
.catalogo-brand-button[data-brand="3m"].active {
    background-color: white;
    border-color: #dc2626;
    color: #dc2626;
}

/* BELDEN - Fondo blanco, letra azul */
.catalogo-brand-button[data-brand="belden"].active {
    background-color: white;
    border-color: #2563eb;
    color: #2563eb;
}

/* Weidmüller - Fondo blanco, letra naranja/dorada */
.catalogo-brand-button[data-brand="weidmuller"].active {
    background-color: white;
    border-color: #ea580c;
    color: #ea580c;
}

/* SIEMENS - Fondo blanco, letra verde azulado (cian) */
.catalogo-brand-button[data-brand="siemens"].active {
    background-color: white;
    border-color: #0891b2;
    color: #0891b2;
}

/* Danfoss - Fondo blanco, letra roja */
.catalogo-brand-button[data-brand="danfoss"].active {
    background-color: white;
    border-color: #dc2626;
    color: #dc2626;
}

/* FLUKE - Fondo blanco, letra negra */
.catalogo-brand-button[data-brand="fluke"].active {
    background-color: white;
    border-color: #374151;
    color: #000000;
}

/* WEG - Fondo blanco, letra azul */
.catalogo-brand-button[data-brand="weg"].active {
    background-color: white;
    border-color: #2563eb;
    color: #2563eb;
}

/* HELUKABEL - Fondo blanco, letra roja */
.catalogo-brand-button[data-brand="helukabel"].active {
    background-color: white;
    border-color: #dc2626;
    color: #dc2626;
}

/* PHOENIX CONTACT - Fondo blanco, letra negra */
.catalogo-brand-button[data-brand="phoenix-contact"].active {
    background-color: white;
    border-color: #374151;
    color: #000000;
}

/* OMRON - Fondo blanco, letra azul */
.catalogo-brand-button[data-brand="omron"].active {
    background-color: white;
    border-color: #2563eb;
    color: #2563eb;
}

/* PILZ - Fondo blanco, letra negra */
.catalogo-brand-button[data-brand="pilz"].active {
    background-color: white;
    border-color: #374151;
    color: #000000;
}

/* WAGO - Fondo blanco, letra verde */
.catalogo-brand-button[data-brand="wago"].active {
    background-color: white;
    border-color: #16a34a;
    color: #16a34a;
}

/* GE (General Electric) - Fondo blanco, letra negra */
.catalogo-brand-button[data-brand="ge"].active {
    background-color: white;
    border-color: #374151;
    color: #000000;
}

/* HUBBELL - Fondo blanco, letra negra */
.catalogo-brand-button[data-brand="hubbell"].active {
    background-color: white;
    border-color: #374151;
    color: #000000;
}

/* BRADY - Fondo blanco, letra azul */
.catalogo-brand-button[data-brand="brady"].active {
    background-color: white;
    border-color: #2563eb;
    color: #2563eb;
}

/* Honeywell - Fondo blanco, letra roja */
.catalogo-brand-button[data-brand="honeywell"].active {
    background-color: white;
    border-color: #dc2626;
    color: #dc2626;
}

/* CIC - Fondo blanco, letra azul (por defecto) */
.catalogo-brand-button[data-brand="cic"].active {
    background-color: white;
    border-color: #2563eb;
    color: #2563eb;
}

/* Sylvania - Fondo blanco, letra azul (por defecto) */
.catalogo-brand-button[data-brand="sylvania"].active {
    background-color: white;
    border-color: #2563eb;
    color: #2563eb;
}

/* HITACHI - Fondo blanco, letra roja (por defecto) */
.catalogo-brand-button[data-brand="hitachi"].active {
    background-color: white;
    border-color: #dc2626;
    color: #dc2626;
}

/* Balestro - Fondo blanco, letra azul (por defecto) */
.catalogo-brand-button[data-brand="balestro"].active {
    background-color: white;
    border-color: #2563eb;
    color: #2563eb;
}

/* Marcas ocultas por falta de logo */
.catalogo-brand-button.brand-hidden {
    display: none !important;
}

/* Indicador visual para marcas sin logo (solo para debugging) */
.catalogo-brand-button[data-hidden-reason="no-logo"] {
    opacity: 0.3;
    pointer-events: none;
}

/* Animación suave para mostrar/ocultar marcas */
.catalogo-brand-button {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.catalogo-brand-button.brand-loading {
    opacity: 0.5;
    transform: scale(0.95);
}

/* Estilos para imágenes de marca que están cargando */
.brand-card-image {
    transition: opacity 0.3s ease;
}

.brand-card-image.loading {
    opacity: 0.3;
}

/* Placeholder para marcas sin imagen */
.brand-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    font-size: 0.75rem;
    text-align: center;
    border-radius: 0.5rem;
}
.catalogo-brand-button .brand-tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0.5rem;
    background-color: var(--slate-900);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

.catalogo-brand-button .brand-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: var(--slate-900);
}

.catalogo-sidebar.collapsed .catalogo-brand-button:hover .brand-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Ajustes para sidebar colapsado */
.catalogo-sidebar.collapsed .catalogo-brand-button {
    justify-content: center;
    padding: 1rem 0.75rem;
}

.catalogo-sidebar.collapsed .catalogo-brand-icon {
    margin: 0;
}

/* ========================================
   CONTENIDO PRINCIPAL DEL CATÁLOGO
   ======================================== */

.catalogo-main-content {
    flex: 1;
    padding: 1.5rem 2rem 2rem 2rem;
    background-color: var(--background-light);
    overflow-y: auto;
}

.catalogo-main-content.dark {
    background-color: var(--background-dark);
}

@media (max-width: 767px) {
    .catalogo-main-content {
        padding: 1rem;
    }
}

/* ========================================
   GRID DE PRODUCTOS - 4 COLUMNAS
   ======================================== */

.catalogo-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas fijas */
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .catalogo-product-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en pantallas medianas */
    }
}

@media (max-width: 900px) {
    .catalogo-product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
}

@media (max-width: 640px) {
    .catalogo-product-grid {
        grid-template-columns: 1fr; /* 1 columna en móvil */
        gap: 1rem;
    }
}

/* Tarjetas de producto */
.catalogo-product-card {
    background-color: white;
    border-radius: 1rem;
    /* overflow: hidden REMOVIDO — bloqueaba el acordeón y el -webkit-line-clamp */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: default; 
    border: 2px solid transparent; 
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    height: fit-content;
    align-self: start;
    user-select: text;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; /* Elimina delay de 300ms en móvil y doble-tap */
}


.catalogo-product-card:hover {
    border-color: transparent;
}

.catalogo-product-card.dark {
    background-color: var(--surface-dark);
}

/* Tarjeta seleccionada - Borde de color */
.catalogo-product-card.selected {
    border: 2px solid var(--primary); /* Borde azul cuando está seleccionada */
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2); /* Sombra azul suave */
}

.catalogo-product-card.catalogo-product-hidden {
    display: none;
}

/* Contenedor cuadrado - imagen sin distorsión */
.catalogo-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #fff;
    overflow: hidden;
    display: block;
}

.catalogo-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 300ms ease;
    will-change: transform; /* GPU composite — evita repaint que ciclaba el cursor */
}

.catalogo-product-card:hover .catalogo-product-image img {
    transform: scale(1.03);
}

.catalogo-product-info {
    padding: 2.25rem 1.5rem; /* Incrementado para dar más altura */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 160px; /* Altura mínima para consistencia visual */
}


.catalogo-product-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
    line-height: 1.3;
}

.catalogo-product-title.dark {
    color: white;
}

.catalogo-product-selection {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background-color: var(--slate-50);
    border-radius: 0.5rem;
    transition: all 150ms;
}

.catalogo-product-selection.dark {
    background-color: var(--slate-800);
}

.catalogo-selection-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-600);
}

.catalogo-selection-status.dark {
    color: var(--slate-400);
}

/* Ícono de cotizar */
.catalogo-selection-icon {
    font-size: 1.25rem;
    color: var(--primary);
}

/* Estado seleccionado - SOLO cambia el fondo */
.catalogo-product-card.selected .catalogo-product-selection {
    background-color: var(--primary); /* Fondo azul cuando está seleccionado */
}

.catalogo-product-card.selected .catalogo-selection-status {
    color: white; /* Texto blanco cuando está seleccionado */
}

.catalogo-product-card.selected .catalogo-selection-icon {
    color: white; /* Ícono blanco cuando está seleccionado */
}

/* ========================================
   BOTÓN FLOTANTE DE WHATSAPP - DISEÑO PREMIUM
   ======================================== */

.catalogo-whatsapp-container {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    z-index: 9999;
    pointer-events: auto;
    transform: translateZ(0);
}

.catalogo-whatsapp-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 2rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 600;
    max-width: 20rem;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    position: relative;
    overflow: hidden;
}

.catalogo-whatsapp-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.catalogo-whatsapp-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
}

.catalogo-whatsapp-button:hover::before {
    left: 100%;
}

.catalogo-whatsapp-icon-container {
    position: relative;
    flex-shrink: 0;
}

.catalogo-whatsapp-icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.catalogo-whatsapp-notification-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #ff4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.catalogo-whatsapp-text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.catalogo-whatsapp-text {
    line-height: 1.3;
    font-weight: 600;
}

.catalogo-whatsapp-expansion {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.catalogo-whatsapp-expansion.expanded {
    max-height: 2rem;
    opacity: 1;
}

.catalogo-whatsapp-expansion-text {
    font-size: 0.75rem;
    opacity: 0.9;
    line-height: 1.2;
}

.catalogo-whatsapp-arrow {
    font-size: 1.125rem;
    transition: transform 300ms;
}

.catalogo-whatsapp-button:hover .catalogo-whatsapp-arrow {
    transform: translateX(0.25rem);
}

@media (max-width: 640px) {
    .catalogo-whatsapp-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .catalogo-whatsapp-button {
        max-width: none;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        border-radius: 1.5rem;
    }
    
    .catalogo-whatsapp-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .catalogo-whatsapp-arrow {
        font-size: 1.125rem;
    }
    
    .catalogo-whatsapp-expansion-text {
        font-size: 0.875rem;
    }
}

.catalogo-whatsapp-icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.catalogo-whatsapp-notification-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #ff4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.catalogo-whatsapp-text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.catalogo-whatsapp-text {
    line-height: 1.3;
}

.catalogo-whatsapp-expansion {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.catalogo-whatsapp-expansion.expanded {
    max-height: 2rem;
    opacity: 1;
}

.catalogo-whatsapp-expansion-text {
    font-size: 0.75rem;
    opacity: 0.9;
    line-height: 1.2;
}

.catalogo-whatsapp-arrow {
    font-size: 1.125rem;
    transition: transform 300ms;
}

.catalogo-whatsapp-button:hover .catalogo-whatsapp-arrow {
    transform: translateX(0.25rem);
}

@media (max-width: 640px) {
    .catalogo-whatsapp-container {
        bottom: 1rem; /* Más cerca del pie de página en móvil */
        bottom: calc(1rem + env(safe-area-inset-bottom));
        right: 1rem;
        left: 1rem;
    }
    
    .catalogo-whatsapp-button {
        max-width: none;
        padding: 1rem 1.25rem; /* Padding aumentado */
        font-size: 1rem; /* Tamaño de fuente aumentado de 0.8125rem a 1rem */
    }
    
    .catalogo-whatsapp-icon {
        width: 1.5rem; /* Ícono más grande */
        height: 1.5rem;
    }
    
    .catalogo-whatsapp-arrow {
        font-size: 1.125rem; /* Flecha más grande */
    }
    
    .catalogo-whatsapp-expansion-text {
        font-size: 0.875rem; /* Texto de expansión más grande */
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: #3385ff;
    --primary-blue: #3b82f6;
    --primary-blue-dark: #2563eb;
    --success-green: #10b981;
    --background-light: #ffffff;
    --background-dark: #0a1628;
    --surface-light: #ffffff;
    --surface-dark: #1a2332;
    --text-main: #0f1419;
    --text-secondary: #64748b;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --accent: #fbbf24;
    --accent-dark: #f59e0b;
}

/* ========================================
   CONTENEDOR PRINCIPAL DEL CATÁLOGO - SIMPLIFICADO
   ======================================== */

.catalogo-container {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    min-height: calc(100vh - 5rem);
    margin-left: 0; /* Sin margen ya que usamos el header estándar */
    padding-top: 0;
}

.catalogo-container.dark {
    background-color: var(--background-dark);
}

/* En móvil, sin margen y sin desplazamiento del contenido */
@media (max-width: 767px) {
    .catalogo-container {
        margin-left: 0;
        padding-bottom: 1rem;
    }
}

/* ========================================
   LAYOUT PRINCIPAL DEL CATÁLOGO
   ======================================== */

.catalogo-main-layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 5rem);
    width: 100%;
}

/* ========================================
   OVERLAY PARA MÓVIL
   ======================================== */

.catalogo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.catalogo-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Solo mostrar overlay en móvil */
@media (min-width: 768px) {
    .catalogo-overlay {
        display: none;
    }
}

/* ========================================
   ACCESIBILIDAD - TEXTO SOLO PARA LECTORES DE PANTALLA
   ======================================== */

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

/* ========================================
   TARJETAS CON IMAGEN COMPLETA
   ======================================== */

.brand-card-abb,
.brand-card-full {
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shine Effect Overlay */
.brand-card-abb::before,
.brand-card-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: none;
    z-index: 2;
    pointer-events: none;
}

.brand-card-abb:hover::before,
.brand-card-full:hover::before {
    left: 200%;
    transition: left 0.8s ease-in-out;
}

.brand-card-abb:hover,
.brand-card-full:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 
        0 20px 40px rgba(0, 102, 255, 0.2),
        0 0 0 1px rgba(0, 102, 255, 0.4) inset;
    z-index: 10;
}

.brand-card-image-full {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-card-full-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.95) contrast(1.05);
}

.brand-card-abb:hover .brand-card-full-image,
.brand-card-full:hover .brand-card-full-image {
    transform: scale(1.1);
    filter: brightness(1) contrast(1.15);
}

/* Efecto de borde sutil para profesionalismo */
.brand-card-abb::after,
.brand-card-full::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    transition: border-color 300ms ease;
    pointer-events: none;
}

.brand-card-abb:hover::after,
.brand-card-full:hover::after {
    border-color: rgba(0, 102, 255, 0.3);
}

/* Responsive adjustments for all full image cards */
@media (max-width: 640px) {
    .brand-card-abb:hover,
    .brand-card-full:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    }
}

/* ========================================
   BRAND GRID LAYOUT
   ======================================== */

.catalogo-container {
    margin-left: 0 !important; /* Overriding sidebar margin */
    padding: 0;
    background-color: white;
}

.brand-grid-container {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Header as Banner */
.catalogo-info-banner {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    margin-top: 0; /* Removido: El contenedor principal ya tiene el espacio */
    position: relative;
    z-index: 40;
    width: 100%;
}

@media (max-width: 768px) {
    .catalogo-info-banner {
        margin-top: 0 !important; /* Reset 5rem to 0 on mobile */
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

.catalogo-info-content p {
    margin: 0;
}

/* Estilos para lazy loading de imágenes */
.brand-image-lazy {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.brand-image-loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Animación suave para marcas que se remueven */
.brand-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.brand-card.removing {
    opacity: 0;
    transform: scale(0.95);
}

/* Placeholder mejorado para carga */
.brand-card-image-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem; /* Reducido de 2rem a 0.75rem para menos separación */
    width: 100%;
    /* Removed border-bottom */
    padding: 2rem 0;
}

@media (min-width: 640px) {
    .brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .brand-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1280px) {
    .brand-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.brand-card {
    background-color: white;
    border-radius: 16px;
    padding: 0; /* Sin padding - la imagen ocupará todo */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--slate-200);
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer !important;
    text-align: center;
    aspect-ratio: 1/1;
    position: relative;
    z-index: 1;
    overflow: hidden; /* Para que la imagen no se salga de los bordes redondeados */
}

@media (min-width: 640px) {
    .brand-card {
        padding: 0; /* Sin padding en desktop también */
        gap: 0;
    }
}

.brand-card:hover {
    background-color: var(--slate-50);
    z-index: 2;
}

.brand-card-image-container {
    width: 100%;
    height: 100%; /* Ocupa toda la altura de la tarjeta */
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute; /* Posición absoluta para ocupar toda la tarjeta */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.brand-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover para llenar toda la tarjeta */
    object-position: center;
    transition: all 200ms;
    border-radius: 16px; /* Mismo border-radius que la tarjeta */
}

.brand-card:hover .brand-card-image {
    transform: scale(1.1);
}

/* ... (keep placeholders as is) ... */

.brand-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    transition: color 200ms;
    /* Ocultar visualmente pero mantener accesible para lectores de pantalla */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brand-card:hover .brand-card-title {
    color: var(--slate-900);
}

/* Product View & Navigation */
.brand-products-container {
    padding: 2rem;
    max-width: 80rem;
    margin: 0 auto;
}

.brand-products-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.back-to-brands-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 200ms;
}

.back-to-brands-btn:hover {
    background-color: var(--slate-100);
}

.selected-brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
}

/* Hide previous catalogo layout elements */
.catalogo-sidebar,
.catalogo-overlay,
.catalogo-sidebar-search,
.catalogo-header-actions .catalogo-hamburger-btn {
    display: none !important;
}

.catalogo-header-container {
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
}

/* ========================================
   PRODUCTOS DINÁMICOS DESDE BASE DE DATOS
   ======================================== */



/* Mensaje de error */
.catalogo-error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.catalogo-error-message h3 {
    margin: 0 0 1rem 0;
    color: #dc2626;
}

.catalogo-error-message p {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary);
}

/* Contador de productos seleccionados */
.catalogo-selected-count {
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* OLD RESPONSIVE STYLES REMOVED */

/* ========================================
   LOADING STATES
   ======================================== */

.catalogo-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.catalogo-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-blue);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* ========================================
   HEADER DE PRODUCTOS MEJORADO
   ======================================== */

/* ========================================
   HEADER DE PRODUCTOS - DISEÑO PROFESIONAL UX/UI
   ======================================== */

/* Wrapper Global para la vista de productos */
.catalogo-brand-products-view {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

@media (max-width: 640px) {
    .catalogo-brand-products-view {
        padding: 0 0.75rem;
    }
}

.catalogo-products-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem; /* Valor base compacto para móvil */
    padding: 1rem 0; /* Valor base compacto */
    border-bottom: 2px solid var(--slate-100);
    position: relative;
    /* Removed individual max-width/margin as parent handles it now */
}

@media (min-width: 769px) {
    .catalogo-products-header {
        margin-bottom: 1.5rem; /* Ajustado para reducir el espacio muerto */
        padding: 2rem 0;     /* Mantenemos el aire interno del header */
    }
}

.catalogo-products-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 1px;
}

.catalogo-back-icon {
    /* Premium Design Update */
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--slate-100);
    width: 52px;
    height: 52px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.catalogo-back-icon:hover {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}



.catalogo-back-icon:active {
    transform: translateY(0) scale(1);
    transition: transform 0.1s;
}

.catalogo-back-icon svg {
    transition: transform 0.3s ease;
}

.catalogo-back-icon:hover svg {
    transform: translateX(-2px);
}

.catalogo-products-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    flex: 1;
    letter-spacing: -0.025em;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   PRODUCTOS GRID - DISEÑO PREMIUM
   ======================================== */

.catalogo-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 0;
}

/* Móvil: 2 columnas siempre */
@media (max-width: 640px) {
    .catalogo-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .catalogo-product-name {
        font-size: 0.8rem;
    }

    .catalogo-product-brand {
        font-size: 0.7rem;
    }

    .catalogo-product-info {
        padding: 0.5rem 0.6rem;
    }
}

.catalogo-product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--slate-100);
    position: relative;
    cursor: default; /* Cambiado de pointer a default */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.catalogo-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.catalogo-product-card:hover {
    /* No-op para mantener estructura sin interactividad */
    pointer-events: none;
}

.catalogo-product-card:hover::before {
    opacity: 1;
}

/* Bloque duplicado eliminado - los estilos de .catalogo-product-image
   están definidos arriba en la línea ~1222 */


.catalogo-product-info {
    padding: 1rem 1.25rem; /* Reduced from 1.75rem */
    position: relative;
    z-index: 2;
}

.catalogo-product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.catalogo-product-brand {
    font-size: 0.875rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.catalogo-product-model {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.catalogo-product-actions {
    padding: 0 1.25rem 1.25rem 1.25rem; /* Reduced from 1.75rem */
    position: relative;
    z-index: 2;
}

.catalogo-btn-select {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.catalogo-btn-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.catalogo-btn-select:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.catalogo-btn-select:hover::before {
    left: 100%;
}

.catalogo-btn-select.selected {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* 
   AJUSTE DE PRECISIÓN: Botón de Procura (Catalog Action)
   -----------------------------------------------------
   Selector específico solicitado para aislamiento de estilos.
   Aumenta ergonomía y destaca la acción principal.
*/
.btn-catalog-procura {
    width: 100%; /* Base width */
    max-width: 100%; 
    padding: 1.1rem 1.5rem; /* Aumentado padding vertical y horizontal (+20% visual feel) */
    font-size: 1rem; /* Texto ligeramente más grande para autoridad */
    text-transform: uppercase;
    letter-spacing: 0.05em; /* Provee aire y profesionalismo */
    border-radius: 10px; /* Suavizar ligeramente diferente al estándar */
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2); /* Sombra específica */
}

/* Responsivo: Ajuste adaptativo en móvil */
@media (max-width: 768px) {
    .btn-catalog-procura {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ========================================
   MENSAJE SIN PRODUCTOS - DISEÑO ELEGANTE
   ======================================== */

.catalogo-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 24px;
    border: 2px dashed var(--slate-300);
    position: relative;
    overflow: hidden;
}

.catalogo-no-products::before {
    content: '📦';
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.catalogo-no-products p:first-of-type {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.catalogo-no-products p:last-of-type {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN PROFESIONAL
   ======================================== */

@media (max-width: 768px) {
    .catalogo-products-header {
        position: sticky;
        top: 80px;
        z-index: 20;
        margin: 0 -1rem 2rem -1rem;
        padding: 1.5rem 1rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-left: none;
        border-right: none;
        border-top: none;
    }
    
    .catalogo-back-icon {
        width: 44px;
        height: 44px;
    }
    
    .catalogo-products-header h1 {
        font-size: 2rem;
    }
    
    .catalogo-products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .catalogo-product-card {
        border-radius: 16px;
    }
    
    /* .catalogo-product-image height eliminada: ahora usa aspect-ratio 1/1 */
}

@media (max-width: 480px) {
    .catalogo-products-header {
        padding: 1rem;
        gap: 1rem;
    }
    
    .catalogo-products-header h1 {
        font-size: 1.75rem;
    }
    
    .catalogo-back-icon {
        width: 40px;
        height: 40px;
    }
    
    .catalogo-products-grid {
        padding: 0 0.5rem;
    }
    
    .catalogo-product-info {
        padding: 1.5rem;
    }
    
    .catalogo-product-actions {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
}

/* ========================================
   BOTÓN DE NAVEGACIÓN MEJORADO
   ======================================== */

.catalogo-back-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
    min-width: 180px;
    justify-content: center;
}

.catalogo-back-btn:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(59, 130, 246, 0.4);
}

.catalogo-back-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.catalogo-back-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.catalogo-back-btn:hover svg {
    transform: translateX(-3px);
}

.catalogo-back-btn span {
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* ========================================
   RESPONSIVE PARA HEADER DE PRODUCTOS
   ======================================== */

/* Los estilos responsive están ahora integrados en la sección principal */
/* ========================================
   MENSAJE DE NO PRODUCTOS DISPONIBLES
   ======================================== */

.catalogo-no-products-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.message-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    max-width: 400px;
    width: 90%;
    margin: 1rem;
}

.message-content h3 {
    margin: 0 0 1rem 0;
    color: var(--text-main);
    font-size: 1.25rem;
}

.message-content p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.message-content p:first-of-type {
    font-weight: 500;
    color: var(--text-main);
}

/* ========================================
   MEJORAS DE NAVEGACIÓN RESPONSIVE (ACTUALIZADAS)
   ======================================== */

/* Los estilos del botón de navegación están ahora en la sección anterior */

/* Responsive para navegación */
@media (max-width: 768px) {
    .catalogo-brand-products-view {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .catalogo-brand-products-view {
        padding: 0 0.5rem;
    }
}

/* ========================================
   ESTADOS DE CARGA PARA MARCAS
   ======================================== */

.brand-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.brand-card.loading {
    opacity: 0.6;
    pointer-events: none;
    transform: scale(0.98);
}

/* Indicador de carga en marca */
.brand-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* Overlay de carga */
.brand-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: inherit;
    z-index: 5;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   MEJORAS DE ACCESIBILIDAD
   ======================================== */

.catalogo-back-btn:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

.message-content button:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Texto para lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   ANIMACIONES SUAVES
   ======================================== */

.catalogo-brand-products-view {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalogo-product-card {
    animation: fadeInScale 0.3s ease-out;
    animation-fill-mode: both;
}

.catalogo-product-card:nth-child(1) { animation-delay: 0.1s; }
.catalogo-product-card:nth-child(2) { animation-delay: 0.2s; }
.catalogo-product-card:nth-child(3) { animation-delay: 0.3s; }
.catalogo-product-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   BRAND REMOVAL ANIMATIONS
   ======================================== */

/* Brand removal states */
.brand-removing {
    pointer-events: none;
    transition: all 0.3s ease-out;
}

.brand-removed {
    display: none !important;
}

.brand-active {
    display: block;
}

/* Brand reorganization animation */
.brand-reorganize {
    animation: brandReorganize 0.5s ease-out;
}

@keyframes brandReorganize {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Smooth transitions for brand cards */
.brand-card {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Enhanced hover effects for active brands */
.brand-card.brand-active:hover {
    transform: scale(1.05);
}

/* Debugging styles (can be removed in production) */
.brand-card[data-removed-reason="no-logo"] {
    border: 2px dashed red;
    opacity: 0.3;
}
/* ========================================
   LOADING STATES PARA MARCAS DINÁMICAS
   ======================================== */

.brand-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
    text-align: center;
}

.brand-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.brand-loading-container p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

/* Estados de carga para marcas individuales */
.brand-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.brand-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
/* WhatsApp Button Override for Long Text in Catalog */
.smart-assistant-pill.expanded,
.smart-assistant-pill:hover {
    max-width: 32rem !important;
    padding-right: 2.5rem !important;
}

/* ========================================
   LEVEL 2: CATEGORY NAVIGATION (PREMIUM)
   ======================================== */

/* ========================================
   LEVEL 2: CATEGORY NAVIGATION (PREMIUM)
   ======================================== */

.catalogo-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (max-width: 640px) {
    .catalogo-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.catalogo-category-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* User Request: 3:4 Ratio (Consistent Design) */
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #0f172a; /* Fallback dark bg */
}

.catalogo-category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

/* Background Image Layer */
.category-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.category-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.catalogo-category-card:hover .category-bg-image img {
    transform: scale(1.1);
}

/* Overlay Layer (Gradient) */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0.1) 0%, 
        rgba(0, 0, 0, 0) 30%, 
        rgba(0, 0, 0, 0.6) 80%,
        rgba(0, 0, 0, 0.9) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

/* Badge (Top Left) */
.category-badge {
    align-self: flex-start;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.catalogo-category-card:hover .category-badge {
    transform: translateY(2px) scale(1.02);
}

.badge-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -0.01em;
}

.icon-badge {
    font-size: 16px;
    color: var(--slate-900);
}

/* Bottom Info */
.category-bottom-info {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.category-text-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-price-tag {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Ensure Z-Index for WhatsApp is highest */
.smart-assistant-container {
    z-index: 9999 !important;
}


.catalogo-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem 0;
}

@media (max-width: 480px) {
    .catalogo-products-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .catalogo-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .catalogo-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   NEW CATEGORY CARD DESIGN (Stylish / Premium)
   ======================================== */

/* Main Card Container Override/Addition */
/* Main Card Container Override/Addition */
.catalogo-category-card-stylish {
    position: relative !important;
    /* Aspect ratio for tall vertical card look (Portrait) */
    aspect-ratio: 2 / 3 !important; 
    min-height: 400px !important;
    height: auto !important;
    width: 100% !important;
    background: transparent !important; /* Fix white background conflict */
    border: none !important;
    border-radius: 20px !important;
    padding: 24px !important;
    overflow: hidden !important;
    cursor: pointer;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block !important; /* Override potential flex/grid item behavior */
}

.catalogo-category-card-stylish:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4) !important;
}

/* Background Image */
.category-card-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    z-index: 1;
}

.catalogo-category-card-stylish:hover .category-card-bg-image {
    transform: scale(1.1);
}

/* Overlay Gradient */
.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.2) 40%,
        rgba(0, 0, 0, 0.8) 100%
    );
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    color: white;
}

/* Content (Top) */
.category-card-content {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-card-icon {
    color: white;
    font-size: 2rem; /* 32px roughly */
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-card-title {
    font-size: clamp(1.25rem, 5vw, 1.8rem); /* Reducido a petición del usuario */
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0;
    color: white !important; /* Force white text */
    text-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: none;
    hyphens: none;
    max-width: 100%;
    background: none !important; /* Ensure no background/pill effect */
    padding: 0 !important;
}

.category-card-subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.95;
    margin: 8px 0 0 0;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Footer (Bottom Button) */
.category-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-pill-btn {
    background: white;
    color: var(--slate-900);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 200px;
    text-align: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-pill-btn:hover {
    background: var(--slate-50);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.category-pill-btn svg {
    transition: transform 0.3s ease;
}

.category-pill-btn:hover svg {
    transform: translateX(4px);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .catalogo-category-card-stylish {
        min-height: 250px !important; /* Reduced height for better proportion */
    }
    
    .category-card-overlay {
        padding: 0.8rem 0.75rem !important; /* Less padding to maximize horizontal space */
    }

    .category-card-title {
        font-size: 0.85rem !important; /* Reduced again to fit long titles nicely */
        line-height: 1.15;
        -webkit-hyphens: none;
        hyphens: none;
        word-break: normal; /* Don't break words if possible */
    }

    .category-card-subtitle {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
    
    .category-pill-btn {
        padding: 6px 10px !important; /* Smaller button to save width */
        font-size: 0.70rem !important;
        max-width: 100%;
        gap: 0.35rem; /* Tighter arrow spacing */
    }
    
    .category-card-content {
        gap: 0.25rem;
    }
}



