/* CUB-FIX-BUILD: 2026-09-03-r10  (search this string to confirm deployment) */
/* CareUrBaby client modifications — Phase 1. Loaded last intentionally. */

/* Keep the promotional strip aligned with the same wide content grid as hero/home sections. */
.phase1-home .phase5-hero-partners {
    box-sizing: border-box;
    width: min(100%, var(--p1-container-wide, 1440px));
    margin-inline: auto !important;
    padding-inline: var(--p1-gutter, 24px) !important;
    overflow: hidden;
}
.phase1-home .phase5-hero-partners .container-fluid,
.phase1-home .phase5-hero-partners .ads-partner-slider {
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}
.phase1-home .phase5-hero-partners .swiper-wrapper { align-items: stretch; }

/* Give Category and Offers the same restrained title treatment. */
.phase1-home .pdf2-category-section .pdf2-section-heading,
.phase1-home .pdf2-quick-deal-section .pdf2-quick-deal-titlebar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    margin-bottom: 20px;
    padding: 10px 18px 15px;
    background: transparent !important;
    border: 0 !important;
}
.phase1-home .pdf2-category-section .pdf2-section-heading::after,
.phase1-home .pdf2-quick-deal-section .pdf2-quick-deal-titlebar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 58px;
    height: 3px;
    border-radius: 999px;
    background: #1f2937;
    transform: translateX(-50%);
}
.phase1-home #pdf2-category-title,
.phase1-home #pdf2-quick-deal-title {
    margin: 0 !important;
    color: #1f2937 !important;
    font-size: clamp(24px, 2.4vw, 34px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center;
    letter-spacing: -.02em;
}

/* Testimonial heading must follow the neutral section palette, never brand red. */
.phase1-home .testimonial-six-right .sub-title-main {
    color: #4b5563 !important;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.phase1-home .testimonial-six-right .title-animation { color: #1f2937 !important; }

@media (max-width: 767.98px) {
    .phase1-home .phase5-hero-partners { padding-inline: 12px !important; }
    .phase1-home .pdf2-category-section .pdf2-section-heading,
    .phase1-home .pdf2-quick-deal-section .pdf2-quick-deal-titlebar { min-height: 46px; margin-bottom: 14px; }
}

/* ==========================================================================
   CLIENT FIX ROUND 2  (03 Sep 2026, rev 3)
   Header, hero banner and promo strip all begin and end on the same vertical
   line. Three knobs at the top control everything.
   ========================================================================== */

:root {
    /* The homepage grid already established by home-responsive-fix inside
       phase6-storefront-bundle: 1320px wide, 16px of breathing room each side
       at narrow widths, no inner padding. Everything below matches it. */
    /* cub-logo-white.png carries transparent margin of its own that CSS cannot
       measure. This pulls the visible mark back onto the gutter line.
       Less negative = logo moves right. More negative = logo moves left. */
    --cub-logo-nudge: -2px;
}

/* --------------------------------------------------------------------------
   1) ADOPT THE THEME'S OWN ALIGNMENT SYSTEM

   front-page-responsive-final.css already defines the correct grid:

       .phase1-home :is(.stx-header-container, .pdf1-hero-container,
                        .pdf1-promo-container, .pdf4-home-container, ...) {
           width: 100% !important;
           max-width: calc(1320px + gutter*2) !important;
           padding-inline: var(--cub-home-gutter) !important;   /* 16px */
       }

   index.blade.php pushes that file through @push('styles'), and the layout
   renders @stack('styles') on line 198 - after this file loads on line 191.
   Equal specificity, later origin, so it won every !important written here.
   Measured proof: header, hero and pdf4 all reported padding 16px, not the 0
   this file asked for.

   So this file no longer invents a second geometry. It reuses the same
   variable, and only raises specificity (body.phase1-home... = one extra id-
   less selector) so the promo strip is pulled onto the same line as the rest
   instead of keeping its own 12px padding from pdf-phase1-home.css.

   Change --cub-home-gutter in front-page-responsive-final.css to move every
   band at once. Do not add widths here.
   -------------------------------------------------------------------------- */
body.phase1-home .stx-header-container,
body.phase1-home .pdf1-hero-container,
body.phase1-home .pdf1-promo-container,
body.phase1-home .pdf1-promo-container.container,
body.phase1-home .pdf2-section-container,
body.phase1-home .pdf4-home-container {
    --bs-gutter-x: 0 !important;
    width: 100% !important;
    max-width: calc(var(--cub-home-content-max, 1320px) + (var(--cub-home-gutter, 16px) * 2)) !important;
    margin-inline: auto !important;
    padding-left: var(--cub-home-gutter, 16px) !important;
    padding-right: var(--cub-home-gutter, 16px) !important;
}

/* The header sits outside .phase1-home on inner pages, so it needs the same
   treatment without depending on the homepage class. */
body.phase1-storefront .stx-header-container,
body.phase1-storefront .stx-navbar-container {
    --bs-gutter-x: 0 !important;
    max-width: calc(var(--cub-home-content-max, 1320px) + (var(--cub-home-gutter, 16px) * 2)) !important;
    margin-inline: auto !important;
    padding-left: var(--cub-home-gutter, 16px) !important;
    padding-right: var(--cub-home-gutter, 16px) !important;
}

/* Zero the logo surface's own 10px side padding so the mark starts on the
   gutter line rather than 10px inside it. */
