﻿* {
    box-sizing: border-box;
}

.product-card {
    max-width: 400px;
    min-width: -webkit-fill-available;
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: 0.3s all ease;
    border: 1px solid mediumturquoise;
    /*    max-height: 34rem;*/
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    margin-left: auto;
    margin-right: auto;
}

    .product-card:hover {
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
        transform: translateY(-4px);
        cursor: pointer;
        background-color: #d2e6ff;
    }

/*.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}*/

.product-image {
    width: 100%;
    /*aspect-ratio: 8/6;*/ /* نسبت عرض به ارتفاع */
    height:180px;
    object-fit: contain;
    background-color: #f5f5f5;
    padding: 1rem;
    flex-shrink: 0; /* تصویر جمع نشه */
}

.product-content {
    padding: 20px;
    padding-top:0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    color: #1e3a8a;
    margin-bottom: 8px;
    padding-top: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* تعداد خطوط */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* تعداد خطوط */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-pricing {
    display: flex;
    flex-direction:column;
    flex-wrap: wrap;
    align-items: start;
    gap: 12px;
    margin-bottom: auto;
    margin-top: auto;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
}

.old-price {
    text-decoration: line-through;
    color: #a0aec0;
    font-size: 16px;
}

.new-price {
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
}

.product-pricing, .product-description {
    flex-grow: 0;
}

.discount-badge {
    background-color: red;
    color: white;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 8px;
}

.add-to-cart {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    text-align: center;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 1rem;
}

    .add-to-cart:hover {
        background-color: #345578;
    }

@media (max-width: 480px) {
    .product-content {
        padding: 16px;
        padding-top: 0;
    }

    .product-name {
        font-size: 18px;
    }

    .product-description {
        font-size: 13px;
    }

    .new-price {
        font-size: 18px;
    }
}


/* بخش فیلتر و جستجو */
.filter-search-bar {
    display: flex;
    flex-direction:column;
    gap: 15px;
    align-items: center;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    margin-bottom: 25px;
    color: white;
}

.search-box input {
    width: 180px; /* کوچیک‌تر از قبل */
}

@media (max-width: 768px) {
    .filter-search-bar {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

        .search-box input {
            flex: 1;
            width: 100%;
        }
}


    /* لیبل مرتب‌سازی */
    .filter-search-bar label {
        font-weight: bold;
        font-size: 16px;
        margin-left: 8px;
    }

    /* منوی کشویی مرتب‌سازی */
    .filter-search-bar select {
        padding: 8px 12px;
        border-radius: 10px;
        border: none;
        outline: none;
        font-size: 15px;
        font-weight: 600;
        color: #073763;
        background: #e9f5ff;
        transition: all 0.3s ease;
        cursor: pointer;
    }

        .filter-search-bar select:hover {
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }

/* بخش جستجو */
.search-box {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .search-box input {
        padding: 10px 14px;
        border-radius: 10px;
        border: 2px solid #10253e6b;
        outline: none;
        font-size: 15px;
        background: #fff;
        transition: all 0.3s ease;
        width: 95%;
    }

        .search-box input:focus {
            border-color: #007bff;
            box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
        }

    /* دکمه جستجو */
    .search-box button {
        background: #0056b3;
        border: none;
        padding: 10px 18px;
        border-radius: 10px;
        font-weight: bold;
        color: white;
        transition: all 0.3s ease;
        cursor: pointer;
    }

        .search-box button:hover {
            background: #004099;
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }

.price-filter-container {
    background: #f8fbff;
    border: 1px solid #d0e7ff;
}

.price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    color: #0d6efd;
}

.custom-range {
    accent-color: #0d6efd; /* رنگ آبی برای اسلایدر */
}

option {
    background-color: #86def1;
}

.position-sticky-custom{
    position:static;
}


.mobilefilter {    
    transition: all 0.2s ease-in-out;
    z-index: 1002;
    pointer-events:none;
    opacity:0;
}

    .mobilefilter.show {
        pointer-events: auto;
        opacity: 1;
        height:fit-content !important;
    }

.dontshowproductsonfilter{
    display:none !important;
}

.dontshowcartonfilter {
    display: none !important;
}

.colorpicker {
    transition: all 0.1s ease-in-out;
}


/*-------------------------------------Product Card Responsiev------------------------------*/
.grid-wid-product {
    grid-template-columns: 1fr;
    display: grid;
    gap: 1.5rem;
    align-items: stretch; /* کارت‌ها هم‌ارتفاع می‌شن */
}

@media (min-width: 576px) {
    .grid-wid-product {
        grid-template-columns: repeat(2, 1fr);
    }

    .position-sticky-custom {
        position: sticky;
        top: 100px;
    }


    .product-card {
        margin-left: 0;
        margin-right: 0;
        max-width: 400px;
        min-width: fit-content;
    }

@media (min-width: 768px) {
    .grid-wid-product {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobilefilter {
        display: none !important;
    }

    .showfilterondesktop {
        display: flex !important;
    }

    .showfilterbuttononmobile {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .grid-wid-product {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .grid-wid-product {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .grid-wid-product {
        grid-template-columns: repeat(4, 1fr);
    }
}
/*-------------------------------------Product Card Responsiev------------------------------*/

