/* ==========================================================================
   TavsZoo home widgets: lock images to fixed ratios so uploads of any
   dimensions never shift / unbalance the layout.
   ========================================================================== */

/* --- Promo grid -------------------------------------------------------- */
.tavszoo-promo-grid .banner-image {
    margin-bottom: 30px;
}
.tavszoo-promo-grid .col-sm-3 .banner-image:last-child,
.tavszoo-promo-grid .col-sm-6 .banner-image:last-child {
    margin-bottom: 0;
}
.tavszoo-promo-grid .banner-image > a {
    display: block;
    overflow: hidden;
}
/* small tiles: 300 x 180 */
.tavszoo-promo-grid .col-sm-3 .banner-image > a {
    aspect-ratio: 5 / 3;
}
/* large centre tile: 630 x 390 */
.tavszoo-promo-grid .col-sm-6 .banner-image > a {
    aspect-ratio: 21 / 13;
}
.tavszoo-promo-grid .banner-image > a > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Mobile: columns stack full-width, so place the two small tiles in each
   side column next to each other instead of full-width giants. */
@media (max-width: 767px) {
    .tavszoo-promo-grid [class*="col-sm-"] {
        margin-bottom: 15px;
    }
    .tavszoo-promo-grid [class*="col-sm-"]:last-child {
        margin-bottom: 0;
    }
    .tavszoo-promo-grid .col-sm-3 {
        display: flex;
        column-gap: 15px;
    }
    .tavszoo-promo-grid .col-sm-3 .banner-image {
        flex: 1 1 0;
        margin-bottom: 0;
    }
}

/* --- Brand logos ------------------------------------------------------- */
/* Logos use object-fit: contain so they are never cropped, but every tile
   keeps the same 190 x 110 box. */
.tavszoo-brand-carousel .item > a {
    display: block;
    aspect-ratio: 19 / 11;
}
.tavszoo-brand-carousel .item > a > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Single banner ----------------------------------------------------- */
.tavszoo-single-banner {
    display: block;
    overflow: hidden;
    border-radius: 10px;
}
.tavszoo-single-banner > img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Gallery ----------------------------------------------------------- */
/* Uniform square, crop-to-fill, works with any upload. No rounded corners,
   no bottom spacing (override the theme's .img-gallery defaults). */
.tavszoo-gallery-carousel .item > a.img-gallery {
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 0;
    margin-bottom: 0;
}
.tavszoo-gallery-carousel .item > a.img-gallery > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
