﻿/* ===== Search Dropdown (desktop) ===== */
.search-dropdown {
    position: fixed;
    left: 0;
    width: 100vw;
    z-index: 999;
    background: var(--purple);
    border-bottom: 3px solid var(--green);
    padding: 20px 30px 24px;
    box-sizing: border-box;
    overflow-y: auto;
    max-height: 70vh;
}

.search-dropdown:not(.is-visible) {
    display: none;
}

/* Overlay derriere le dropdown (desktop uniquement) */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0, 0, 0, .45);
}

.search-overlay:not(.is-visible) {
    display: none;
}

/* Version mobile : insere dans le menu mobile, pas en fixed */
.search-dropdown-mobile {
    position: relative;
    width: 100%;
    max-height: none;
    z-index: auto;
    border-bottom: 2px solid var(--green);
    border-radius: 0 0 12px 12px;
    padding: 14px 10px 16px;
    margin-top: -4px;
}

/* Sections produits / articles */
.search-section {
    margin-bottom: 16px;
}

.search-section:last-child {
    margin-bottom: 0;
}

.search-section-title {
    font-family: var(--font-head);
    font-size: 1.125rem;
    color: var(--green);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ligne horizontale scrollable */
.search-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--green) transparent;
}

.search-row::-webkit-scrollbar {
    height: 4px;
}

.search-row::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 2px;
}

/* Cards */
.search-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    text-decoration: none;
    color: var(--white);
    transition: background .2s;
    min-width: 220px;
    max-width: 300px;
}

.search-card:hover {
    background: rgba(255, 255, 255, .18);
}

.search-card-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .1);
}

.search-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.search-card-name {
    font-family: var(--font-head);
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-price {
    font-size: .8rem;
    color: var(--green);
}

.search-card-desc {
    font-size: .78rem;
    color: var(--lightgrey);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Aucun resultat */
.search-empty {
    color: var(--lightgrey);
    text-align: center;
    padding: 16px 0;
    font-size: .95rem;
}

/* Mobile : cards plus compactes */
.search-dropdown-mobile .search-section-title {
    font-size: .95rem;
    margin-bottom: 8px;
}

.search-dropdown-mobile .search-card {
    min-width: 170px;
    max-width: 240px;
    padding: 8px 10px;
    gap: 10px;
}

.search-dropdown-mobile .search-card-img {
    width: 44px;
    height: 44px;
}

.search-dropdown-mobile .search-card-name {
    font-size: .82rem;
}

.search-dropdown-mobile .search-card-price,
.search-dropdown-mobile .search-card-desc {
    font-size: .72rem;
}

.search-dropdown-mobile .search-row {
    gap: 10px;
}
