/* ============================================================
   MCS V2 Vehicle Distribution — Frontend Styles
   Used by: homepage-promotions, remote-deals-reviews,
            remote-vehicle-features shortcodes.
   ============================================================ */

/* ===== Homepage Promotions Slider =====
   Heights/overlay strength are driven by CSS custom properties set inline
   on the .mcsv2-slider element by the shortcode:
     --mcsv2-slider-h          (desktop, default 620px)
     --mcsv2-slider-h-mobile   (mobile,  default 420px)
     --mcsv2-slider-overlay    (0..1,    default 0.4)
   var() fallbacks make this work even if the inline custom properties
   somehow get stripped. !important is needed to defeat themes (Avada,
   etc.) that set heights on parent column wrappers.
   ================================================================ */

.mcsv2-slider {
    position: relative;
    width: 100% !important;
    overflow: hidden;
    --mcsv2-slider-h: 620px;
    --mcsv2-slider-h-mobile: 420px;
    --mcsv2-slider-overlay: 0.4;
}

.mcsv2-slide {
    position: relative;
    display: flex !important;
    align-items: center;
    width: 100% !important;
    min-height: var(--mcsv2-slider-h, 620px) !important;
    height: var(--mcsv2-slider-h, 620px) !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    box-sizing: border-box !important;
}

/* Multi-slide layout: slides stack on top of each other; the active one is
   the only one visible. Opacity transition keeps layout stable. */
