﻿/* =====================================================
   Horizontal Scroller (قدیمی – فقط اگر جای دیگر استفاده شود)
===================================================== */

.horizontal-scroller {
    display: flex;
    overflow-x: auto;
    gap: 1.25rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

    .horizontal-scroller::-webkit-scrollbar {
        height: 8px;
    }

    .horizontal-scroller::-webkit-scrollbar-thumb {
        background: #adb5bd;
        border-radius: 4px;
    }

    .horizontal-scroller::-webkit-scrollbar-track {
        background: #f1f1f1;
    }


/* =====================================================
   Coin Card – موبایل کوچک
===================================================== */

@media (max-width: 576px) {
    .coin-card {
        width: 180px !important;
        flex: 0 0 180px !important;
    }

    .coin-image-container {
        height: 140px !important;
    }
}


/* =====================================================
   Category Grid
===================================================== */

.category-section {
    margin-bottom: 3rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    justify-items: center;
    padding: 0 1rem;
}

.category-tile {
    text-align: center;
    transition: transform 0.2s ease;
}

    .category-tile:hover {
        transform: scale(1.05);
    }

    .category-tile img {
        width: 110px;
        height: 110px;
        object-fit: cover;
        border-radius: 50%;
        border: 2px solid #e0e0e0;
        box-shadow: 0 3px 10px rgba(0,0,0,0.08);
        margin-bottom: 0.8rem;
    }

    .category-tile h5 {
        font-size: 0.95rem;
        margin: 0;
        color: #444;
        font-weight: 600;
    }

/* تبلت و موبایل */
@media (max-width: 991px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .category-tile img {
        width: 100px;
        height: 100px;
    }

    .category-tile h5 {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .category-grid {
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .category-tile img {
        width: 90px;
        height: 90px;
    }

    .category-tile h5 {
        font-size: 0.85rem;
    }
}


/* =====================================================
   Coin Horizontal Slider — DESKTOP
===================================================== */

.coin-horizontal-wrapper {
    display: flex;
    gap: 16px;
    overflow-x: hidden; /* دسکتاپ بدون اسکرول */
    scroll-behavior: smooth;
}

.coin-scroll-item {
    flex: 0 0 290px;
}


/* دکمه‌های اسلایدر (فقط دسکتاپ) */
.coin-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    z-index: 10;
    cursor: pointer;
}

    .coin-scroll-btn.left {
        left: -20px;
    }

    .coin-scroll-btn.right {
        right: -20px;
    }

    .coin-scroll-btn i {
        font-size: 18px;
    }


/* =====================================================
   Mobile — vertical list (بدون اسکرول افقی)
===================================================== */

@media (max-width: 991.98px) {

    /* تبدیل کامل به لیست عمودی */
    .coin-horizontal-wrapper {
        display: block;
        overflow: visible;
    }

    .coin-scroll-item {
        width: 100%;
        margin-bottom: 16px;
    }

    /* حذف دکمه‌ها */
    .coin-scroll-btn {
        display: none !important;
    }
}


/* =====================================================
   Coin Horizontal Slider — با فضای کافی برای hover
===================================================== 
.coin-horizontal-wrapper {
    display: flex;
    gap: 16px;
    overflow-x: hidden;  دسکتاپ بدون اسکرول 
    scroll-behavior: smooth;
     مهم: فضای کافی از بالا برای حرکت کارت هنگام hover 
    padding-top: 12px;  یا 16px — بسته به میزان بالا رفتن کارت 
    margin-top: -12px;  جبران padding-top برای اینکه فاصله کلی تغییر نکند 
}

 اگر کارت‌ها هنگام hover این تغییرات رو دارن (مثال رایج) 
.coin-scroll-item:hover {
    transform: translateY(-2px);  یا هر مقداری که الان داری 
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);  سایه پررنگ‌تر 
     یا هر استایل hover دیگری که داری 
}


 برای اطمینان بیشتر، می‌تونی به خود کارت هم کمی margin بدهی 
.coin-scroll-item {
    flex: 0 0 290px;
    transition: all 0.25s ease;  نرم‌تر شدن حرکت 
     فضای خالی داخل کارت برای جلوگیری از بریده شدن محتوا 
    margin-top: 8px;
    margin-bottom: 8px;
}
*/

/* =====================================================
   Coin Horizontal Slider — با فضای کافی برای hover (فقط دسکتاپ)
===================================================== */
@media (min-width: 992px) { /* فقط از lg به بالا (دسکتاپ/تبلت بزرگ) */
    .coin-horizontal-wrapper {
        display: flex;
        gap: 16px;
        overflow-x: hidden;
        scroll-behavior: smooth;
        /* فضای کافی برای hover فقط در دسکتاپ */
        padding-top: 12px; /* یا 10px–14px — بسته به مقدار translateY کارت */
        margin-top: -12px; /* جبران فاصله */
    }

    .coin-scroll-item:hover {
        transform: translateY(-6px); /* ← مقدار ملایم‌تر پیشنهاد می‌کنم */
        box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    }

    .coin-scroll-item {
        flex: 0 0 290px;
        transition: all 0.25s ease;
        /* حاشیه داخلی برای کارت‌ها */
        margin-top: 8px;
        margin-bottom: 8px;
    }

    /* دکمه‌های اسکرول فقط در دسکتاپ */
    .coin-scroll-btn {
        display: block !important;
    }
}

/* =====================================================
   Mobile — لیست کاملاً عمودی بدون فضای اضافی
===================================================== */
@media (max-width: 991.98px) {
    .coin-horizontal-wrapper {
        display: block !important; /* لیست عمودی */
        overflow-x: visible !important;
        overflow-y: visible;
        /* حذف کامل فضای اضافی hover در موبایل */
        padding-top: 0 !important;
        margin-top: 0 !important;
        padding-bottom: 1rem; /* فقط برای اسکرول‌بار احتمالی */
    }

    .coin-scroll-item {
        width: 100% !important;
        flex: none !important;
        margin-bottom: 16px; /* فاصله بین کارت‌ها در حالت عمودی */
        margin-top: 0 !important; /* حذف حاشیه بالا */
    }

    /* دکمه‌های اسکرول در موبایل مخفی شوند */
    .coin-scroll-btn {
        display: none !important;
    }
}




