/* ═══════════════════════════════════════════════
   Belgian Baked – Shortcode Styles
   ═══════════════════════════════════════════════ */

/* ── Elementor Background Video Fix ───────── */
/* Prevents black borders caused by Elementor JS
   miscalculating video dimensions (especially
   portrait videos). Forces CSS-only cover sizing. */

.elementor-background-video-hosted {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    background: transparent !important;
}

/* ── Hero Video ────────────────────────────── */

.bb-hero-video {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #001A33;
}

.bb-hero-video__desktop { display: block; }
.bb-hero-video__mobile  { display: none;  }

.bb-hero-video__iframe-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.bb-hero-video__iframe-wrap--landscape {
    padding-top: 56.25%; /* 16:9 */
}

.bb-hero-video__iframe-wrap--portrait {
    padding-top: 177.78%; /* 9:16 */
}

.bb-hero-video__iframe-wrap iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.bb-hero-video--playing iframe {
    opacity: 1;
}

@media (max-width: 767px) {
    .bb-hero-video__desktop { display: none;  }
    .bb-hero-video__mobile  { display: block; }
}


/* ── Product Grid / Carousel ──────────────── */

body.home {
    position: relative;
    overflow-x: hidden;
}

body.home .bb-waffle-floaters {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100%;
    height: 2800px;
    overflow: hidden;
    pointer-events: none;
    z-index: 8;
}

body.home .site-header {
    position: relative;
    z-index: 20;
}

body.home .entry-content,
body.home .elementor-35 {
    position: relative;
}

body.home .elementor-35 > .elementor-element {
    position: relative;
    z-index: 1;
}

body.home .bb-float-waffle {
    position: absolute;
    width: clamp(120px, 13vw, 230px);
    height: auto;
    opacity: 1;
    filter: drop-shadow(0 24px 28px rgba(0, 26, 51, 0.18));
    transform-origin: center;
    will-change: transform;
}

body.home .bb-float-waffle--liege {
    top: 1120px;
    right: 2vw;
    width: clamp(170px, 17vw, 290px);
    animation: bb-waffle-float-liege 9s ease-in-out infinite;
}

body.home .bb-float-waffle--vanilla {
    top: 1580px;
    left: 2vw;
    width: clamp(150px, 15vw, 260px);
    animation: bb-waffle-float-vanilla 11s ease-in-out infinite;
}

body.home .bb-float-waffle--marble {
    top: 2140px;
    right: 2vw;
    width: clamp(150px, 16vw, 270px);
    animation: bb-waffle-float-marble 10s ease-in-out infinite;
}

body.home .bb-float-waffle--lukken {
    top: 2420px;
    left: 4vw;
    width: clamp(105px, 10vw, 170px);
    animation: bb-waffle-float-lukken 12s ease-in-out infinite;
}

@keyframes bb-waffle-float-liege {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(-18deg) scale(1);
    }
    45% {
        transform: translate3d(-18px, -26px, 0) rotate(-12deg) scale(1.03);
    }
    70% {
        transform: translate3d(8px, -12px, 0) rotate(-22deg) scale(0.99);
    }
}

@keyframes bb-waffle-float-vanilla {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(20deg) scale(1);
    }
    40% {
        transform: translate3d(20px, -18px, 0) rotate(26deg) scale(1.02);
    }
    72% {
        transform: translate3d(8px, 10px, 0) rotate(15deg) scale(0.98);
    }
}

@keyframes bb-waffle-float-marble {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(14deg) scale(1);
    }
    48% {
        transform: translate3d(-24px, -20px, 0) rotate(8deg) scale(1.025);
    }
    76% {
        transform: translate3d(-8px, 12px, 0) rotate(18deg) scale(0.99);
    }
}

@keyframes bb-waffle-float-lukken {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(-10deg) scale(1);
    }
    42% {
        transform: translate3d(18px, -14px, 0) rotate(-4deg) scale(1.04);
    }
    74% {
        transform: translate3d(-8px, 8px, 0) rotate(-14deg) scale(0.99);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.home .bb-float-waffle {
        animation: none;
    }
    body.home .bb-float-waffle--liege {
        transform: rotate(-18deg);
    }
    body.home .bb-float-waffle--vanilla {
        transform: rotate(20deg);
    }
    body.home .bb-float-waffle--marble {
        transform: rotate(14deg);
    }
    body.home .bb-float-waffle--lukken {
        transform: rotate(-10deg);
    }
}

