/* ============================================================================
   Intelligent Banners promotions slider (#vlp-promotions) and promo grid cards
   Moved out of vlp-2020.css (2026-11, ticket 73204) so the legacy VLP (vlp_normal)
   can load it on its own (Inventory::vlp_display). vlp-2020.css still @imports it,
   so any edit here requires `gulp minifyCss` before it can ship.
   ============================================================================ */

/* BMW VLP Promotions Slider  */
@font-face { font-family: 'bmwpromohead'; src: url('/wp-content/themes/pm-flex-theme/fonts/bmw/BMWMotorrad-Bold.ttf'); } 
@font-face { font-family: 'bmwpromobody'; src: url('/wp-content/themes/pm-flex-theme/fonts/bmw/BMWMotorrad-Regular.ttf'); }

.inv-promotion-slider { width: 75%; margin: 0 auto; }
.inv-promotion-slider.slick-dotted.slick-slider { margin-bottom: 15px !important; }
.inv-promotion-slider.slick-dotted.slick-slider .slick-dots { bottom: -10px !important; }
.inv-promotion-slider.slick-initialized { display: block !important; }

.inv-promotion-block { text-align: center; }
.inv-promotion-block .ipb-cont { max-width: 1200px; }
.inv-promotion-block .ipb-cont { display: flex; align-items: center; justify-content: center; gap: 25px; background-color: #f1f1f1; margin: 20px 0; padding: 30px 30px; }
/* #vlp-promotions specificity needed to beat bmw_promotions_slider.css's .ipb-cont{width:100%} rule, which loads for every site with promotions enabled, not just BMW ones */
#vlp-promotions .inv-promotion-block .ipb-cont { max-width: 1200px; width: auto; }
.inv-promotion-block .ipb-left img { width: 210px; height: 120px; object-fit: contain; }
.inv-promotion-block br { display: none; }

.inv-promotion-block .ipb-right { text-align: left; }
.inv-promotion-block .ipb-title { font-family: 'bmwpromohead' !important; font-size: 20px; letter-spacing: -0.2px; margin-bottom: 4px; }
.inv-promotion-block .ipb-short-description { font-family: 'bmwpromobody'; font-size: 14px; line-height: 1.4; margin-bottom: 8px; max-width: 700px; }
.inv-promotion-block .ipb-expire { font-family: 'bmwpromobody' !important; }
.inv-promotion-block .ipb-cta { margin-top: 15px; }
.inv-promotion-block .ipb-cta a { cursor: pointer; font-family: 'bmwpromobody'; background: #000; color: #fff; font-weight: bold; font-size: 14px; padding: 7px 13px; display: inline-block; }

@media only screen and (max-width: 767px) {
    /* .inv-promotion-block .ipb-left { display: none; } */
    .inv-promotion-block .ipb-short-description { display: none; }
    .ipb-promo-description { display: none; }
}

/* CrossCountry Powersports VLP Promotions (dark banner design) — mobile-first.
   Base rules below are the mobile layout: stacked, left-aligned, full-width image, full
   (unclamped) description. The min-width:768px block layers on the desktop row layout used in
   the #vlp-promotions slider. bmw_promotions_slider.css loads after this file for every site
   with promotions enabled (not just BMW ones) and sets several of these same properties at
   the SAME specificity across its own base/1199px/767px tiers — every property below that it
   also touches is duplicated with a #vlp-promotions prefix (ID beats any number of classes,
   regardless of load order or which media tier is active) so ours always wins. The inline VLP
   grid card (.vlpcard-item-container.ccps-promo-block) never matches bmw's .inv-promotion-block
   selectors, so it only needs the plain rules — this only matters for the slider.
   jQuery's $(...).show() (called from _initSlider for the personalization-banner flow) also
   writes an inline display style directly onto #vlp-promotions, which beats any non-!important
   CSS — the mobile-hide/desktop-show toggle needs !important on both sides to survive that. */
/* Overrides the general .inv-promotion-slider{width:75%} rule (vlp-2020.css) — this design
   spans the full content width, matching the search bar/vehicle grid below it. */
#vlp-promotions .inv-promotion-slider.ccps-promo-slider { position: relative; width: 100%; background-color: transparent; }
/* quick-look.css's global, unscoped .slick-track{align-items:center} vertically centers every
   slide within the track's shared height (set to the tallest slide). Since the disclaimer below
   ipb-cont still varies in length per promotion, that centering pushed the banner down by a
   different amount per slide even after ipb-cont itself was fixed-height — top-align instead so
   the banner always starts at the same spot regardless of a shorter/longer disclaimer. */
#vlp-promotions .ccps-promo-slider.slick-slider .slick-track { align-items: flex-start !important; }
.ccps-promo-block,
#vlp-promotions .ccps-promo-block { text-align: left; }
.ccps-promo-block .ipb-cont,
#vlp-promotions .ccps-promo-block .ipb-cont { display: flex; flex-direction: column; align-items: stretch; max-width: none; width: 100%; margin: 20px 0; padding: 0; background-color: var(--pmib-panel-bg); overflow: hidden; }
.ccps-promo-block .ipb-left,
#vlp-promotions .ccps-promo-block .ipb-left { width: 100%; }
.ccps-promo-block .ipb-left img,
#vlp-promotions .ccps-promo-block .ipb-left img { width: 100%; height: auto; display: block; object-fit: cover; }
.ccps-promo-block .ipb-right,
#vlp-promotions .ccps-promo-block .ipb-right { width: 100%; padding: 20px 20px 0; }
.ccps-promo-block .ipb-title,
#vlp-promotions .ccps-promo-block .ipb-title { font-family: 'Rubik', sans-serif !important; color: var(--pmib-text-color); font-size: 28px; font-weight: 700; text-transform: uppercase; line-height: 1.25; margin-bottom: 8px; }
.ccps-promo-block .ipb-short-description { font-family: 'Rubik', sans-serif; color: var(--pmib-muted-color); font-size: 16px; font-weight: 400; line-height: 1.5; margin-bottom: 0; }
.ccps-promo-block .ipb-more-details { color: var(--pmib-accent-color); font-weight: 700; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.ccps-promo-block .ipb-cta,
#vlp-promotions .ccps-promo-block .ipb-cta { margin-top: 0; padding: 16px 20px 20px; }
.ccps-promo-block .ipb-cta a,
#vlp-promotions .ccps-promo-block .ipb-cta a { font-family: 'Rubik', sans-serif; background: var(--pmib-cta-bg); color: var(--pmib-cta-color); font-weight: 700; font-size: 20px; padding: 12px 22px; letter-spacing: 0.5px; text-decoration: none; display: block; width: 100%; text-align: center; box-sizing: border-box; }
.ccps-promo-block .ipb-disclaimer { font-family: 'Rubik', sans-serif; text-align: center; font-style: italic; font-size: 11px; color: var(--pmib-muted-color); line-height: 1.4; max-width: none; width: 100%; margin: 12px 0 0; }

/* Reuses the existing .vlpm3Pagination/.vlpm3Pages "X of Y" + arrow pattern (vehicle listing
   pagination) instead of slick's dots — see PMSEO.setupSliderPager() in seo.js. */
.ccps-slider-pager { margin: 15px 0; }

/* Prev/next chevrons overlaid on the slider, hidden until hover — CSS-only chevrons (rotated
   border corner) rather than slick-theme's icon font, since that font isn't loaded on this
   theme (see .vlpm3VehicleImage's arrows above, which take the same DIY approach). Only one
   promotion means nothing to navigate to, so #vlp-promotions.pmib-single-promo (toggled in
   PMSEO.setupSliderPager() based on slick's slideCount) hides both these and the pager entirely. */
.ccps-promo-slider .slick-arrow { position: absolute; top: 50%; z-index: 10; width: 40px; height: 40px; padding: 0; margin: 0; border: none; background: transparent; cursor: pointer; opacity: 0; transform: translateY(-50%); transition: opacity 0.2s ease; }
.ccps-promo-slider .slick-arrow:before { content: none; }
.ccps-promo-slider:hover .slick-arrow { opacity: 1; }
.ccps-promo-slider .slick-prev { left: 10px; }
.ccps-promo-slider .slick-next { right: 10px; }
.ccps-promo-slider .slick-arrow span { display: block; width: 14px; height: 14px; border-top: 3px solid var(--pmib-text-color); border-right: 3px solid var(--pmib-text-color); }
.ccps-promo-slider .slick-prev span { margin-left: 12px; transform: rotate(-135deg); }
.ccps-promo-slider .slick-next span { margin-right: 12px; transform: rotate(45deg); }
#vlp-promotions.pmib-single-promo .ccps-promo-slider .slick-arrow,
#vlp-promotions.pmib-single-promo .ccps-slider-pager { display: none; }

/* The inline VLP grid card should match the width of the inventory cards around it (its
   .vlpcard-item-container wrapper is already width:100%) rather than the slider's capped,
   centered 1200px box. */
.vlpcard-item-container.ccps-promo-block .ipb-cont { max-width: none; width: 100%; margin: 20px 0; }

/* Mobile (<768px): the #vlp-promotions slider is now shown here too (client request), same as
   tablet/desktop. The styles below apply to both it and the inline VLP grid card
   (.vlpcard-item-container.ccps-promo-block) — give both the same inset-image treatment as
   tablet (was full-bleed edge-to-edge) and a smaller headline so it doesn't dominate the narrow
   card. */
@media only screen and (max-width: 767px) {
    .ccps-promo-block .ipb-cont,
    #vlp-promotions .ccps-promo-block .ipb-cont { padding: 16px; }
    .ccps-promo-block .ipb-right,
    #vlp-promotions .ccps-promo-block .ipb-right { padding: 16px 0 0; }
    .ccps-promo-block .ipb-cta,
    #vlp-promotions .ccps-promo-block .ipb-cta { padding: 16px 0 16px; }
}

/* Tablet (768–991px): still stacked like mobile, but the image is inset (not full-bleed) and
   the CTA is an auto-width button instead of stretching full width. */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    .ccps-promo-block .ipb-cont,
    #vlp-promotions .ccps-promo-block .ipb-cont { padding: 24px; }
    /* Capped so the (often lower-res) promo image doesn't stretch to the full inset width and
       look blown-up/blurry on tablet. */
    .ccps-promo-block .ipb-left img,
    #vlp-promotions .ccps-promo-block .ipb-left img { max-width: 350px; width: 100%; height: auto; margin: 0 auto; display: block; }
    .ccps-promo-block .ipb-right,
    #vlp-promotions .ccps-promo-block .ipb-right { padding: 20px 0 0; }
    .ccps-promo-block .ipb-cta,
    #vlp-promotions .ccps-promo-block .ipb-cta { padding: 16px 0 0; }
    .ccps-promo-block .ipb-cta a,
    #vlp-promotions .ccps-promo-block .ipb-cta a { display: inline-block; width: auto; }
}

/* Desktop (992px+): 2-column grid — image on the left spanning the full height, with the
   title/description/CTA stacked normally in the right column (not a 3rd item in a row — the
   CTA sits directly under the description, left-aligned, per the design reference). */
@media only screen and (min-width: 992px) {
    .ccps-promo-block .ipb-cont,
    #vlp-promotions .ccps-promo-block .ipb-cont { display: grid; grid-template-columns: 260px 1fr; grid-template-rows: auto auto; gap: 16px 25px; padding: 30px; }
    .ccps-promo-block .ipb-left,
    #vlp-promotions .ccps-promo-block .ipb-left { grid-column: 1; grid-row: 1 / span 2; width: auto; height: 100%; }
    .ccps-promo-block .ipb-left img,
    #vlp-promotions .ccps-promo-block .ipb-left img { width: 100%; height: 100%; object-fit: contain; }
    .ccps-promo-block .ipb-right,
    #vlp-promotions .ccps-promo-block .ipb-right { grid-column: 2; grid-row: 1; width: auto; padding: 0; }
    .ccps-promo-block .ipb-short-description,
    #vlp-promotions .ccps-promo-block .ipb-short-description { max-width: none; }
    .ccps-promo-block .ipb-cta,
    #vlp-promotions .ccps-promo-block .ipb-cta { grid-column: 2; grid-row: 2; padding: 0; }
    .ccps-promo-block .ipb-cta a,
    #vlp-promotions .ccps-promo-block .ipb-cta a { display: inline-block; width: auto; }
    /* When the image is hidden (.ipb-left.d-none, e.g. a broken NAN-dimensioned URL), the fixed
       260px column would otherwise stay reserved as empty space since display:none on the item
       doesn't remove the grid track itself — collapse to a single full-width column instead. */
    .ccps-promo-block .ipb-cont.ccps-no-image,
    #vlp-promotions .ccps-promo-block .ipb-cont.ccps-no-image { grid-template-columns: 1fr; }
    .ccps-promo-block .ipb-cont.ccps-no-image .ipb-right,
    #vlp-promotions .ccps-promo-block .ipb-cont.ccps-no-image .ipb-right,
    .ccps-promo-block .ipb-cont.ccps-no-image .ipb-cta,
    #vlp-promotions .ccps-promo-block .ipb-cont.ccps-no-image .ipb-cta { grid-column: 1; }
}
