﻿@font-face {
    font-family: 'IRAN_Sans';
    src: url('../Fonts/IRAN_Sans.eot') format('embedded-opentype'), url('../Fonts/IRAN_Sans.otf') format('opentype'), url('../Fonts/IRAN_Sans.svg') format('svg'), url('../Fonts/IRAN_Sans.ttf') format('truetype'), url('../Fonts/IRAN_Sans.woff') format('woff'), url('../Fonts/IRAN_Sans.woff2') format('woff2');
}

@font-face {
    font-family: 'Vazir-Bold';
    src: url('../Fonts/Vazir-Bold.eot') format('embedded-opentype'), url('../Fonts/Vazir-Bold.ttf') format('truetype'), url('../Fonts/Vazir-Bold.woff') format('woff'), url('../Fonts/Vazir-Bold.woff2') format('woff2');
}

/* =========================================
   Latest Products - Modern Responsive Design
   ========================================= */

.latest-products-section {
    width: 100%;
    position: relative;
    display: flow-root;
    clear: both;
    box-sizing: border-box;
}

/* عنوان بخش */

.latest-products-header {
    width: 100%;
    padding: 0 12px;
    margin-bottom: 22px;
}

    .latest-products-header .section-title {
        font-size: 20px;
        font-weight: 700;
        margin: 0;
        line-height: 1.8;
    }

/* چیدمان محصولات */

.latest-products-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 20px 14px;
    width: 100%;
    padding: 0 12px;
    margin: 0;
    box-sizing: border-box;
    align-items: stretch;
}

/* آیتم محصول */

.latest-product-item {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
}

/* لینک محصول */

.latest-product-link {
    display: flex;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none !important;
    min-width: 0;
}

/* کارت محصول */

.latest-products-grid .product-card2 {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 12px 10px;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.045);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* افکت حرکت کارت */

.latest-product-link:hover .product-card2 {
    transform: translateY(-4px);
    border-color: #cbdced;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.09);
}

/* تصویر محصول */

.latest-products-grid .product-image2 {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 190px;
    margin: 0 auto 10px;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
}

    /* خود تصویر */

    .latest-products-grid .product-image2 img {
        display: block;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        object-position: center center !important;
        margin: auto !important;
        float: none !important;
        position: static !important;
        transition: transform 0.3s ease;
    }

/* بزرگ شدن ملایم تصویر */

.latest-product-link:hover .product-image2 img {
    transform: scale(1.045);
}

/* محتوای کارت */

.latest-product-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
}

/* نام محصول */

.latest-products-grid .product-title2 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.9;
    color: #374151;
    margin: 0 0 10px;
    min-height: 49px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    overflow-wrap: anywhere;
}

/* قیمت محصول */

.latest-products-grid .product-price2 {
    width: 100%;
    margin-top: auto;
    min-height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.latest-products-grid .price-new {
    font-size: 14px;
    font-weight: 700;
    color: #1565c0;
    line-height: 1.8;
}

.latest-products-grid .currency {
    font-size: 11px;
    font-weight: 500;
    margin-right: 2px;
}

.latest-products-grid .inquiry-price {
    font-size: 13px;
    color: #1565c0;
}

/* وضعیت موجودی */

.latest-products-grid .product-stock-status {
    margin-top: 9px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
    color: #198754;
}

    .latest-products-grid .product-stock-status.unavailable {
        color: #dc3545;
    }

/* دکمه مشاهده همه */

.latest-products-footer {
    text-align: center;
    margin-top: 28px;
    padding: 0 12px;
}

    .latest-products-footer .btn {
        padding: 9px 25px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 7px;
        transition: all 0.25s ease;
    }

        .latest-products-footer .btn:hover {
            transform: translateY(-2px);
        }


/* =========================================
   Responsive Breakpoints
   ========================================= */

/* نمایشگرهای بزرگ */

@media (min-width: 1500px) {

    .latest-products-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 22px 16px;
    }
}

