/**
 * WC Premium Categories - Public Styles (Versión COMPLETA Y CORREGIDA)
 * Combina el nuevo diseño de tarjetas con los estilos funcionales del resto del plugin.
 */

/* AJUSTE #1: Modifica esta sección al inicio de tu archivo */
:root {
    --wcpc-primary: #5dc2b0;
    --wcpc-secondary: #05243f; /* Color solicitado para el botón */
    --wcpc-text-light: #ffffff;
    --wcpc-text-dark: #333333;
    --wcpc-neutral: #d9d9d9;
    --wcpc-neutral-light: #f5f5f5;
    --wcpc-neutral-dark: #b8b8b8;
    --wcpc-white: #ffffff;
    --wcpc-success: #46b450;
    --wcpc-warning: #ffb900;
    --wcpc-danger: #dc3232;
    --wcpc-border-radius: 0px; /* PUNTO 1: Bordes rectos */
    --wcpc-transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --wcpc-shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --wcpc-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.2);
    --wcpc-shadow-hover: 0 15px 40px -15px rgba(0, 0, 0, 0.3);
    --wcpc-shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
}

/* =================================
   NUEVO GRID DE CATEGORÍAS
   ================================= */
/* Wrapper de categorías */
.wcpc-categories-wrapper {
    position: relative;
    z-index: 1; /* ⭐ BAJO */
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.wcpc-grid-controls {
    margin-bottom: 30px;
}

.wcpc-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--wcpc-neutral);
}

.wcpc-grid-title {
    font-size: 28px;
    color: var(--wcpc-secondary);
    margin: 0;
}

.wcpc-grid-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Grid de categorías */
.wcpc-categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    position: relative;
    z-index: 1; /* ⭐ BAJO */
}

@media (max-width: 992px) {
    .wcpc-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .wcpc-categories-grid {
        grid-template-columns: 1fr;
    }
}


/* =================================
   NUEVAS TARJETAS DE CATEGORÍA (VERSIÓN DEFINITIVA Y PRECISA)
   ================================= */

.wcpc-category-item {
    flex: 0 0 calc(33.333% - 20px);
    min-width: 280px;
    max-width: 400px;
    position: relative;
    z-index: 1; /* ⭐ BAJO */
}

@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.wcpc-category-card {
    display: block;
    position: relative;
    height: 380px; /* Ajustada para acomodar la banda */
    border-radius: var(--wcpc-border-radius); /* 0px */
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--wcpc-shadow);
    transition: var(--wcpc-transition);
    z-index: 1;
}

.wcpc-category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--wcpc-shadow-hover);
}

.wcpc-category-card .wcpc-category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wcpc-category-card:hover .wcpc-category-image {
    transform: scale(1.10);
}

/* Overlay general sutil (si se necesita) */
.wcpc-category-card .wcpc-image-backdrop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1); /* Muy ligero */
    transition: background-color 0.4s ease;
}

/* =================================
   La Banda de Contenido Horizontal (Punto 5)
   ================================= */
.wcpc-category-card .wcpc-content-band-wrapper {
    position: absolute;
    bottom: 0; /* Anclado a la parte inferior de la tarjeta */
    left: 0;
    width: 100%;
    /* La altura se ajustará automáticamente por el contenido y padding */
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcpc-category-card .wcpc-content-band-overlay {
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25); /* Capa semitransparente de la banda */
    transition: background-color 0.4s ease;
    z-index: 1; /* Asegura que esté detrás del texto */
}

.wcpc-category-card:hover .wcpc-content-band-overlay {
    background-color: rgba(0, 0, 0, 0.7); /* Se oscurece más al hover */
}

.wcpc-category-card .wcpc-content-band-info {
    position: relative; /* Para que su contenido se posicione correctamente */
    padding: 25px 35px; /* Más padding para que la banda sea más alta */
    text-align: center;
    width: 100%;
    z-index: 2; /* Asegura que el texto esté encima del overlay */
}

/* =================================
   Título (Punto 2 y 4)
   ================================= */
