/*
 * Model page (single-jac_model.php): its sections, the photo sliders from
 * parts/feat-slider.php and the promotions strip.
 * Loaded after main.css by jac_page_style() in inc/enqueue.php.
 */

/* Feat slider */
.jac-feat-slider { position: relative; }

.jac-feat-slider__wrap { overflow: hidden; }

.jac-feat-slider__track {
    display: flex;
    gap: 20px;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}

.jac-feat-slider__card {
    flex: none;
    width: calc((100% - 40px) / 3);
    border-radius: 12px;
    overflow: hidden;
    background: #fbfbfb;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

.jac-feat-slider__img-wrap { overflow: hidden; }

.jac-feat-slider__img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform .35s;
}

.jac-feat-slider__card:hover .jac-feat-slider__img { transform: scale(1.03); }

.jac-feat-slider__body { padding: 16px; }

.jac-feat-slider__title { font-size: .9375rem; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
.jac-feat-slider__desc  { font-size: .8125rem; line-height: 1.55; color: rgba(33,33,33,.7); }

.jac-feat-slider__arrow {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.12);
    background: var(--white);
    box-shadow: 0 2px 8px rgb(0 0 0 / .1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    z-index: 5;
}

.jac-feat-slider__arrow:hover   { border-color: var(--brand); background: var(--brand); color: var(--white); }
.jac-feat-slider__arrow:disabled { opacity: .3; pointer-events: none; }
.jac-feat-slider__arrow--prev { left: -20px; }
.jac-feat-slider__arrow--next { right: -20px; }

@media (max-width: 900px) {
    .jac-feat-slider__card { width: calc((100% - 20px) / 2); }
}

@media (max-width: 540px) {
    .jac-feat-slider__card { width: 100%; }
}

/* ============================================================
   MODEL PAGE — single-jac_model.php
   Tłumaczenie 1:1 z NowejacModelPage.tsx
   ============================================================ */

.jac-model-page { background: #fff; padding-bottom: 80px; }

.jac-divider { border: none; border-top: 1px solid rgba(0,0,0,.12); margin: 0; }

/* === HERO === */
.jac-mhero { position: relative; background: #0a1e2e; }

.jac-mhero__bg {
    position: relative;
    z-index: 0;
    height: 160px;
    overflow: hidden;
    background: #0a1e2e;
}

.jac-mhero__video,
.jac-mhero__bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jac-mhero__car-wrap {
    pointer-events: none;
    position: absolute;
    left: 50%;
    top: 40px;
    z-index: 10;
    width: 80%;
    max-width: 860px;
    height: 200px;
    transform: translateX(-50%);
}

.jac-mhero__car {
    height: 100%;
    width: 100%;
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 24px 40px rgba(0,0,0,.22));
}

.jac-mhero__bar {
    position: relative;
    z-index: 1;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.12);
    padding-bottom: 28px;
    padding-top: 100px;
}

.jac-mhero__badges {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.jac-mhero__badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 140px;
}

.jac-mhero__badge-value {
    width: 100%;
    border: 1.5px solid #005d7d;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 8px 16px;
    font-size: clamp(18px, 4vw, 32px);
    font-weight: 700;
    letter-spacing: -.03em;
    color: #212121;
    line-height: 1;
}

.jac-mhero__badge-label {
    width: 100%;
    border-radius: 0 0 12px 12px;
    padding: 5px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #fff;
    background: #005d7d;
    line-height: 1.3;
}

.jac-mhero__badge-label.is-promo { background: #E71324; }

.jac-mhero__catalog-price {
    margin-top: 12px;
    text-align: center;
    font-size: .875rem;
    color: rgba(33,33,33,.7);
}

.jac-mhero__cta {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* === OVERVIEW === */
.jac-moverview { padding-block: 80px; }

.jac-moverview__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
}

.jac-moverview__title {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.025em;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.jac-moverview__intro {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(33,33,33,.7);
    margin-bottom: 28px;
}

.jac-moverview__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.jac-moverview__feat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1.5px solid rgba(0,0,0,.12);
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.jac-moverview__feat-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jac-moverview__feat-header img { width: 36px; height: 36px; object-fit: contain; }

.jac-moverview__feat-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #1a1a1a;
}

.jac-moverview__feat-desc {
    font-size: .875rem;
    line-height: 1.55;
    color: rgba(33,33,33,.7);
}

/* === STATS GRID (power, zabudowa, warranty) === */
.jac-mstats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
}

.jac-mstats-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1.5px solid rgba(0,0,0,.12);
    border-radius: 12px;
    padding: 28px;
    background: rgba(255,255,255,.8);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.jac-mstats-desc {
    font-size: .9375rem;
    line-height: 1.6;
    color: rgba(33,33,33,.7);
}

.jac-mstats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.jac-mstats-item {
    padding: 8px 24px 8px 0;
    margin-right: 24px;
    border-right: 1px solid rgba(0,0,0,.1);
}

.jac-mstats-item:last-child { border-right: none; padding-right: 0; margin-right: 0; }

.jac-mstats-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.03em;
    color: #1a1a1a;
    line-height: 1;
}

