/* ========================================================================
   کدهای CSS بهبود یافته - برای اضافه کردن به انتهای فایل style.css
   ======================================================================== */

/* ===================================
   بهبود دسته‌بندی‌ها (Categories)
   =================================== */

.box-cat {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
}

.box-cat .elem {
    margin: 8px !important;
    transition: all 0.3s ease !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    background: white !important;
}

.box-cat .elem:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2) !important;
}

.box-cat .elem .img-cat {
    border-radius: 15px !important;
}

.box-cat .elem .img-cat img {
    transition: transform 0.4s ease !important;
    border-radius: 15px !important;
}

.box-cat .elem:hover .img-cat img {
    transform: scale(1.1) !important;
}

.box-cat .elem .img-cat .name {
    height: 50px !important;
    line-height: 50px !important;
    font-weight: bold !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent) !important;
    transition: all 0.3s ease !important;
}

.box-cat .elem:hover .img-cat .name {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3)) !important;
}

/* ====================================
   بهبود نمایش محصولات (Products)
   ==================================== */

#bg-product {
    background: #f8f9fa !important;
}

#bg-product .station {
    margin-bottom: 30px !important;
    padding: 0 10px !important;
}

/* کارت محصول - FIX اصلی */
#bg-product .box-product {
    background: white !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08) !important;
    border-radius: 15px !important;
    transition: all 0.3s ease !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: row !important;
    overflow: hidden !important;
    border-top: 4px solid #2e8bdb !important;
    box-shadow: 0 -6px #2e8bdb inset, 0 3px 10px rgba(0, 0, 0, 0.08) !important;
}

#bg-product .box-product:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 -6px #2e8bdb inset, 0 12px 30px rgba(0, 0, 0, 0.15) !important;
}

/* 🔑 تصویر محصول - بدون کات شدن */
#bg-product .box-product .img-product {
    float: right !important;
    width: 40% !important;
    max-width: 180px !important;
    min-width: 120px !important;
    padding: 15px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    border-radius: 15px 0 0 15px !important;
}

#bg-product .box-product .img-product img {
    width: 100% !important;
    height: auto !important;
    max-height: 180px !important;
    object-fit: contain !important; /* 🎯 اینجا کلید اصلیه! */
    border-radius: 10px !important;
    transition: transform 0.3s ease !important;
}

#bg-product .box-product:hover .img-product img {
    transform: scale(1.05) rotate(2deg) !important;
}

/* اطلاعات محصول */
#bg-product .box-product .info-product {
    flex: 1 !important;
    padding: 20px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    background: white !important;
}

#bg-product .box-product .info-product .cl {
    font-size: 1.1em !important;
    margin-bottom: 12px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
}

#bg-product .box-product .info-product .cl:first-child {
    font-size: 1.3em !important;
    color: #2e8bdb !important;
    font-weight: bold !important;
    margin-bottom: 15px !important;
}

#bg-product .box-product .info-product .cl:before {
    height: 10px !important;
    width: 10px !important;
    border-radius: 50% !important;
    margin-left: 10px !important;
}

/* وضعیت محصول */
#bg-product .box-product .info-product .cl span#enable {
    color: #4caf50 !important;
    font-weight: bold !important;
    background: rgba(76, 175, 80, 0.1) !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
}

#bg-product .box-product .info-product .cl span#disable {
    color: #f44336 !important;
    font-weight: bold !important;
    background: rgba(244, 67, 54, 0.1) !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
}

/* قیمت محصول */
#bg-product .box-product .info-product .price {
    position: static !important;
    font-size: 1.4em !important;
    font-weight: bold !important;
    color: #2e8bdb !important;
    margin-top: 15px !important;
    padding: 12px !important;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border-radius: 10px !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(46, 139, 219, 0.2) !important;
}

#bg-product .box-product .info-product .price span {
    color: #555 !important;
    font-size: 0.8em !important;
}

/* محصول انتخاب شده */
#bg-product .box-product.select-product:after {
    content: "✓" !important;
    left: 15px !important;
    top: 15px !important;
    background: #4caf50 !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    text-align: center !important;
    font-size: 24px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4) !important;
}

/* محصول غیرفعال */
#bg-product .box-product.select-products {
    opacity: 0.6 !important;
    filter: grayscale(50%) !important;
}

/* انیمیشن ورود */
#bg-product .box-product {
    animation: fadeInUp 0.6s ease-out !important;
    animation-fill-mode: both !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================
   Responsive - تبلت
   ===================================== */

@media only screen and (max-width: 992px) {
    #bg-product .box-product .img-product {
        width: 35% !important;
        max-width: 150px !important;
    }
    
    #bg-product .box-product .info-product .price {
        font-size: 1.2em !important;
    }
}

/* =====================================
   Responsive - موبایل
   ===================================== */

@media only screen and (max-width: 600px) {
    /* دسته‌بندی‌ها */
    .box-cat .elem {
        width: 48% !important;
        margin: 4px 1% !important;
    }
    
    .box-cat .elem .img-cat .name {
        font-size: 1em !important;
        height: 40px !important;
        line-height: 40px !important;
    }
    
    /* محصولات - حالت عمودی */
    #bg-product {
        padding: 20px 0 !important;
    }
    
    #bg-product .station {
        margin-bottom: 20px !important;
        padding: 0 5px !important;
    }
    
    #bg-product .box-product {
        flex-direction: column !important;
        min-height: auto !important;
    }
    
    #bg-product .box-product .img-product {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        padding: 20px !important;
        border-radius: 15px 15px 0 0 !important;
    }
    
    #bg-product .box-product .img-product img {
        max-height: 200px !important;
    }
    
    #bg-product .box-product .info-product {
        padding: 15px !important;
    }
    
    #bg-product .box-product .info-product .cl {
        font-size: 1em !important;
        margin-bottom: 10px !important;
        text-align: center !important;
    }
    
    #bg-product .box-product .info-product .cl:first-child {
        font-size: 1.2em !important;
    }
    
    #bg-product .box-product .info-product .price {
        font-size: 1.3em !important;
        margin-top: 10px !important;
    }
    
    /* Header */
    .head-factor h2 {
        font-size: 1.2em !important;
    }
}

/* موبایل کوچک */
@media only screen and (max-width: 480px) {
    #bg-product .box-product .info-product .cl {
        font-size: 0.95em !important;
    }
    
    #bg-product .box-product .info-product .price {
        font-size: 1.1em !important;
    }
    
    .box-cat .elem .img-cat .name {
        font-size: 0.9em !important;
        height: 35px !important;
        line-height: 35px !important;
    }
}

/* =====================================
   بهبودهای اضافی
   ===================================== */

/* لینک محصول */
#bg-product a {
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth !important;
}

/* پیام خالی */
#bg-product p.align-center {
    background: white !important;
    padding: 60px 20px !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    font-family: yekan, IRANSans !important;
}

/* Tab Content */
.tab-content {
    display: none !important;
}

.tab-content.current {
    display: block !important;
    animation: fadeIn 0.5s ease-in !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* دکمه محصولات */
.product_rezagift {
    display: inline-block !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 15px 40px !important;
    border-radius: 50px !important;
    font-size: 1.2em !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
    font-weight: bold !important;
}

.product_rezagift:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

/* Accessibility */
.box-product:focus-within {
    outline: 3px solid #2e8bdb !important;
    outline-offset: 2px !important;
}

/* ========================================================================
   پایان کدهای اضافه شده
   ======================================================================== */