/* ============================================
   CLOUDÉ — SEARCH OVERLAY STYLES
   ============================================ */

/* ── Overlay Backdrop ── */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.search-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 18, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
}

/* ── Search Modal ── */
.search-modal {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 700px;
    margin: 0 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(200, 160, 180, 0.3);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(100, 50, 80, 0.2), 0 0 0 1px rgba(255,255,255,0.5) inset;
    overflow: hidden;
    transform: translateY(-20px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-overlay.active .search-modal {
    transform: translateY(0) scale(1);
}

/* ── Header / Input Row ── */
.search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(200, 160, 180, 0.15);
}

.search-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0.8rem;
    background: rgba(245, 235, 240, 0.5);
    border: 1px solid rgba(200, 160, 180, 0.25);
    border-radius: 14px;
    padding: 0.7rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.search-input-wrap:focus-within {
    border-color: rgba(201, 133, 149, 0.5);
    box-shadow: 0 0 0 3px rgba(201, 133, 149, 0.08);
}

.search-icon-inp {
    color: #a87b8d;
    flex-shrink: 0;
}

.search-input {
    border: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #3a2a32;
    flex: 1;
    outline: none;
    min-width: 0;
}
.search-input::placeholder { color: #b89aaa; }

.search-clear {
    background: rgba(200,160,180,0.15);
    border: none;
    color: #8c6071;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}
.search-clear:hover { background: rgba(200,160,180,0.35); }

.search-close-btn {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #8c6071;
    cursor: pointer;
    white-space: nowrap;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}
.search-close-btn:hover { background: rgba(201,133,149,0.1); color: #5a404b; }

/* ── Results Area ── */
.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1.2rem 1.5rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(200,160,180,0.3) transparent;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { background: rgba(200,160,180,0.3); border-radius: 4px; }

/* ── Labels ── */
.search-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #a87b8d;
    margin-bottom: 0.8rem;
}

/* ── Trending Tags ── */
.search-trending { margin-bottom: 0.5rem; }
.search-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.search-tag {
    padding: 0.45rem 1rem;
    background: rgba(245, 235, 240, 0.7);
    border: 1px solid rgba(200, 160, 180, 0.25);
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #5a404b;
    cursor: pointer;
    transition: all 0.25s ease;
}
.search-tag:hover {
    background: rgba(201, 133, 149, 0.12);
    border-color: rgba(201, 133, 149, 0.4);
    color: #3a2a32;
    transform: translateY(-1px);
}

/* ── Product Result Cards ── */
.search-products-label { margin: 0.8rem 0; }
.search-product-list { display: flex; flex-direction: column; gap: 0.5rem; }

.search-result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(200, 160, 180, 0.15);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}
.search-result-card:hover {
    background: rgba(245, 235, 240, 0.9);
    border-color: rgba(201, 133, 149, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(180,140,160,0.1);
}
.search-result-img {
    width: 52px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(245, 235, 240, 0.5);
    padding: 4px;
    flex-shrink: 0;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #3a2a32;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-type {
    font-size: 0.75rem;
    color: #8c6071;
    margin-top: 2px;
}
.search-result-notes {
    font-size: 0.72rem;
    color: #a87b8d;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #c98595;
    flex-shrink: 0;
}
.search-badge {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 10px;
    background: #3a2a32;
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
}
.search-badge.bestseller { background: #c98595; }

/* ── No Results ── */
.search-no-results {
    text-align: center;
    padding: 2rem;
    color: #8c6071;
}
.search-no-results .search-no-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.search-no-results p { font-size: 0.9rem; }
.search-no-results span { color: #c98595; font-style: italic; }

/* ── View All Button ── */
.search-view-all {
    display: block;
    text-align: center;
    margin-top: 1rem;
    padding: 0.7rem;
    background: linear-gradient(135deg, rgba(201,133,149,0.1), rgba(168,123,141,0.08));
    border: 1px solid rgba(201, 133, 149, 0.2);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #c98595;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}
.search-view-all:hover {
    background: rgba(201, 133, 149, 0.15);
    border-color: rgba(201, 133, 149, 0.35);
}

/* ── Keyboard shortcut hint ── */
.search-kbd-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    color: #b89aaa;
    border-top: 1px solid rgba(200,160,180,0.1);
}
kbd {
    background: rgba(200,160,180,0.12);
    border: 1px solid rgba(200,160,180,0.25);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: #8c6071;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .search-overlay { padding-top: 60px; }
    .search-modal { margin: 0 0.8rem; border-radius: 18px; }
    .search-header { padding: 1rem; }
    .search-results { padding: 1rem; }
    .search-close-btn { display: none; }
}
