/* استایل کادر جستجو — منتقل‌شده از base.html برای کش بهتر */

    /* ===== استایل کادر جستجو ===== */
    .search-modal {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 80px 20px 20px;
        animation: searchFadeIn 0.3s ease;
    }

    @keyframes searchFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .search-modal__overlay {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .search-modal__container {
        position: relative;
        width: 100%;
        max-width: 700px;
        background: #fff;
        border-radius: 20px;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        overflow: hidden;
        animation: searchSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: calc(100vh - 100px);
        display: flex;
        flex-direction: column;
    }

    @keyframes searchSlideDown {
        from {
            opacity: 0;
            transform: translateY(-30px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .search-modal__header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 20px 24px;
        border-bottom: 1px solid #f1f5f9;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    }

    .search-modal__icon {
        width: 24px;
        height: 24px;
        color: #6366f1;
        flex-shrink: 0;
    }

    .search-modal__input {
        flex: 1;
        border: none;
        outline: none;
        font-family: 'Vazir', sans-serif;
        font-size: 1.05rem;
        background: transparent;
        color: #0f172a;
    }

    .search-modal__input::placeholder {
        color: #94a3b8;
    }

    .search-modal__close {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: rgba(99, 102, 241, 0.08);
        color: #64748b;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .search-modal__close:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #dc2626;
        transform: rotate(90deg);
    }

    .search-modal__close svg {
        width: 20px;
        height: 20px;
    }

    .search-modal__body {
        flex: 1;
        overflow-y: auto;
        max-height: 400px;
    }

    .search-modal__placeholder {
        text-align: center;
        padding: 60px 20px;
        color: #94a3b8;
    }

    .search-modal__placeholder svg {
        width: 64px;
        height: 64px;
        margin: 0 auto 16px;
        opacity: 0.4;
    }

    .search-modal__placeholder p {
        font-size: 1rem;
        margin-bottom: 8px;
        color: #64748b;
    }

    .search-modal__placeholder small {
        font-size: 0.85rem;
        color: #94a3b8;
    }

    /* نتیجه جستجو */
    .search-result-item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 12px 24px;
        text-decoration: none;
        color: inherit;
        transition: background 0.15s;
        border-bottom: 1px solid #f8fafc;
    }

    .search-result-item:hover {
        background: rgba(99, 102, 241, 0.05);
    }

    .search-result-item__image {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        object-fit: cover;
        background: #f1f5f9;
        flex-shrink: 0;
    }

    .search-result-item__image-placeholder {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #cbd5e1;
    }

    .search-result-item__content {
        flex: 1;
        min-width: 0;
    }

    .search-result-item__title {
        font-size: 0.95rem;
        font-weight: 600;
        color: #0f172a;
        margin-bottom: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .search-result-item__meta {
        font-size: 0.8rem;
        color: #64748b;
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .search-result-item__category {
        background: rgba(99, 102, 241, 0.08);
        color: #6366f1;
        padding: 2px 8px;
        border-radius: 9999px;
        font-size: 0.72rem;
    }

    .search-result-item__price {
        font-size: 0.9rem;
        font-weight: 700;
        color: #4f46e5;
        flex-shrink: 0;
    }

    .search-modal__loading {
        text-align: center;
        padding: 40px 20px;
        color: #64748b;
    }

    .search-modal__loading .spinner {
        width: 32px;
        height: 32px;
        border: 3px solid #e2e8f0;
        border-top-color: #6366f1;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin: 0 auto 12px;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    .search-modal__no-results {
        text-align: center;
        padding: 40px 20px;
        color: #64748b;
    }

    .search-modal__no-results svg {
        width: 56px;
        height: 56px;
        margin: 0 auto 12px;
        color: #cbd5e1;
    }

    .search-modal__footer {
        padding: 14px 24px;
        border-top: 1px solid #f1f5f9;
        background: #f8fafc;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .search-modal__shortcuts {
        display: flex;
        gap: 16px;
        font-size: 0.8rem;
        color: #64748b;
    }

    .search-modal__shortcuts kbd {
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        padding: 2px 8px;
        font-family: monospace;
        font-size: 0.75rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        margin-left: 4px;
    }

    .search-modal__all-products {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: #6366f1;
        font-size: 0.85rem;
        font-weight: 500;
        text-decoration: none;
        transition: color 0.2s;
    }

    .search-modal__all-products:hover {
        color: #4f46e5;
    }

    .search-modal__all-products svg {
        width: 14px;
        height: 14px;
    }

    @media (max-width: 576px) {
        .search-modal {
            padding: 20px 10px;
        }

        .search-modal__container {
            max-height: calc(100vh - 40px);
        }

        .search-modal__header {
            padding: 16px;
        }

        .search-modal__input {
            font-size: 0.95rem;
        }

        .search-modal__shortcuts {
            display: none;
        }
    }
    