/* ۱. تعریف فونت برندها (مثل اپل و گوگل) */
@font-face {
    font-family: 'Font Awesome 6 Brands';
    src: url('../fontawesome/webfonts/fa-brands-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

/* ۲. تعریف فونت آیکون‌های توپر (Solid) */
@font-face {
    font-family: 'Font Awesome 6 Free';
    src: url('../fontawesome/webfonts/fa-solid-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
}

/* ۳. تعریف فونت آیکون‌های معمولی (Regular) - اگر فایلش را داری */
@font-face {
    font-family: 'Font Awesome 6 Free';
    src: url('../fontawesome/webfonts/fa-regular-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

/* ۴. اجبار مرورگر: کلاس fa را هم به Solid وصل می‌کنیم */
.fa, .fas, .fa-solid {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900; /* برای اینکه آیکون‌های Solid درست نمایش داده شوند */
}

.fab, .fa-brands {
    font-family: 'Font Awesome 6 Brands' !important;
}

@font-face {
    font-family: 'IRANSansWeb_FaNum';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/eot/IRANSansWeb_FaNum.eot');
    src: url('../fonts/eot/IRANSansWeb_FaNum.eot?#iefix') format('embedded-opentype'),
    url('../fonts/woff2/IRANSansWeb_FaNum.woff2') format('woff2'),
    url('../fonts/woff/IRANSansWeb_FaNum.woff') format('woff'),
    url('../fonts/ttf/IRANSansWeb_FaNum.ttf') format('truetype');
}

@font-face {
    font-family: 'IRANSansWeb_FaNum';
    font-style: normal;
    font-weight: 900; /* وزن بولد */
    font-display: swap;
    src: url('../fonts/woff2/IRANSansWeb_FaNum_Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'IRANSansWeb_FaNum_Bold';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/eot/IRANSansWeb_FaNum_Bold.eot');
    src: url('../fonts/eot/IRANSansWeb_FaNum_Bold.eot?#iefix') format('embedded-opentype'),
    url('../fonts/woff2/IRANSansWeb_FaNum_Bold.woff2') format('woff2'),
    url('../fonts/woff/IRANSansWeb_FaNum_Bold.woff') format('woff'),
    url('../fonts/ttf/IRANSansWeb_FaNum_Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'IRANSansWeb_FaNum_Bold';
    font-style: normal;
    font-weight: 900; /* وزن بولد */
    font-display: swap;
    src: url('../fonts/woff2/IRANSansWeb_FaNum_Bold.woff2') format('woff2');
}

/* ۲. تنظیمات عمومی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: black;
    font-family: IRANSansWeb_FaNum !important;
}

body {
    direction: rtl;
    font-family: 'IRANSansWeb_FaNum', sans-serif !important;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}

.container-fluid {
    width: 100%;
    padding: 0 30px; /* مطابق با HorizontalPadding قالب اصلی */
}

/* ۳. استایل هدر (بخش بالا) */
.main-header {
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000; /* اطمینان از اینکه هدر روی همه المان‌ها قرار می‌گیرد */
    background-color: #fff; /* حتماً رنگ پس‌زمینه داشته باشد تا محتوای زیرین دیده نشود */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* یک سایه ملایم برای جدا شدن از محتوا هنگام اسکرول */
}

.nav-wrapper {
    display: flex;
    align-items: center;
    height: 60px; /* ارتفاع دقیق در اسکرین‌های کوچک */
    gap: 20px;
}

/* در دسکتاپ (لپتاپ به بالا) ارتفاع بیشتر می‌شود */
@media (min-width: 1024px) {
    .nav-wrapper {
        padding-top: 10px;
    }
}

/* ۴. جستجو (بخش وسط) */
.nav-search {
    flex-grow: 1;
}

.nav-right {
    margin-top: 10px;
}

.main-logo {
    color: black;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 45px 0 15px; /* فاصله از سمت راست برای آیکون */
    border: 1px solid rgb(194, 194, 194);
    appearance: none;
    line-height: 1;
    border-radius: 3px;
    background: rgb(255, 255, 255);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border 0.3s;
}

.search-box input:focus {
    border-color: #000;
    background: #fff;
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
}

/* ۵. منو و دکمه‌ها */
.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #000;
    font-size: 16px;
    font-weight: 500; /* وزن ضخیم مطابق نسخه اصلی */
    margin: 0 10px;
}

.auth-group {
    display: flex;
    gap: 10px;
}

.btn {
    height: 40px;
    padding: 0 20px;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
    border: 1px solid #000;
    transition: 0.2s;
    border-radius: 15px;
    height: 30px;
    padding-left: 25px;
    padding-right: 25px;
}

.btn-blue:hover {
    background-color: rgb(16, 35, 215);
    border-color: rgb(16, 35, 215);
    color: rgb(255, 255, 255);
    text-decoration: underline;
}

.btn-outline {
    background: #fff;
    color: #000;
}

.btn-dark {
    background: #000;
    color: #fff;
}

/* ۶. منوی پایین (Categories) - ریسپانسیو */
.header-bottom {
    border-bottom: 1px solid #e5e5e5;
    display: none; /* در موبایل مخفی */
}

@media (min-width: 1024px) {
    .header-bottom {
        display: block;
    }
}

.categories-list {
    list-style: none;
    display: flex;
    height: 44px;
    align-items: center;
    gap: 32px;
    position: relative; /* مهم برای تراز مگامنو */
}

.categories-list a {
    text-decoration: none;
    color: #000;
    font-size: 17px;
    font-weight: 500;
}

/* ۷. ریسپانسیو سازی برای موبایل */
@media (max-width: 1023px) {
    .desktop-menu, .auth-group {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
    }
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.categories-list li {
    display: flex;
    align-items: center;
    height: 100%; /* برای اینکه هاور در تمام ارتفاع کار کند */
}

/* اصلاح موقعیت مگامنو */
.mega-menu {
    position: absolute;
    top: 44px; /* دقیقاً زیر ارتفاع categories-list */
    right: -30px; /* خنثی کردن پدینگ کانتینر برای چسبیدن به لبه */
    width: 100vw;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 40px 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(0);
    pointer-events: none; /* جلوگیری از تداخل وقتی منو بسته است */
}

/* نمایش منو هنگام هاور */
.has-dropdown:hover .mega-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* برای اینکه مگامنو محتوایش را در مرکز نگه دارد */
.mega-menu-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    padding: 0;
}

/* ستون‌های منو */
.mega-column {
    display: flex;
    flex-direction: column;
}

.column-title {
    font-size: 14px;
    font-weight: 900; /* مطابق با وزن بولد ایران‌سنس */
    color: #666; /* رنگ mono60 در کد اصلی */
    margin-bottom: 15px;
}

.divider {
    height: 1px;
    background: #e5e5e5;
    margin-bottom: 15px;
    width: 100%;
}

a {
    text-decoration: none;
}

.mega-column a {
    text-decoration: none;
    color: #000;
    font-size: 15px;
    font-weight: 400;
    padding: 8px 0;
    transition: color 0.2s;
}

/* استایل اختصاصی ستون تصویر */
.featured-column {
    border-right: 1px solid #f5f5f5; /* ایجاد یک مرز ظریف برای جدا کردن تصویر */
    padding-right: 20px;
}

.featured-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0 !important; /* حذف فاصله پایین برای کارت */
}

.featured-card img {
    width: 100%;
    height: 300px; /* ارتفاع عکس شاخص */
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover img {
    transform: scale(1.05);
}

.featured-overlay {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
}

.featured-title {
    font-weight: 600;
    color: #000;
    font-size: 14px;
}

.featured-link {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    text-decoration: underline !important;
}

.mega-column a:hover {
    color: rgb(16, 35, 215); /* هماهنگ با رنگ آبی دکمه شما */
}

/* اصلاح برای نمایش درست در تمام عرض */
@media (min-width: 1024px) {
    .header-bottom .container-fluid {
        position: static; /* اجازه می‌دهد مگامنو تمام عرض شود */
    }
}

/* مخفی کردن دکمه بازگشت در منوی اصلی */
.back-menu-btn {
    visibility: hidden;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%; /* شروع از خارج صفحه */
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.menu-title {
    font-weight: 500;
    font-size: 17px;
}

.mobile-menu-content {
    position: relative;
    flex-grow: 1;
    overflow-x: hidden;
}

.menu-level {
    list-style: none;
    padding: 20px;
    transition: transform 0.4s ease;
    width: 100%;
}

.menu-level li {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
}

.menu-level li a {
    text-decoration: none;
    color: #000;
    width: 100%;
}

/* استایل زیرمنوها */
.submenu {
    position: absolute;
    top: 0;
    right: -100%;
}

/* حالت‌های انیمیشن اسلاید */
.main-level-out {
    transform: translateX(100%);
}

/* خروج منو اصلی به راست */
.submenu-active {
    right: 0 !important;
}

/* ورود زیرمنو */

.close-menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* متن سمت چپ، تصویر سمت راست */
    align-items: center;
    gap: 40px;
    min-height: 500px;
}

.hero-content h1, .hero-content h2 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #403b3b;
}

.hero-image {
    position: relative;
    height: 500px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-caption {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}


/* استایل خطوط پیشرفت (Pagination) */
.swiper-pagination {
    position: relative !important;
    margin-top: 30px;
    text-align: right !important;
    padding-right: 30px;
}

.swiper-pagination-bullet {
    width: 40px !important;
    height: 3px !important;
    border-radius: 0 !important;
    background: #e5e5e5 !important;
    opacity: 1 !important;
    transition: 0.3s;
}

.swiper-pagination-bullet-active {
    background: #000 !important; /* خط تیره برای اسلاید فعال */
}

/* ریسپانسیو موبایل */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        height: 300px;
        order: -1;
    }

    /* تصویر بالای متن قرار بگیرد */
    .custom-arrow {
        display: none;
    }

    /* حذف فلش‌ها در موبایل طبق گفته شما */
    .hero-content h1 {
        font-size: 28px;
    }
}

.slider-controls-container {
    margin-top: 20px;
}

.controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* چیدمان در یک سطر */
    gap: 20px;
}

/* استایل خطوط دراز */
.custom-pagination {
    position: relative !important;
    display: flex !important;
    gap: 8px;
    width: auto !important; /* اجازه می‌دهد خطوط کنار هم باشند */
}

.custom-pagination .swiper-pagination-bullet {
    width: 60px !important; /* خطوط دراز */
    height: 2px !important;
    border-radius: 0 !important;
    background: #e5e5e5 !important;
    opacity: 1 !important;
    margin: 0 !important;
    cursor: pointer;
}

.custom-pagination .swiper-pagination-bullet-active {
    background: #000 !important; /* خط فعال تیره */
}

/* دکمه‌های فلش‌دار کنار خطوط */
.navigation-arrows {
    display: flex;
    gap: 10px;
}

.arrow-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* دایره‌ای */
    border: 1px solid #e5e5e5;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #000;
}

