html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
}

/*.container, .row, .col, [class*="col-"] {*/
/*    max-width: 100%;*/
/*    overflow-x: visible;*/
/*}*/

img, video, iframe, table {
    max-width: 100%;
    height: auto;
}
.product {
    width: 100%;
    /*width: 250px;*/
    height: auto;
    /*height: 40vh;*/
    margin: auto;
    border-radius: 15px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 1s ease;
    /*padding: 10px;*/
    position: relative;
}

.product:hover {
    /*transform: scale(1.02);*/
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

/* تصویر محصول */
.product-img-container {
    position: relative;
    overflow: hidden;
}

.img-product {
    width: 100%;
    /*height: auto;*/
    height: 25vh;
    object-fit: contain;
    /*border-radius: 20px;*/
    transition: all 0.5s ease;
}
.img-hover{
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 25vh;
    object-fit: contain;
    border-radius: 1rem;
}
.product:hover .img-hover {
    opacity: 1;
    transform: scale(1.06);
    transition: opacity 2s ease, transform 2s ease;
}

.product:hover .img-product {
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 2s ease, transform 2s ease;
}




/* 🎯 آیکون سبد خرید */
.product-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #1E6F5C;
    border-radius: 10px;
    padding: 8px 12px;
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    border: none;
    outline: none;
    z-index: 300;
}

.product:hover .product-icon {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}




/* ✨ همیشه نمایش در موبایل */
@media (max-width: 768px) {
    .product-icon {
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
}

/* متن و قیمت */
.product h5 {
    margin-top: 4px;
    font-weight: 600;
    color: #333;
    font-size: clamp(15px, 1.4vw, 20px);

}

.price {
    color: #1e6f5c;
    font-weight: bold;
    font-size: clamp(10px, 1vw, 14px);

}

.old-price {
    color: #888;
    text-decoration: line-through;
    font-size: clamp(10px, 1vw, 14px);
}

/* کارت فیلتر */
.filter-card {
    background-color: #f8f9fa;
    border-radius: 1rem;
    border: 1px solid #1E6F5C;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.filter-card .form-label {
    color: #1E6F5C;
    font-size: 0.95rem;
}

.filter-card .form-select {
    border-radius: 0.5rem;
    border: 1px solid #1E6F5C;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    color: #333;
    width: 100%;
    background-color: #fff;
    transition: all 0.3s;
}

.filter-card .form-select:focus {
    border-color: #16513f;
    box-shadow: 0 0 0 0.2rem rgba(30, 111, 92, 0.25);
}

/* دکمه اعمال فیلتر */
.btn-apply {
    background-color: #1E6F5C;
    color: #fff;
    font-weight: bold;
    border-radius: 1rem;
    font-size: 1rem;
    transition: 0.3s;
}

.btn-apply:hover {
    background-color: #16513f;
    color: #fff;
}

/* آیکون داخل select */
.filter-card i {
    vertical-align: middle;
    color: #1E6F5C;
}
.product-filter{
    margin-top: 120px;
}
@media (max-width: 991px) {
    .product-filter {
        margin-top: 0;
    }
}
/* انیمیشن نرم برای باز و بسته شدن فیلتر موبایل */
@media (max-width: 991px) {
    #mobileFilter {
        transition: height 0.45s ease, opacity 0.3s ease;
    }

    #mobileFilter.collapsing {
        opacity: 0;
    }

    #mobileFilter.collapse.show {
        opacity: 1;
    }
}

.discount {
    position: absolute; /* روی کارت ثابت شود */
    top: 15px;
    left: 15px; /* یا right:10px; برای سمت راست */
    background-color: red;
    color: white;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 9999px; /* گرد */
    font-size: clamp(8px, 0.8vw, 10px); /* واکنش‌گرا */
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;

}
@media (max-width: 576px) {
    /*.product {*/
    /*    height: 30vh;*/
    /*}*/
    .img-product{
        height: 17vh;
    }
    .img-hover{
        height: 17vh;
    }
    .product-icon{
        padding: 5px 9px;
    }
}
.product p{
    margin-bottom: 8px;
}
.product h5{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}