.bb-products {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bb-products__viewport {
    overflow: visible;
}

.bb-products__track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.bb-products__card {
    position: relative;
    text-align: center;
    padding: 12px 12px 24px;
    background: rgba(255, 250, 240, 0.62);
    border: 1px solid rgba(238, 186, 43, 0.24);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(0, 26, 51, 0.05);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.bb-products__card:hover {
    border-color: rgba(238, 186, 43, 0.45);
    box-shadow: 0 18px 42px rgba(0, 26, 51, 0.08);
    transform: translateY(-2px);
}

.bb-products__image-link {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 18px;
}

.bb-products__image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.bb-products__image-link:hover .bb-products__image {
    transform: scale(1.05);
}

.bb-products__name {
    font-family: 'Ovo', serif;
    font-size: 20px;
    font-weight: 400;
    color: #001A33;
    margin: 0 0 6px;
}

.bb-products__price {
    display: block;
    font-family: 'Ovo', serif;
    font-size: 17px;
    color: #EEBA2B;
    margin-bottom: 10px;
}

.bb-products__teaser {
    font-family: 'Ovo', serif;
    font-size: 18px;
    line-height: 1.6;
    color: #001A33;
    margin: 0 0 16px;
    flex: 1;
}

.bb-products__button {
    display: inline-block;
    font-family: 'Ovo', serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    background: #001A33;
    padding: 12px 30px;
    border: none;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.3s ease;
    align-self: center;
    margin-top: auto;
}

.bb-products__button:hover {
    background: #EEBA2B;
    color: #fff;
}

.bb-products__swipe-cue {
    display: none;
}

/* ── Ingredient Grid ─────────────────────── */

.bb-ingredients-home {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bb-ingredients-home__row {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

.bb-ingredients-home__row:last-child {
    margin-bottom: 0;
}

.bb-ingredients-home__row--4 {
    grid-template-columns: repeat(4, 1fr);
}

.bb-ingredients-home__row--3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.bb-ingredient-card-home {
    text-align: center;
    padding: 15px 15px 20px;
    background: #FEFBF0;
    border: 1px solid rgba(238, 186, 43, 0.24);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.bb-ingredient-card-home:hover {
    border-color: rgba(238, 186, 43, 0.5);
    box-shadow: 0 12px 28px rgba(0, 26, 51, 0.06);
}

.bb-ingredient-card-home img {
    width: 69%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    margin-bottom: 15px;
}

.bb-ingredient-card-home--vanilla-sugar img {
    width: 90%;
    margin-bottom: -22px;
}

.bb-ingredient-card-home h4 {
    font-family: 'Ovo', serif;
    font-size: 28px;
    font-weight: 400;
    color: #001A33;
    margin: 0 0 8px;
}

.bb-ingredient-card-home p {
    font-family: 'Ovo', serif;
    font-size: 18px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 14px;
    flex: 1;
}

.bb-ingredient-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
}

.bb-ingredient-pill {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid rgba(238, 186, 43, 0.5);
    border-radius: 20px;
    color: #001A33;
    font-family: 'Ovo', serif;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.bb-ingredient-pill:hover {
    background: #001A33;
    color: #fff;
    border-color: #001A33;
}

/* ── Tablet: 2 columns ── */
@media (max-width: 991px) {
    .bb-ingredients-home__row--4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .bb-ingredients-home__row--3 {
        grid-template-columns: repeat(2, 1fr);
        max-width: none;
    }

    .bb-products__track {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* ── Mobile: horizontal scroll carousel ── */
@media (max-width: 767px) {
    body.home .bb-waffle-floaters {
        height: 1800px;
    }

    body.home .bb-float-waffle {
        width: 128px;
        opacity: 1;
        filter: drop-shadow(0 16px 20px rgba(0, 26, 51, 0.14));
    }

    body.home .bb-float-waffle--liege {
        top: 1185px;
        right: -105px;
        width: 154px;
    }

    body.home .bb-float-waffle--vanilla {
        top: 1540px;
        left: -92px;
        width: 145px;
    }

    body.home .bb-float-waffle--marble,
    body.home .bb-float-waffle--lukken {
        display: none;
    }

    .bb-ingredients-home__row--4,
    .bb-ingredients-home__row--3 {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        max-width: min(420px, 100%);
        margin-left: auto;
        margin-right: auto;
    }

    .bb-ingredient-card-home {
        width: 100%;
        padding: 22px 20px 24px;
    }

    .bb-ingredient-card-home img {
        width: min(58%, 210px);
    }

    .bb-ingredient-card-home--vanilla-sugar img {
        width: min(72%, 250px);
    }

    .bb-ingredient-card-home h4 {
        font-size: 28px;
    }

    .bb-ingredient-card-home p {
        font-size: 17px;
        line-height: 1.65;
    }

    .bb-ingredient-pill {
        font-size: 12px;
        padding: 4px 12px;
    }

    .bb-products {
        padding: 0;
    }

    .bb-products__viewport {
        overflow: hidden;
        margin: 0 -30px;
        padding: 0 30px;
        position: relative;
    }

    .bb-products__track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        gap: 18px;
        padding: 8px 0 18px;
        cursor: grab;
        scrollbar-width: none;
    }

    .bb-products__track.is-dragging {
        cursor: grabbing;
        scroll-snap-type: none;
    }

    .bb-products__card {
        flex: 0 0 min(82vw, 320px);
        max-width: min(82vw, 320px);
        min-height: 100%;
        padding: 10px 10px 22px;
        scroll-snap-align: start;
        border-color: rgba(238, 186, 43, 0.18);
        background: rgba(255, 250, 240, 0.78);
        box-shadow: 0 8px 18px rgba(0, 26, 51, 0.04);
        touch-action: pan-x pan-y;
    }

    .bb-products__card:hover {
        border-color: rgba(238, 186, 43, 0.18);
        box-shadow: 0 8px 18px rgba(0, 26, 51, 0.04);
        transform: none;
    }

    .bb-products__card::before {
        display: none;
    }

    .bb-products__image-link {
        border: 0;
        box-shadow: none;
    }

    .bb-products__name {
        font-size: 24px;
        margin-top: 4px;
    }

    .bb-products__teaser {
        min-height: 92px;
        padding: 0 4px;
    }

    .bb-products__button {
        background: #EEBA2B;
        color: #001A33;
        border-radius: 6px;
        box-shadow: 0 5px 0 rgba(0, 26, 51, 0.16);
    }

    .bb-products__track::-webkit-scrollbar {
        display: none;
    }

    .bb-products__swipe-cue {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: auto;
        height: 36px;
        margin: 6px auto 0;
        overflow: visible;
        background: transparent;
    }

    .bb-products__arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        padding: 0;
        border: 1px solid rgba(238, 186, 43, 0.42);
        border-radius: 50%;
        background: rgba(255, 248, 223, 0.92);
        color: #001A33;
        font-family: Arial, sans-serif;
        font-size: 24px;
        line-height: 1;
        box-shadow: 0 4px 10px rgba(0, 26, 51, 0.05);
        cursor: pointer;
        appearance: none;
    }

    .bb-products__arrow:hover,
    .bb-products__arrow:focus {
        background: #EEBA2B;
        color: #001A33;
        border-color: #EEBA2B;
        box-shadow: none;
        outline: none;
    }

    .bb-products__arrow--prev {
        padding-right: 2px;
    }

    .bb-products__arrow--next {
        padding-left: 2px;
    }

    .bb-products__swipe-cue-bar {
        display: none;
    }
}


/* ── Subscribe Form ─────────────────────────── */

.footer-newsletter .newsletter-form {
    width: 100%;
}

.bb-subscribe {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.bb-subscribe__heading {
    font-family: 'Ovo', serif;
    font-size: 26px;
    font-weight: 400;
    color: #001A33;
    margin: 0 0 8px;
}

.bb-subscribe__desc {
    font-family: 'Ovo', serif;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 20px;
}

.bb-subscribe__row {
    display: flex;
    gap: 10px;
}

.bb-subscribe__input {
    flex: 1;
    padding: 12px 16px;
    font-family: 'Ovo', serif;
    font-size: 15px;
    color: #001A33;
    border: 1px solid rgba(0, 26, 51, 0.18);
    border-radius: 6px;
    background: #fff;
    outline: none;
    transition: border-color 0.25s ease;
}

.bb-subscribe__input:focus {
    border-color: #EEBA2B;
}

.bb-subscribe__input::placeholder {
    color: #aaa;
}

.bb-subscribe__button {
    padding: 12px 28px;
    font-family: 'Ovo', serif;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #001A33;
    background: #EEBA2B;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease;
}

.bb-subscribe__button:hover {
    background: #001A33;
    color: #fff;
}

.bb-subscribe__msg {
    font-family: 'Ovo', serif;
    font-size: 14px;
    margin: 10px 0 0;
    min-height: 20px;
}

.bb-subscribe__msg--ok {
    color: #2e7d32;
}

.bb-subscribe__msg--err {
    color: #c62828;
}

@media (max-width: 480px) {
    .bb-subscribe__row {
        flex-direction: column;
    }

    .bb-subscribe__button {
        width: 100%;
    }
}