/* افکت دایره و سایه هنگام کلیک یا هاور */
.arrow-btn:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.arrow-btn:active {
    color: rgb(16, 35, 215); /* آبی شدن فلش هنگام کلیک */
    border-color: rgb(16, 35, 215);
}

.arrow-btn i {
    font-size: 14px;
}

.sub-slider {
    font-size: 26px;
    line-height: 32px;
    letter-spacing: -0.01em;
    color: rgb(112, 112, 112);
}

.titel-slider {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -0.01em;
    font-weight: 900;
    margin-bottom: 20px;
    color: #2e2c2c;
}

.btn-slider {
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    font-weight: normal;
    text-align: center;
    border: 1px solid rgb(0, 0, 0);
    text-decoration: none;
    transition: color 0.25s, border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
    height: 50px;
    border-radius: 25px;
    padding-left: 25px;
    padding-right: 25px;
    background-color: transparent;
    color: rgb(0, 0, 0);
    width: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}

/* مخفی کردن در موبایل (در صورت نیاز) */
@media (max-width: 768px) {
    .navigation-arrows {
        display: none;
    }

    .custom-pagination .swiper-pagination-bullet {
        width: 30px !important;
    }
}

.controls-spacer {
    flex-grow: 1; /* این باعث می‌شود فضای خالی بین خطوط و دکمه‌ها ایجاد شود */
}

@media screen and (min-width: 768px) {
    .hero-grid {
        display: grid;
        /* تعریف ۱۲ ستون مساوی مشابه سیستم گرید Artsy */
        grid-template-columns: repeat(12, 1fr);
        align-items: center;
        gap: 20px;
        padding: 0 !important;
        background-color: rgb(247, 247, 247);
    }

    .hero-content {
        /* حالا این دستور به درستی کار می‌کند */
        grid-column: 2 / span 5; /* یا همان محدوده ای که مد نظرت هست */
        z-index: 2;
    }

    .hero-image {
        grid-column: 7 / span 6; /* تصویر بقیه ستون‌ها را بگیرد */
    }
}

.featured-articles {
    padding: 60px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 30px;
    color: #000;
}

/* گرید ۴ ستونه */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.article-card a {
    text-decoration: none;
    display: block;
}

/* حفظ نسبت تصویر ۳ به ۲ */
.article-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    margin-bottom: 12px;
    background-color: #f8f8f8;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.article-card:hover img {
    opacity: 0.8;
}

.article-category {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: #000;
    margin-bottom: 5px;
}

.article-title {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    line-height: 1.4;
}

/* ریسپانسیو موبایل و تبلت */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr); /* در تبلت ۲ ستونه */
    }
}

@media (max-width: 600px) {
    .articles-grid {
        grid-template-columns: 1fr; /* در موبایل ۱ ستونه */
    }
}

/* حل مشکل چسبیدن به لبه‌ها */
.art-shelf-container {
    padding-right: 40px !important;
    padding-left: 40px !important;
}

.art-shelf-section {
    padding: 60px 0;
    background: #fff;
}

.shelf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.shelf-main-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.shelf-sub-title {
    font-size: 15px;
    color: #666;
    margin: 5px 0 0 0;
}

.view-all-link {
    font-weight: bold;
    text-decoration: underline;
    color: #000;
}

/* اسلایدر با ابعاد واقعی تصاویر */
.art-card {
    width: auto !important; /* اجازه بده هر عکس بر اساس عرض خودش جا بگیرد */
    display: flex;
    flex-direction: column;
}

.art-image-container {
    height: 300px;
    display: flex;
    align-items: flex-end;
}

.art-image-container img {
    width: auto;
    object-fit: contain;
}

/* متادایتا و لایک */
.art-metadata {
    padding-top: 12px;
}

.artist-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.artist-name {
    font-weight: bold;
    font-size: 15px;
}


.like-btn.active svg {
    fill: #f70808;
    color: red;
}

/* لایک مشکی توپر طبق استایل آرتسی */


/* لایه‌ی متن */
.art-bio {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
    z-index: 1;
}

.art-bio, .art-buttons-row {
    transition: transform 0.3s ease;
}

.art-buttons-row {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    gap: 6px;
    background: #fff; /* برای پوشاندن متن زیرین */
}

.art-card:hover .art-bio {
    transform: translateY(-110%);
}

.art-card:hover .art-buttons-row {
    transform: translateY(0);
}

.btn-tag {
    border: 1px solid #e5e5e5;
    background: #fff;
    padding: 2px 10px;
    font-family: 'IRANSansWeb_FaNum', sans-serif !important;
    font-size: 15px;
    cursor: pointer;
    height: fit-content;
}

.art-title-italic {
    font-style: italic;
    color: #666;
    margin: 0;
    font-size: 14px;
}

.gallery-name {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.art-price {
    font-weight: bold;
    display: block !important;
    font-size: 15px;
    margin-top: 4px;
}

/* دکمه‌های ناوبری دایره‌ای */
.shelf-nav-prev, .shelf-nav-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    position: absolute;
    top: 150px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.shelf-nav-prev {
    right: 10px;
}

.shelf-nav-next {
    left: 10px;
}

/* نوار اسکرول (Scrollbar) */
.custom-scrollbar-wrapper {
    margin-top: 40px;
    padding: 0 40px;
}

.swiper-scrollbar {
    height: 2px !important;
    background: #eee !important;
    position: relative !important;
}

.swiper-scrollbar-drag {
    background: #000 !important;
    cursor: grab;
}

.editorial-section {
    padding: 40px 0;
}

.editorial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* دو ستون اصلی */
    gap: 30px;
}

/* مقاله بزرگ */
.article-featured .article-img-wrapper {
    aspect-ratio: 815 / 720;
    overflow: hidden;
    background: #f4f4f4;
}

/* گرید سمت چپ (۴ مقاله کوچک) */
.article-sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* دو ستون در دل ستون چپ */
    gap: 20px;
    align-content: start;
}

.article-item .article-img-wrapper {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f4f4;
    margin-bottom: 10px;
}

/* استایل عکس‌ها */
.article-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.article-link:hover img {
    opacity: 0.7;
}

/* متن‌ها */
.article-link {
    text-decoration: none !important;
    color: inherit;
}

.article-category {
    font-weight: bold;
    font-size: 13px;
    display: block;
    margin-top: 10px;
    color: #000;
}

.article-title-large {
    font-size: 28px;
    margin: 10px 0;
    line-height: 1.2;
    font-weight: 500;
}

.article-title {
    font-size: 16px;
    margin: 8px 0;
    line-height: 1.4;
    font-weight: 500;
}