/* لپ تاپ و نمایشگر متوسط */

@media (min-width: 1200px) and (max-width: 1499.98px) {

    .latest-products-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 18px 12px;
    }
}

/* لپ تاپ کوچک */

@media (min-width: 992px) and (max-width: 1199.98px) {

    .latest-products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px 12px;
    }
}

/* تبلت افقی */

@media (min-width: 768px) and (max-width: 991.98px) {

    .latest-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px 12px;
    }
}

/* تبلت عمودی */

@media (min-width: 576px) and (max-width: 767.98px) {

    .latest-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px 10px;
    }
}

/* موبایل */

@media (max-width: 575.98px) {

    .latest-products-section {
        padding-top: 25px !important;
    }

    .latest-products-header {
        margin-bottom: 15px;
        padding: 0 10px;
    }

        .latest-products-header .section-title {
            font-size: 17px;
        }

    .latest-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
        padding: 0 10px;
    }

        .latest-products-grid .product-card2 {
            padding: 9px 7px;
            border-radius: 8px;
        }

        .latest-products-grid .product-image2 {
            max-height: 160px;
            margin-bottom: 7px;
        }

        .latest-products-grid .product-title2 {
            font-size: 12px;
            min-height: 44px;
            line-height: 1.8;
        }

        .latest-products-grid .price-new {
            font-size: 13px;
        }

        .latest-products-grid .product-stock-status {
            font-size: 10px;
        }

    .latest-products-footer {
        margin-top: 22px;
    }
}

/* موبایل بسیار کوچک */

@media (max-width: 360px) {

    .latest-products-grid {
        gap: 10px 8px;
        padding: 0 7px;
    }

        .latest-products-grid .product-card2 {
            padding: 7px 5px;
        }

        .latest-products-grid .product-title2 {
            font-size: 11px;
        }
}

/* =========================================
   Homepage Hero - Slider & Featured Products
   ========================================= */

.home-hero-row {
    align-items: stretch;
}

/* اسلایدشو */

#header-carousel {
    height: 430px;
    overflow: hidden;
    border-radius: 10px;
}

    #header-carousel .carousel-inner,
    #header-carousel .carousel-item {
        height: 430px;
    }

        #header-carousel .carousel-item > img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
        }

/* ستون محصولات منتخب */

.featured-store-list {
    height: 430px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* کارت منتخب */

.featured-store-card {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce8f5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

/* لینک */

.featured-store-link {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

    /* تصویر */

    .featured-store-link img {
        display: block;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center;
        transition: transform 0.3s ease;
    }

.featured-store-card:hover img {
    transform: scale(1.025);
}

/* تبلت و موبایل */

@media (max-width: 991.98px) {

    .home-hero-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        height: auto !important;
        min-height: 0 !important;
        margin-left: 0;
        margin-right: 0;
        overflow: visible !important;
    }

        .home-hero-row > div {
            position: relative !important;
            width: 100% !important;
            height: auto !important;
            min-height: 0 !important;
            float: none !important;
        }

    #header-carousel {
        height: auto;
        aspect-ratio: 16 / 9;
    }

        #header-carousel .carousel-inner,
        #header-carousel .carousel-item {
            height: 100%;
        }

    .featured-store-list {
        height: auto;
        min-height: 0;
        margin-top: 12px;
        gap: 10px;
    }

    .featured-store-card {
        height: auto;
        flex: none;
        aspect-ratio: 16 / 9;
    }
}

/* =========================================
   جلوگیری از هم پوشانی زیرگروه ها
   ========================================= */

.home-subgroups-section {
    position: relative !important;
    display: flow-root !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 25px !important;
    margin-bottom: 0 !important;
    z-index: 1 !important;
    overflow: visible !important;
}



.product-stock-status {
    margin-top: 8px !important;
    font-size: 12px !important;
    color: #198754 !important;
    font-weight: 600 !important;
}