.wcpc-category-card .wcpc-category-title {
    color: var(--wcpc-white);
    font-family: 'Lato', sans-serif; /* Usando una fuente similar a la de tu referencia */
    font-size: 30px; /* PUNTO 2: Título más grande */
    font-weight: 700;
    margin: 0 0 -5px 0; /* Espacio debajo del título */
    display: flex; /* Clave para las líneas */
    align-items: center; /* Clave para las líneas */
    white-space: nowrap; /* Evita que el título se parta en dos líneas */
    justify-content: center; /* Centra el título y las líneas */
    line-height: 1.2;
}

.wcpc-category-title::before,
.wcpc-category-title::after {
    content: '';
    display: block;
    height: 2px; /* Más grueso para que se vea mejor */
    background-color: var(--wcpc-white); /* Líneas blancas */
    flex-grow: 1;
    margin: 0 15px; /* Espacio entre el texto y las líneas */
    max-width: 50px; /* Limita el tamaño de las líneas si el título es corto */
}

.wcpc-category-title span {
    padding: 0; /* No necesitamos padding aquí, ya lo tenemos en el margin de before/after */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4); /* Sombra para resaltar */
}

/* =================================
   Subtítulo (Ajustado)
   ================================= */
/*.wcpc-category-card .wcpc-category-subtitle {
  /*  color: var(--wcpc-white);
 /*   font-family: 'Lato', sans-serif; /* Consistencia en la fuente */
 /*   margin: 0 0 25px 0; /* Más espacio debajo para el botón */
  /*  font-size: 14px; /* Un poco más grande para leerse bien */
/*    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
*/
/* =================================
   Botón (Punto 6)
   ================================= */
.wcpc-category-card .wcpc-btn {
    display: inline-block;
    background-color: var(--wcpc-secondary) !important; /* PUNTO 6: Color azul */
    color: var(--wcpc-white);
    padding: 12px 30px;
    border-radius: 35px; /* Ligeramente redondeado como tu imagen de referencia */
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none; /* No queremos borde inicialmente */
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* Sombra para que destaque */
}

.wcpc-category-card:hover .wcpc-btn {
    background-color: var(--wcpc-primary); /* Un color alternativo en hover */
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}


/* ============================================
   BUSCADOR PREMIUM - DISEÑO MODERNO Y ELEGANTE
   ============================================ */

/* Wrapper principal - DEBE permitir overflow */
.wcpc-search-wrapper {
    position: relative;
    z-index: 9999; /* ⭐ MUY ALTO */
    margin: 40px auto;
    max-width: 720px;
}

.wcpc-search-modern {
    position: relative;
    z-index: 9999;
    margin: 0;
    max-width: 100%;
}

/* Contenedor - NO debe tener overflow hidden */
.wcpc-search-container {
    position: relative;
    z-index: 10000;
    overflow: visible; /* ⭐ CRÍTICO */
}


/* Caja de búsqueda */
.wcpc-search-box {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible; /* ⭐ Cambiar de hidden a visible */
    z-index: 10001;
}

.wcpc-search-box:hover {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(93, 194, 176, 0.2);
}

.wcpc-search-box:focus-within {
    box-shadow: 
        0 8px 40px rgba(93, 194, 176, 0.15),
        0 0 0 2px var(--wcpc-primary);
}

/* Wrapper del input */
.wcpc-search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    position: relative;
}

/* Icono de búsqueda */
.wcpc-search-icon {
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.wcpc-search-box:focus-within .wcpc-search-icon {
    color: var(--wcpc-primary);
}

/* Input principal */
.wcpc-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 20px 0;
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wcpc-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Acciones del input */
.wcpc-search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Botones de acciones */
.wcpc-clear-btn,
.wcpc-voice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.wcpc-clear-btn:hover,
.wcpc-voice-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.wcpc-voice-btn:active {
    background: #fee2e2;
    color: #ef4444;
}

/* Botón principal de búsqueda */
.wcpc-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    background: linear-gradient(135deg, var(--wcpc-primary) 0%, #4ab39a 100%);
    color: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(93, 194, 176, 0.3),
        0 0 0 0 rgba(93, 194, 176, 0);
}

.wcpc-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(93, 194, 176, 0.4),
        0 0 0 4px rgba(93, 194, 176, 0.1);
}