.jac-mstats-label {
    font-size: .75rem;
    color: rgba(33,33,33,.7);
    margin-top: 2px;
}

.jac-mstats-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 12px;
}

.jac-mstats-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* === DESIGN EXPLORER (1:1 z DesignExplorer.tsx) === */
.jac-de {
    border-top: 1px solid rgba(0,0,0,.12);
    padding-block: 64px 80px;
    overflow-x: hidden;
}

.jac-de__grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.jac-de__sidebar { min-width: 0; }

/* Sidebar */
.jac-de__title {
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.025em;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.jac-de__subtitle {
    font-size: .9375rem;
    color: rgba(33,33,33,.7);
    margin-bottom: 20px;
}

.jac-de__nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: none;
}
.jac-de__nav::-webkit-scrollbar { display: none; }

.jac-de__nav-btn {
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,.06);
    color: #212121;
    font-size: .9375rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background .2s, color .2s;
    white-space: nowrap;
}

.jac-de__nav-btn:hover   { background: rgba(0,0,0,.09); }
.jac-de__nav-btn.is-active { background: var(--brand); color: #fff; }

/* Content area */
.jac-de__content {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f6f6f6;
    min-width: 0;
}

.jac-de__panel { display: none; }
.jac-de__panel.is-active { display: block; }

/* Colors panel */
.jac-de__img-wrap { position: relative; aspect-ratio: 16/9; background: #f2f2f2; }
.jac-de__img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }

.jac-de__color-slide { display: none; width: 100%; height: 100%; }
.jac-de__color-slide.is-active { display: block; }
.jac-de__color-slide img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }

.jac-de__color-label {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    white-space: nowrap;
}

.jac-de__swatches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 16px 24px;
    border-top: 1px solid #ebebeb;
    background: #fff;
}

.jac-de__swatch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .2s, box-shadow .2s;
    outline: none;
}

.jac-de__swatch:hover { transform: scale(1.12); }
.jac-de__swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #005d7d; }

/* Tab panels */
.jac-de__tab-img { aspect-ratio: 16/9; overflow: hidden; background: #e5e5e5; }
.jac-de__tab-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.jac-de__tab-body { padding: 24px; background: #fff; }

.jac-de__tab-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.jac-de__tab-desc {
    font-size: .9375rem;
    line-height: 1.6;
    color: rgba(33,33,33,.7);
}

/* Responsive */
@media (max-width: 1024px) {
    .jac-de { padding-block: 48px 64px; }
    .jac-de__grid { grid-template-columns: 1fr; gap: 32px; }
    .jac-de__nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
    }
    .jac-de__nav-btn { flex-shrink: 0; font-size: .875rem; }
}

/* === TJA === */
.jac-mtja {
    position: relative;
    padding-block: 80px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 420px;
    display: flex;
    align-items: center;
}

@media (max-width: 900px) {
    /* background-attachment: fixed doesn't work well on mobile */
    .jac-mtja { background-attachment: scroll; }
}

.jac-mtja__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.2) 100%);
}

