/**
 * vs_homebrands — Front CSS
 *
 * Displays manufacturer/brand logos in a clean, compact grid.
 * Responsive: 6 per row desktop, 4 tablet, 3 mobile landscape, 2 mobile portrait
 */

/* ===========================================
   CONTAINER
   =========================================== */

.vs-homebrands {
    margin-bottom: 40px;
    padding: 20px 0;
}

.vs-homebrands-head {
    margin-bottom: 20px;
    padding: 0 15px;
}

.vs-homebrands-title {
    line-height: 1.2;
    margin: 0;
    text-align: left;
    font-size: 28px;
    font-weight: 600;
}

/* ===========================================
   GRID LAYOUT
   =========================================== */

.vs-homebrands-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: 0 -10px;
    list-style: none;
    padding: 0;
}

.vs-homebrands-item {
    width: 16.666%;  /* 6 per row on desktop */
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
}

.vs-homebrands-item a {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.vs-homebrands-item a:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ===========================================
   IMAGE CONTAINER - images fill the space
   =========================================== */

.vs-homebrands-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;  /* Square container */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    padding: 2px;  /* Minimal padding for maximum image space */
}

.vs-homebrands-image img {
    width: 100%;  /* Fill container width */
    height: 100%; /* Fill container height */
    display: block;
    object-fit: contain;  /* Maintain aspect ratio within container */
}

/* ===========================================
   RESPONSIVE BREAKPOINTS
   =========================================== */

/* Small desktop (1200px-1440px): 5 per row */
@media (max-width: 1440px) {
    .vs-homebrands-item {
        width: 20%;  /* 5 per row */
    }
}

/* Tablet (768px-1199px): 4 per row */
@media (max-width: 1199px) {
    .vs-homebrands-item {
        width: 25%;  /* 4 per row */
    }
}

/* Tablet portrait (576px-767px): 3 per row */
@media (max-width: 767px) {
    .vs-homebrands-item {
        width: 33.333%;  /* 3 per row */
    }
}

/* Mobile portrait (< 576px): 2 per row */
@media (max-width: 575px) {
    .vs-homebrands {
        padding: 15px 0;
    }

    .vs-homebrands-head {
        padding: 0 10px;
    }

    .vs-homebrands-title {
        font-size: 22px;
    }

    .vs-homebrands-item {
        width: 50%;  /* 2 per row */
        padding: 8px;
    }

    .vs-homebrands-image {
        padding: 2px;  /* Consistent minimal padding */
    }
}