@media (min-width: 992px) {
    body.phase1-storefront .stx-mainbar__inner {
        grid-template-columns: 132px minmax(280px, 1fr) auto !important;
        align-items: center !important;
    }

    body.phase1-storefront .stx-logo {
        justify-content: flex-start !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    body.phase1-storefront .stx-logo__surface {
        width: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: var(--cub-logo-nudge) !important;
    }
}

/* --------------------------------------------------------------------------
   2) PROMO STRIP (Swiper)

   partners.blade.php now renders a Swiper carousel instead of a duplicated
   CSS marquee. Swiper measures its own container and snaps, so slides rest
   flush without any percentage arithmetic here, and it auto-advances once
   there are more than 3 banners (with 3 there is nothing to advance into).

   This block only supplies the card frame. Do not add widths to the slides -
   Swiper sets those inline and will fight anything declared here.
   -------------------------------------------------------------------------- */
body.phase1-home .pdf1-promo-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden;
}

body.phase1-home .cub-promo-swiper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.phase1-home .cub-promo-swiper .swiper-slide {
    height: auto !important;
}

body.phase1-home .cub-promo-card {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 3 / 1 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    text-decoration: none !important;
}

/* home-responsive-fix.css sets object-fit: contain on the old promo image
   class, which letterboxed roughly 3:1 artwork inside a 2.72:1 frame and
   printed a near-white margin inside every card. Fill the frame instead. */
body.phase1-home .cub-promo-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    background: transparent !important;
}

/* --------------------------------------------------------------------------
   2b) ALIGNMENT INSPECTOR

   Run this in the browser console to outline every band, then look at whether
   the coloured edges form one straight vertical line down the page:

       document.body.classList.toggle('cub-debug-align')

   Red    = header bar
   Blue   = hero banner
   Green  = promo strip
   Orange = section containers
   A dashed centre line marks the true 1320px column.
   -------------------------------------------------------------------------- */
.cub-debug-align .stx-header-container { outline: 2px solid rgba(220, 38, 38, .9) !important; outline-offset: -2px; }
.cub-debug-align .pdf1-hero-container { outline: 2px solid rgba(37, 99, 235, .9) !important; outline-offset: -2px; }
.cub-debug-align .pdf1-promo-container { outline: 2px solid rgba(22, 163, 74, .9) !important; outline-offset: -2px; }
.cub-debug-align .pdf1-promo-group { outline: 1px dashed rgba(22, 163, 74, .7) !important; }
.cub-debug-align .pdf1-promo-card { outline: 1px solid rgba(147, 51, 234, .8) !important; outline-offset: -1px; }
.cub-debug-align .pdf4-home-container,
.cub-debug-align .pdf2-section-container { outline: 2px solid rgba(234, 88, 12, .9) !important; outline-offset: -2px; }

.cub-debug-align::before,
.cub-debug-align::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px dashed rgba(0, 0, 0, .55);
    z-index: 99999;
    pointer-events: none;
}
.cub-debug-align::before { left: calc(50% - (var(--cub-home-content-max, 1320px) / 2)); }
.cub-debug-align::after  { left: calc(50% + (var(--cub-home-content-max, 1320px) / 2)); }

/* --------------------------------------------------------------------------
   3) NOTHING PAINTS OUTSIDE ITS BAND
   -------------------------------------------------------------------------- */
.phase1-home {
    overflow-x: clip;
}

.phase1-home .pdf1-hero-section,
.phase1-home .pdf1-promo-section {
    overflow-x: clip;
}

.phase1-home .pdf1-hero-container {
    overflow: hidden !important;
}


.phase1-home .pdf1-promo-card:empty,
.phase1-home .pdf1-promo-card:not(:has(img)) {
    display: none !important;
}

@media (max-width: 991.98px) {
    :root {
        --cub-logo-nudge: -2px;
    }
}

/* --------------------------------------------------------------------------
   4) TESTIMONIALS
   Same vertical rhythm as the bands above, heading text and underline pinned
   to the true centre of the navy band.
   -------------------------------------------------------------------------- */
.phase1-home .pdf4-testimonials {
    margin-top: 48px !important;
    padding: 0 0 56px !important;
}

.phase1-home .pdf4-testimonials .pdf4-section-heading,
.pdf4-testimonials .pdf4-section-heading {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 64px !important;
    padding: 16px 24px !important;
    margin: 0 0 36px !important;
    text-align: center !important;
}

.phase1-home .pdf4-testimonials .pdf4-section-heading h2,
.pdf4-testimonials .pdf4-section-heading h2 {
    flex: 0 1 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

.phase1-home .pdf4-testimonials .pdf4-section-heading h2::after,
.pdf4-testimonials .pdf4-section-heading h2::after {
    margin-inline: auto !important;
}

.phase1-home .pdf4-testimonials .cub-testi-swiper {
    padding: 4px 4px 54px !important;
}

.phase1-home .pdf4-testimonials .cub-testi-dots {
    bottom: 14px !important;
}

@media (max-width: 767.98px) {
    .phase1-home .pdf4-testimonials {
        margin-top: 30px !important;
        padding: 0 0 36px !important;
    }

    .phase1-home .pdf4-testimonials .pdf4-section-heading,
    .pdf4-testimonials .pdf4-section-heading {
        min-height: 50px !important;
        padding: 12px 16px !important;
        margin-bottom: 22px !important;
    }
}
