/* WC Pro Search - CSS Limpio */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.wc-search {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    position: relative !important;
    width: 100% !important;
    max-width: 700px !important;
    margin: 0 auto !important;
    z-index: 99999 !important;
    box-sizing: border-box !important;
}

.wc-search *, .wc-search *::before, .wc-search *::after {
    box-sizing: border-box !important;
}

/* Search Box */
.wc-search__box {
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    border-radius: 12px !important;
    padding: 6px !important;
    box-shadow: 0 4px 20px rgba(38,55,104,0.15) !important;
    border: 2px solid transparent !important;
    transition: all 0.3s ease !important;
}

.wc-search__box:focus-within {
    border-color: #0ECFB6 !important;
    box-shadow: 0 4px 25px rgba(14,207,182,0.25) !important;
}

/* Icon */
.wc-search__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 46px !important;
    height: 46px !important;
    background: linear-gradient(135deg, #263768, #1a2747) !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
}

.wc-search__icon svg {
    width: 20px !important;
    height: 20px !important;
    color: #fff !important;
}

/* Input */
.wc-search__input {
    flex: 1 !important;
    height: 46px !important;
    border: none !important;
    background: transparent !important;
    padding: 0 12px !important;
    font-size: 16px !important;
    font-family: inherit !important;
    color: #1a2747 !important;
    outline: none !important;
    min-width: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.wc-search__input::placeholder {
    color: #94a3b8 !important;
}

/* Clear Button */
.wc-search__clear {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background: #f1f5f9 !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
}

.wc-search__clear.show {
    display: flex !important;
}

.wc-search__clear svg {
    width: 14px !important;
    height: 14px !important;
    color: #64748b !important;
}

/* Search Button */
.wc-search__btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 46px !important;
    padding: 0 20px !important;
    background: linear-gradient(135deg, #0ECFB6, #0bb89f) !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    color: #1a2747 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.wc-search__btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(14,207,182,0.4) !important;
}

.wc-search__btn svg {
    width: 18px !important;
    height: 18px !important;
}

/* Results Panel */
.wc-search__results {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(38,55,104,0.2) !important;
    max-height: 70vh !important;
    overflow: hidden !important;
    z-index: 100000 !important;
}

.wc-search__results.show {
    display: block !important;
}

/* Loading */
.wc-search__loading {
    display: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px !important;
    gap: 12px !important;
    color: #64748b !important;
    font-size: 14px !important;
}

.wc-search__loading.show {
    display: flex !important;
}

.wc-search__spinner {
    width: 36px !important;
    height: 36px !important;
    border: 3px solid #e2e8f0 !important;
    border-top-color: #0ECFB6 !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Categories */
.wc-search__cats {
    display: none !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.wc-search__cats.show {
    display: flex !important;
}

.wc-search__cats::before {
    content: 'Categorías' !important;
    display: block !important;
    width: 100% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    margin-bottom: 8px !important;
}

.wc-search__cat {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    background: linear-gradient(135deg, #263768, #1a2747) !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: transform 0.2s ease !important;
}

.wc-search__cat:hover {
    transform: translateY(-2px) !important;
}

.wc-search__cat span {
    background: #0ECFB6 !important;
    color: #1a2747 !important;
    padding: 2px 8px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

/* Products */
.wc-search__prods {
    display: none !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.wc-search__prods.show {
    display: block !important;
}

.wc-search__prods::before {
    content: 'Productos' !important;
    display: block !important;
    padding: 16px 16px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    background: #f8fafc !important;
    position: sticky !important;
    top: 0 !important;
}

.wc-search__prod {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px 16px !important;
    text-decoration: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background 0.2s ease !important;
}

.wc-search__prod:hover, .wc-search__prod:active {
    background: #f8fafc !important;
}

.wc-search__prod img {
    width: 56px !important;
    height: 56px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
}

.wc-search__prod-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.wc-search__prod-cat {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #0ECFB6 !important;
    text-transform: uppercase !important;
    margin-bottom: 2px !important;
}

.wc-search__prod-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a2747 !important;
    margin: 0 0 2px 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.wc-search__prod-desc {
    font-size: 12px !important;
    color: #64748b !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Empty */
.wc-search__empty {
    display: none !important;
    padding: 40px !important;
    text-align: center !important;
    color: #64748b !important;
}

.wc-search__empty.show {
    display: block !important;
}

/* Footer */
.wc-search__footer {
    display: none !important;
    padding: 14px 16px !important;
    background: #f8fafc !important;
    border-top: 1px solid #f1f5f9 !important;
}

.wc-search__footer.show {
    display: block !important;
}

.wc-search__viewall {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    background: linear-gradient(135deg, #263768, #1a2747) !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Overlay */
.wc-search__overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.4) !important;
    z-index: 99998 !important;
}

.wc-search__overlay.show {
    display: block !important;
}

/* ===================== MOBILE ===================== */
@media screen and (max-width: 768px) {
    .wc-search {
        padding: 0 10px !important;
    }
    
    .wc-search__box {
        padding: 5px !important;
    }
    
    .wc-search__icon {
        width: 42px !important;
        height: 42px !important;
    }
    
    .wc-search__icon svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .wc-search__input {
        height: 42px !important;
        padding: 0 10px !important;
        font-size: 16px !important;
    }
    
    .wc-search__clear {
        width: 30px !important;
        height: 30px !important;
        margin-right: 6px !important;
    }
    
    .wc-search__btn {
        height: 42px !important;
        padding: 0 14px !important;
    }
    
    .wc-search__btn span {
        display: none !important;
    }
    
    .wc-search__btn svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .wc-search__results {
        max-height: 60vh !important;
    }
    
    .wc-search__prod {
        padding: 12px !important;
        gap: 12px !important;
    }
    
    .wc-search__prod img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .wc-search__prod-name {
        font-size: 13px !important;
    }
    
    .wc-search__prod-desc {
        display: none !important;
    }
}