.wcpc-search-btn:active {
    transform: translateY(0);
}

/* Indicador de carga */
.wcpc-search-loading {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #f1f5f9;
    overflow: hidden;
}

.wcpc-loading-spinner {
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--wcpc-primary) 50%, 
        transparent 100%
    );
    animation: loading-slide 1.5s ease-in-out infinite;
}

@keyframes loading-slide {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Filtros de búsqueda */
.wcpc-search-filters {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.wcpc-search-filters::-webkit-scrollbar {
    height: 4px;
}

.wcpc-search-filters::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.wcpc-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.wcpc-filter-chip:hover {
    border-color: var(--wcpc-primary);
    background: #f0fdf9;
    color: var(--wcpc-primary);
}

.wcpc-filter-chip.active {
    background: var(--wcpc-primary);
    color: #ffffff;
    border-color: var(--wcpc-primary);
}

.wcpc-filter-chip svg {
    opacity: 0.7;
}

/* Dropdown - debe estar encima de todo */
.wcpc-search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    max-height: 600px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 10002; /* ⭐ MUY ALTO */
}

/* Visible cuando tiene display block o clase active */
.wcpc-search-dropdown[style*="display: block"],
.wcpc-search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@keyframes dropdownFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcpc-dropdown-content {
    max-height: 600px;
    overflow-y: auto;
    padding: 8px;
}

/* Scrollbar personalizado */
.wcpc-dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.wcpc-dropdown-content::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 8px;
}

.wcpc-dropdown-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}

.wcpc-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Secciones del dropdown */
.wcpc-search-section {
    padding: 12px;
}

.wcpc-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.wcpc-section-title svg {
    opacity: 0.7;
}

/* Listas de resultados */
.wcpc-recent-list,
.wcpc-categories-results,
.wcpc-products-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Items de resultado */
.wcpc-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.wcpc-result-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.wcpc-result-item:active {
    background: #f1f5f9;
}

/* Imagen del resultado */
.wcpc-result-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}

/* Contenido del resultado */
.wcpc-result-content {
    flex: 1;
    min-width: 0;
}

.wcpc-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wcpc-result-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badge de contador */
.wcpc-result-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}

/* Trending tags */
.wcpc-trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wcpc-trending-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wcpc-trending-tag:hover {
    background: var(--wcpc-primary);
    color: #ffffff;
    border-color: var(--wcpc-primary);
}

/* Estado vacío */
.wcpc-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.wcpc-empty-state svg {
    color: #cbd5e1;
    margin-bottom: 16px;
}

.wcpc-empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.wcpc-empty-state p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Overlay */
.wcpc-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9998; /* ⭐ Debajo del dropdown pero encima de categorías */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Solo visible cuando tiene la clase 'active' */
.wcpc-search-overlay.active {
    opacity: 1;
    visibility: hidden;
    pointer-events: auto;
}


@keyframes overlayFadeIn {
    to {
        opacity: 1;
    }
}

/* Grupos de resultados */
.wcpc-results-group {
    margin-bottom: 20px;
}

.wcpc-results-group:last-child {
    margin-bottom: 0;
}

