.b4-promo-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.b4-promo-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.b4-promo-slide {
    flex: 0 0 100%;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.b4-promo-slide-content {
    max-width: 480px;
    flex: 0 0 auto;
    margin-left: 5%;
    padding: 32px;
    color: var(--b4-promo-text-color, #ffffff);
    position: relative;
    z-index: 1;
}

/* Inner/Sub image — the post's Featured Image, layered on top of the
   background. Capped at a max size (not flex-grow to fill all remaining
   space, and not forced into a fixed box shape) — the image scales down to
   fit within the cap while keeping its own natural aspect ratio, never
   upscaled past its real size. */
.b4-promo-slide-image {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 64px;
}

/* Pixel (not percentage) max-width/height directly on the img — reliably
   caps its rendered size regardless of the flex container's own auto height,
   scaling down to fit while preserving its natural aspect ratio, never
   upscaled past its real size. */
.b4-promo-slide-image img {
    display: block;
    max-width: 700px;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.b4-promo-slide-badge img {
    max-width: 260px;
    height: auto;
    margin-bottom: 16px;
}

.b4-promo-slide-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 12px;
    line-height: 1.1;
    color: var(--b4-promo-text-color, #ffffff);
}

.b4-promo-slide-subtitle {
    font-size: 1.1rem;
    margin: 0 0 20px;
    opacity: 0.9;
}

/* Bigger than the theme's default .button — scoped to this slide's own CTA
   only, doesn't affect .button anywhere else on the site. !important is
   needed here: on the shop page this button renders inside WooCommerce's
   own .woocommerce content wrapper, and the theme has higher-specificity
   rules like ".woocommerce a.button" that otherwise win over a plain single
   class here — that's why the bigger size only showed up on the homepage
   (no .woocommerce ancestor there) and not the shop page. */
.b4-promo-slide-btn {
    padding: 18px 36px !important;
    font-size: 1.15rem !important;
}

.b4-promo-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.b4-promo-slider-arrow:hover {
    background: rgba(0, 0, 0, 0.75);
}

.b4-promo-slider-prev {
    left: 16px;
}

.b4-promo-slider-next {
    right: 16px;
}

.b4-promo-slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.b4-promo-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
}

.b4-promo-slider-dot.is-active {
    background: #ffffff;
}

@media (max-width: 768px) {
    .b4-promo-slide {
        min-height: 320px;
        flex-wrap: wrap;
    }

    .b4-promo-slide-content {
        max-width: 90%;
        margin-left: 5%;
        padding: 20px;
    }

    .b4-promo-slide-title {
        font-size: 1.75rem;
    }

    .b4-promo-slide-image {
        margin: 0 auto 20px;
    }

    .b4-promo-slide-image img {
        max-width: 90%;
        max-height: 260px;
    }
}