.mcsv2-slider.is-multi {
    min-height: var(--mcsv2-slider-h, 620px) !important;
    height: var(--mcsv2-slider-h, 620px) !important;
}
.mcsv2-slider.is-multi .mcsv2-slide {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
    z-index: 1;
}
.mcsv2-slider.is-multi .mcsv2-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* Dark gradient overlay for text readability on busy images. */
.mcsv2-slide-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(180deg,
        rgba(0,0,0, calc(var(--mcsv2-slider-overlay, 0.4) * 0.4)) 0%,
        rgba(0,0,0, var(--mcsv2-slider-overlay, 0.4)) 100%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

.mcsv2-slide-inner {
    position: relative !important;
    z-index: 2 !important;
    padding: 40px 48px;
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
}

.mcsv2-slide-inner.align-center { margin: 0 auto; text-align: center; }
.mcsv2-slide-inner.align-right  { margin-left: auto; text-align: right; }
.mcsv2-slide-inner.align-left   { margin-right: auto; text-align: left; }

.mcsv2-slide-inner.valign-top    { align-self: flex-start; padding-top: 60px; }
.mcsv2-slide-inner.valign-bottom { align-self: flex-end; padding-bottom: 60px; }

.mcsv2-slide h2 {
    margin: 0 0 14px !important;
    font-size: 44px !important;
    line-height: 1.05 !important;
    color: #fff !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.mcsv2-slide-content {
    color: #fff !important;
    margin-bottom: 22px;
    font-size: 17px;
    line-height: 1.5;
    text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}
.mcsv2-slide-content p { color: #fff !important; }

.mcsv2-slide-button {
    display: inline-block !important;
    padding: 14px 30px !important;
    background: #c9362e !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    transition: background .2s ease;
}
.mcsv2-slide-button:hover { background: #a92c27 !important; }

/* Pagination dots (multi-slide only) */
.mcsv2-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 5;
}
.mcsv2-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,0.5);
    padding: 0;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.mcsv2-slider-dot:hover { background: rgba(255,255,255,0.8); }
.mcsv2-slider-dot.is-active { background: #fff; transform: scale(1.2); }

@media (max-width: 640px) {
    .mcsv2-slide,
    .mcsv2-slider.is-multi {
        min-height: var(--mcsv2-slider-h-mobile, 420px) !important;
        height: var(--mcsv2-slider-h-mobile, 420px) !important;
    }
    .mcsv2-slide-inner { padding: 24px 20px; max-width: 100%; }
    .mcsv2-slide h2 { font-size: 28px !important; }
    .mcsv2-slide-content { font-size: 15px !important; }
}

/* ===== Remote Deals & Reviews ===== */
.jac-rdr-wrap { margin: 40px auto; width: 100%; max-width: 1160px; position: relative; }
.jac-rdr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 42px 36px; }

.jac-rdr-card { display: block; text-decoration: none !important; color: inherit !important; box-sizing: border-box; }
.jac-rdr-image { width: 100%; aspect-ratio: 16/10; overflow: hidden; border-radius: 10px; background: #f3f3f3; margin-bottom: 16px; }
.jac-rdr-image img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; }

.jac-rdr-title { margin: 0 0 10px; font-size: 24px; line-height: 1.05; font-weight: 800; color: #c9362e; text-align: center; }
.jac-rdr-excerpt { font-size: 14px; line-height: 1.5; color: #111; text-align: center; }
.jac-rdr-button { display: inline-block; margin-top: 18px; background: #c9362e; color: #fff !important; text-decoration: none !important; padding: 14px 28px; font-weight: 800; }

.jac-rdr-deals .jac-rdr-grid { grid-template-columns: 1fr; gap: 70px; }
.jac-rdr-deals .jac-rdr-grid .jac-rdr-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.jac-rdr-deals .jac-rdr-title { text-align: left; font-size: 42px; }
.jac-rdr-deals .jac-rdr-excerpt { text-align: left; }
.jac-rdr-reviews .jac-rdr-button { display: none; }

/* Carousel shell — deals/reviews */
.jac-rdr-carousel-shell { position: relative; width: 100%; }
.jac-rdr-carousel-viewport { overflow: hidden; width: 100%; }
.jac-rdr-carousel-track {
    display: flex;
    gap: var(--jac-rdr-gap, 32px);
    transition: transform .35s ease;
    will-change: transform;
}
.jac-rdr-carousel-track .jac-rdr-card {
    flex: 0 0 calc((100% - (var(--jac-rdr-gap, 32px) * (var(--jac-rdr-visible, 3) - 1))) / var(--jac-rdr-visible, 3));
    max-width: calc((100% - (var(--jac-rdr-gap, 32px) * (var(--jac-rdr-visible, 3) - 1))) / var(--jac-rdr-visible, 3));
}

.jac-rdr-arrow {
    position: absolute;
    top: 34%;
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 0;
    background: #c9362e;
    color: #fff;
    font-size: 24px;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jac-rdr-arrow:hover { background: #a92c27; }
.jac-rdr-prev { left: -54px; }
.jac-rdr-next { right: -54px; }
.jac-rdr-arrow[disabled] { opacity: .3; cursor: not-allowed; }

.jac-rdr-dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; }
.jac-rdr-dot { width: 9px; height: 9px; border-radius: 999px; border: 0; background: #bfbfbf; padding: 0; cursor: pointer; }
.jac-rdr-dot.is-active { background: #c9362e; }

@media (max-width: 1280px) {
    .jac-rdr-prev { left: -22px; }
    .jac-rdr-next { right: -22px; }
}

@media (max-width: 980px) {
    .jac-rdr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .jac-rdr-carousel-track { --jac-rdr-visible: var(--jac-rdr-tablet-visible, 3); }
    .jac-rdr-deals .jac-rdr-grid .jac-rdr-card { grid-template-columns: 1fr; }
    .jac-rdr-deals .jac-rdr-title { text-align: center; font-size: 32px; }
    .jac-rdr-deals .jac-rdr-excerpt { text-align: center; }
}

@media (max-width: 640px) {
    .jac-rdr-grid { grid-template-columns: 1fr; }
    .jac-rdr-carousel-track { --jac-rdr-visible: var(--jac-rdr-mobile-visible, 1); }
    .jac-rdr-arrow { top: 28%; width: 34px; height: 34px; font-size: 22px; }
    .jac-rdr-prev { left: 4px; }
    .jac-rdr-next { right: 4px; }
}

/* ===== Remote Vehicle Features ===== */
.jac-rvf-wrap { margin: 24px 0; }
.jac-rvf-title { margin: 0 0 28px; text-align: center; }
.jac-rvf-grid { display: grid; gap: 0; align-items: stretch; }
.jac-rvf-card { padding: 34px 24px; text-align: center; min-height: 100%; box-sizing: border-box; }
.jac-rvf-card-inner { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; height: 100%; }
.jac-rvf-icon { margin: 0 0 18px; line-height: 0; display: flex; align-items: center; justify-content: center; }
.jac-rvf-icon img { width: auto; height: auto; display: block; border-radius: .5em; }
.jac-rvf-image { margin: 0 0 18px; width: 100%; aspect-ratio: 16/10; overflow: hidden; border-radius: 14px; }
.jac-rvf-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jac-rvf-name { margin: 0 0 10px; line-height: 1.08; text-align: center; }
.jac-rvf-text { line-height: 1.55; text-align: center; margin: 0 auto; }
.jac-rvf-text p { margin: 0; }
.jac-rvf-empty { padding: 18px 20px; border: 1px solid #e5e7eb; border-radius: 14px; background: #f8fafc; }

/* Carousel shell — vehicle features */
.jac-rvf-carousel-shell { position: relative; max-width: 100%; padding: 0 46px; }
.jac-rvf-carousel-viewport { overflow: hidden; width: 100%; }
.jac-rvf-carousel-track { display: flex; transition: transform .38s ease; will-change: transform; }
.jac-rvf-carousel-item { flex: 0 0 auto; box-sizing: border-box; padding: 0 14px; }
.jac-rvf-carousel-item .jac-rvf-card { height: 100%; }

.jac-rvf-arrow {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 0;
    background: #c9362e;
    color: #fff;
    font-size: 26px;
    line-height: 0;
    text-align: center;
    cursor: pointer;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jac-rvf-arrow:hover { background: #111; }
.jac-rvf-prev { left: 0; }
.jac-rvf-next { right: 0; }
.jac-rvf-dots { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 18px; }
.jac-rvf-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; background: #c7c7c7; padding: 0; cursor: pointer; }
.jac-rvf-dot.active { background: #c9362e; }
.jac-rvf-carousel-shell.is-disabled .jac-rvf-arrow,
.jac-rvf-carousel-shell.is-disabled .jac-rvf-dots { display: none; }

@media (max-width: 800px) {
    .jac-rvf-carousel-shell { padding: 0 34px; }
    .jac-rvf-arrow { width: 32px; height: 32px; font-size: 22px; }
}