.article-author {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.article-date {
    font-size: 12px;
    color: #999;
}

/* واکنش‌گرا برای موبایل */
@media (max-width: 992px) {
    .editorial-grid {
        grid-template-columns: 1fr;
    }

    /* همه زیر هم */
    .article-sub-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .article-sub-grid {
        grid-template-columns: 1fr;
    }

    .article-title-large {
        font-size: 22px;
    }
}

/* ثابت کردن ابعاد برای بخش جدید */
.uniform-layout .art-card {
    width: 280px !important; /* عرض ثابت برای هر کارت */
}

.uniform-layout .art-image-container.fixed-ratio {
    height: 350px; /* ارتفاع ثابت */
    width: 100%;
    overflow: hidden;
    display: block; /* تغییر از flex به block برای کنترل بهتر */
    background: #f8f8f8; /* رنگ پس‌زمینه برای عکس‌هایی که هنوز لود نشدند */
}

.uniform-layout .art-image-container.fixed-ratio img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* مهم: عکس کل باکس را پر می‌کند و دفرمه نمی‌شود */
}

/* در موبایل عرض کارت‌ها کمی کمتر شود */
@media (max-width: 768px) {
    .uniform-layout .art-card {
        width: 220px !important;
    }

    .uniform-layout .art-image-container.fixed-ratio {
        height: 280px;
    }
}

.fairs-section {
    padding: 60px 0;
    border-top: 1px solid #e5e5e5;
}

.fairs-grid {
    display: grid;
    /* ۴ ستون در دسکتاپ بزرگ */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.fair-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fair-image-wrapper {
    width: 100%;
    aspect-ratio: 600 / 450; /* نسبت ابعاد دقیق طبق کد شما */
    overflow: hidden;
    background-color: #f4f4f4;
    margin-bottom: 12px;
}

.fair-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.fair-link:hover img {
    opacity: 0.7;
}

.fair-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 4px 0;
    color: #000;
}

.fair-date {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* واکنش‌گرا (Responsive) */
@media (max-width: 1100px) {
    .fairs-grid {
        grid-template-columns: repeat(3, 1fr); /* ۳ ستونه در تبلت */
    }
}

@media (max-width: 768px) {
    .fairs-grid {
        grid-template-columns: repeat(2, 1fr); /* ۲ ستونه در موبایل افقی */
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .fairs-grid {
        grid-template-columns: 1fr; /* تک ستونه در موبایل */
    }
}

/* استایل اختصاصی کارت گالری */
.gallery-card {
    width: 300px !important; /* اندازه ثابت برای تصاویر هم‌اندازه */
    display: flex;
    flex-direction: column;
}

.gallery-info-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    min-height: 50px; /* برای تراز ماندن تصاویر در صورت کوتاه/بلند بودن متن */
}

.gallery-name-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 4px 0;
    color: #000;
}

.gallery-location {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* دکمه بیضی فالو */
.follow-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 6px 20px;
    border-radius: 25px; /* ایجاد حالت بیضی */
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'IRANSansWeb_FaNum', sans-serif;
}

.follow-btn:hover {
    background: #333;
}

/*badge عدد جلوی تیتر */
.count-badge {
    color: #1023e8; /* رنگ آبی برند آرتسی */
    font-size: 14px;
    vertical-align: super;
    margin-right: 5px;
}

.gallery-image-container {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f4f4;
}

.gallery-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* استایل اختصاصی کارت هنرمند */
.artist-card {
    width: 300px !important; /* طبق کد آرتسی */
    display: flex;
    flex-direction: column;
}

.artist-image-container {
    width: 100%;
    aspect-ratio: 4 / 3; /* حفظ تناسب مستطیلی */
    overflow: hidden;
    margin-bottom: 12px;
}

.artist-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* اطلاعات پایین تصویر */
.artist-info-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center; /* تراز عمودی با دکمه */
}

.artist-name {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 2px 0;
    color: #000;
}

