﻿.company-brands-section {
    padding: 80px 0;
}

.company-content-wrapper {
    padding-right: 30px;
    text-align: right;
}

.company-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: right;
}

.company-description {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: right;
}

.production-brands-wrapper {
    padding-top: 50px;
}

.brands-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
}

/* باکس اصلی بزرگ مستطیل */
.brands-main-container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.brands-inner-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
}

/* هر آیتم برند */
.brand-item {
    flex: 1 1 auto;
    min-width: 150px;
    max-width: 200px;
    padding: 20px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

    /* فقط آیتم‌هایی که تصویر محصول دارند overflow hidden و cursor pointer داشته باشند */
    .brand-item.has-curtain {
        overflow: hidden;
        cursor: pointer;
    }

    /* آیتم‌های بدون تصویر محصول */
    .brand-item:not(.has-curtain) {
        cursor: default;
    }

/* خط جداکننده عمودی */
.brand-item-divider::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: #e0e0e0;
    z-index: 1;
}

.brand-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 2;
    transition: opacity 0.5s ease;
}

/* آیکون - بالا */
.brand-icon {
    max-width: 80px;
    max-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

    .brand-icon img {
        width: 100% !important;
        height: auto !important;
        max-width: 80px;
        max-height: 80px;
        object-fit: contain;
        display: block;
    }

/* متن - پایین */
.brand-name {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-top: 0;
}

/* پرده تصویر محصول */
.product-curtain {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    padding: 15px;
}

.product-curtain-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

/* Hover effect - فقط برای آیتم‌هایی که has-curtain دارند */
.brand-item.has-curtain:hover .product-curtain {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.brand-item.has-curtain:hover .product-curtain-image {
    transform: scale(1);
}

.brand-item.has-curtain:hover .brand-content {
    opacity: 0;
}

/* Hover effect برای باکس - فقط برای آیتم‌های دارای پرده */
.brand-item.has-curtain:hover {
    background: #f8f9fa;
}

/* Hover خفیف برای آیتم‌های بدون پرده */
.brand-item:not(.has-curtain):hover {
    background: rgba(248, 249, 250, 0.3);
}

/* Responsive */
@@media (max-width: 991px) {
    .brands-main-container {
        max-width: 100%;
        padding: 20px 15px;
    }

    .brand-item {
        min-width: 120px;
        max-width: 150px;
        padding: 15px 10px;
    }

    .brand-icon {
        max-width: 60px;
        max-height: 60px;
        margin-bottom: 10px;
    }

        .brand-icon img {
            max-width: 60px;
            max-height: 60px;
        }

    .brand-name {
        font-size: 0.9rem;
    }
}

@@media (max-width: 767px) {
    .brands-inner-wrapper {
        flex-direction: column;
    }

    .brand-item {
        width: 100%;
        max-width: 100%;
        padding: 20px;
        border-bottom: 1px solid #e0e0e0;
    }

        .brand-item:last-child {
            border-bottom: none;
        }
    /* حذف خط عمودی در موبایل */
    .brand-item-divider::after {
        display: none;
    }

    .brand-icon {
        max-width: 70px;
        max-height: 70px;
    }

        .brand-icon img {
            max-width: 70px;
            max-height: 70px;
        }
}
/* نمایش پرده محصول فقط هنگام هاور */
.brand-item .product-curtain {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85); /* اختیاری: افکت محو */
    justify-content: center;
    align-items: center;
    z-index: 10;
    text-align: center;
}

.brand-item:hover .product-curtain {
    display: flex;
}

.brand-item {
    position: relative;
    cursor: pointer;
}

.product-curtain-image {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}