/* NICOLE DI BELLA SEARCH STYLES - VERSION 2.0 - UPDATED MODAL */
/* Search Overlay Styles */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px;
    overflow-y: auto;
}

.close-search {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    z-index: 10;
}

.close-search:hover {
    transform: scale(1.1);
}

.search-container {
    width: 100%;
    max-width: 800px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Header */
.search-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.search-header h2 {
    font-size: 36px;
    font-weight: 300;
    margin: 0 0 10px 0;
}

.search-header p {
    font-size: 16px;
    opacity: 0.8;
}

/* Search Form */
.search-form {
    margin-bottom: 30px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-input {
    flex: 1;
    padding: 20px 30px;
    font-size: 18px;
    border: none;
    outline: none;
    background: transparent;
}

.search-submit {
    background: #8b5cf6;
    border: none;
    color: white;
    padding: 0 30px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-submit:hover {
    background: #7c3aed;
}

.search-submit i {
    font-size: 20px;
}

/* Search Suggestions */
.search-suggestions {
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.search-suggestions.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestions-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestions-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.view-all {
    color: #8b5cf6;
    text-decoration: none;
    font-size: 14px;
}

.view-all:hover {
    text-decoration: underline;
}

.suggestions-list {
    max-height: 400px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.suggestion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-info {
    flex: 1;
}

.suggestion-info h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 500;
}

.suggestion-info mark {
    background: #ffd700;
    color: #333;
    padding: 0 2px;
}

.suggestion-category {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #666;
}

.suggestion-price {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #8b5cf6;
}

/* Loading & Error States */
.suggestions-loading,
.no-suggestions,
.suggestions-error {
    padding: 40px;
    text-align: center;
    color: #666;
}

.suggestions-loading i,
.no-suggestions i,
.suggestions-error i {
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
}

.no-suggestions strong {
    color: #333;
}

.suggestion-hint {
    font-size: 14px;
    margin-top: 10px;
    opacity: 0.8;
}

/* Recent Searches */
.recent-searches {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.recent-searches h3 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.recent-searches-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-searches-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.recent-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.recent-search-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.recent-search-item i {
    opacity: 0.6;
}

.clear-recent {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.clear-recent:hover {
    color: white;
}

.no-recent {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-style: italic;
}

/* Popular Categories */
.popular-categories {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.popular-categories h3 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.category-tag:hover {
    background: #8b5cf6;
    color: white;
    transform: translateY(-2px);
}

/* Search Results Modal - Copy of product modal styles */
.search-results-modal,
.search-results-modal-v2 {
    display: none !important;
    position: fixed !important;
    z-index: 1000 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    overflow: auto !important;
    animation: fadeIn 0.3s ease !important;
}

.search-results-modal.active,
.search-results-modal-v2.active {
    display: block !important;
}

.search-results-content {
    background-color: white !important;
    margin: 5% auto !important;
    padding: 0 !important;
    border-radius: 12px !important;
    width: 90% !important;
    max-width: 900px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    animation: slideDown 0.3s ease !important;
    position: relative !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-content .modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-results-content .close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-results-content .close-modal:hover {
    background: #e9ecef;
    color: #333;
    transform: scale(1.1);
}

.search-results-content .modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.search-results-content .modal-body {
    overflow-y: auto;
    padding: 20px 30px 30px;
    max-height: 60vh;
}

.results-header {
    margin-bottom: 30px;
}

.results-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.results-header strong {
    color: #333;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Clickable product cards */
.clickable-product {
    transition: all 0.3s ease;
}

.clickable-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.clickable-product:hover .product-image img {
    transform: scale(1.05);
}

.clickable-product .product-image {
    overflow: hidden;
}

.clickable-product .product-image img {
    transition: transform 0.3s ease;
}

/* No Results */
.search-no-results {
    max-width: 500px;
    text-align: center;
    padding: 60px 40px;
}

.no-results-content i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-results-content h3 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
}

.no-results-content p {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 16px;
}

.no-results-suggestions {
    text-align: left;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.no-results-suggestions p {
    margin: 0 0 10px 0;
    font-weight: 500;
    color: #333;
}

.no-results-suggestions ul {
    margin: 0;
    padding-left: 20px;
}

.no-results-suggestions li {
    color: #666;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-overlay-content {
        padding: 60px 15px;
    }
    
    .close-search {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .search-header h2 {
        font-size: 28px;
    }
    
    .search-header p {
        font-size: 14px;
    }
    
    .search-input {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .search-submit {
        padding: 0 20px;
    }
    
    .category-tags {
        justify-content: center;
    }
    
    .search-results-modal,
    .search-results-modal-v2 {
        padding: 20px 10px !important;
    }
    
    .search-results-content {
        max-width: 95vw !important;
        max-height: 90vh !important;
        margin: 2% auto !important;
    }
    
    .search-results-content .modal-body {
        padding: 20px;
    }
    
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}