body {
    background-color: #ffffff;
}

.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.25s ease;
}

.user-menu-btn:hover {
    border-color: #2168ff;
    background: #f8fafc;
    color: #2168ff;
}

.user-menu-btn .chevron {
    transition: transform 0.25s ease;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 8px;
    display: none;
    z-index: 1000;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

.user-dropdown.open {
    display: block;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown a,
.user-dropdown .logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: right;
}

.user-dropdown a:hover,
.user-dropdown .logout-btn:hover {
    background: #f8fafc;
    color: #2168ff;
}

.user-dropdown svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
}

.dropdown-divider {
    border-top: 1px solid #f1f5f9;
    margin: 6px 0;
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #2168ff;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(33, 104, 255, 0.35);
}


.cart-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #2168ff;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(33, 104, 255, 0.35);
}

.icon-button {
    position: relative;
}

.messages-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    max-width: 380px;
    pointer-events: none;
}

@media (max-width: 600px) {
    .messages-container {
        left: 14px;
        right: 14px;
        bottom: 16px;
        max-width: none;
    }
}

.message {
    pointer-events: auto;
    padding: 9px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
    animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.msg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.msg-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
}

.msg-text {
    flex: 1;
    line-height: 1.4;
}

.message-success {
    border-right: 3px solid #16a34a;
    color: #15803d;
    background: rgba(240, 253, 244, 0.98);
    border-color: #bbf7d0;
}

.message-error {
    border-right: 3px solid #ef4444;
    color: #b91c1c;
    background: rgba(254, 242, 242, 0.98);
    border-color: #fecdd3;
}

.message-info {
    border-right: 3px solid #2168ff;
    color: #1d4ed8;
    background: rgba(239, 246, 255, 0.98);
    border-color: #bfdbfe;
}

.message-warning {
    border-right: 3px solid #f59e0b;
    color: #b45309;
    background: rgba(255, 251, 235, 0.98);
    border-color: #fde68a;
}

.msg-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    padding: 0 2px;
    transition: opacity 0.2s;
}

.msg-close:hover {
    opacity: 1;
}


.breadcrumb {
    padding: 12px 24px;
    max-width: 1400px;
    margin: 125px auto 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.86rem;
}

@media (max-width: 768px) {
    .breadcrumb {
        margin-top: 75px;
        padding: 8px 16px;
    }
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #2168ff;
}

.breadcrumb .current {
    color: #0f172a;
    font-weight: 600;
}


.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
}

