﻿
/* ===== کانتینر اسلایدر ===== */
.slider-wrapper {
    max-width: 1400px;
    width: 100%;
    position: relative;
    padding: 0 40px;
}

/* استایل‌های Swiper */
.swiper {
    width: 100%;
    padding: 0.5rem 0.2rem;
    overflow: hidden;
}

.swiper-slide {
    height: auto;
    display: flex;
}

/* ===== کارت محصول ===== */
.product-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 32px 12px 32px 12px;
    box-shadow: 12px 12px 12px -10px rgba(0, 80, 80, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.2rem 1rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height:420px;
}
.out-of-stock{
    filter: grayscale(1);
}
.product-card:hover {
    /*transform: translateY(-8px);*/
    box-shadow: 12px 12px 12px -10px rgba(0, 120, 120, 0.35),
                0 0 0 2px rgba(38, 166, 154, 0.2) inset;
    background: rgba(255, 255, 255, 0.85);
}

/* ===== نشان‌های ویژه ===== */
.product-badge {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: linear-gradient(135deg, #26a69a, #00897b);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 500;
    padding: 0.2rem 0.7rem;
    border-radius: 30px 6px 30px 6px;
    box-shadow: 0 4px 12px rgba(0, 137, 123, 0.3);
    z-index: 3;
    letter-spacing: 0.3px;
}

.product-badge.sale {
    background: linear-gradient(135deg, #ef5350, #c62828);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}

.product-badge.new {
    background: linear-gradient(135deg, #42a5f5, #1565c0);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

/* ===== دکمه علاقه‌مندی در گوشه بالا سمت راست ===== */
.wishlist-btn {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    color: #00897b;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wishlist-btn:hover {
    background: #ef5350;
    color: #fff;
    transform: scale(1.12);
    box-shadow: 0 6px 16px rgba(239, 83, 80, 0.3);
}

.wishlist-btn.active {
    background: #ef5350;
    color: #fff;
}

/* ===== تصویر محصول ===== */
.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 20px 6px 20px 6px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: 0.3s;
    position: relative;
}
.PImage {
    width: auto;
    max-width: 80%;
}
.product-card:hover .product-image {
    box-shadow: 0 8px 24px rgba(0, 100, 100, 0.12);
}

.product-image i {
    font-size: 3.5rem;
    color: #00897b;
    opacity: 0.7;
    transition: 0.3s;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.05));
}

.product-card:hover .product-image i {
    transform: scale(1.08) rotate(-3deg);
    opacity: 0.9;
}

/* ===== محتوای کارت ===== */
.product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #004d40;
    margin-bottom: 0.2rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 0.6rem;
    color: #00897b;
    font-weight: 400;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.product-category i {
    font-size: 0.5rem;
    opacity: 0.6;
}

.product-brand {
    font-size: 0.7rem;
    color: #4a6a65;
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
    direction:ltr;
}

.product-rating .stars {
    color: #ffb300;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.product-rating .stars .empty {
    color: #c8d6d3;
}

.product-rating .count {
    font-size: 0.6rem;
    color: #80a8a3;
    font-weight: 300;
}

/* ===== قیمت و دکمه سبد خرید ===== */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(0, 137, 123, 0.08);
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    white-space: nowrap;
}

.product-price .old {
    font-size: 0.65rem;
    color: #b0b0b0;
    text-decoration: line-through;
    font-weight: 300;
    order: 1;
    /* قیمت خط‌خورده بالا */;
}

.product-price .current {
    font-size: 1rem;
    font-weight: 900;
    color: #00695c;
    letter-spacing: -0.3px;
    order: 2;
    /* قیمت اصلی پایین */;
}

.product-price .current .currency {
    font-size: 0.6rem;
    font-weight: 400;
    color: #00897b;
}

.cart-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #26a69a, #00897b);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 137, 123, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-btn.quantity-control {
    position: relative;
    width: 38px;
    min-width: 38px;
    border-radius: 20px;
    overflow: visible;
    transition: all 0.3s ease;
    margin-left:10px;
}

.cart-btn.quantity-control .quantity-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 100%;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

.cart-btn.quantity-control .quantity-action {
    position: absolute;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
    flex-shrink: 0;
    transform: translateY(-50%);
    background: #2e7d32;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.cart-btn.quantity-control .quantity-action:first-child{
    border-radius: 50% 0 0 50%;
}
.cart-btn.quantity-control .quantity-action:last-child{
    border-radius: 0 50% 50% 0;
}
.cart-btn.quantity-control .quantity-decrease {
    right: calc(100% - 9px);
}

