/* Elegant Search Modal Styles */
.elegant-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.elegant-search-modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.elegant-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.elegant-modal-content {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: elegantSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes elegantSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

/* Elegant Header - Minimized */
.elegant-modal-header {
    position: relative;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.elegant-modal-close {
    width: 35px;
    height: 35px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.elegant-modal-close:hover {
    background: #e9ecef;
    border-color: #d4af37;
    transform: scale(1.1) rotate(90deg);
}

.elegant-modal-close i {
    font-size: 14px;
    color: #666;
}

/* Elegant Modal Body */
.elegant-modal-body {
    padding: 25px 30px 30px 30px;
    max-height: 75vh;
    overflow-y: auto;
}

/* Elegant Search Form */
.elegant-search-form {
    margin-bottom: 25px;
}

.elegant-search-input {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.elegant-search-input:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.elegant-search-input input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    outline: none;
}

.elegant-search-input input::placeholder {
    color: #999;
}

.elegant-submit-btn {
    padding: 0 25px;
    background: linear-gradient(135deg, #d4af37 0%, #f9e71e 100%);
    border: none;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    margin: 0;
    min-width: 60px;
    height: auto;
}

.elegant-submit-btn:hover {
    background: linear-gradient(135deg, #f9e71e 0%, #d4af37 100%);
}

.elegant-submit-btn i {
    font-size: 18px;
    color: #333;
}

/* Modal Sections */
.modal-section {
    margin-bottom: 25px;
}

.modal-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Category Tabs Container */
.category-tabs-container {
    position: relative;
    overflow: hidden;
}

.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-tab:hover {
    background: #e9ecef;
    color: #333;
}

/* Section Tabs */
.section-tabs {
    display: flex;
    border-bottom: 2px solid #f1f1f1;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab.active {
    color: #333;
    border-bottom-color: #d4af37;
}

.tab:hover {
    color: #333;
}

/* Products Section - Horizontal */
.products-section {
    margin-top: 10px;
}

/* Horizontal Product Container */
.products-container-horizontal {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #f1f1f1;
    padding: 10px 0 15px 0;
}

.products-container-horizontal::-webkit-scrollbar {
    height: 6px;
}

.products-container-horizontal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.products-container-horizontal::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 3px;
}

.products-container-horizontal::-webkit-scrollbar-thumb:hover {
    background: #c19b2b;
}

/* Horizontal Product Cards */
.product-card-horizontal {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    width: 150px;
    padding: 12px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
    flex-shrink: 0;
}

.product-card-horizontal:hover {
    background: #f8f9fa;
    border-color: #d4af37;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
}

.product-image-horizontal {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.product-image-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-horizontal {
    text-align: center;
}

.product-info-horizontal h5 {
    margin: 0 0 5px 0;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 30px;
}

.product-price-horizontal {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    margin-top: 4px;
}

/* No Products - Horizontal */
.no-products-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    padding: 40px 20px;
    color: #999;
    text-align: center;
}

.no-products-horizontal i {
    font-size: 36px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-products-horizontal p {
    margin: 0;
    font-size: 14px;
}

/* Popular Searches */
.popular-searches {
    margin-bottom: 20px;
}

.popular-searches h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popular-searches h3 i {
    color: #ff6b6b;
    font-size: 20px;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.popular-tag {
    display: inline-block;
    padding: 10px 18px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #666;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.popular-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.4s ease;
}

.popular-tag:hover::before {
    left: 100%;
}

.popular-tag:hover {
    background: linear-gradient(135deg, #d4af37, #f9e71e);
    color: #333;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
}

/* Recent Products */
.recent-products {
    display: grid;
    gap: 15px;
}

.recent-product-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.recent-product-item:hover {
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.recent-product-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.recent-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-product-info {
    flex: 1;
}

.recent-product-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Elegant Search Button */
.elegant-search-container {
    display: flex !important;
    align-items: center;
}

.elegant-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #d4af37 0%, #f9e71e 100%);
    border: none;
    border-radius: 25px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.elegant-search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.elegant-search-btn:hover::before {
    left: 100%;
}

.elegant-search-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #f9e71e 0%, #d4af37 100%);
}

.elegant-search-btn i {
    font-size: 16px;
}

.search-text {
    font-size: 13px;
    font-weight: 700;
}

/* Header search button visibility */
.header-desktop-search1 {
    display: flex !important;
}

/* Responsive */
@media (max-width: 768px) {
    .elegant-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 10px auto;
        border-radius: 20px;
    }
    
    .elegant-modal-header {
        padding: 12px 15px;
    }
    
    .elegant-modal-close {
        width: 32px;
        height: 32px;
    }
    
    .elegant-modal-close i {
        font-size: 12px;
    }
    
    .elegant-modal-body {
        padding: 20px;
        max-height: 75vh;
    }
    
    .category-tabs {
        gap: 8px;
    }
    
    .category-tab {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .section-tabs {
        justify-content: center;
    }
    
    .tab {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .product-card-horizontal {
        min-width: 130px;
        width: 130px;
        padding: 10px;
    }
    
    .product-image-horizontal {
        height: 100px;
        margin-bottom: 8px;
    }
    
    .product-info-horizontal h5 {
        font-size: 11px;
        min-height: 28px;
    }
    
    .product-price-horizontal {
        font-size: 12px;
    }
    
    .elegant-search-btn .search-text {
        display: none;
    }
    
    .elegant-search-btn {
        padding: 15px 18px;
        border-radius: 50%;
    }
}

@media (max-width: 480px) {
    .elegant-modal-content {
        width: 98%;
        margin: 5px auto;
    }
    
    .elegant-modal-body {
        padding: 15px;
    }
    
    .elegant-search-input {
        flex-direction: row;
    }
    
    .elegant-search-input input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .elegant-submit-btn {
        padding: 12px 15px;
    }
    
    .product-card-horizontal {
        min-width: 110px;
        width: 110px;
        padding: 8px;
    }
    
    .product-image-horizontal {
        height: 80px;
        margin-bottom: 6px;
    }
    
    .product-info-horizontal h5 {
        font-size: 10px;
        min-height: 24px;
    }
    
    .product-price-horizontal {
        font-size: 11px;
    }
    
    .section-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
}

/* Scrollbar Styling */
.search-modal-body::-webkit-scrollbar {
    width: 6px;
}

.search-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.search-modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}