.artist-bio {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* اگر می‌خواهی فاصله بین اسلایدها دقیقاً مثل کد اصلی باشد */
.artSwiper .swiper-slide {
    margin-right: 20px;
}

.cta-section {
    display: flex;
    align-items: stretch; /* برای اینکه هر دو ستون هم‌ارتفاع باشند */
    border-bottom: 1px solid #e5e5e5;
    flex-wrap: wrap;
    direction: ltr; /* برای قرار گرفتن عکس در سمت راست در ساختار فلکس */
    padding: 50px;
    border-radius: 18px;
}

.cta-content {
    flex: 1; /* یک واحد فضا (یک سوم) */
    background-color: rgb(247, 247, 247);
    display: flex;
    flex-direction: column;
    justify-content: center; /* وسط‌چین عمودی */
    align-items: center; /* وسط‌چین افقی */
    padding: 40px;
    text-align: center;
}

.cta-image-container {
    flex: 2; /* دو واحد فضا (دو سوم) */
    height: 350px;
}

.cta-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cta-text {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 30px;
    color: #000;
    /* برای اینکه متن در محفظه خودش خیلی پخش نشود */
    max-width: 300px;
}

.signup-btn {
    background-color: black;
    color: white;
    padding: 12px 40px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 50px; /* در اکثر نسخه‌های مدرن Artsy دکمه‌ها گرد هستند */
    transition: background-color 0.2s;
    font-family: 'IRANSansWeb_FaNum', sans-serif;
}

.signup-btn:hover {
    background-color: #333;
    font-family: 'IRANSansWeb_FaNum', sans-serif;
}

/* واکنش‌گرا برای موبایل */
@media (max-width: 768px) {
    .cta-section {
        flex-direction: column-reverse;
    }

    .cta-image-container {
        flex: none;
        width: 100%;
    }
}

/* استایل‌های فوتر */
footer {
    padding: 40px 20px;
    background-color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    text-align: center;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-column a {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-column a:hover {
    text-decoration: underline;
}

/* بخش کپی‌رایت و شبکه‌های اجتماعی */
.footer-bottom {
    border-top: 1px solid #eee;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    color: #666;
    font-size: 12px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons svg {
    width: 18px;
    height: 18px;
    fill: #666;
    transition: fill 0.2s;
}

.social-icons svg:hover {
    fill: #000;
}

.legal-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legal-links a {
    color: #666;
    text-decoration: none;
}

@media (max-width: 768px) {
    .cta-section {
        flex-direction: column-reverse;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

.social-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-icons a {
    color: #666; /* رنگ پیش‌فرض مشابه Artsy */
    font-size: 20px; /* اندازه آیکون‌ها */
    transition: color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.social-icons a:hover {
    color: #000; /* رنگ هنگام هاور */
    transform: translateY(-3px); /* یک افکت کوچک برای جذابیت بیشتر */
}

/* اگر تمایل دارید هر آیکون رنگ برند خودش را داشته باشد، می‌توانید این را اضافه کنید: */
/*
.social-icons a:hover .fa-instagram { color: #E1306C; }
.social-icons a:hover .fa-telegram { color: #0088cc; }
.social-icons a:hover .fa-whatsapp { color: #25D366; }
*/


/* تنظیمات کلی برای فونت فارسی (اگر فونت خاصی دارید اینجا جایگزین کنید) */
.modal-overlay {
    font-family: 'IRANSansWeb_FaNum', sans-serif !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px); /* بلور کردن پشت پاپ آپ */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.modal-container {
    background: white;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    position: relative;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px; /* انتقال به چپ برای RTL */
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #333;
}

.close-btn-left {
    position: absolute;
    top: 15px;
    left: 15px; /* انتقال به چپ برای RTL */
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #333;
}

.modal-logo {
    width: 120px;
    margin: 0 auto 25px;
}

.modal-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #000;
}

.auth-form input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid #e5e5e5;
    margin-bottom: 15px;
    box-sizing: border-box;
    text-align: right; /* راست‌چین کردن متن ورودی */
    font-size: 14px;
}

.continue-btn {
    width: 100%;
    height: 50px;
    background: black;
    color: white;
    border: none;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.continue-btn:hover {
    background: #333;
}

.divider {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 13px;
    margin: 20px 0;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
    margin: 0 10px;
}

.divider::before {
    margin-left: 10px;
}

.divider::after {
    margin-right: 10px;
}

.social-login {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-btn {
    flex: 1;
    height: 50px;
    border: 1px solid #e5e5e5;
    background: white;
    cursor: pointer;
    font-size: 22px;
    transition: all 0.2s;
}

.social-btn:hover {
    background: #f9f9f9;
    border-color: #000;
}

.modal-container.split-layout {
    max-width: 900px; /* عرض بیشتر برای دو ستون */
    display: flex;
    flex-direction: row-reverse; /* برای اینکه در RTL تصویر سمت چپ بماند */
    padding: 0; /* حذف پدینگ کانتینر برای چسبیدن عکس */
    overflow: hidden;
}

.modal-image-side {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: block;
}

@media (max-width: 768px) {
    .modal-image-side {
        display: none;
    }

    /* مخفی کردن عکس در موبایل */
    .modal-container.split-layout {
        max-width: 440px;
    }
}

.moving-image-wrapper {
    width: 100%;
    height: 100%;
}

.animated-bg {
    width: 150%; /* تصویر بزرگتر از کادر برای فراهم کردن فضای حرکت */
    height: 100%;
    object-fit: cover;
    animation: panImage 170s linear infinite alternate;
}

/* انیمیشن حرکت آرام از راست به چپ */
@keyframes panImage {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(20%); /* جابجایی آرام */
    }
}

.modal-form-side {
    flex: 1;
    padding: 40px;
    background: white;
}

.disclaimer {
    font-size: 11px;
    color: #666;
    margin-top: 30px;
    line-height: 1.8;
}

.disclaimer a {
    color: #000;
    text-decoration: underline;
}

.like-btn, .follow-btn {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.like-btn:active, .follow-btn:active {
    transform: scale(0.9); /* افکت کلیک شدن */
}

.back-page {
    font-size: 10px;
    color: #585555;
}

.ps-3 {
    padding-right: 12px;
}

.px-3 {
    padding-left: 12px;
    padding-right: 12px;
}

/* استایل کلی بخش سکشن */
.collection-intro-section {
    padding: 60px 0 40px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 40px;
    background-color: #fff;
}

.collection-back-section {
    padding: 15px 0 15px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 40px;
    background-color: #fff;
}

.collection-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* دو ستون مساوی */
    gap: 50px;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 25px;
}

@media screen and (min-width: 768px) {
    .collection-container {
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
        padding-right: 40px;
        padding-left: 40px;
    }
}

@media screen and (min-width: 768px) {
    .filters-container {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100% !important;
        padding-right: 40px !important;
        padding-left: 40px !important;
    }
}

/* ستون عنوان */
.main-title {
    font-size: 45px;
    font-weight: 500;
    margin: 0 0 20px 0;
    letter-spacing: -1px;
    color: #000;
}

/* مسیر راهنما */
.breadcrumb-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumb-list li a {
    color: #000;
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumb-list li a:hover {
    opacity: 0.6;
}

.breadcrumb-list .separator {
    margin: 0 12px;
    color: #bbb;
}

/* ستون توضیحات */
.description-column {
    display: flex;
    align-items: flex-end; /* تراز کردن متن با انتهای ستون مقابل */
    padding-bottom: 5px;
}

.text-wrapper p {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin: 0;
    text-align: justify;
}

.text-wrapper a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* بهینه سازی برای نمایشگرهای کوچک */
@media (max-width: 992px) {
    .collection-container {
        grid-template-columns: 1fr; /* ستون‌ها روی هم قرار می‌گیرند */
        gap: 30px;
    }

    .main-title {
        font-size: 36px;
    }

    .description-column {
        align-items: flex-start;
    }
}

/* کانتینر اصلی با قابلیت چسبندگی */
.filters-sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 0;
}

.filters-container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 20px;
}

/* استایل دسکتاپ */
.desktop-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-scroll-area {
    display: flex;
    position: relative;
    gap: 10px;
    /* overflow-x: auto; را حذف کن یا کامنت کن */
    align-items: center;
}

.filter-scroll-area::-webkit-scrollbar {
    display: none;
}

/* مخفی کردن اسکرول در کروم */

/* استایل دکمه‌های کپسولی (Pills) */
.pill-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #000;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    background: #e5e5e5;
    border-color: #000;
}

.all-filters-btn {
    background: #fff;
    border: 1px solid #000;
}

.chevron {
    width: 12px;
    height: 12px;
}

/* استایل دکمه مرتب‌سازی */
.sort-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

/* استایل موبایل */
.mobile-filters {
    display: none;
}

.mobile-full-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5; /* خاکستری خیلی ملایم */
    border: none;
    border-radius: 25px; /* دکمه کپسولی */
    padding: 8px 20px;
    width: 100%; /* تمام عرض برای دسترسی راحت‌تر انگشت */
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    transition: background 0.2s;
}

/* مدیریت نمایش در موبایل و دسکتاپ */
@media (max-width: 768px) {
    .desktop-filters {
        display: none;
    }

    .mobile-filters {
        display: flex;
        padding: 10px 15px;
        background: #fff;
        justify-content: center; /* دکمه در وسط باشد */
    }

    .filters-sticky-wrapper {
        padding: 0;
    }

    /* چسبیدن کامل به لبه‌ها در موبایل */
}

/* دراور اصلی */
.filter-drawer {
    position: fixed;
    top: 0;
    right: -450px; /* مخفی در سمت راست */
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 1001;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.filter-drawer.open {
    right: 0;
}

.filter-group.open .accordion-content {
    display: block;
}

.filter-group.open .chevron-icon {
    transform: rotate(180deg);
}

/* وقتی منو باز می‌شود */
.filter-drawer.active {
    right: 0;
}

.drawer-overlay.active {
    display: block;
}

/* لایه محو کننده */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* هدر دراور */
.drawer-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.drawer-title {
    font-size: 20px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
}

/* آکاردئون‌ها */
.drawer-content {
    overflow-y: auto;
    padding: 10px 20px;
}

.filter-group {
    border-bottom: 1px solid #eee;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.filter-group.active .accordion-content {
    max-height: 500px;
    padding-bottom: 20px;
}

.filter-group.active .chevron-icon {
    transform: rotate(180deg);
}

/* استایل چک‌باکس‌ها */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    cursor: pointer;
}

/* کلیات صفحه */
.artwork-page {
    display: flex;
    gap: 50px;
    padding: 50px;
    background: #fff;
    padding-top: 0 !important;
}

.artwork-viewer {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center; /* وسط‌چین کردن افقی */
    justify-content: flex-start;
}

/* این کد را در انتهای فایل CSS یا داخل Media Query موبایل بگذار */
@media (max-width: 768px) {
    /* ۱. ظرف اصلی را از ردیف به ستون تبدیل می‌کنیم */
    main, .main-container {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 15px; /* کمی فاصله از لبه‌های گوشی */
    }

    /* ۲. اصلاح بخش نمایش عکس */
    .artwork-viewer {
        flex: none !important; /* خاصیت flex: 2 وب را لغو می‌کند */
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        margin-bottom: 20px; /* فاصله با بخش توضیحات زیرین */
    }

    .artwork-viewer img {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block;
    }

    /* ۳. اصلاح سایدبار (بخش توضیحات که نمایش داده نمی‌شد) */
    .artwork-sidebar {
        width: 100% !important;
        display: block !important; /* مطمئن می‌شویم مخفی نیست */
        flex: none !important;
    }
}


#mainArt {
    width: 100%;
    height: auto;
    display: block;
}

.artwork-actions-wrapper {
    width: 100%;
    max-width: 600px;
    margin-top: 15px;
    text-align: center;
    display: ruby;
}

.artwork-action-bar {
    display: flex;
    justify-content: flex-start;
    gap: 25px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.util-btn-wrapper {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
    font-family: inherit;
    font-size: 14px;
    transition: color 0.2s;
}

.util-btn-wrapper:hover {
    color: #000;
}

.icon-box {
    width: 18px;
    height: 18px;
    position: relative;
}

.image-container {
    width: 100%;
    /* این دو مورد توسط جاوااسکریپت بازنویسی می‌شوند اما برای رزرو فضا اینجا هستند */
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background-color: #f9f9f9; !* برای جاهایی که عکس پر نمی‌کند *!*/
}

.artwork-sidebar {
    flex: 1;
    max-width: 400px;
}

/* استایل سایدبار و متن‌ها */
.artist-name {
    font-size: 24px;
    margin-bottom: 5px;
}

.artist-name a {
    color: #000;
    text-decoration: none;
}

.artwork-meta {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    font-weight: normal;
}

.info-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 20px 0;
}

.spec-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #666;
}

.link-btn {
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    color: #666;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
}

.price-tag {
    font-size: 26px;
    font-weight: bold;
    margin: 30px 0;
}

/* دکمه‌های خرید */
.action-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.primary-btn {
    cursor: pointer;
    position: relative;
    border: 1px solid rgb(0, 0, 0);
    height: 50px;
    border-radius: 25px;
    padding-left: 25px;
    padding-right: 25px;
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);

}

.primary-btn:hover {
    background-color: rgb(16, 35, 215);
    border-color: rgb(16, 35, 215);
    color: rgb(255, 255, 255);
    text-decoration: underline;
}

.secondary-btn {
    cursor: pointer;
    position: relative;
    border: 1px solid rgb(0, 0, 0);
    border-top-color: rgb(0, 0, 0);
    border-right-color: rgb(0, 0, 0);
    border-bottom-color: rgb(0, 0, 0);
    border-left-color: rgb(0, 0, 0);
    height: 50px;
    border-radius: 25px;
    padding-left: 25px;
    padding-right: 25px;
    background-color: transparent;
    color: rgb(0, 0, 0);
}

/* ظرف کلی آکاردئون */
.artsy-accordion {
    margin-top: 20px;
}

/* تنظیمات اختصاصی بخش ضمانت */
.guarantee-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 10px;
}

.guarantee-row {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #666;
}

.guarantee-icon {
    width: 20px;
    height: 20px;
    color: #000; /* آیکون‌ها در Artsy مشکی هستند */
}

.guarantee-text {
    font-size: 14px;
    color: #666;
}

.learn-more-guarantee {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    text-decoration: underline;
}

/* کمی فاصله بین آکاردئون‌ها */
.artsy-accordion + .artsy-accordion {
    border-top: 1px solid #e5e5e5;
}

