﻿.box {
    padding: 1rem 1.25rem;
}


h1 {
    font-size: 32px;
    font-weight: 400;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.nav-tabs,
.nav-tabs button {
    border: 0 !important;
}

    .nav-tabs button,
    .nav-tabs span {
        font-size: 14px;
        font-weight: 400;
        margin-left: 1.2rem;
    }

    .nav-tabs a.nav-link:hover {
        color: rgba(15, 67, 135, 1) !important;
    }

    .nav-tabs a.nav-link.active {
        background-color: rgba(15, 67, 135, 1);
        color: #fff;
        border-radius: 4px;
    }

        .nav-tabs a.nav-link.active:hover {
            color: #fff !important;
        }

.divider {
    height: 2px;
    width: 100%;
    margin: 0.5rem 0;
    background-color: rgba(255, 210, 186, 1);
}


.card-title-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 2px solid rgba(255, 210, 186, 1);
    margin-bottom: 0.8rem;
}

    .card-title-box h6 {
        font-size: 22px;
        font-weight: 400;
    }

    .card-title-box a {
        font-size: 14px;
    }

        .card-title-box a img {
            transform: rotate(90deg);
        }

        .card-title-box a:hover img {
            filter: invert(77%) sepia(52%) saturate(6914%) hue-rotate(97deg) brightness(94%) contrast(98%);
        }

.swiper-slide.slider-card.allover {
    filter: grayscale(100%);
}

.allover-tag {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 4px 0 0 0;
    padding: 0.5rem 1rem;
    font-size: 14px;
    color: #fff;
    background-color: rgba(115, 115, 115, 1);
    z-index: 2;
}

.slider-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* ارتفاع کارت توی swiper پر میشه */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 0;
}

    .slider-card .img-link {
        border-radius: 8px 8px 0 0;
        box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.1);
    }


        .slider-card .img-link img {
            width: 100%;
            height: 200px; /* ارتفاع ثابت */
            object-fit: cover; /* عکس کراپ میشه تا توی باکس بخوابه */
            border-radius: 8px 8px 0 0;
        }

        .slider-card .img-link.image-wrapper {
            position: relative;
            width: 100%;
            padding-top: 100%; /* مربع */
            overflow: hidden;
        }

            .slider-card .img-link.image-wrapper img {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                object-fit: cover;
                visibility: hidden; /* به جای display:none */
            }

        .slider-card .img-link > div.placeholder {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, #eee, #ddd, #eee);
            background-size: 200% 100%;
            animation: shimmer 1.2s infinite;
            border-radius: 6px;
        }


    .slider-card .card-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .slider-card .card-name {
        display: -webkit-box;
        -webkit-line-clamp: 2; /* حداکثر ۲ خط */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 40px; /* برای یکسان شدن ارتفاع */
        font-size: 13px;
        margin: 1rem 0 0;
    }

    .slider-card .card-price-box {
        padding-top: 0.5rem;
        margin: 0 auto;
        width: 100%;
        text-align: center;
    }

        .slider-card .card-price-box p {
            font-size: 16px;
        }

            .slider-card .card-price-box p.discount {
                font-weight: 200;
                color: rgba(115, 115, 115, 1);
                text-decoration: line-through;
            }

            .slider-card .card-price-box p.price:after {
                content: ' تومان';
                font-size: 10px;
                display: inline-block;
                text-decoration: none !important;
            }

    .slider-card .btn-box {
        padding: 0.5rem 0;
        width: 60%;
    }

        .slider-card .btn-box a {
            display: flex;
            justify-content: center;
            background-color: rgba(234, 82, 1, 1);
            color: #fff;
            padding: 10px;
            border-radius: 4px;
            border: 0;
            font-size: 12px;
        }

            .slider-card .btn-box a:hover {
                background-color: rgb(255, 97, 12);
            }

            .slider-card .btn-box a:active {
                background-color: rgb(255, 130, 63);
            }

            .slider-card .btn-box a img {
                filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(88deg) brightness(106%) contrast(102%);
            }

        .slider-card .btn-box img {
            transform: rotate(90deg);
        }

.filter-box {
    display: flex;
    flex-direction: column;
    width: 100%;
}

    .filter-box h4 {
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(212, 212, 212, 1);
    }

.filter-item {
    border-radius: 4px;
    padding: 0rem 0.5rem;
    margin: 0;
}

    .filter-item > div.form-check {
        margin: 1rem 0 !important;
    }

.filter-divider {
    height: 1px;
    width: 100%;
    background-color: rgba(212, 212, 212, 1);
}

.range-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.filter-btn {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(234, 82, 1, 1);
    background-color: #fff;
    color: rgba(234, 82, 1, 1);
    border-radius: 4px;
}

    .filter-btn:hover {
        background-color: rgba(234, 82, 1, 1);
        color: #fff;
    }

    .filter-btn:active {
        background-color: rgb(204, 71, 0);
        color: #fff;
    }

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.more-text {
    max-height: 20em;
    overflow: hidden;
    line-height: 1.5em;
    position: relative;
    transition: max-height 0.5s ease;
    mask-image: linear-gradient(to bottom, black 60%, transparent); /* فید در پایین */
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent); /* برای Chrome و Safari */
}

    .more-text.expanded {
        max-height: 20000px;
        mask-image: none;
        -webkit-mask-image: none;
    }

#toggleBtn {
    margin-top: 0.5em;
}

@media(min-width:768px) {
    .card-box {
        padding: 1rem 2rem;
    }
}