.jac-mtja__inner { position: relative; z-index: 2; max-width: 600px; }

.jac-mtja__title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -.025em;
    margin-bottom: 16px;
}

.jac-mtja__desc {
    font-size: 1rem;
    color: rgba(255,255,255,.8);
    line-height: 1.6;
}

/* === INTERIOR === */
.jac-minterior { padding-block: 80px; }

.jac-minterior__hero {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: center;
    margin-bottom: 80px;
}

.jac-minterior__hero-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 12px;
}

.jac-minterior__hero-img img { width: 100%; height: 100%; object-fit: cover; }

.jac-minterior__hero-text h2 {
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.025em;
    margin-bottom: 16px;
}

.jac-minterior__hero-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(33,33,33,.7);
}

/* === TECHNOLOGY === */
.jac-mtech { padding-block: 80px; }

.jac-mtech__header {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 32px;
}

.jac-mtech__intro h2 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: -.025em;
    margin-bottom: 16px;
}

.jac-mtech__intro p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(33,33,33,.7);
}

.jac-mtech__highlight {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

.jac-mtech__highlight img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.jac-mtech__highlight-body { padding: 16px; }

.jac-mtech__highlight-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.jac-mtech__highlight-desc {
    font-size: .875rem;
    line-height: 1.55;
    color: rgba(33,33,33,.7);
}

/* === SAFETY === */
.jac-msafety { padding-block: 80px; }

.jac-msafety__intro {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(33,33,33,.7);
    max-width: 720px;
    margin-bottom: 32px;
}

.jac-msafety__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.jac-msafety__card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    background: #fbfbfb;
    box-shadow: 0 0 4px rgba(0,0,0,.08);
}

.jac-msafety__card-img { position: relative; aspect-ratio: 16/9; width: 100%; overflow: hidden; }
.jac-msafety__card-img img { width: 100%; height: 100%; object-fit: cover; }

.jac-msafety__card-body { flex: 1; padding: 16px; }

.jac-msafety__card-title {
    font-size: .9375rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin-bottom: 6px;
}

.jac-msafety__card-desc {
    font-size: .8125rem;
    line-height: 1.55;
    color: rgba(33,33,33,.7);
}

/* === CTA === */
.jac-mcta { padding-block: 80px; border-top: 1px solid rgba(0,0,0,.12); }

.jac-mcta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
}

.jac-mcta__logo { height: 52px; width: auto; object-fit: contain; }

.jac-mcta__model-name {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -.03em;
    color: #1a1a1a;
}

.jac-mcta__car {
    max-width: 480px;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-inline: auto;
}

.jac-mcta__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* === MOBILE BOTTOM BAR === */
.jac-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    border-top: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.97);
    padding: 10px 20px 16px;
    backdrop-filter: blur(12px);
}

.jac-mobile-bar__inner {
    display: flex;
    justify-content: space-around;
    background: #f0f0f0;
    border-radius: 999px;
    padding: 6px;
}

.jac-mobile-bar__btn {
    display: flex;
    flex: 1;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #212121;
    transition: background .2s;
}

.jac-mobile-bar__btn:hover { background: rgba(0,0,0,.06); }

.jac-mobile-bar__btn--red {
    flex: none;
    width: 44px;
    height: 44px;
    background: #ff3131;
    flex-shrink: 0;
}