.status-badge.pending,
.status-badge.status-pending {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-badge.paid,
.status-badge.status-paid {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-badge.processing,
.status-badge.status-processing {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-badge.shipped,
.status-badge.status-shipped {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.status-badge.delivered,
.status-badge.status-delivered {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.status-badge.cancelled,
.status-badge.status-cancelled {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecdd3;
}


.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
    color: #0f172a;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2168ff;
    box-shadow: 0 0 0 3px rgba(33, 104, 255, 0.15);
    background: #ffffff;
}

.form-input::placeholder {
    color: #94a3b8;
}

.field-error {
    color: #ef4444;
    font-size: 0.82rem;
    margin-top: 4px;
}


.btn-primary {
    background: #2168ff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(33, 104, 255, 0.25);
}

.btn-primary:hover {
    background: #1455e6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 104, 255, 0.35);
}

.btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;

    align-items: center;
    transition: all 0.2s ease;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #2168ff;
}


.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.empty-state-icon svg {
    width: 40px;
    height: 40px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.empty-state h3 {
    font-size: 1.35rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
}


.digi-nav {
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    height: 46px;
    max-height: 46px;
    position: relative;
    z-index: 150;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s ease;
    overflow: visible;
    will-change: height, max-height, opacity, transform;
}

.digi-nav.nav-hidden {
    height: 0;
    max-height: 0;
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
    border-top-color: transparent;
    border-bottom-color: transparent;
    overflow: hidden;
}

.digi-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.digi-nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 100%;
}


.nav-cat-dropdown-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0 10px 0 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.nav-cat-btn:hover,
.nav-cat-dropdown-wrapper:hover .nav-cat-btn {
    color: #2168ff;
}

.nav-cat-btn svg.cat-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.nav-cat-btn svg.chevron-icon {
    width: 12px;
    height: 12px;
    transition: transform 0.25s ease;
}

.nav-cat-dropdown-wrapper:hover .chevron-icon {
    transform: rotate(180deg);
}


.nav-cat-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 270px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.nav-cat-dropdown-wrapper:hover .nav-cat-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.nav-cat-item:hover {
    background: #eff6ff;
    color: #2168ff;
    transform: translateX(-3px);
}

.cat-svg-icon {
    width: 18px;
    height: 18px;
    stroke: #64748b;
    stroke-width: 1.8;
    fill: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-cat-item:hover .cat-svg-icon {
    stroke: #2168ff;
    transform: scale(1.1);
}

.nav-vertical-divider {
    width: 1px;
    height: 18px;
    background: #e2e8f0;
    margin: 0 2px;
}


.digi-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.digi-nav-item svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

.digi-nav-item:hover {
    color: #2168ff;
}

.digi-nav-item.hot-deal {
    color: #e11d48;
    font-weight: 600;
}

.digi-nav-item.hot-deal:hover {
    color: #be123c;
}


.nav-guarantee-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-guarantee-badge svg {
    width: 15px;
    height: 15px;
    color: #10b981;
}

.nav-guarantee-badge:hover {
    border-color: #cbd5e1;
    color: #334155;
    background: #f1f5f9;
}

@media (max-width: 991px) {
    .digi-nav {
        display: none;
    }
}

/* =====================================================
   1. غیرفعال‌سازی سراسری تغییر سایز کادرهای متنی (Textarea)
===================================================== */
textarea,
textarea.form-control,
textarea.form-textarea,
textarea.input-field,
textarea.review-input-text,
textarea[name="address"],
textarea[name="message"],
textarea[name="comment"],
.form-group textarea,
.checkout-form-grid textarea {
    resize: none !important;
}

/* =====================================================
   2. فاصله استاندارد و یکدست تمامی صفحات از هدر سایت
===================================================== */
:root {
    --site-header-total-height: 124px;
    --site-header-page-gap: 24px;
}

.site-main-content {
    display: block;
    width: 100%;
    min-height: calc(100vh - 350px);
    padding-top: calc(124px + 24px) !important;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    .site-main-content {
        padding-top: calc(76px + 20px) !important;
    }
}

@media (max-width: 768px) {
    .site-main-content {
        padding-top: calc(64px + 16px) !important;
    }
}

/* یکنواخت‌سازی و حذف مارجین‌ها و پدینگ‌های بالای ناهمگون در صفحات */
.site-main-content .breadcrumb,
.site-main-content > .breadcrumb,
.site-main-content > .hero-slider,
.site-main-content > .about-page,
.site-main-content > .contact-page,
.site-main-content > .blog-page,
.site-main-content > .article-page,
.site-main-content > .product-page,
.site-main-content > .auth-page,
.site-main-content > .payment-page,
.site-main-content > .success-page,
.site-main-content > .search-header-section,
.site-main-content > .checkout-page,
.site-main-content > .cart-hero,
.site-main-content > .category-hero,
.site-main-content > .dashboard-page {
    margin-top: 0 !important;
}

.site-main-content > .about-page,
.site-main-content > .contact-page,
.site-main-content > .blog-page,
.site-main-content > .article-page,
.site-main-content > .auth-page,
.site-main-content > .payment-page,
.site-main-content > .success-page {
    padding-top: 0 !important;
}

/* تنظیم بریک‌کرامب جهت داشتن فاصله یکدست با هدر و با محتوای زیر خود */
.site-main-content .breadcrumb {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
}

/* کارت‌های احراز هویت، پرداخت و ثبت سفارش */
.site-main-content .auth-card {
    margin-top: 0 !important;
}
.site-main-content .payment-gateway-card,
.site-main-content .success-card {
    margin-top: 0 !important;
}


/* =====================================================
   3. ساختار و ترتیب هدر در موبایل:
      - ذره‌بین سرچ (سمت راست)
      - سبد خرید (وسط)
      - منوی همبرگری ۳ خط (سمت چپ - جایگزین آیکون اکانت)
===================================================== */
.mobile-hamburger-btn {
    display: none;
}

@media (max-width: 768px) {
    /* مخفی‌سازی آیکون اکانت کاربری و علاقه‌مندی در موبایل */
    .header-actions .user-menu-wrapper,
    .header-actions #userLoginBtn,
    .header-actions .icon-button {
        display: none !important;
    }

    /* ترتیب و چیدمان آیکون‌های هدر موبایل (در حالت RTL) */
    .header-actions {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    /* ۱. ذره‌بین سرچ در سمت راست */
    .header-actions .search-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        color: #1e293b !important;
        cursor: pointer !important;
        padding: 0 !important;
        order: 1 !important;
        transition: all 0.2s ease !important;
    }

    .header-actions .search-toggle:hover,
    .header-actions .search-toggle:active {
        background: #f1f5f9 !important;
        border-color: #cbd5e1 !important;
        color: #2168ff !important;
    }

    .header-actions .search-toggle svg {
        width: 20px !important;
        height: 20px !important;
        stroke-width: 2 !important;
        fill: none !important;
        stroke: currentColor !important;
    }

    /* ۲. سبد خرید در وسط */
    .header-actions .cart-button {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        color: #1e293b !important;
        position: relative !important;
        order: 2 !important;
        transition: all 0.2s ease !important;
    }

    .header-actions .cart-button:hover,
    .header-actions .cart-button:active {
        background: #f1f5f9 !important;
        border-color: #cbd5e1 !important;
        color: #2168ff !important;
    }

    .header-actions .cart-button svg {
        width: 20px !important;
        height: 20px !important;
        stroke: currentColor !important;
        stroke-width: 1.8 !important;
        fill: none !important;
    }

    /* ۳. منوی همبرگری ۳ خط در سمت چپ (جایگزین اکانت) */
    .mobile-hamburger-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        color: #1e293b !important;
        cursor: pointer !important;
        padding: 0 !important;
        order: 3 !important;
        transition: all 0.2s ease !important;
    }

    .mobile-hamburger-btn:hover,
    .mobile-hamburger-btn:active {
        background: #f1f5f9 !important;
        border-color: #cbd5e1 !important;
        color: #2168ff !important;
    }

    .mobile-hamburger-btn svg {
        width: 20px !important;
        height: 20px !important;
        stroke: currentColor !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
        fill: none !important;
        display: block !important;
    }
}



/* ==============================================================
   UNIFIED GLOBAL INPUT & FORM CONTROL DESIGN SYSTEM
   همسان‌سازی کامل تمامی اینپوت‌ها، تکست‌اریاها و انتخابگرها
   ============================================================== */

/* تمام انواع اینپوت‌های متنی، عددی، ایمیل، پسورد، سرچ و سلکت‌ها */
input[type="text"]:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not(.no-unify),
input[type="email"]:not(.no-unify),
input[type="password"]:not(.no-unify),
input[type="number"]:not(.no-unify),
input[type="tel"]:not(.no-unify),
input[type="search"]:not(.no-unify),
input[type="url"]:not(.no-unify),
input:not([type]):not(.no-unify),
textarea:not(.no-unify),
select:not(.no-unify),
.form-input,
.form-control,
.custom-select-trigger,
.price-input-mini {
    border-radius: 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ارتفاع و پدینگ یکدست برای اینپوت‌های تک‌خطی و دکمه‌های تریگر */
input[type="text"]:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not(.no-unify),
input[type="email"]:not(.no-unify),
input[type="password"]:not(.no-unify),
input[type="number"]:not(.no-unify),
input[type="tel"]:not(.no-unify),
input[type="search"]:not(.no-unify),
input[type="url"]:not(.no-unify),
input:not([type]):not(.no-unify),
select:not(.no-unify),
.custom-select-trigger {
    height: 46px !important;
    padding: 0 16px !important;
}

/* تکست‌اریاها: پدینگ یکدست و عدم امکان تغییر سایز (Resize: None) در تمام صفحات */
textarea,
textarea.form-input,
textarea.form-control {
    padding: 12px 16px !important;
    min-height: 105px !important;
    resize: none !important; /* غیرقابل ریسایز شدن */
}

/* حالت هاور برای تمامی اینپوت‌ها */
input[type="text"]:not([type="checkbox"]):not([type="radio"]):hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="tel"]:hover,
input[type="search"]:hover,
textarea:hover,
select:hover,
.form-input:hover,
.form-control:hover,
.custom-select-trigger:hover,
.price-input-mini:hover {
    border-color: #94a3b8 !important;
    background-color: #ffffff !important;
}

/* حالت فوکوس یکسان، شیک و درخشان */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus,
.form-input:focus,
.form-control:focus,
.custom-select-trigger:focus,
.custom-select-wrapper.open .custom-select-trigger,
.price-input-mini:focus {
    border-color: #2168ff !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3.5px rgba(33, 104, 255, 0.14) !important;
    outline: none !important;
}

/* استایل متن نگه‌دارنده (Placeholder) */
::placeholder,
::-webkit-input-placeholder,
:-ms-input-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
}

/* همسان‌سازی باکس جستجوی اصلی هدر */
.search-box {
    border-radius: 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    background-color: #f8fafc !important;
    height: 46px !important;
    transition: all 0.2s ease !important;
}

.search-box:focus-within {
    border-color: #2168ff !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3.5px rgba(33, 104, 255, 0.14) !important;
}

.search-box input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 100% !important;
    padding: 0 8px !important;
}

/* دکمه‌های کنترلی در کنار اینپوت‌ها */
.clear-filter-btn,
.filter-btn-submit {
    border-radius: 12px !important;
    height: 46px !important;
}

/* پنهان‌سازی منوی دراپ‌داون سنتی برای جایگزینی با مودال */
.custom-select-menu {
    display: none !important;
}


/* ==============================================================
   UNIVERSAL SELECT MODAL (مودال انتخابگر هوشمند)
   ============================================================== */

/* قفل اسکرول صفحه هنگام باز بودن مودال */
body.select-modal-open {
    overflow: hidden !important;
}

/* پرده پس‌زمینه مات و بلور */
.universal-select-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    padding: 16px;
    box-sizing: border-box;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.universal-select-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* کانتینر اصلی مودال */
.universal-select-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    max-height: 85vh;
    border-radius: 22px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.92) translateY(12px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease;
    box-sizing: border-box;
}