.cart-btn.quantity-control .quantity-increase {
    left: calc(100% - 9px);
}

.cart-btn:hover {
    box-shadow: 0 8px 24px rgba(0, 137, 123, 0.35);
    background: linear-gradient(135deg, #2eccb0, #1a8b7a);
}

.cart-btn:active {
    transform: scale(0.95);
}

.cart-btn.added {
    background: #2e7d32;
}

/* ===== دکمه‌های ناوبری Swiper ===== */
.swiper-button-next,
.swiper-button-prev {
    color: #00897b;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 80, 80, 0.15);
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #00897b;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 137, 123, 0.3);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: 900;
}

.swiper-button-next {
    right: 0;
    left: auto;
}

.swiper-button-prev {
    left: 0;
    right: auto;
}

/* ===== رنگ‌های متنوع کارت‌ها ===== */
.product-card:nth-child(1) .product-image {
    background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
}
.product-card:nth-child(1) .product-image i {
    color: #2e7d32;
}
.product-card:nth-child(2) .product-image {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
}
.product-card:nth-child(2) .product-image i {
    color: #1565c0;
}
.product-card:nth-child(3) .product-image {
    background: linear-gradient(145deg, #fce4ec, #f8bbd0);
}
.product-card:nth-child(3) .product-image i {
    color: #c62828;
}
.product-card:nth-child(4) .product-image {
    background: linear-gradient(145deg, #fff3e0, #ffe0b2);
}
.product-card:nth-child(4) .product-image i {
    color: #e65100;
}
.product-card:nth-child(5) .product-image {
    background: linear-gradient(145deg, #f3e5f5, #e1bee7);
}
.product-card:nth-child(5) .product-image i {
    color: #7b1fa2;
}
.product-card:nth-child(6) .product-image {
    background: linear-gradient(145deg, #fff8e1, #ffecb3);
}
.product-card:nth-child(6) .product-image i {
    color: #f57f17;
}
.product-card:nth-child(7) .product-image {
    background: linear-gradient(145deg, #e0f7fa, #b2ebf2);
}
.product-card:nth-child(7) .product-image i {
    color: #00838f;
}
.product-card:nth-child(8) .product-image {
    background: linear-gradient(145deg, #f1f8e9, #dcedc8);
}
.product-card:nth-child(8) .product-image i {
    color: #558b2f;
}
.product-card:nth-child(9) .product-image {
    background: linear-gradient(145deg, #fbe9e7, #ffccbc);
}
.product-card:nth-child(9) .product-image i {
    color: #bf360c;
}
.product-card:nth-child(10) .product-image {
    background: linear-gradient(145deg, #e8eaf6, #c5cae9);
}
.product-card:nth-child(10) .product-image i {
    color: #283593;
}
.product-card:nth-child(11) .product-image {
    background: linear-gradient(145deg, #fce4ec, #f8bbd0);
}
.product-card:nth-child(11) .product-image i {
    color: #ad1457;
}
.product-card:nth-child(12) .product-image {
    background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
}
.product-card:nth-child(12) .product-image i {
    color: #2e7d32;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 1200px) {
    .slider-wrapper {
        padding: 0 35px;
    }
}

@media (max-width: 768px) {
    .slider-wrapper {
        padding: 0 30px;
    }
    .swiper-button-next,
    .swiper-button-prev {
        width: 36px;
        height: 36px;
    }
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 0.9rem;
    }
    .product-image i {
        font-size: 2.8rem;
    }
    .product-title {
        font-size: 0.85rem;
    }
    .wishlist-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        top: 0.6rem;
        right: 0.6rem;
    }
}

@media (max-width: 576px) {
    .slider-wrapper {
        padding: 0 20px;
    }
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
        display: none;
    }
    .product-card {
        padding: 0.8rem;
    }
    .product-image i {
        font-size: 2.2rem;
    }
    .product-title {
        font-size: 0.8rem;
    }
    .product-brand {
        font-size: 0.65rem;
    }
    .cart-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .cart-btn.quantity-control {
        width: 32px;
        min-width: 32px;
    }
    .cart-btn.quantity-control .quantity-action {
        width: 22px;
        height: 22px;
        font-size: 0.6rem;
    }
    .wishlist-btn {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    .product-price .current {
        font-size: 0.85rem;
    }
    .product-price .old {
        font-size: 0.6rem;
    }
}

@media (max-width: 400px) {
    .slider-wrapper {
        padding: 0 10px;
    }
}