.jac-mobile-bar__btn--red:hover { background: #e62b2b; }

/* === MODEL PAGE — responsive === */
@media (min-width: 901px) {
    .jac-mhero__bg { height: 420px; }
    .jac-mhero__car-wrap { top: 150px; width: 36%; height: 380px; }
    .jac-mhero__bar { padding-top: 140px; padding-bottom: 36px; }
    .jac-mhero__badge { min-width: 180px; }
}

@media (max-width: 900px) {
    .jac-mhero__bg { height: 220px; }
    .jac-mhero__car-wrap { top: 60px; width: 50%; height: 260px; }
    .jac-mhero__bar { padding-top: 120px; }
    .jac-moverview__grid { grid-template-columns: 1fr; }
    .jac-mstats-grid { grid-template-columns: 1fr; }
    .jac-minterior__hero { grid-template-columns: 1fr; }
    .jac-mtech__header { grid-template-columns: 1fr; }
    .jac-msafety__grid { grid-template-columns: repeat(2, 1fr); }
    .jac-mobile-bar { display: block; }
    .jac-model-page { padding-bottom: 96px; }
}

@media (max-width: 640px) {
    .jac-mhero__bg { height: 160px; }
    .jac-mhero__car-wrap { top: 40px; width: 80%; height: 200px; }
    .jac-mhero__bar { padding-top: 100px; }
    .jac-moverview__features { grid-template-columns: 1fr; }
    .jac-msafety__grid { grid-template-columns: 1fr; }
    .jac-mhero__badges { gap: 8px; }
    .jac-mhero__badge { min-width: 120px; }
}

/* ============================================================
   PROMO SECTION — strony modeli
   ============================================================ */

.promo-section { padding: 80px 0; border-bottom: 1px solid rgba(0,0,0,.12); }

.promo-section .wrap {
    display: grid;
    grid-template-columns: 280px 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.promo-section .promo-card {
    background: #fbfbfb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}

.promo-section .promo-card:hover {
    box-shadow: 0 8px 40px rgba(0,0,0,.14);
    transform: translateY(-2px);
}

.promo-section .promo-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1920/750;
    height: auto;
    overflow: hidden;
    background: #f0f0f0;
}

.promo-section .promo-card__img-wrap img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.promo-section .promo-card__body { padding: 16px; }

.promo-section .promo-card__title {
    font-size: 1.125rem; font-weight: 700;
    letter-spacing: -.02em; color: #1a1a1a;
    margin-bottom: 8px; line-height: 1.3;
}

.promo-section .promo-card__desc {
    font-size: .875rem; color: rgba(33,33,33,.55);
    line-height: 1.6; margin-bottom: 14px;
}

.promo-section .promo-card__footer { display: flex; justify-content: flex-end; }

/* ── Jedna promocja: zdjęcie na lewej połowie absolutnie ── */
.promo-section .wrap:has(> .promo-card:nth-child(2):last-child) {
    grid-template-columns: 280px 1fr;
}
.promo-section .wrap:has(> .promo-card:nth-child(2):last-child) .promo-card {
    position: relative;
    display: block;
}
.promo-section .wrap:has(> .promo-card:nth-child(2):last-child) .promo-card__img-wrap {
    position: absolute; top: 0; left: 0; right: 50%; bottom: 0;
    width: auto; height: 100%; aspect-ratio: unset;
}
.promo-section .wrap:has(> .promo-card:nth-child(2):last-child) .promo-card__body {
    margin-left: 50%;
    display: flex; flex-direction: column; justify-content: center;
    padding: 28px 32px; min-height: 180px;
}
.promo-section .wrap:has(> .promo-card:nth-child(2):last-child) .promo-card__footer {
    margin-top: auto; justify-content: flex-start;
}

@media (max-width: 900px) {
    .promo-section .wrap { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
    .promo-section .wrap > *:first-child { grid-column: 1 / -1; }
    .promo-section .wrap:has(> .promo-card:nth-child(2):last-child) { grid-template-columns: 1fr; }
    .promo-section .wrap:has(> .promo-card:nth-child(2):last-child) > *:first-child { grid-column: 1; }
}
@media (max-width: 640px) {
    .promo-section { padding: 48px 0; }
    .promo-section .wrap { grid-template-columns: 1fr; }
    .promo-section .wrap > *:first-child { grid-column: 1; }
    .promo-section .wrap:has(> .promo-card:nth-child(2):last-child) .promo-card__img-wrap {
        position: relative; top: auto; left: auto; right: auto; bottom: auto;
        width: 100%; height: auto; aspect-ratio: 1920/750;
    }
    .promo-section .wrap:has(> .promo-card:nth-child(2):last-child) .promo-card__body {
        margin-left: 0; padding: 20px; min-height: 0;
    }
}