.universal-select-modal-backdrop.active .universal-select-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* دستگیره لمسی بالای مودال برای موبایل */
.select-modal-grab-handle {
    display: none;
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 10px;
    margin: 12px auto 4px auto;
    flex-shrink: 0;
}

/* هدر مودال */
.select-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.select-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-modal-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(33, 104, 255, 0.1);
    color: #2168ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.select-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.select-modal-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 3px;
    display: block;
}

/* دکمه بستن (✕) */
.select-modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.select-modal-close-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #ef4444;
    transform: rotate(90deg);
}

/* باکس جستجوی زنده داخل مودال */
.select-modal-search-wrap {
    position: relative;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.select-modal-search-wrap svg {
    color: #94a3b8;
    flex-shrink: 0;
}

.select-modal-search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    height: 38px !important;
    padding: 0 !important;
    font-size: 0.92rem !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

.select-modal-search-clear {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
}

.select-modal-search-clear:hover {
    background: #cbd5e1;
    color: #0f172a;
}

/* بدنه و لیست گزینه‌های مودال */
.select-modal-body {
    padding: 14px 18px;
    overflow-y: auto;
    max-height: 55vh;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.select-modal-body::-webkit-scrollbar {
    width: 6px;
}
.select-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* هر ردیف گزینه داخل مودال */
.select-modal-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.select-modal-option:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
    transform: translateX(-3px);
}

.select-modal-option-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.select-modal-option-icon {
    font-size: 1rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    flex-shrink: 0;
}

.select-modal-option-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.select-modal-active-badge {
    background: rgba(33, 104, 255, 0.12);
    color: #2168ff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* دایره رادیو و چک‌مارک تایید */
.select-modal-option-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.8px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.select-modal-option-check svg {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

/* استایل گزینه فعال و انتخاب شده */
.select-modal-option.selected {
    background: #eff6ff;
    border-color: #93c5fd;
}

.select-modal-option.selected .select-modal-option-text {
    color: #1d4ed8;
    font-weight: 800;
}

.select-modal-option.selected .select-modal-option-check {
    background: #2168ff;
    border-color: #2168ff;
}

.select-modal-option.selected .select-modal-option-check svg {
    opacity: 1;
    transform: scale(1);
}

/* وضعیت عدم یافتن نتیجه جستجو */
.select-modal-empty {
    text-align: center;
    padding: 35px 20px;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* فوتر مودال */
.select-modal-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.btn-select-modal-cancel {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-select-modal-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ==============================================================
   حالت باتم‌شیت در موبایل (Bottom Sheet on Mobile)
   ============================================================== */
@media (max-width: 640px) {
    .universal-select-modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .universal-select-modal-container {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        max-height: 85vh;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .universal-select-modal-backdrop.active .universal-select-modal-container {
        transform: translateY(0);
    }

    .select-modal-grab-handle {
        display: block;
    }

    .select-modal-header {
        padding: 14px 18px 12px;
    }

    .select-modal-body {
        padding: 12px 14px;
        max-height: 52vh;
    }

    .select-modal-option {
        padding: 12px 14px;
    }
}
