/* ============================================
   MRWIKD BLACK - Search Modal Styles
   ============================================ */

/* Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.search-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease,
                visibility 0.3s ease;
}
.search-modal.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-modal-inner {
    max-width: 720px;
    margin: 80px auto 0;
    background: var(--color-bg-secondary, #0d0d0d);
    border: 1px solid rgba(255, 255, 255, 0.06);
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.search-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}
.search-icon {
    color: var(--color-text-muted, #555);
    flex-shrink: 0;
}
.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--color-text-primary, #e8e8e8);
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 1rem;
    padding: 0.25rem 0;
}
.search-input::placeholder {
    color: var(--color-text-muted, #555);
}
.search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-text-muted, #555);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}
.search-clear:hover {
    color: var(--color-text-primary, #e8e8e8);
}
.search-close-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary, #888);
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.search-close-btn:hover {
    color: var(--color-text-primary, #e8e8e8);
}

/* Results */
.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    min-height: 100px;
    max-height: 60vh;
}
.search-results::-webkit-scrollbar {
    width: 4px;
}
.search-results::-webkit-scrollbar-track {
    background: transparent;
}
.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Placeholder / Loading / Empty */
.search-placeholder,
.search-loading,
.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-muted, #555);
}
.search-placeholder p,
.search-no-results p {
    font-size: 0.9rem;
    margin: 0;
}
.search-no-results span {
    font-size: 0.78rem;
    margin-top: 0.5rem;
    opacity: 0.6;
}
.search-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--color-accent-warm, #d4a853);
    border-radius: 50%;
    animation: searchSpin 0.6s linear infinite;
    margin-bottom: 0.75rem;
}
@keyframes searchSpin {
    to { transform: rotate(360deg); }
}

/* Results Count */
.search-results-count {
    font-size: 0.75rem;
    color: var(--color-text-muted, #555);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

/* Results Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

/* Product Card */
.search-product-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.search-product-card:hover {
    transform: translateY(-2px);
}
.search-product-image {
    aspect-ratio: 1 / 1.15;
    background: var(--color-bg-tertiary, #121212);
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.search-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.search-product-card:hover .search-product-image img {
    transform: scale(1.05);
}
.search-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-text-muted, #555);
}
.search-product-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.search-product-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-warm, #d4a853);
}
.search-product-title {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-primary, #e8e8e8);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-product-price {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 0.8rem;
    color: var(--color-text-secondary, #888);
}

/* Mobile */
@media (max-width: 600px) {
    .search-modal-inner {
        margin: 0;
        max-height: 100vh;
        height: 100vh;
        border: none;
    }
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