/* دکمه هدر */
.accordion-header-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* بخش هدر سایدبار */
.partner-info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.partner-name {
    display: block;
    font-weight: bold;
    text-decoration: none;
    color: #000;
    font-size: 15px;
}

.partner-location {
    color: #666;
    font-size: 13px;
}

.contact-btn {
    cursor: pointer;
    position: relative;
    border: 1px solid rgb(0, 0, 0);
    border-top-color: rgb(0, 0, 0);
    border-right-color: rgb(0, 0, 0);
    border-bottom-color: rgb(0, 0, 0);
    border-left-color: rgb(0, 0, 0);
    height: 30px;
    border-radius: 15px;
    padding-left: 25px;
    padding-right: 25px;
    background-color: transparent;
    color: rgb(0, 0, 0);
}

.contact-btn:hover {
    background-color: rgb(16, 35, 215);
    border-color: rgb(16, 35, 215);
    color: rgb(255, 255, 255);
    text-decoration: underline;
}

/* مدال بیس */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* مخفی در حالت عادی */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 550px;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    color: black;
    font-weight: bold;
    font-size: 18px;
    left: 15px;
    width: 25px;
    height: 25px;
}

.modal-title {
    font-size: 18px;
    text-align: center;
    margin-bottom: 20px;
}

.separator {
    border: 0;
    border-top: 1px solid #e5e5e5;
    margin: 15px 0;
}

/* جزییات اثر در مدال */
.artwork-summary {
    display: flex;
    gap: 15px;
    align-items: center;
}

.artwork-summary img {
    width: 45px;
    height: 60px;
    object-fit: cover;
}

.artwork-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

/* چک‌باکس‌های سفارشی */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

/* فیلد سرچ لوکیشن */
.search-input-wrapper {
    position: relative;
    margin: 10px 0;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid #ccc;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    color: #666;
}

.location-hidden {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.location-visible {
    max-height: 100px;
}

/* متغیر پیام */
.textarea-wrapper {
    position: relative;
    margin-top: 20px;
}

.textarea-wrapper textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 1px solid #ccc;
    resize: none;
}

.textarea-wrapper label {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #fff;
    padding: 0 5px;
    font-size: 12px;
    color: #666;
}

.profile-share-note {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #666;
    margin: 20px 0;
    align-items: flex-start;
}

.profile-share-note svg {
    width: 25px;
    fill: #666;
}

.submit-btn {
    width: 100%;
    background: #000;
    color: #fff;
    padding: 15px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.header-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
}