.product-stock-status.unavailable {
    color: #dc3545 !important;
}

.home-subgroups-section {
    position: relative !important;
    display: flow-root !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 25px !important;
    margin-bottom: 0 !important;
    z-index: 1 !important;
    overflow: visible !important;
}


/* =========================================
           چیدمان محصولات صفحه اصلی
        ========================================= */


@media (max-width: 991.98px) {

    .home-hero-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

        .home-hero-row > div {
            position: relative !important;
            float: none !important;
            height: auto !important;
            min-height: 0 !important;
            width: 100% !important;
        }

    .featured-store-list {
        height: 430px !important;
        min-height: 430px !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .featured-store-card {
        position: relative !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
    }
}
/* =================================
                   صفحه اصلی - اسلایدشو و منتخب فروشگاه
                ================================= */

.home-hero-row {
    align-items: stretch;
}

/* ارتفاع اسلایدشو */
#header-carousel {
    height: 430px;
    overflow: hidden;
    border-radius: 10px;
}

    #header-carousel .carousel-inner,
    #header-carousel .carousel-item {
        height: 430px;
    }

        #header-carousel .carousel-item > img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

/* ستون دو کارت منتخب */

.featured-store-list {
    height: 430px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    row-gap: 8px !important;
}

.featured-store-card {
    margin: 0 !important;
    padding: 0 !important;
}

