/* =============================================
   ELVOURA — SEARCH PANEL STYLES
   search.css
============================================= */

/* ── Overlay Backdrop ─────────────────────── */
#elvoura-search-panel {
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
#elvoura-search-panel.open {
    pointer-events: all;
    opacity: 1;
}

.esp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── Panel Slide-Down ─────────────────────── */
.esp-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card)fff;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
#elvoura-search-panel.open .esp-panel {
    transform: translateY(0);
}

/* ── Header / Input Row ───────────────────── */
.esp-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 5% 20px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.esp-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 0 18px;
    gap: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.esp-input-wrap:focus-within {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
    background: var(--bg-card);
}

.esp-search-icon {
    color: #94a3b8;
    font-size: 15px;
    flex-shrink: 0;
}

.esp-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-family: 'Jost', sans-serif;
    font-size: 17px;
    color: #0f172a;
    padding: 16px 0;
    letter-spacing: 0.2px;
}
.esp-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.esp-clear {
    background: #e2e8f0;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: 11px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.esp-clear:hover { background: #cbd5e1; }

.esp-close {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}
.esp-close:hover {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

/* ── Body ─────────────────────────────────── */
.esp-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 5% 16px;
    scrollbar-width: thin;
}

.esp-label {
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 14px;
}

/* ── Quick Suggestion Tags ────────────────── */
.esp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.esp-tag {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 30px;
    padding: 8px 18px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.esp-tag:hover {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
    transform: translateY(-1px);
}

/* ── Results Grid ─────────────────────────── */
.esp-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.esp-result-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid #f1f5f9;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.2s;
    animation: espFadeIn 0.3s ease both;
    background: var(--bg-card);
}
.esp-result-card:hover {
    border-color: #000;
    background: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

@keyframes espFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.esp-result-img {
    width: 60px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}
.esp-result-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.esp-result-info {
    flex: 1;
    min-width: 0;
}

.esp-result-cat {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #10b981;
    margin-bottom: 4px;
    font-family: 'Jost', sans-serif;
}

.esp-result-name {
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.esp-result-name mark {
    background: #fef08a;
    color: #000;
    border-radius: 2px;
    padding: 0 1px;
}

.esp-result-price {
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.esp-result-arrow {
    color: #cbd5e1;
    font-size: 13px;
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
}
.esp-result-card:hover .esp-result-arrow {
    transform: translateX(4px);
    color: #000;
}

/* ── No Results ───────────────────────────── */
.esp-no-results {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 50px 20px;
    text-align: center;
    color: #94a3b8;
}
.esp-no-results i { font-size: 36px; opacity: 0.4; }
.esp-no-results p {
    font-family: 'Jost', sans-serif;
    font-size: 15px;
    color: #64748b;
}
.esp-no-results span { font-weight: 700; color: #000; }

.esp-view-all-btn {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 10px 24px;
    border-radius: 30px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    letter-spacing: 0.5px;
}
.esp-view-all-btn:hover { background: #1e3a2f; }

/* ── Footer Bar ───────────────────────────── */
.esp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 5%;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.esp-footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}
.esp-footer-link:hover { color: #10b981; }
.esp-footer-link i { font-size: 12px; }

.esp-footer-hint {
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}
.esp-footer-hint kbd {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: monospace;
    color: #475569;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .esp-results-grid {
        grid-template-columns: 1fr;
    }
    .esp-close span { display: none; }
    .esp-footer-hint { display: none; }
}