.title-group {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.main-title {
    font-size: 16px;
    font-weight: bold;
    color: #000;
}

.estimate-link {
    font-size: 13px;
    color: #666;
    text-decoration: underline;
}

/* آیکون فلش */
.arrow-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

/* وقتی آکاردئون بسته است فلش بچرخد */
.accordion-header-btn[aria-expanded="false"] .arrow-icon {
    transform: rotate(180deg);
}

/* محتوا */
.accordion-content {
    overflow: hidden;
    max-height: 500px; /* حداکثر ارتفاع برای انیمیشن */
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.accordion-header-btn[aria-expanded="false"] + .accordion-content {
    max-height: 0;
    opacity: 0;
}

.content-inner {
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.tax-note {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

.tax-note a {
    color: #666;
    text-decoration: underline;
}

.secondary-btn:hover {
    background-color: rgb(16, 35, 215);
    border-color: rgb(16, 35, 215);
    color: rgb(255, 255, 255);
    text-decoration: underline;
}

/* مدال راریتی */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* پیش‌فرض مخفی */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    border-radius: 2px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.modal-title {
    font-size: 22px;
    margin-bottom: 25px;
    font-weight: bold;
}

.rarity-item dt {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.rarity-item dd {
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
    font-size: 14px;
}

.modal-footer-note {
    color: #666;
    font-size: 12px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
}

.confirm-btn {
    width: 100%;
    background: black;
    color: white;
    padding: 15px;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    font-weight: bold;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    border: none;
    background: none;
}

/* لایت‌باکس تمام صفحه */
.fullscreen-viewer {
    background: black;
    width: 100vw;
    height: 100vh;
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2100;
}

.lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#zoomableImg {
    transition: transform 0.25s ease;
    max-width: 90%;
    max-height: 85vh;
}

/* لودینگ انیمیشنی */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* کنترل‌های زوم */
.viewer-controls {
    position: absolute;
    bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 25px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.viewer-controls button {
    color: white;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.zoom-slider {
    width: 150px;
    cursor: pointer;
    accent-color: white;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.input-box {
    flex: 1;
    border: 1px solid #ccc;
    padding: 8px;
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.input-box input {
    border: none;
    outline: none;
    padding-top: 5px;
}

.show-more {
    background: none;
    border: none;
    text-decoration: underline;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    margin-top: 10px;
}

/* ایجاد موقعیت نسبی برای نگهدارنده */
.filter-item-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-pane {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-radius: 4px;
    display: none; /* در حالت عادی مخفی */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-pane.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content {
    max-height: 250px;
    overflow-y: auto;
    padding: 15px;
}

.dropdown-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.btn-clear, .btn-confirm {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.btn-clear {
    background: transparent;
    text-decoration: underline;
}

.btn-confirm {
    background: #000;
    color: #fff;
}

.btn-clear:disabled, .btn-confirm:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* چرخش چورون دکمه هنگام باز شدن */
.pill-btn.active .chevron {
    transform: rotate(180deg);
}

/* ۱. حذف فلش های کثیف */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* اصلاح نوار اسلایدر */
.range-slider-section {
    position: relative;
    padding: 35px 15px; /* فضای کافی برای Thumb ها */
}

.slider {
    height: 5px;
    position: relative;
    background: #ddd;
    border-radius: 5px;
}

.slider .progress {
    height: 100%;
    left: 0;
    right: 0;
    position: absolute;
    border-radius: 5px;
    background: #007bff;
    z-index: 1; /* زیر دایره‌ها */
}

.range-input {
    position: relative;
}

/* نکته مهم: دایره‌ها باید دقیقا روی نوار باشند */
.range-input input {
    position: absolute;
    width: 100%;
    height: 5px;
    top: -5px;
    left: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

/* استایل دایره‌های لغزنده */
/* استایل دایره‌ها - thumb */
input[type="range"]::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #007bff; /* توپر رنگی */
    border: 2px solid #fff; /* یک حاشیه سفید برای زیبایی */
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 3;
    position: relative;
}

input[type="range"]::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border: 2px solid #007bff;
    border-radius: 50%;
    background: #007bff;
    pointer-events: auto;
    -moz-appearance: none;
}


/* ۲. باکس‌های ورودی عدد مدرن */
.price-input-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
}

.custom-input-group {
    position: relative;
    flex: 1;
    height: 54px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.custom-input-group input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 15px 0 45px; /* فضا برای لیبل و واحد */
    font-size: 15px;
    font-family: inherit;
    text-align: right;
}

/* ۳. استایل لیبل (کمترین/بیشترین) - حالت شناور */
.custom-input-group label {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    font-size: 14px;
    pointer-events: none;
    transition: all 0.2s ease;
    background: #fff; /* برای اینکه وقتی روی بوردر میره، خط زیرش رو بپوشونه */
    padding: 0 4px;
}

/* واحد تومان */
.input-unit {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9e9e9e;
    font-size: 12px;
    pointer-events: none;
}

/* ۴. جادوی جابجایی لیبل هنگام فوکوس یا پر بودن */
.custom-input-group:focus-within {
    border-color: #007bff;
    border-width: 2px;
}

/* وقتی فوکوس میشه یا وقتی اینپوت خالی نیست، لیبل بره بالا */
.custom-input-group:focus-within label,
.custom-input-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
    color: #007bff;
    transform: translateY(-50%) scale(0.9);
}

.custom-input-group input:not(:placeholder-shown) + label {
    color: #757575; /* وقتی پره ولی فوکوس نیست رنگش خنثی بشه */
}

.custom-input-group:focus-within label {
    color: #007bff; /* وقتی فوکوسه رنگش اصلی بشه */
}

.price-separator {
    width: 10px;
    height: 1px;
    background: #e0e0e0;
}

/* کانتینر اصلی */
.artwork-grid-container {
    display: grid;
    /* ایجاد ۴ ستون مساوی که عرضشان از هم تاثیر نمی‌گیرد */
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    direction: rtl;
    padding: 20px;
    align-items: start; /* جلوگیری از کشیده شدن کارت‌ها */
}

.artwork-item .art-buttons-row {
    display: none;
    gap: 8px;
}

/* هر ستون */
.grid-column {
    display: flex;
    flex-direction: column;
    gap: 50px; /* فاصله عمودی دقیق بین محصولات هر ستون */
    width: 100%; /* اجبار به رعایت عرض ستون گرید */
}

/* کارت محصول */
.artwork-item {
    width: 100%;
    position: relative;
}


.artwork-item .artist-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 10px;
}

.image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden; /* مانع از بیرون زدن عکس موقع زوم می‌شود */
    background-color: #f3f3f3;
    cursor: zoom-in;
}

.zoom-img {
    cursor: pointer !important;
}

.image-wrapper img {
    width: 100%;
    display: block;
    height: auto;
    position: relative; /* تغییر از absolute به relative برای حل مشکل ابعاد */
}

.artist-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.artist-name {
    font-weight: bold;
    font-size: 16px;
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    padding: 0;
}


.btn-tag {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}

/* منطق هاور: غیب شدن بیو و ظاهر شدن دکمه‌ها */
.artwork-item:hover .art-bio {
    display: none;
}

.artwork-item:hover .art-buttons-row {
    display: flex;
}

@media (max-width: 768px) {
    /* ۱. کانتینر اصلی رو تبدیل به ستون‌بندی روزنامه‌ای می‌کنیم */
    .artwork-grid-container {
        display: block !important; /* گرید رو کلاً غیرفعال کن */
        column-count: 2 !important; /* فقط ۲ ستون واقعی */
        column-gap: 15px !important;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    /* ۲. دیوار ستون‌های دسکتاپ رو خراب کن */
    .grid-column {
        display: contents !important; /* این خط باعث می‌شه دیوهای ستون نادیده گرفته بشن */
    }

    /* ۳. حالا به خودِ محصول بگو چجوری رفتار کنه */
    .artwork-item {
        display: inline-block !important; /* برای اینکه توی ستون‌ها پخش بشه */
        width: 100% !important;
        margin-bottom: 20px !important; /* فاصله عمودی بین محصولات */
        break-inside: avoid !important; /* مانع از نصف شدن یک محصول بین دو ستون */
        position: relative;
    }

    /* ۴. فیکس کردن عکس‌ها برای جلوگیری از فضای خالی */
    .image-wrapper {
        width: 100% !important;
    }

    .image-wrapper img {
        display: block;
        width: 100% !important;
        height: auto !important;
    }
}


/* رفع مشکل فاصله خالی در موبایل - متد Masonry روزنامه‌ای */
@media (max-width: 768px) {
    .artwork-grid-container {
        display: block !important;
        column-count: 2 !important;
        column-gap: 15px !important;
        padding: 10px;
    }

    .grid-column {
        display: contents !important;
    }

    .artwork-item {
        display: inline-block !important;
        width: 100% !important;
        margin-bottom: 20px !important;
        break-inside: avoid !important;
    }
}

/* استایل منوی مرتب‌سازی */
.sort-wrapper {
    position: relative;
    display: inline-block;
}

.sort-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    z-index: 1000;
    width: 300px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 23px;
}

.sort-dropdown.show {
    display: block;
}

.sort-option {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: none;
    text-align: right;
    cursor: pointer;
    font-family: inherit;
}

.sort-option:hover {
    background: #f9f9f9;
}

.sort-option.active {
    color: #000;
    font-weight: bold;
}

/* استایل نمایش تمام‌صفحه (Immersive) */
.immersive-overlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.immersive-content img {
    max-height: 80vh;
    max-width: 90vw;
    object-fit: contain;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    padding: 20px;
}

.prev-btn {
    right: 20px;
}

/* راست‌چین */
.next-btn {
    left: 20px;
}

.close-immersive {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    border: none;
    background: none;
    cursor: pointer;
}

.immersive-view-btn {
    background: #fff;
    border: 1px solid #000;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-right: 20px;
}


.room-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.4); /* تیره کردن پشت برای تمرکز روی اتاق */
}

.room-wrapper {
    position: relative;
    width: 100%;
    height: 100vh; /* ارتفاع دقیقاً برابر با قد کل صفحه نمایش */
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.room-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* ۱. استایل دیوار (بخش بالایی) */
.wall-section {
    flex: 1; /* فضای باقی‌مانده بالای صندلی را می‌گیرد */
    background: #DFDBD8; /* رنگ دیوار گالری در ویدیو */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ۲. استایل کف و صندلی (بخش پایینی) */
.floor-section {
    height: 250px; /* ارتفاع ثابت برای بخش صندلی در دسکتاپ */
    position: relative;
    overflow: hidden;
}

.room-background {
    position: absolute;
    inset: 0;
    background-image: url('../images/room3d.jpeg');
    background-size: cover;
    background-position: center top;
    z-index: 1;
}

/* ۳. لایه نگهدارنده تابلو (باید کمی بالاتر از نیمکت باشد) */
.artwork-wall-wrapper {
    transform: scale(0.6);
    opacity: 0;
    transition: all 0.7s ease-out;
}

/* وقتی مدال فعال شد تابلو با افکت بزرگ میشه */
.room-modal.active .artwork-wall-wrapper {
    transform: scale(1);
    opacity: 1;
}

.artwork-on-wall {
    background: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
}

.artwork-on-wall img {
    display: block;
    width: 200px; /* اندازه تابلو */
    height: auto;
}

.room-measure {
    position: absolute;
    bottom: -35px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.measure-line {
    width: 100%;
    height: 1px;
    background: #000000; /* رنگ خاکستری ملایم آرتسی */
    position: relative;
}

/* خط‌های عمودی دو طرف خط‌کش */
.measure-line::before,
.measure-line::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 1px;
    height: 9px;
    background: #000000;
}

.measure-line::before {
    left: 0;
}

.measure-line::after {
    right: 0;
}

.measure-text {
    font-size: 11px;
    color: #000000;
    font-family: 'Arial', sans-serif;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

.room-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 10001;
    color: #6f6f6f;

}

.room-close-btn:hover {
    opacity: 0.5;
}

/* --- تنظیمات مخصوص موبایل --- */
/* --- تنظیمات مخصوص موبایل برای تمام‌صفحه شدن --- */
@media (max-width: 768px) {
    .floor-section {
        height: 30vh; /* در موبایل صندلی جای کمتری بگیرد تا دیوار بلندتر شود */
    }

    .room-background {
        background-position: center bottom;
    }

    .artwork-on-wall img {
        max-width: 160px; /* ابعاد تابلو در موبایل */
    }
}


/* حالت پیش‌فرض: مخفی */
.content-toggle-area .art-buttons-row {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* حالت هاور: نمایش قطعی */
.content-toggle-area:hover .art-buttons-row {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* دکمه‌ها میان سر جاشون */
}

/* عملیات جادویی هاور */
.content-toggle-area:hover .art-bio {
    opacity: 0;
    transform: translateY(-20px); /* متن میره بالا و غیب میشه */
}

/* مطمئن می‌شیم که دکمه لایک بالاتر از همه قرار داره */
.like-btn {
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* ۱. کانتینر اصلی: فقط این لایه مسئول تشخیص هاور است */
.content-toggle-area {
    position: relative;
    width: 100%;
    height: 50px; /* یک ارتفاع ثابت که باکس نپره */
    overflow: hidden;
    pointer-events: auto !important; /* حتما کلیک رو بگیره */
}

.content-toggle-area .art-buttons-row,
.content-toggle-area .art-bio,
.like-btn {
    pointer-events: auto; /* اما محتویات داخلش کلیک رو بگیرن */
}

/* مدال باید از همه چیز در کل سایت بالاتر باشه */
.modal-overlay {
    z-index: 999999 !important; /* یک عدد بزرگتر از لایک */
}

/* اگر کانتینر داخلی مدال هم اذیت می‌کنه */
.modal-container {
    z-index: 1000000 !important;
}

.share-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200000; /* بالاتر از همه چیز */
    justify-content: center;
    align-items: center;
}

.share-modal-content {
    background: #fff;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.share-close-btn {
    position: absolute;
    top: 15px;
    left: 15px; /* چون RTL هستیم */
    background: none;
    border: none;
    cursor: pointer;
}

.share-close-btn svg {
    width: 18px;
    fill: #666;
}

.share-title {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: right;
}

.share-input-wrapper {
    display: flex;
    gap: 0;
    border: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

#shareLink {
    flex-grow: 1;
    border: none;
    padding: 10px;
    font-size: 13px;
    color: #666;
    outline: none;
    direction: ltr;
}

.copy-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #333;
}

.share-separator {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #000;
    padding: 8px 0;
    transition: opacity 0.2s;
}

.share-item:hover {
    opacity: 0.7;
}

.share-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
}

.share-icon svg {
    width: 20px;
}

/* کانتینر اصلی بخش جزئیات */
.artwork-details-container {
    margin-top: 40px;
    /*border-top: 1px solid #eee;*/
    font-family: inherit;
}

.mt-0 {
    margin-top: 0 !important;
}

/* استایل تب‌ها */
.details-tabs {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 25px;
    padding-right: 15px;
}

.info-section {
    border: 1px #dbcfcf solid;
    padding: 15px;
}

.tab-btn {
    padding: 10px 0;
    margin-left: 30px;
    background: none;
    border: none;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    position: relative;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 100%;
    height: 2px;
    background: #000;
}

/* ردیف‌های اطلاعاتی (Materials, Size, etc.) */
.info-row, .exhibit-row {
    display: flex;
    margin: 15px 0;
    line-height: 1.6;
}

.info-row dt, .exhibit-row dt {
    width: 150px;
    color: #000;
    font-weight: 500;
    flex-shrink: 0;
}

.info-row dd, .exhibit-row dd {
    color: #666;
    margin: 0;
}

.detail-link {
    color: #666;
    text-decoration: underline;
}

/* کارت‌های هنرمند و گالری */
.artist-card-section, .partner-card-section {
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin-top: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.artist-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar.placeholder {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.name-box {
    display: flex;
    flex-direction: column;
}

.artist-name {
    font-weight: bold;
    text-decoration: none;
    color: #000;
    font-size: 15px;
}

.birth-year, .location {
    font-size: 13px;
    color: #666;
}

/* بخش نمایشگاه‌ها */
.exhibitions-section {
    padding: 15px;
    border: 1px #ebebeb solid;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
}

.gallery-name {
    color: #666;
}

.view-all-link {
    display: inline-block;
    margin-top: 10px;
    color: #000;
    text-decoration: underline;
    font-size: 14px;
}

.m-40 {
    margin: 40px;
}


.related-artists-section {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.related-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #000;
}

/* شبکه هنرمندان - ۳ ستونه در دسکتاپ، ۲ در تبلت، ۱ در موبایل */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 40px;
}

@media (max-width: 992px) {
    .artists-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .artists-grid {
        grid-template-columns: 1fr;
    }
}

.artist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.artist-link-group {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.artist-thumb {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
}

.artist-meta {
    display: flex;
    flex-direction: column;
}

.artist-name-link {
    font-size: 15px;
    font-weight: 500;
    color: #000;
    text-decoration: none;
    transition: color 0.2s;
}

.artist-name-link:hover {
    color: #666;
}

.artist-origin {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* دکمه فالو کوچک */
.follow-btn-small {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    padding: 6px 18px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.follow-btn-small:hover {
    background: #333;
}

/* بخش دکمه نمایش بیشتر */
.show-more-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.show-more-btn {
    background: #fff;
    color: #000;
    border: 1px solid #e5e5e5;
    padding: 10px 40px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: inherit;
}

.show-more-btn:hover {
    border-color: #000;
}

/* دقیقاً همان استایل فیکس خودت */
.image-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* اگر عکس‌ها مربعی هستند، این کمک می‌کند سایز ثابت بماند */
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* مانع کوچک شدن غیرعادی یا دفرمه شدن می‌شود */
    display: block;
}

/* استایل تصاویر کوچک بدون دخالت در باکس اصلی */
.thumbnails-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px; /* ایجاد فاصله از باکس عکس اصلی */
}

.thumb {
    width: 64px;
    height: 64px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    opacity: 0.6; /* عکس‌های غیرفعال کمی کمرنگ‌تر */
}

.thumb.active {
    border-color: #000;
    opacity: 1;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-adv-banner {
    width: 100%;
    margin: 30px auto;
    overflow: hidden;
    position: relative;
    background: #ededed;
    padding: 20px;
}

.adv-link {
    display: block;
    width: 100%;
    height: 250px; /* ارتفاع ثابت بنر */
    position: relative;
    text-decoration: none;
}

.adv-link img {
    width: 100%;
    height: 100%;
    object-fit: scale-down; /* گیف یا عکس رو فیکس می‌کنه بدون دفرمه شدن */
    transition: transform 0.5s ease;
}

/*!* افکت هاور جذاب *!*/
/*.adv-link:hover img {*/
/*    transform: scale(1.05); !* یکم زوم میشه وقتی موس میره روش *!*/
/*}*/

.adv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* یه لایه تیره خیلی کمرنگ */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.adv-overlay span {
    color: #fff;
    padding: 10px 25px;
    border: 1px solid #fff;
    border-radius: 30px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.adv-link:hover .adv-overlay {
    opacity: 1; /* موقع هاور دکمه ظاهر میشه */
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .adv-link {
        height: 150px;
    }

    .adv-overlay {
        display: none; /* توی موبایل چون هاور نداریم، مخفیش کردیم */
    }
}


.blog-section-wrapper {
    padding: 40px 0;
    border-bottom: 1px solid #eee; /* برای جدا کردن بخش‌های تکراری پایین صفحه */
}

.blog-grid-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start; /* حیاتی برای کارکرد sticky */
}

/* تنظیم عرض ستون‌ها */
.blog-main-content {
    flex: 2; /* دو سوم فضا */
}

.blog-sidebar {
    flex: 1; /* یک سوم فضا */
    position: sticky;
    top: 100px; /* فاصله از بالای صفحه بعد از اسکرول (هدر فیکس شما) */
}

/* استایل محتوای ستون اصلی */
.main-blog-post {
    margin-bottom: 50px;
}

.post-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-meta {
    font-size: 12px;
    color: #666;
    margin: 15px 0 10px;
}

.post-title {
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: bold;
}

/* استایل اخبار کوچک در سایدبار */
.sidebar-title {
    font-size: 18px;
    border-bottom: 1px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.news-mini-card {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.news-mini-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.mini-card-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.custom-bg-frame {
    width: 100%;
    max-width: 100%;
    /*aspect-ratio: 2 / 1;*/
    background-color: #f5f2ed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.custom-bg-frame a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.custom-bg-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto; /* برای جلوگیری از کشیده شدن */
    height: auto; /* برای جلوگیری از دفرمه شدن */
    object-fit: contain; /* نمایش تمام جزئیات تصویر بدون برش خوردن */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* سایه ملایم برای روی بک‌گراند کرمی */
}

/* هاور ملایم برای بنر */
.custom-bg-frame:hover img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* ریسپانسیو برای موبایل مطابق ویدیو */
@media (max-width: 992px) {
    .blog-grid-layout {
        flex-direction: column;
    }

    .blog-sidebar {
        position: static; /* در موبایل چسبنده نیست */
        width: 100%;
        margin-top: 40px;
    }
}


/* ظرف رزرو کننده فضا برای عکس */
.reveal-container {
    height: 360px; /* ارتفاع عکس در دسکتاپ */
    width: 100%;
    position: relative;
}

/* تصویر فیکس شده با رفع مشکل تاری */
.fixed-background {
    position: fixed;
    top: 104px; /* ارتفاع هدر شما */
    left: 0;
    width: 100%;
    height: 360px;
    z-index: -1; /* فرستادن به پشت محتوا */
    will-change: transform;
    transform: translateZ(0); /* رفع تاری */
}

.fixed-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* بخش اصلی که روی عکس می‌لغزد */
.rolling-content {
    position: relative;
    /*z-index: 10;*/
    background-color: #ffffff; /* بسیار مهم: باید کدر باشد تا تصویر زیر پوشانده شود */
    margin-top: 0; /* محتوا بلافاصله بعد از فضای رزرو شده عکس شروع می‌شود */
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1); /* سایه ملایم برای لبه پوشاننده */
}

/* اطلاعات حراجی قبل از فیلترها */
.auction-header-info {
    padding: 40px 20px;
    background: #fff;
}

/* فیکس شدن فیلترها زیر هدر */
.filters-sticky-wrapper {
    position: sticky;
    top: 104px;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #eee;
}

/* موبایل */
@media (max-width: 767px) {
    .reveal-container, .fixed-background {
        height: 320px;
    }

    .fixed-background, .filters-sticky-wrapper {
        top: 60px;
    }
}


.auction-description-row {
    padding: 20px 0;
    background-color: #fff;
}

.auction-description-row .row-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px; /* فاصله بین دو ستون */
}

/* ستون سمت راست (دو سوم) */
.col-main-text {
    flex: 2; /* اشغال دو سهم از فضا */
    min-width: 300px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    text-align: justify;
}

.secondary-text {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

/* ستون سمت چپ (یک سوم) */
.col-side-content {
    flex: 1; /* اشغال یک سهم از فضا */
    min-width: 250px;
    margin-right: 40px;
}

/* --- نسخه موبایل --- */
@media (max-width: 768px) {
    .col-side-content {
        margin-right: 0;
    }

    .auction-description-row .row-wrapper {
        flex-direction: column; /* ستون‌ها زیر هم می‌افتند */
        gap: 20px;
    }

    .col-main-text,
    .col-side-content {
        flex: none;
        width: 100%; /* در موبایل تمام عرض را می‌گیرند */
    }

    /* طبق خواسته شما: اول متن (راست) و بعد ستون بعدی (چپ) نمایش داده می‌شود */
    .col-main-text {
        order: 1;
    }

    .col-side-content {
        order: 2;
    }
}

.line-m3 {
    margin-top: 30px;
    margin-bottom: 30px;
}

.line-m4 {
    margin-top: 60px;
    margin-bottom: 60px;
}

.artsy-pagination-container {
    width: 100%;
    padding: 60px 0;
    border-top: 1px solid #eee;
    background-color: #fff;
    margin-top: 40px;
}

.pagination-wrapper {
    display: flex;
    justify-content: space-between; /* چیدمان دو طرفه */
    align-items: center;
    max-width: 1200px; /* یا هماهنگ با عرض گرید شما */
    margin: 0 auto;
    padding: 0 20px;
}

.pagination-arrow {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    transition: opacity 0.2s;
}

.pagination-arrow.disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-num {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    color: #666;
    border-radius: 50%;
    transition: all 0.2s;
}

.page-num:hover {
    background-color: #f4f4f4;
    color: #000;
}

.page-num.active {
    color: #000;
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.page-dots {
    color: #ccc;
    padding: 0 5px;
}

/* --- نسخه موبایل --- */
@media (max-width: 768px) {
    .pagination-numbers {
        /*display: none; !* در موبایل معمولاً اعداد حذف و فقط قبلی/بعدی می‌ماند *!*/
    }

    .pagination-wrapper {
        justify-content: space-around;
    }

    .drawer-content {
        overflow-x: auto;
        margin-left: 5%;
        padding-right: 5%;
    }

    .price-inputs{
        display: inline !important;

    }



}

.kaws-alert-section {
    padding: 20px 0;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
}

/* بخش متون بالا */
.main-alert-text {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
}

.info-tooltip-wrapper {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

/* استایل Tooltip هوشمند */
.tooltip-trigger {
    position: relative;
    cursor: pointer;
    color: #ccc;
    display: inline-flex;
}

.tooltip-content {
    position: absolute;
    bottom: 150%; /* نمایش در بالای آیکون */
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    background: #ffffff;
    color: #000000;
    padding: 15px;
    border-radius: 3px;
    font-size: 12px;
    text-align: right;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tooltip-trigger:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    bottom: 130%;
}

/* گرید ۵ ستونه اختصاصی */
.mini-grid-container {
    padding: 3% 12% 0 12%; /* ایجاد فاصله از چپ و راست */
}

.mini-grid-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* ۵ ستون برابر */
    gap: 20px;
}

/* تنظیم سایز کارت‌های مشابه برای هماهنگی */
.mini-grid-row .artwork-item {
    text-align: right;
    text-decoration: none;
    color: #000;
}

/* دکمه نمایش بیشتر */
.btn-show-more {
    margin-top: 40px;
    background: none;
    border: 1px solid #ccc;
    padding: 12px 40px;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s;
}

.btn-show-more:hover {
    border-color: #000;
    background: #f4f4f4;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 1024px) {
    .mini-grid-row {
        grid-template-columns: repeat(2, 1fr); /* در تبلت ۲ تا کنار هم */
    }

    .mini-grid-container {
        padding: 40px 5%;
    }
}

@media (max-width: 768px) {
    .mini-grid-row {
        grid-template-columns: 1fr; /* در موبایل یکی زیر دیگری */
    }

    .main-alert-text {
        font-size: 18px;
        padding: 0 20px;
    }
}

.alert-p {
    height: 40px !important;
    padding-left: 35px !important;
    padding-right: 35px !important;
    border-radius: 25px !important;
}


/* مدال استایل اختصاصی */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(230, 230, 230, 0.5);
    display: none; /* در ابتدا مخفی */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.modal-dialog {
    background: #fff;
    width: 95%;
    max-width: 500px;
    /* تعیین ارتفاع ثابت یا حداکثری */
    height: 80vh;
    display: flex; /* تبدیل به فلکس باکس */
    flex-direction: column; /* چیدمان عمودی */
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden; /* جلوگیری از اسکرول کل کادر */
}

.modal-header {
    flex-shrink: 0; /* هدر فشرده نشود و ثابت بماند */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    flex-grow: 1; /* تمام فضای خالی بین هدر و فوتر را بگیرد */
    overflow-y: auto; /* فقط اینجا اسکرول شود */
    padding: 20px;
}

.modal-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    display: block;
}

/* Pills */
.pills-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pill {
    padding: 6px 12px;
    border: 1px solid #000;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pill-disabled {
    background: #f4f4f4;
    border-color: #eee;
    color: #999;
}

/* Filter Button */
.modal-filter-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    padding: 15px 0;
    text-align: right;
    cursor: pointer;
}

.filter-text strong {
    display: block;
    font-size: 14px;
}

.filter-text span {
    font-size: 12px;
    color: #666;
}

.modal-textarea {
    width: 100%;
    height: 100px;
    border: 1px solid #ddd;
    padding: 12px;
    font-family: inherit;
    resize: none;
    margin-bottom: 20px;
}

.modal-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

/* Checkbox Style */
.notification-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.notif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-checkbox {
    position: relative;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 3px;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #000;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.modal-footer {
    flex-shrink: 0; /* فوتر فشرده نشود و پایین بماند */
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff; /* برای اینکه محتوای اسکرول شده زیرش دیده نشود */
}

.btn-submit-alert {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 15px;
    font-weight: bold;
    cursor: pointer;
}

/* شخصی‌سازی اسکرول‌بار داخل مدال */
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.modal-step {
    display: none;
    flex-direction: column;
    height: 100%;
}

.modal-step.active {
    display: flex;
}

/* دکمه بازگشت در مرحله دوم */
.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* گرید فیلترها (۲ ستونه طبق کد Artsy) */
.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 10px 0;
}

/* استایل چک‌باکس‌های فیلتر */
.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    width: 45%;
}

/* استایل بخش قیمت */
.price-inputs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.input-wrap {
    flex: 1;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    padding: 5px 10px;
}
.input-wrap input {
    border: none;
    width: 100%;
    outline: none;
    padding: 8px;
}

/* استایل انتخاب رنگ */
.color-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);
}
.color-pick {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    width: 45%;
}
.color-pick span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

/* استایل پایه کادر مدال */
.modal-dialog {
    background: #fff;
    width: 95%;
    max-width: 500px; /* عرض مرحله اول */
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* عرض بزرگتر برای مرحله فیلترها در دسکتاپ */
@media (min-width: 768px) {
    .modal-dialog.modal-large {
        max-width: 700px; /* عرض مرحله دوم (فیلترها) */
    }
}

/* مرحله دوم: گرید فیلترها را ۳ ستونه کنیم تا از فضای جدید بهتر استفاده شود */
@media (min-width: 768px) {
    .modal-large .filter-grid {
        grid-template-columns: repeat(2, 1fr); /* در دسکتاپ ۳ ستونه شود */
    }

    .modal-large .color-grid .color-pick {
        width: 30%; /* رنگ‌ها هم در ردیف‌های ۳ تایی */
    }
}

/* حذف هایلایت آبی پیش‌فرض در موبایل */
.mobile-menu-content ul li,
.mobile-menu-content ul li a,
.mobile-menu-content ul li span {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* اصلاح برای موبایل (زیر 768 پیکسل) */
@media (max-width: 767px) {
    .shelf-header {
        flex-direction: column; /* چیدمان زیر هم */
        align-items: flex-start; /* تراز شدن از راست در حالت RTL */
        gap: 15px; /* ایجاد فاصله بین متن و لینک */
    }

    .shelf-main-title {
        font-size: 20px; /* کمی کوچک‌تر برای موبایل */
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .shelf-sub-title {
        font-size: 14px;
        line-height: 1.6;
        color: #666;
        max-width: 100%; /* اجازه بده تمام عرض را بگیرد */
    }

    .view-all-link {
        font-size: 14px;
        font-weight: bold;
        text-decoration: underline;
        padding-top: 5px;
        /* در صورت تمایل می‌توانید دکمه را تمام‌عرض کنید: width: 100%; */
    }

    .artSwiper .swiper-slide {
        margin-left: 20px !important;
    }
}

/* اصلاح اصولی برای موبایل */
@media (max-width: 768px) {
    .art-shelf-section {
        /* پدینگ بالا و پایین رو به نصف یا کمتر کاهش بده */
        padding: 30px 0;
    }
}

/* اصلاح برای موبایل (تبلت و گوشی) */
@media (max-width: 992px) {
    .art-shelf-container {
        /* اینجا دوباره از important استفاده می‌کنیم تا زورمان به استایل قبلی برسد */
        padding-right: 20px !important;
        padding-left: 20px !important;
    }
}

@media (max-width: 480px) {
    .art-shelf-container {
        /* برای گوشی‌های کوچک حتی ۱۵ پیکسل هم کافیست */
        padding-right: 15px !important;
        padding-left: 15px !important;
    }
}

@media (max-width: 768px) {
    /* ۱. محدود کردن عرض تولتیپ */
    .tooltip-content {
        width: 200px; /* عرض کمتر در موبایل */
        left: auto;   /* غیرفعال کردن مرکزگرایی قبلی */
        right: 0;     /* چسباندن به سمت راست آیکون */
        transform: translateX(20%); /* تنظیم موقعیت برای اینکه از صفحه بیرون نزند */
    }

    /* ۲. جلوگیری از بیرون زدگی والد */
    .info-tooltip-wrapper {
        flex-wrap: wrap; /* اگر متن طولانی بود بشکند و عرض را زیاد نکند */
        justify-content: center;
        overflow: visible;
    }

    .kaws-alert-section {
        overflow: hidden; /* هر چیزی بیرون بزنه رو قیچی می‌کنه */
    }
}

