﻿/* ==============================================
   1. کارت محصولات
   ============================================== */
.product-card {
    border: 1px solid #d6d6d6;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.25s ease;
}

    .product-card:hover {
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        transform: translateY(-3px);
    }


    .product-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: contain;
    }


    .product-card img {
        width: 100%;
        aspect-ratio: 1 / 1;
        display: block;
    }



.product-card-body {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-right: 35px;
}

    .product-card-body h5 {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 6px;
    }

        .product-card-body h5::before {
            content: "";
            position: absolute;
            right: 20px;
            top: 10%;
            width: 6px;
            height: 80%;
            background-color: #E6511B;
            border-radius: 8px;
        }

    .product-card-body p {
        font-size: 0.8rem;
        color: #555;
        margin-bottom: 4px;
    }

.product-card-footer {
    padding: 10px 12px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.vertical-line {
    width: 8px;
    height: 34px;
    background: #fff;
    border-radius: 6px;
}

/* ==============================================
   2. گرید محصولات
   ============================================== */
.products-row {
    margin: 0;
}

    .products-row > div {
        padding: 4px;
    }

/* ==============================================
   3. فاصله بین فیلتر و محصولات کمتر
   ============================================== */
.row > .col-lg-3 {
    padding-right: 8px; /* فاصله کمتر سمت فیلتر */
}

.row > .col-lg-9 {
    padding-left: 8px; /* فاصله کمتر سمت محصولات */
}

/* ==============================================
   4. فیلتر – استایل پایه
   ============================================== */
.filter-sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 10;
}

/* ==============================================
   5. موبایل – فیلتر اسلایدی شفاف و بهتر
   ============================================== */
@media (max-width: 991px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100dvh;
        background: #085a72cc;
        backdrop-filter: blur(12px);
        box-shadow: -4px 0 25px rgba(0,0,0,0.4);
        color: #fff;
        transition: right 0.35s ease;
        z-index: 2000;
        overflow-y: auto;
    }

        .filter-sidebar.active {
            right: 0;
        }

    .filter-tab {
        position: fixed;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 40px;
        height: 100px;
        background: #085a72;
        border-radius: 12px 0 0 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1050;
        transition: right 0.35s ease;
    }

    .filter-sidebar.active + .filter-tab {
        right: 300px;
    }

    .filter-tab span {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font-size: 0.85rem;
        color: #fff;
        letter-spacing: 1px;
        white-space: nowrap;
    }
}

/* ==============================================
   6. دسکتاپ – فیلتر ثابت (Sticky)
   ============================================== */
@media (min-width: 992px) {
    .filter-sidebar {
        position: sticky;
        top: 90px;
        height: calc(100vh - 90px);
        overflow-y: auto;
        background: #fff;
        border: 1px solid #000000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border-radius: 12px;
        z-index: 1040;
    }

    .filter-tab,
    .overlay {
        display: none !important;
    }
}

/* ==============================================
   7. افکت های داخلی فیلتر (کاربر پسند)
   ============================================== */
.filter-sidebar .card {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.filter-sidebar .card-header {
    background: #f8f9fa;
    font-weight: 500;
    cursor: pointer;
}

.filter-sidebar .list-group-item {
    border: none;
    padding: 6px 12px;
}

    .filter-sidebar .list-group-item:hover {
        background: #e9f1f6;
    }


.btn-shokofablue {
    border: none;
    border-radius: 6px;
    transition: all 0.25s ease;
    color: white;
}

.btn-shokofablue {
    background: #085A72;
}

    .btn-shokofablue:hover {
        background: #eee !important;
        color: #085A72 !important;
    }

        .btn-shokofablue:hover i {
            color: #085A72 !important;
        }

.btn-shokofawhite {
    border: none;
    border-radius: 6px;
    transition: all 0.25s ease;
    color: #085A72;
}

.btn-shokofawhite {
    background: #ffffff;
}

    .btn-shokofawhite:hover {
        background: #085A72 !important;
        color: #ffffff !important;
    }

        .btn-shokofawhite:hover i {
            color: #085A72 !important;
        }


.card-header[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.card-header .bi-chevron-down {
    display: inline-block;
    transition: transform 0.3s ease;
}



/* استایل کلی سایدبار فیلتر */
.filter-sidebar {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* استایل لیست دسته‌بندی‌ها */
.list-group-item {
    border: none; /* حذف خطوط اضافی برای ظاهر مدرن‌تر */
    padding: 8px 12px;
    transition: background 0.2s;
}

    .list-group-item:hover {
        background-color: #f0f7ff !important;
    }

/* استایل چک‌باکس‌ها */
.form-check-input:checked {
    background-color: #E6511B; /* ست کردن با رنگ نارنجی که در کارت محصول داشتی */
    border-color: #E6511B;
}

/* آیکون فلش برای Collapse */
.card-header[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s;
}

.filter-sidebar {
    font-size: 0.9rem;
    scrollbar-width: thin;
    scrollbar-color: #085a72 #f1f1f1;
}

    .filter-sidebar .card {
        border: 1px solid #f0f0f0;
        border-radius: 12px;
        margin-bottom: 16px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.02);
        transition: all 0.3s ease;
        overflow: hidden;
    }

        .filter-sidebar .card:hover {
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            border-color: #e0e0e0;
        }

    .filter-sidebar .card-header {
        background-color: #ffffff;
        padding: 12px 15px;
        border-bottom: 1px solid #f8f9fa;
        transition: background 0.2s;
    }

        .filter-sidebar .card-header:hover {
            background-color: #fcfcfc;
        }

        .filter-sidebar .card-header label {
            font-weight: 600;
            color: #333;
            letter-spacing: -0.2px;
        }

        .filter-sidebar .card-header i {
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            color: #085a72;
        }

        .filter-sidebar .card-header[aria-expanded="true"] i {
            transform: rotate(180deg);
        }

    .filter-sidebar .list-group-item {
        border: none;
        padding: 8px 15px;
        margin: 2px 8px;
        border-radius: 8px;
        transition: all 0.2s ease;
        background: transparent;
    }

        .filter-sidebar .list-group-item:hover {
            background: #f0f7f9 !important;
            color: #085a72;
        }

    .filter-sidebar .form-check-input {
        width: 1.1em;
        height: 1.1em;
        margin-top: 0.25em;
        cursor: pointer;
        border: 1.5px solid #cbd5e0;
    }

        .filter-sidebar .form-check-input:checked {
            background-color: #E6511B;
            border-color: #E6511B;
        }

    .filter-sidebar .card-body input[type="number"] {
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        padding: 8px;
        font-size: 0.85rem;
        transition: border-color 0.2s;
    }

        .filter-sidebar .card-body input[type="number"]:focus {
            border-color: #085a72;
            box-shadow: 0 0 0 3px rgba(8, 90, 114, 0.1);
        }

    .filter-sidebar .btn-light {
        background: #085a72;
        color: #fff;
        border: none;
        padding: 12px;
        font-weight: 600;
        border-radius: 10px;
        margin-top: 10px;
        transition: all 0.3s;
    }

        .filter-sidebar .btn-light:hover {
            background: #064558;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(8, 90, 114, 0.2);
        }

    .filter-sidebar .card-footer {
        border-top: 1px dashed #eee;
        padding: 10px;
    }

    .filter-sidebar .btn-outline-secondary {
        font-size: 0.75rem;
        border-radius: 6px;
        border-color: #e2e8f0;
        color: #718096;
    }

        .filter-sidebar .btn-outline-secondary:hover {
            background-color: #f7fafc;
            color: #2d3748;
            border-color: #cbd5e0;
        }