/* هر کارت نصف ارتفاع ستون */
.featured-store-card {
    height: calc((430px - 15px) / 2);
    min-height: 0;
    flex: 1 1 0;
    overflow: hidden;
    border: 1px solid #dce8f5;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}


.featured-store-list {
    height: 430px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.featured-store-card {
    height: 207px;
    min-height: 0;
    flex: 1 1 0;
    overflow: hidden;
    border: 1px solid #dce8f5;
    border-radius: 10px;
    background: #fff;
}


.featured-store-link {
    display: flex !important;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}


    .featured-store-link img {
        display: block;
        width: 100% !important;
        height: calc(100% - 1px) !important;
        object-fit: fill !important;
        object-position: center center !important;
    }




.featured-store-card:hover img {
    transform: scale(1.02);
}


.featured-store-card:hover img {
    transform: scale(1.02);
}

/* نمایش مناسب در موبایل */
@media (max-width: 991.98px) {
    .home-hero-row {
        margin-left: 0;
        margin-right: 0;
    }

    .featured-store-list {
        height: auto;
    }

    .featured-store-card {
        height: auto;
        aspect-ratio: 16 / 9;
        flex: none;
    }

    .featured-store-link img {
        object-fit: contain;
    }
}



/* =========================================
                   جلوگیری از هم‌پوشانی زیرگروه‌ها
                   در تبلت و موبایل
                ========================================= */

@media (max-width: 991.98px) {

    .home-subgroups-section {
        position: relative;
        clear: both;
        display: block;
        width: 100%;
        margin-top: 25px !important;
        z-index: 1;
    }
}



/* =========================================
   نمایش دقیقاً سه ردیف محصولات در مانیتور
   ========================================= */

/* مانیتورهای بزرگ: 7 ستون، 21 محصول */

@media screen and (min-width: 1500px) {

    .latest-products-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

        .latest-products-grid > .latest-product-item:nth-child(n+22) {
            display: none !important;
        }
}


/* لپ تاپ: 6 ستون، 18 محصول */

@media screen and (min-width: 1200px) and (max-width: 1499.98px) {

    .latest-products-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

        .latest-products-grid > .latest-product-item:nth-child(n+19) {
            display: none !important;
        }
}


/* مانیتور کوچک: 5 ستون، 15 محصول */

@media screen and (min-width: 992px) and (max-width: 1199.98px) {

    .latest-products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

        .latest-products-grid > .latest-product-item:nth-child(n+16) {
            display: none !important;
        }
}


/* تبلت: 4 ستون، 12 محصول */

@media screen and (min-width: 768px) and (max-width: 991.98px) {

    .latest-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

        .latest-products-grid > .latest-product-item:nth-child(n+13) {
            display: none !important;
        }
}


/* تبلت کوچک: 3 ستون، 9 محصول */

@media screen and (min-width: 576px) and (max-width: 767.98px) {

    .latest-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

        .latest-products-grid > .latest-product-item:nth-child(n+10) {
            display: none !important;
        }
}


/* موبایل: حفظ نمایش 18 محصول */

@media screen and (max-width: 575.98px) {

    .latest-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .latest-products-grid > .latest-product-item:nth-child(n+19) {
            display: none !important;
        }
}



/* =====================================
   Category Carousel - Product Card
===================================== */

.vendor-carousel .item {
    width: 100%;
    padding: 6px;
    box-sizing: border-box;
}

/* کارت دسته بندی */
.product-card4 {
    width: 100%;
    height: 210px;
    padding: 12px 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

    /* Hover کارت */
    .product-card4:hover {
        transform: translateY(-5px);
        border-color: #cfe2ff;
        box-shadow: 0 12px 25px rgba(13, 110, 253, 0.15);
    }

/* تصویر دسته بندی */
.product-img-wrapper4 {
    width: 115px;
    height: 115px;
    flex: 0 0 115px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .product-img-wrapper4 img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

/* Hover تصویر */
.product-card4:hover .product-img-wrapper4 {
    transform: scale(1.06);
}

/* عنوان دسته بندی */
.product-title4 {
    width: 100%;
    margin: 12px 0 0;
    padding: 0 4px;
    font-family: Vazir-Bold, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
    color: #333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.product-card4:hover .product-title4 {
    color: #0d6efd;
}

/* نمایش در موبایل */
@media (max-width: 575.98px) {
    .product-card4 {
        height: 180px;
        padding: 10px 6px;
    }

    .product-img-wrapper4 {
        width: 100px;
        height: 100px;
        flex-basis: 100px;
    }

    .product-title4 {
        font-size: 12px;
        margin-top: 10px;
    }
}


/* Category Carousel Navigation Buttons */

/* Professional Category Carousel Navigation */

.category-carousel .owl-nav {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 16px !important;
}

    .category-carousel .owl-nav .owl-prev,
    .category-carousel .owl-nav .owl-next {
        min-width: 72px;
        height: 34px;
        padding: 0 12px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: #f1f6fc !important;
        color: #31577f !important;
        border: 1px solid #dce7f2 !important;
        border-radius: 8px;
        font-family: Vazir-Bold;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(30, 70, 110, .06);
        transition: all .25s ease;
    }

        .category-carousel .owl-nav .owl-prev:hover,
        .category-carousel .owl-nav .owl-next:hover {
            background: #1565c0 !important;
            color: #fff !important;
            border-color: #1565c0 !important;
            box-shadow: 0 4px 10px rgba(21, 101, 192, .18);
            transform: translateY(-2px);
        }

    .category-carousel .owl-nav .category-nav-content {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        color: inherit !important;
        white-space: nowrap;
    }

        .category-carousel .owl-nav .category-nav-content i {
            font-size: 14px;
            color: inherit !important;
        }

    .category-carousel .owl-nav .owl-prev:active,
    .category-carousel .owl-nav .owl-next:active {
        transform: translateY(0);
    }

@media (max-width: 575.98px) {
    .category-carousel .owl-nav {
        gap: 7px;
        margin-top: 12px !important;
    }

        .category-carousel .owl-nav .owl-prev,
        .category-carousel .owl-nav .owl-next {
            min-width: 72px;
            height: 31px;
            padding: 0 9px;
            font-size: 10px;
        }

        .category-carousel .owl-nav .category-nav-content i {
            font-size: 12px;
        }
}
