/* ========================================
   UNIFIED SLIDING SEARCH WITH DROPDOWN
   Slides from right + dropdown results
======================================== */

/* Search Backdrop */
.search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-backdrop.active {
    display: block;
    opacity: 1;
}

/* Main Sliding Search Panel */
.search-slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    max-width: 90%;
    height: 100%;
    background: white;
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.search-slide-panel.active {
    transform: translateX(0);
}

/* Panel Header */
.search-panel-header {
    padding: 20px;
    background: linear-gradient(to bottom, white, var(--gray-50));
    border-bottom: 2px solid var(--gray-200);
    flex-shrink: 0;
}

.search-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.search-panel-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-panel-title h3 i {
    color: var(--primary);
    font-size: 20px;
}

.search-close-btn {
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gray-600);
    transition: all 0.3s ease;
}

.search-close-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: rotate(90deg) scale(1.05);
}

/* Search Input Container */
.search-input-container {
    position: relative;
}

.search-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 16px;
    pointer-events: none;
}

.search-input-field {
    width: 100%;
    padding: 14px 50px 14px 48px;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 15px;
    background: white;
    transition: all 0.3s ease;
    font-weight: 400;
    color: var(--dark);
}

.search-input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(127, 169, 155, 0.1);
}

.search-input-field::placeholder {
    color: var(--gray-400);
}

.search-clear-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--gray-400);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    transition: color 0.2s;
    display: none;
}

.search-clear-button:hover {
    color: var(--gray-700);
}

/* Dropdown Results Container */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 10;
}

.search-dropdown.active {
    display: block;
    animation: dropdownSlideDown 0.3s ease;
}

@keyframes dropdownSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown Sections */
.dropdown-section {
    padding: 12px 0;
}

.dropdown-section:not(:last-child) {
    border-bottom: 1px solid var(--gray-200);
}

.dropdown-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-section-title i {
    color: var(--primary);
    font-size: 12px;
}

/* Dropdown Items */
.dropdown-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-item {
    padding: 0;
}

.dropdown-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-item a:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.dropdown-item-icon {
    width: 16px;
    text-align: center;
    color: var(--gray-400);
    font-size: 13px;
    flex-shrink: 0;
}

.dropdown-item a:hover .dropdown-item-icon {
    color: var(--primary);
}

.dropdown-item-text {
    flex: 1;
    font-weight: 500;
}

/* Product Items in Dropdown */
.dropdown-product-item {
    padding: 0;
}

.dropdown-product-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-product-item a:hover {
    background: var(--gray-50);
}

.dropdown-product-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-100);
    flex-shrink: 0;
}

.dropdown-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-product-info {
    flex: 1;
    min-width: 0;
}

.dropdown-product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-product-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-product-badge {
    display: inline-block;
    padding: 2px 6px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 9px;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Empty State */
.dropdown-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--gray-400);
}

.dropdown-empty i {
    font-size: 40px;
    color: var(--gray-300);
    margin-bottom: 12px;
    display: block;
}

.dropdown-empty h4 {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 6px;
    font-weight: 600;
}

.dropdown-empty p {
    font-size: 13px;
    color: var(--gray-400);
}

/* Loading State */
.dropdown-loading {
    padding: 30px 20px;
    text-align: center;
    color: var(--gray-500);
}

.dropdown-loading i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

/* View All Button in Dropdown */
.dropdown-view-all {
    padding: 12px 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.dropdown-view-all a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.dropdown-view-all a:hover {
    background: linear-gradient(135deg, #5A7770, var(--primary-dark));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 169, 155, 0.3);
}

.dropdown-view-all a i {
    transition: transform 0.3s ease;
}

.dropdown-view-all a:hover i {
    transform: translateX(4px);
}

/* Panel Body - Quick Links */
.search-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.quick-links-section {
    margin-bottom: 24px;
}

.quick-links-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-links-title i {
    color: var(--primary);
    font-size: 13px;
}

.quick-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links-list li {
    margin-bottom: 4px;
}

.quick-links-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.quick-links-list a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(-3px);
}

.quick-links-list a i {
    font-size: 13px;
    color: var(--gray-400);
    transition: color 0.2s;
}

.quick-links-list a:hover i {
    color: white;
}

/* Highlight Effect - Removed for cleaner display */
.highlight {
    /* No special styling applied */
}

/* Scrollbar Styling */
.search-dropdown::-webkit-scrollbar,
.search-panel-body::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown::-webkit-scrollbar-track,
.search-panel-body::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.search-dropdown::-webkit-scrollbar-thumb,
.search-panel-body::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover,
.search-panel-body::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-slide-panel {
        width: 100%;
        max-width: 100%;
    }
    
    .search-panel-header {
        padding: 16px;
    }
    
    .search-panel-body {
        padding: 16px;
    }
    
    .dropdown-product-image {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .search-input-field {
        padding: 12px 46px 12px 44px;
        font-size: 14px;
    }
    
    .search-panel-title h3 {
        font-size: 16px;
    }
}