﻿.section-footer {
    justify-content: center;
}

.products-section .section-content {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

.carousel-container .product-card {
    flex: 0 0 calc((100% - 4 * 3%) / 5);
}

.hidden-carousel {
    display: none !important;
}



@media (max-width: 1300px) {

    .carousel-container .product-card {
        flex: 0 0 calc((100% - 3 * 3%) / 4);
    }
}


@media (max-width: 992px) {


    .carousel-container .product-card {
        flex: 0 0 calc((100% - 2 * 3%) / 3);
    }
}


@media (max-width: 578px) {

    .carousel-container .product-card {
        flex: 0 0 calc((100% - 1 * 3%) / 2);
    }
}

.product-container {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    overflow: hidden;
    gap:10%;
}

.product-info {
    display: flex;
    flex-direction: column;
    width: 55%;
    justify-content: space-between;
    gap: 50px;
}




.mobile-product-title {
    display: none;
}




.product-meta {
    display: flex;
    flex-wrap: wrap;
    transition: var(--default-transition);
    gap: 10px;
}

    .product-meta .code {
        font-family: 'Vazir-Light';
    }

    .product-meta span {
        display: flex;
        align-items: center;
    }

        .product-meta span a {
            margin: 0 5px;
        }









.product-details {
    flex-wrap: wrap;
    display: block;
    width: 100%;
    background-color: var(--background-color);
    backdrop-filter: var(--background-blur);
    border-radius: var(--radius-pill);
}

    .product-details h3 {
        margin-bottom: 10px;
        display: block;
    }

.product-detail {
    display: flex;
    flex-wrap: wrap;
    margin: 20px 0;
}

.detail {
    max-width: 20%;
    overflow: hidden;
    padding: 5px;
    min-width: 18%;
    flex-grow: 1;
    text-align: center;
}


    .detail .title {
        color: var(--color-secondary-light);
        font-weight: bold;
    }

    .detail .value {
        display: block;
    }













.product-abilities {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}







.product-carousel {
    position: relative;
    width: 100%;
    margin: 0 auto;
    width: 35%;
}


.product-carousel:hover .slider-controls {
        opacity: 1;
    }


.carousel-wrapper {
    position: relative;
    background-color: white;
    border-radius: var(--radius-pill);
    overflow: hidden;
    touch-action: pan-y; /* اجازه swipe افقی */
    user-select: none; /* جلوگیری از انتخاب متن هنگام drag */
}

.image-container {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
    cursor: grab;
}

.image-container.dragging {
    cursor: grabbing;
    transition: none; /* هنگام drag، transition غیرفعال شود */
}

.carousel-image {
    min-width: 100%;
    object-fit: cover;
    aspect-ratio: 1;
    border-radius: 0;
    user-select: none; /* جلوگیری از انتخاب تصویر هنگام drag */
    -webkit-user-drag: none; /* جلوگیری از drag پیشفرض مرورگر */
}

/* دکمه‌ها روی تصویر */
/*.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    font-size: var(--font-size-lg);
    transition: var(--default-transition);
    background: rgba(255, 255, 255, 0.45);
    color: var(--color-primary);
}*/

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* dot indicators */
.carousel-dots {
    text-align: center;
    margin-top: 10px;
}

.dot {
    display: inline-block;
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--color-primary);
}





















.description {
    padding: 40px;
    border-radius: 5px;
    transition: var(--default-transition);
    background-color: rgba(255,255,255,0.5);
    backdrop-filter: blur(40px);
    border-radius: var(--radius-pill);
}

    .description ul {
        margin: 25px;
    }

    .description li {
        color: var(--color-text-sub);

    }






.similar-products {
    position: relative;
    display: grid;
    overflow: hidden;
    width: 100%;
}

    .similar-products .section-content {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;

    }

@media (max-width: 992px) {

    .product-container {
        gap: 50px;
    }
    .mobile-product-title {
        display: block;
        order: 1;
        width: 100%;
    }

    .product-title {
        display: none;
    }



    .product-images {
        flex: 0 0 100%;
        max-width: 550px;
        margin: 0 auto;
    }

    .product-carousel {
        width: 100%;
        max-width: 500px;
        order: 2;
    }

    .product-info {
        flex: 0 1 100%;
        order: 3;
        gap: 50px;
    }

    .description {
        padding: 30px;
    }
    
}

@media (max-width: 578px) {

    .product-detail {
        display: block;
        width: 50%;
    }

    .detail {
        width: 100%;
        max-width: 100%;
    }

    .product-details {
        display: flex;
    }

    .description {
        padding: 20px;
    }
}
