/* ======= گالری تصاویر ======= */
.main-image {
    width: 100%;
    border-radius: 12px;
    transition: 0.3s;
}
.thumb-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
}
.thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: 0.3s;
}
.thumb:hover, .thumb.active-thumb {
    border-color: #1E6F5C;
    /*transform: scale(1.05);*/
}

/* ======= باکس خرید ======= */
.buy-box {
    border: 2px solid #1E6F5C;

    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    transition: 0.3s;
}
.buy-box:hover { box-shadow: 0 0 25px rgba(0,0,0,0.08); }

.price {
    font-size: 24px;
    color: #1E6F5C;
    text-align: center;
    margin-bottom: 15px;
}

.btn-buy {
    background: #1E6F5C;
    color: #fff;
    border-radius: 12px;
    font-size: 17px;
    width: 100%;
    transition: 0.3s;
}
.btn-buy:hover {
    background: #1E6F5C;
    color: #fff;
}

/* ======= گزینه‌های رنگ و سایز ======= */
.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.option-group.color-options .option-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(30,111,92,0.6);
    cursor: pointer;
    transition: all 0.3s;
}
.option-group.color-options .option-item:hover {
    border-color: #1E6F5C;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.option-group.color-options .option-item.active {
    /*background: #1E6F5C;*/
    color: #fff;
    border-color: #1E6F5C;
    transform: scale(1.05);
}
.option-group.size-options .option-item {
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(30, 111, 92, 0.6);
    background: rgba(255,255,255,0.15);
    color: #1E6F5C;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.option-group.size-options .option-item:hover {
    background: rgba(30, 111, 92, 0.15);
    border: 1px solid #1E6F5C;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.option-group.size-options .option-item.active {
    background: #1E6F5C;
    color: #fff;
    border: 1px solid #1E6F5C;
}

/* ======= تعداد محصول ======= */
.quantity-box {
    display: flex;
    border: 1px solid #bcd4c9;
    border-radius: 12px;
    overflow: hidden;
    width: 140px;
    margin-bottom: 20px;
}
.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #1E6F5C;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}
.qty-btn:hover { background: #174f43; }
.qty-input {
    width: 60px;
    text-align: center;
    border: none;
    font-weight: bold;
    font-size: 16px;
}

/* ======= جدول مشخصات ======= */
.specs-table th {
    background: #1E6F5C;
    color: #fff;
    padding: 12px;
    width: 30%;
}
.specs-table td {
    background: #f7f7f7;
    padding: 12px;
}
.specs-table tr:nth-child(even) td { background: #efefef; }

/* ======= تب‌ها ======= */
.nav-tabs .nav-link.active { background: #1E6F5C; color: #fff !important; }
.nav-tabs .nav-link { color: #1E6F5C; font-weight: 600; }
.details{
    padding-top: 60px;
}
.ul-details > li{
    border-bottom: 1px solid #1E6F5C;
    padding: 10px;
}
.tab-content{
    border-radius: 0 0 20px 20px;
}

/* ======= ریسپانسیو ======= */
@media(max-width:768px){
    .thumb { width: 50px; height: 50px; }
    .buy-box .price { font-size: 20px; }
    .btn-buy { font-size: 15px; }
    .thumb-row{margin-bottom: 20px;}
    .details{padding-top: 30px}
    /*.qty-btn { width: 35px; height: 35px; font-size: 20px; }*/
    /*.qty-input { width: 50px; font-size: 14px; }*/
}
.product {
    /*width: 100%;*/
    width: 250px;
    height: 45vh;
    margin: auto;
    border-radius: 1rem;
    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: 25vh;
    object-fit: cover;
    border-radius: 1rem;
    transition: all 0.5s ease;
}
.img-hover{
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 25vh;
    object-fit: cover;
    border-radius: 1rem;
}
.product:hover .img-hover {
    opacity: 1;
    transform: scale(1.05);
    transition: opacity 0.5s ease, transform 0.7s ease;
}

.product:hover .img-product {
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.5s ease, transform 0.7s 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;
}

.product:hover .product-icon {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
@media (max-width: 768px) {
    .product {
        width: 180px;
    }
}



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

/* متن و قیمت */
.product h5 {
    margin-top: 1rem;
    font-weight: 600;
    color: #333;
}

.price {
    color: #1e6f5c;
    font-weight: bold;
}

.old-price {
    color: #888;
    text-decoration: line-through;
    font-size: 0.9rem;
}
/*اسکرول*/
.product-container {
    position: relative;
}

.product-scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 1rem;
    padding-bottom: 1rem;
}

.product-scroll::-webkit-scrollbar {
    display: none;
}

.product {
    flex: 0 0 auto;
    width: 200px; /* عرض ثابت برای هر محصول */
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: white;
    color: #1E6F5C;
    border: none;
    /*padding: 0.5rem 1rem;*/
    cursor: pointer;
    border-radius: 50%;
    width: 30px;
    height: 30px;
}

.left-btn { left: 0; }
.right-btn { right: 0; }
/* پیش‌فرض دکمه‌ها مخفی */
.scroll-btn {
    opacity: 0;
    pointer-events: none; /* وقتی مخفی هستن، قابل کلیک نیستن */
    transition: opacity 0.7s ease;
}

/* وقتی موس روی کانتینر محصولات رفت */
.product-container:hover .scroll-btn {
    opacity: 1;
    pointer-events: auto; /* فعال شدن دکمه‌ها */
}
@media (max-width: 768px) {
    .scroll-btn {
        display: none;
    }
}
