﻿/* استایل‌های اختصاصی صفحه اصلی که در Index.html بود */
.tab-product-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: all 0.3s;
}

    .tab-product-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    }

.nav-tabs .nav-link {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: #333 !important;
    font-weight: 600 !important;
    background: transparent !important;
    padding: 5px 0 !important;
    margin: 0 10px !important;
    border-radius: 0 !important;
}

    .nav-tabs .nav-link.active {
        border-bottom: 2px solid #00a99d !important;
        color: #00a99d !important;
    }



.img-box-235x235 {
    width: 100%;
    height: 235px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 10px;
}

.img-235x235 {
    width: 235px;
    height: 235px;
    object-fit: contain;
}

.img-box-200x200 {
    width: 100%;
    height: 200px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 10px;
}

.img-200x200 {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.product-title-box {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    margin-bottom: 5px;
}

.price-row-standard {
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    min-height: 60px;
}

.price-main {
    font-weight: bold;
    color: #333;
    font-size: 15px;
    display: block;
    text-align: left;
}

.price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
    display: block;
    text-align: right;
    margin-top: 2px;
}

.badge-discount {
    background: #dc3545;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.rating-star-box {
    display: flex;
    align-items: center;
    color: #fbc02d;
    font-size: 13px;
    margin-bottom: 4px;
}

.hottest-this-week {
    background-color: #2db89b;
}

.hottest-this-week-section-background {
    background-color: #f4f4f5;
}

.count-down-timer {
    display: inline-block;
    direction: ltr;
    unicode-bidi: embed;
}

.mobile-error-visible {
    display: block !important;
}

/* ============================================
           بهینه‌سازی اختصاصی موبایل صفحه اصلی
           ============================================ */
.mobile-slider-header {
    display: none;
}

.category-grid {
    direction: rtl;
}

/* عناصر خارج‌شده از inline-style */
.category-icon-circle {
    width: 75px;
    height: 75px;
}

.category-icon-green {
    color: #00cba0;
}

.category-icon-gold {
    color: #d4af37;
}

.category-icon-purple {
    color: #d633ff;
}

.category-icon-blue {
    color: #3b82f6;
}

.category-icon-red {
    color: #d32f2f;
}

.category-icon-violet {
    color: #9c27b0;
}

.surprise-desktop-nav-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.round-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hot-slider-column {
    padding: 0 15px;
}

.brand-logo-img {
    max-height: 134px;
    width: auto;
}

.bestseller-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.magazine-feature-img {
    height: 350px;
    object-fit: cover;
}

/* ناوبری دسکتاپ/موبایل اسلایدرها */
.mobile-slider-nav, .desktop-slider-nav, .round-nav-btn, .surprise-desktop-nav-btn {
    cursor: pointer;
}

@media (max-width: 768px) {
    /* اسلایدر اصلی صفحه در موبایل */
    /* Swiper باید خودش width اسلایدها را محاسبه کند؛ CSS نباید آن را override کند. */
    .supplement-products-swiper {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

        .supplement-products-swiper .swiper-wrapper {
            align-items: stretch;
        }

        .supplement-products-swiper .swiper-slide {
            height: auto;
            box-sizing: border-box;
        }

        .supplement-products-swiper .tab-product-item {
            width: 100%;
            box-sizing: border-box;
        }

    .myHeroSwiper {
        height: 205px !important;
        min-height: 185px !important;
        max-height: 185px !important;
    }

        .myHeroSwiper .swiper-wrapper {
            height: 185px !important;
        }


        .myHeroSwiper .swiper-slide {
            height: 185px !important;
            min-height: 185px !important;
            max-height: 185px !important;
        }

            .myHeroSwiper .swiper-slide img,
            .myHeroSwiper .swiper-slide img.w-100,
            .myHeroSwiper .swiper-slide img.h-auto {
                width: 100% !important;
                height: 185px !important;
                min-height: 185px !important;
                max-height: 185px !important;
                object-fit: cover !important;
                object-position: center center !important;
                display: block !important;
            }

    .img-box-235x235 {
        height: 180px;
    }

    .img-235x235 {
        width: 180px;
        height: 180px;
    }
    /* هدر موبایلی بخش‌های محصول */
    .mobile-slider-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        direction: rtl;
        padding: 12px 14px 4px;
        color: #fff;
    }

        .mobile-slider-header .section-caption {
            font-size: 15px;
            font-weight: 700;
            margin-left: auto;
            white-space: nowrap;
        }

        .mobile-slider-header .more-link {
            color: inherit;
            text-decoration: none;
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
            border: 1px solid currentColor;
            border-radius: 20px;
            padding: 4px 9px;
        }

        .mobile-slider-header .mobile-slider-nav {
            width: 30px;
            height: 30px;
            padding: 0;
            border: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 30px;
        }

    .desktop-slider-nav {
        display: none !important;
    }

    .surprise-desktop-heading,
    .hot-desktop-heading {
        display: none !important;
    }
    /* دسته‌بندی‌ها: ۴ ستون و تصاویر کوچک‌تر */
    .category-grid {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 14px;
    }

        .category-grid .col {
            padding-left: 5px;
            padding-right: 5px;
        }

        .category-grid img {
            width: 100% !important;
            max-width: 82px;
            height: auto;
            margin: 0 auto;
            display: block;
        }

        .category-grid span {
            font-size: 11px !important;
        }
}

@media (max-width: 420px) {

    .myHeroSwiper {
        height: 185px !important;
        min-height: 165px !important;
        max-height: 165px !important;
    }

        .myHeroSwiper .swiper-wrapper {
            height: 165px !important;
        }

        .myHeroSwiper .swiper-slide {
            height: 165px !important;
            min-height: 165px !important;
            max-height: 165px !important;
        }

            .myHeroSwiper .swiper-slide img,
            .myHeroSwiper .swiper-slide img.w-100,
            .myHeroSwiper .swiper-slide img.h-auto {
                height: 165px !important;
                min-height: 165px !important;
                max-height: 165px !important;
                object-fit: cover !important;
            }
}