/* Helper de accesibilidad (oculto visualmente) */
.wcpc-search-helper {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .wcpc-search-modern {
        max-width: 100%;
        margin: 20px 16px;
    }
    
    .wcpc-search-input-wrapper {
        padding: 0 12px;
    }
    
    .wcpc-search-input {
        padding: 16px 0;
        font-size: 15px;
    }
    
    .wcpc-search-btn {
        width: 44px;
        height: 44px;
    }
    
    .wcpc-dropdown-content {
        max-height: 400px;
    }
    
    .wcpc-voice-btn {
        display: none; /* Ocultar búsqueda por voz en móvil */
    }
    
    .wcpc-filter-chip {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .wcpc-search-modern {
        margin: 16px 12px;
    }
    
    .wcpc-search-input {
        font-size: 14px;
        padding: 14px 0;
    }
    
    .wcpc-search-actions {
        gap: 4px;
    }
    
    .wcpc-clear-btn,
    .wcpc-voice-btn {
        width: 32px;
        height: 32px;
    }
    
    .wcpc-search-btn {
        width: 40px;
        height: 40px;
    }
    
    .wcpc-result-image {
        width: 40px;
        height: 40px;
    }
    
    .wcpc-result-title {
        font-size: 13px;
    }
    
    .wcpc-result-meta {
        font-size: 11px;
    }
}

/* ============================================
   ANIMACIONES ADICIONALES
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.wcpc-search-loading .wcpc-loading-spinner {
    animation: loading-slide 1.5s ease-in-out infinite;
}

/* Efecto de enfoque suave */
.wcpc-search-box {
    will-change: box-shadow, transform;
}




/* Animación de entrada para items */
.wcpc-result-item {
    animation: fadeInItem 0.3s ease backwards;
}

.wcpc-result-item:nth-child(1) { animation-delay: 0.05s; }
.wcpc-result-item:nth-child(2) { animation-delay: 0.1s; }
.wcpc-result-item:nth-child(3) { animation-delay: 0.15s; }
.wcpc-result-item:nth-child(4) { animation-delay: 0.2s; }
.wcpc-result-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de interacción mejorados */
.wcpc-search-btn:focus-visible {
    outline: 3px solid rgba(93, 194, 176, 0.5);
    outline-offset: 2px;
}

.wcpc-filter-chip:focus-visible {
    outline: 2px solid var(--wcpc-primary);
    outline-offset: 2px;
}

/* Efecto glassmorphism para el overlay */
@supports (backdrop-filter: blur(10px)) {
    .wcpc-search-overlay {
        backdrop-filter: blur(6px);
    }
}

/* =================================
   --- SECCIÓN RESTAURADA: BOTONES ---
   ================================= */

.wcpc-btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--wcpc-transition);
    text-align: center;
    font-weight: 600;
}

.wcpc-btn-primary {
    background: var(--wcpc-primary);
    color: white;
    border: 2px solid var(--wcpc-primary);
}

.wcpc-btn-primary:hover {
    background-color: transparent;
    border: 2px solid var(--wcpc-primary);
    color: var(--wcpc-primary);
}

/* Botón dentro de la tarjeta nueva */
.wcpc-category-card .wcpc-btn {
    margin-top: 20px;
    align-self: flex-start;
    transform: translateY(20px);
    opacity: 0;
}

.wcpc-category-card:hover .wcpc-btn {
    transform: translateY(0);
    opacity: 1;
}

/* =================================
   --- SECCIÓN RESTAURADA: MODAL ---
   ================================= */

.wcpc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wcpc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 36, 63, 0.8);
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


.wcpc-modal-content {
    position: relative;
    background: var(--wcpc-white);
    border-radius: var(--wcpc-border-radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    animation: slideUp 0.3s ease;
    box-shadow: var(--wcpc-shadow-xl);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SOLUCIÓN DEFINITIVA - FORZAR VISIBILIDAD DEL BUSCADOR
   ============================================ */

/* IMPORTANTE: Agregar esto AL FINAL del CSS para que tenga prioridad */

body .wcpc-search-wrapper,
body .wcpc-search-modern {
    position: relative !important;
    z-index: 999999 !important;
    overflow: visible !important;
}

body .wcpc-search-container {
    position: relative !important;
    z-index: 999999 !important;
    overflow: visible !important;
}

body .wcpc-search-box {
    position: relative !important;
    z-index: 999999 !important;
    overflow: visible !important;
}

body .wcpc-search-dropdown {
    position: absolute !important;
    z-index: 999999 !important;
    display: none !important;
}

body .wcpc-search-dropdown.active,
body .wcpc-search-dropdown[style*="display: block"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

body .wcpc-search-overlay {
    position: fixed !important;
    z-index: 999998 !important;
    display: none !important;
}

body .wcpc-search-overlay.active,
body .wcpc-search-overlay[style*="display: block"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Categorías deben estar MUY por debajo */
body .wcpc-categories-wrapper,
body .wcpc-categories-grid,
body .wcpc-category-item,
body .wcpc-category-card {
    position: relative !important;
    z-index: 1 !important;
}

/* Asegurar que el header tampoco tape el buscador */
header,
.site-header,
#masthead,
nav {
    z-index: 999 !important;
}