.advanced-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 80%;
    margin: 8px 0px;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1.4px solid #ffffff;
    border-radius: 25px;
    overflow: hidden;
}

#advanced-search-input {
    flex: 1;
    padding: 6px 20px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background: #bf072f !important;
    color: white !important;
    border: none !important;
    padding: 12px 15px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.clear-search {
    position: absolute !important;
    right: 60px !important;
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    cursor: pointer !important;
    padding: 5px !important;
    color: #999 !important;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 5px;
}

.search-suggestions {
    display: flex;
    padding: 20px;
    gap: 30px;
}

.suggestions-column,
.tags-column,
.categories-column {
    flex: 1;
}

.suggestions-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.suggestions-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions-section li {
    margin-bottom: 8px;
}

.suggestions-section a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
    line-height: 1.4;
    /* Limitar a 2 líneas */
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggestions-section a:hover {
    color: #007cba;
}

/* Estilos específicos para etiquetas en el dropdown */
.tags-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tags-list .tag-count {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

/* Estilos para filtros del sidebar */
.woo-filter-widget {
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.woo-filter-widget h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-filter {
    background: white;
    padding: 8px 12px;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.tag-filter:hover {
    background: #007cba;
    color: white;
}

.tag-filter .count {
    font-size: 12px;
    color: #666;
}

.price-filter-form .price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.price-filter-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.price-filter-form button {
    background: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.attribute-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attribute-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 0;
}

.attribute-option input {
    margin: 0;
}

.attribute-option .count {
    color: #666;
    font-size: 12px;
    margin-left: auto;
}

@media (max-width: 768px) {
    .search-suggestions {
        flex-direction: column;
        gap: 20px;
    }
    
    .price-filter-form .price-inputs {
        flex-direction: column;
    }
}

/* Nuevos estilos para categorías desplegables */
.categories-widget {
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.categories-widget h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.category-breadcrumb {
    margin-bottom: 15px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 5px;
    font-size: 14px;
}

.category-breadcrumb .parent-category {
    color: #007cba;
    text-decoration: none;
}

.category-breadcrumb .current-category {
    font-weight: 600;
    color: #333;
}

.category-dropdown {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    overflow: hidden;
}

.category-dropdown.active {
    border-color: #007cba;
}

.dropdown-header {
    padding: 12px 15px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.dropdown-header:hover {
    background: #e9ecef;
}

.category-title {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.category-title:hover {
    color: #007cba;
}

.dropdown-arrow {
    color: #666;
    font-size: 12px;
    margin-left: 10px;
    transition: transform 0.3s;
}

.dropdown-content {
    display: none;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.category-link {
    display: block;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-link:last-child {
    border-bottom: none;
}

.category-link:hover {
    background: #f8f9fa;
    color: #007cba;
    padding-left: 20px;
}

.category-link.sibling {
    background: #fff3cd;
}

.category-link.sibling:hover {
    background: #ffeaa7;
}

.category-link .count {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

.sibling-categories {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.sibling-categories h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.sibling-categories .category-link {
    padding: 8px 0;
    border: none;
    background: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .search-suggestions {
        flex-direction: column;
        gap: 20px;
    }
    
    .price-filter-form .price-inputs {
        flex-direction: column;
    }
    
    .dropdown-header {
        padding: 10px 12px;
    }
    
    .category-link {
        padding: 8px 12px;
    }
}

/* Estilos para subcategorías multinivel */
.subcategory-level-1 {
    margin-left: 0;
    border-left: 3px solid #007cba;
}

.subcategory-level-1 .dropdown-header {
    background: #f0f8ff;
    padding-left: 20px;
    font-size: 14px;
}

.subcategory-level-1 .category-title {
    font-weight: 400;
}

.subcategory-level-2 {
    margin-left: 0;
    border-left: 3px solid #28a745;
}

.subcategory-level-2 .dropdown-header {
    background: #f0fff0;
    padding-left: 35px;
    font-size: 13px;
}

.subcategory-level-2 .category-link {
    padding-left: 45px;
    font-size: 13px;
}

.subcategory-level-3 .category-link {
    padding-left: 60px;
    font-size: 12px;
    color: #666;
}

/* Mejor espaciado para dropdowns anidados */
.dropdown-content .category-dropdown {
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
}

.dropdown-content .category-dropdown:last-child {
    border-bottom: none;
}

/* Indicadores visuales mejorados */
.dropdown-arrow {
    transition: transform 0.3s ease;
    min-width: 20px;
    text-align: center;
}

.category-dropdown.active > .dropdown-header .dropdown-arrow {
    transform: rotate(180deg);
}

/* Hover effects mejorados */
.subcategory-level-1 .dropdown-header:hover {
    background: #e6f3ff;
}

.subcategory-level-2 .dropdown-header:hover {
    background: #e6ffe6;
}

/* Animaciones suaves */
.dropdown-content {
    overflow: hidden;
}

.category-dropdown {
    transition: all 0.3s ease;
}

/* Responsive para subcategorías */
@media (max-width: 768px) {
    .subcategory-level-1 .dropdown-header,
    .subcategory-level-2 .dropdown-header {
        padding-left: 15px;
        font-size: 13px;
    }
    
    .subcategory-level-2 .category-link {
        padding-left: 25px;
    }
    
    .subcategory-level-3 .category-link {
        padding-left: 35px;
    }
}


/* -------------------------------- Estilos para carrito desplegable --------------------------------------- */
.advanced-cart-wrapper {
    position: relative;
    display: inline-block;
}

.cart-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.cart-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.cart-icon {
    position: relative;
    color: #333;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.cart-total-info {
    font-size: 14px;
    color: #666;
}

.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    margin-top: 5px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.cart-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-cart:hover {
    color: #333;
}

.cart-items-container {
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

.cart-items-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.cart-items-container.loading::after {
    content: 'Actualizando...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    color: #666;
}

.empty-cart {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.empty-cart p {
    margin-bottom: 15px;
}

.continue-shopping {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.cart-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    margin-right: 12px;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.item-name a {
    color: #333;
    text-decoration: none;
}

.item-name a:hover {
    color: #007cba;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.item-price {
    color: #666;
    font-size: 13px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
}

.qty-btn:hover {
    background: #f5f5f5;
}

.qty-input {
    width: 40px;
    height: 24px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
}

.item-total {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item:hover {
    color: #e74c3c;
}

.cart-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
    display: block;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
}

.btn-primary {
    background: #007cba;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-dropdown {
        width: 100vw;
        max-width: 350px;
        right: -20px;
    }
    
    .cart-item {
        padding: 12px 15px;
    }
    
    .item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
}