/*
 * 리스스킨 (car_detail_lease) — 리스 계산기 중심 카드형 매물 상세
 * 갤러리·라이트박스·아코디언 토글은 car_detail_encar.css/js를 그대로 재사용하고
 * (엔카 클래스는 이 파일에서 손대지 않음), 여기서는 히어로/카드/퀵닷/모바일독 등
 * 리스스킨 전용 마크업(cdl-*)만 스타일링한다.
 *
 * 사이트 기본 폰트(나눔스퀘어 등)와 무관하게 이 스킨 안에서는 항상 Pretendard로 통일한다
 * (easyplancar/sample/sim0724에서 쓰는 것과 동일한 서브셋 파일을 그대로 재사용 — 이미 그
 * 사이트를 방문했다면 브라우저 캐시도 재활용됨).
 */
@import url("/fonts/pretendard/pretendard-core.css");
@import url("/fonts/pretendard/pretendard-dynamic.css");

.epc-subpage-shell:has(.car-detail-lease-page),
.epc-page-shell:has(.car-detail-lease-page) {
    overflow: visible;
}

/* 모바일독·라이트박스는 .cdl-page 바깥 형제 요소라 body 기준으로 한 번에 적용한다 */
body:has(.car-detail-lease-page) {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

.cdl-page.epc-car-detail-page {
    max-width: var(--epc-detail-max-width, 1120px);
    width: 100%;
    margin: 24px auto 48px;
    box-sizing: border-box;
    padding: 0 10px 18px;
    color: #1a2233;
}

.cdl-page * {
    box-sizing: border-box;
}

/* ---------- 상단: 갤러리 + 히어로 ---------- */

.cdl-top {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 24px;
}

/* 엔카 스킨은 썸네일을 메인 이미지 옆(그리드 2열)에 두지만, 리스스킨은 참고 사이트처럼
   썸네일을 메인 이미지 아래 가로 스트립으로 내린다 — encar-gallery의 그리드 컬럼을
   1열로 바꾸고, 사이드 썸네일 그리드를 가로 flex로 바꿔준다. */
.cdl-gallery {
    display: flex;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
    height: 100%;
    margin-bottom: 0;
}

/* 오른쪽 히어로(리스 계산기 카드)가 이미지보다 길어져서 아래쪽이 비어보이는 걸 막기 위해,
   메인 이미지의 고정 비율 대신 남는 높이를 그대로 채우게(flex:1) 한다 — 짧아지지 않고
   히어로 카드 높이에 맞춰 오히려 길어진다. */
.cdl-gallery .encar-gallery__main {
    aspect-ratio: auto;
    flex: 1 1 auto;
    min-height: 320px;
}

.cdl-gallery__side {
    display: flex;
    flex: 0 0 auto;
    grid-template-columns: none;
    grid-template-rows: none;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 2px;
}

.cdl-gallery__side .encar-gallery__thumb {
    flex: 0 0 96px;
    width: 96px;
    height: 72px;
}

.cdl-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.shm-detail-viewer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef6ff;
    border: 1px solid #d6e9fc;
    color: var(--main-color, #0086d8);
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.cdl-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cdl-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    background: #f1f4f8;
    color: #55606f;
    font-size: 12px;
    font-weight: 700;
}

.cdl-badge--model {
    background: color-mix(in srgb, var(--main-color, #0086d8) 12%, #fff);
    color: var(--main-color, #0086d8);
}

.cdl-badge--serial {
    margin-left: auto;
    background: #f8f9fb;
    color: #8a94a3;
    font-weight: 600;
}

.cdl-hero__title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    color: #10182a;
    letter-spacing: -0.01em;
}

.cdl-spec-grid {
    /* 색상 미선택 매물은 칸이 3개로 줄어드는데, 고정 4열이면 빈 칸이 남아 어색해서
       실제 렌더된 박스 수에 맞춰 균등하게 나눠 채운다 */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
}

.cdl-spec-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 6px;
    border-radius: 12px;
    background: #f6f8fb;
    border: 1px solid #eef1f5;
    min-height: 62px;
    text-align: center;
}

.cdl-spec-box__label {
    font-size: 11px;
    color: #8a94a3;
    font-weight: 600;
}

.cdl-spec-box__value {
    font-size: 14px;
    font-weight: 700;
    color: #1a2233;
    word-break: break-word;
}

/* ---------- 리스 계산기 카드 ---------- */

.cdl-lease-card {
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    padding: 16px 18px 18px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.cdl-sale-card {
    padding: 22px 22px 20px;
    background:
        linear-gradient(180deg, #f4f8ff 0%, #ffffff 42%);
    border-color: #d7e4fb;
    box-shadow: 0 10px 28px rgba(43, 109, 229, 0.08);
}

.cdl-sale-card__head {
    margin-bottom: 6px;
}

.cdl-sale-card__label {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #5b6472;
}

.cdl-sale-card__amount {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 2px 0 18px;
    line-height: 1;
}

.cdl-sale-card__amount strong {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--main-color, #2b6de5);
}

.cdl-sale-card__amount span {
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
}


.cdl-lease-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cdl-lease-card__label {
    font-size: 13px;
    font-weight: 700;
    color: #55606f;
}

.cdl-lease-card__vat {
    font-size: 11px;
    font-weight: 500;
    color: #a5adba;
}

.cdl-lease-card__initial-badge {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fdeef0;
    color: #d0334c;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.cdl-lease-card__amount {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-bottom: 12px;
}

.cdl-lease-card--sale .cdl-lease-card__amount {
    margin-bottom: 16px;
}

.cdl-lease-card__num {
    display: inline-block;
    font-size: 32px;
    font-weight: 900;
    color: var(--main-color, #0086d8);
    letter-spacing: -0.02em;
    transition: opacity 0.15s ease;
}

/* 월리스료/선납금 변경 시 숫자가 카운트업되며 살짝 튀는 펄스 (케이중고차리스 참고) */
[data-cdl-monthly],
[data-cdl-monthly-mirror],
[data-cdl-down-won] {
    display: inline-block;
}

.cdl-amount-pulse {
    animation: cdlAmountPulse 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cdlAmountPulse {
    0% {
        transform: scale(1);
    }
    28% {
        transform: scale(1.1);
        color: var(--main-color, #0086d8);
    }
    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cdl-amount-pulse {
        animation: none;
    }
}

.cdl-lease-card__unit {
    font-size: 17px;
    font-weight: 700;
    color: #1a2233;
}

.cdl-lease-card__term {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #a5adba;
}

.cdl-lease-card__down {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #f6f8fb;
    border: 1px solid #eef1f5;
}

.cdl-lease-card__down-label {
    font-size: 12px;
    font-weight: 700;
    color: #7b8494;
}

.cdl-lease-card__down-amount {
    font-size: 13px;
    font-weight: 800;
    color: #1a2233;
}

.cdl-lease-card__tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: #f6f8fb;
    margin-bottom: 14px;
}

.cdl-lease-tab {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    padding: 9px 4px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #7b8494;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cdl-lease-tab:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.7);
    color: #55606f;
}

.cdl-lease-tab:active {
    transform: scale(0.94);
}

.cdl-lease-tab.is-active {
    background: #fff;
    border-color: #e6eaf0;
    color: var(--main-color, #0086d8);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.cdl-lease-card__down-section {
    margin-bottom: 12px;
}

.cdl-lease-card__down-title {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #55606f;
}

.cdl-lease-card__down-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 6px;
}

.cdl-lease-card__down-tabs .cdl-lease-tab {
    padding: 8px 2px;
    font-size: 12px;
    border: 1px solid #e6eaf0;
    background: #fff;
}

.cdl-lease-card__down-tabs .cdl-lease-tab:hover:not(.is-active) {
    background: #f6f8fb;
    border-color: #d8dee6;
    color: #55606f;
}

.cdl-lease-card__down-tabs .cdl-lease-tab.is-active {
    background: var(--main-color, #0086d8);
    border-color: var(--main-color, #0086d8);
    color: #fff;
    box-shadow: none;
}

.cdl-lease-card__down-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f6f8fb;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
    color: #8b93a3;
}

.cdl-lease-card__down-hint::before {
    content: "💡";
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
}

.cdl-lease-card__cta,
.cdl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
}

.cdl-lease-card__cta {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    background: var(--main-color, #0086d8);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--main-color, #0086d8) 30%, transparent);
}

.cdl-lease-card__cta:hover,
.cdl-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.cdl-lease-card__cta:hover {
    box-shadow: 0 12px 22px color-mix(in srgb, var(--main-color, #0086d8) 36%, transparent);
}

.cdl-btn:hover {
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.14);
}

.cdl-lease-card__cta:active,
.cdl-btn:active {
    transform: translateY(0) scale(0.97);
    filter: brightness(0.97);
}

/* ---------- PC: 오른쪽 하단 간편상담 (오늘본차량은 우측 상단, 상담은 우측 하단) ---------- */

/* 오늘본차량이 화면 아래까지 늘어 간편상담을 덮지 않게 높이 제한 */
body:has(.car-detail-lease-page) #rightbanner {
    max-height: calc(100vh - 280px);
    overflow-x: hidden;
    overflow-y: auto;
}

.cdl-float-counsel {
    position: fixed;
    top: auto !important;
    left: auto;
    right: 24px;
    bottom: 20px;
    z-index: 10050; /* #rightbanner(9999)보다 위 */
    width: 200px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    will-change: auto;
}

/* AI 추천 패널이 열리면 간편상담·하단독·퀵인포는 숨김 (z-index로 덮이는 문제) */
body:has(.car-detail-lease-page):has(.site-ai-sidebar.is-open) .cdl-float-counsel,
body:has(.car-detail-lease-page):has(.site-ai-sidebar.is-open) .cdl-mo-dock,
body:has(.car-detail-lease-page):has(.site-ai-sidebar.is-open) .cdl-quickdock {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 우측 퀵메뉴가 있으면 그 왼쪽에 — 퀵인포도 같은 만큼 비움(--cdl-float-right) */
body:has(.car-detail-lease-page) {
    --cdl-float-right: 24px;
    --cdl-float-width: 200px;
}

@media (min-width: 1024px) {
    body.site-simwooin22:has(.sw22-right-quick),
    body.site-simwooin23:has(.sw23-right-quick),
    body.site-simwooin24:has(.sw24-right-quick) {
        --cdl-float-right: 110px;
    }

    body:has(.car-detail-lease-page) .cdl-float-counsel {
        right: var(--cdl-float-right);
    }
}

.cdl-float-counsel__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 14px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e6eaf0;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    box-sizing: border-box;
}

.cdl-float-counsel__head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cdl-float-counsel__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--main-color, #0086d8) 12%, #fff);
    color: var(--main-color, #0086d8);
}

.cdl-float-counsel__title {
    font-size: 14px;
    font-weight: 800;
    color: var(--main-color, #0086d8);
    letter-spacing: -0.02em;
    line-height: 1.25;
    word-break: keep-all;
}

.cdl-float-counsel__fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cdl-float-counsel__input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dbe1e8;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    box-sizing: border-box;
}

.cdl-float-counsel__input:focus {
    outline: none;
    border-color: var(--main-color, #0086d8);
}

.cdl-float-counsel__submit {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--main-color, #0086d8);
    color: #fff;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.cdl-float-counsel__submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--main-color, #0086d8) 30%, transparent);
}

.cdl-float-counsel__submit:active {
    transform: scale(0.97);
    filter: brightness(0.96);
}

/* ---------- PC 하단 케이중고차형 퀵인포 도크 ---------- */

.cdl-quickdock {
    display: none;
}

@media (min-width: 1024px) {
    .cdl-quickdock {
        display: block;
        position: fixed;
        left: max(1.25rem, calc((100vw - 80rem) / 2));
        /* 오른쪽 간편상담 자리(너비+여백+right오프셋)를 비워 겹침 방지 */
        right: calc(var(--cdl-float-right, 24px) + var(--cdl-float-width, 200px) + 16px);
        bottom: 20px;
        z-index: 900;
        width: auto;
        max-width: none;
        transform: translateY(28px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, visibility 0.35s ease;
    }

    .cdl-quickdock.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .cdl-page.epc-car-detail-page {
        padding-bottom: 220px;
    }
}

.cdl-quickdock__dock {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 20px 48px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.cdl-quickdock__viewers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #242a3a;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
}

.cdl-quickdock__viewers strong {
    color: #5eead4;
    font-weight: 800;
}

.cdl-quickdock__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 0 24px;
    padding: 16px 20px 18px;
}

.cdl-quickdock__car {
    min-width: 0;
}

.cdl-quickdock__title {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cdl-quickdock__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cdl-quickdock__specs li {
    padding: 4px 8px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
}

.cdl-quickdock__price {
    min-width: 9.5rem;
    padding-left: 16px;
    border-left: 1px solid #f3f4f6;
    text-align: right;
}

.cdl-quickdock__price-label {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
}

.cdl-quickdock__price-label span {
    font-weight: 500;
    color: #9ca3af;
}

.cdl-quickdock__price-amount {
    margin: 0;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 2px;
    flex-wrap: wrap;
    color: var(--main-color, #c41e3a);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
}

.cdl-quickdock__price-unit {
    font-size: 15px;
    font-weight: 700;
    color: #374151;
}

.cdl-quickdock__price-term {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    text-align: right;
}

.cdl-quickdock__dealer {
    min-width: 8.5rem;
    padding-left: 16px;
    border-left: 1px solid #f3f4f6;
}

.cdl-quickdock__dealer-name {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.cdl-quickdock__dealer-tel {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--main-color, #c41e3a);
    letter-spacing: -0.02em;
}

.cdl-quickdock__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 7.5rem;
    padding-left: 16px;
    border-left: 1px solid #f3f4f6;
}

.cdl-quickdock__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.cdl-quickdock__btn:hover {
    transform: translateY(-1px);
}

.cdl-quickdock__btn--call {
    background: #111827;
    color: #fff;
}

.cdl-quickdock__btn--call:hover {
    background: #1f2937;
}

.cdl-quickdock__btn--counsel {
    background: var(--main-color, #c41e3a);
    color: #fff;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--main-color, #c41e3a) 35%, transparent);
}

.cdl-quickdock__btn--counsel:hover {
    filter: brightness(1.05);
}

/* 상세에서 사이트 공통 우측 상담과 겹치지 않게 숨김(오늘본차량 등은 유지) */
body:has(.car-detail-lease-page) #rightbanner .sw22-side-counsel,
body:has(.car-detail-lease-page) .sw22-side-counsel {
    display: none !important;
}

/* 리스스킨 상세: 사이트 하단 고정 상담바는 숨기고 리스스킨 독/간편상담만 사용 */
body:has(.car-detail-lease-page) .sw22-bottom-counsel,
body:has(.car-detail-lease-page) .sw23-bottom-counsel,
body:has(.car-detail-lease-page) .sw24-bottom-counsel,
body:has(.car-detail-lease-page) .sw22-mo-fixed-bar,
body:has(.car-detail-lease-page) .sw23-mo-fixed-bar,
body:has(.car-detail-lease-page) .sw24-mo-fixed-bar,
body:has(.car-detail-lease-page) .sw21-mo-fixed-bar,
body:has(.car-detail-lease-page) .sw88-mo-fixed-bar,
body:has(.car-detail-lease-page) .sw91-mo-fixed-bar,
body:has(.car-detail-lease-page) .sw22-mo-bottom-tel,
body:has(.car-detail-lease-page) .sw23-mo-bottom-tel,
body:has(.car-detail-lease-page) .sw24-mo-bottom-tel {
    display: none !important;
}

body.epc-has-bottom-bar:has(.car-detail-lease-page):not(.epc-layout-mobile) {
    padding-bottom: 0;
}

/* ---------- 모바일: 월납 스트립 / 인라인 상담 / 하단 독 (K-Lease) ---------- */
.cdl-mo-strip,
.cdl-mo-counsel,
.cdl-mo-dock {
    display: none;
}

/* ---------- 본문 카드 공통 ---------- */

.cdl-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 좌: 기본정보→옵션 / 우: 판매담당자→빠른상담 — 세로 열 기준 2단 */
.cdl-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.cdl-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.cdl-col > .cdl-card {
    margin: 0;
}

.cdl-card {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 18px;
    padding: 20px 20px 22px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.cdl-card__title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 800;
    color: #10182a;
}

.cdl-card__title-sub {
    font-size: 13px;
    font-weight: 600;
    color: #a5adba;
    margin-left: 6px;
}

.cdl-card__head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.cdl-card__head-row .cdl-card__title {
    margin-bottom: 0;
}

/* ---------- 기본정보 ---------- */

.cdl-basic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cdl-basic-item {
    background: #f6f8fb;
    border-radius: 12px;
    padding: 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    transition: background-color 0.15s ease;
}

.cdl-basic-item:hover {
    background: #eef2f9;
}

.cdl-basic-item dt {
    font-size: 11.5px;
    color: #8a94a3;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.cdl-basic-item dd {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 14.5px;
    font-weight: 700;
    color: #1a2233;
    word-break: break-word;
}

.cdl-basic-sep {
    color: #c3cad4;
    font-weight: 500;
}

.cdl-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
}

.cdl-chip--good {
    background: #e8f6ee;
    color: #1a9a53;
}

.cdl-chip--bad {
    background: #fdedec;
    color: #e0453c;
}

.cdl-chip--neutral {
    background: #eef1f5;
    color: #1a2233;
}

.cdl-basic-sale {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f6f8fb;
}

.cdl-basic-sale__label {
    font-size: 12.5px;
    font-weight: 600;
    color: #8a94a3;
}

.cdl-basic-sale__value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14.5px;
    font-weight: 700;
    color: #1a2233;
}

/* ---------- 판매 담당자 ---------- */

.cdl-dealer {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cdl-dealer__photo {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    background: #f6f8fb;
}

.cdl-dealer__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cdl-dealer__list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 14px;
    border-radius: 12px;
    background: #f6f8fb;
}

.cdl-dealer__list > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e6eaf0;
    font-size: 13px;
}

.cdl-dealer__list > div:last-child {
    border-bottom: 0;
}

.cdl-dealer__list dt {
    color: #8a94a3;
    flex-shrink: 0;
}

.cdl-dealer__list dd {
    margin: 0;
    font-weight: 700;
    color: #1a2233;
    text-align: right;
    word-break: break-word;
}

.cdl-dealer__tel a {
    color: var(--main-color, #0086d8);
    text-decoration: none;
}

/* 상사주소는 길어지면 2열 표(cdl-dealer__list) 안에서 줄바꿈되며 어색해지므로,
   목록에서 빼고 한 줄로 쓸 수 있는 넓은 폭을 그대로 준다 */
.cdl-dealer__address {
    margin: -4px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f6f8fb;
}

.cdl-dealer__address > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
}

.cdl-dealer__address dt {
    flex: 0 0 auto;
    color: #8a94a3;
}

.cdl-dealer__address dd {
    margin: 0;
    font-weight: 700;
    color: #1a2233;
    word-break: break-word;
}

.cdl-dealer__actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.cdl-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.cdl-btn--dark {
    background: #1a2233;
    color: #fff;
}

.cdl-btn--primary {
    background: var(--main-color, #0086d8);
    color: #fff;
}

.cdl-btn--ghost {
    background: color-mix(in srgb, var(--main-color, #0086d8) 8%, #fff);
    border-color: color-mix(in srgb, var(--main-color, #0086d8) 30%, transparent);
    color: var(--main-color, #0086d8);
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
}

/* ---------- 옵션 아코디언 ---------- */

.cdl-option-disclaimer {
    margin: -2px 0 12px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #fff8ec;
    color: #9a6b1f;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.cdl-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cdl-option-acc {
    border: 1px solid #eef1f5;
    border-radius: 12px;
    overflow: hidden;
}

.cdl-option-acc__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: #f6f8fb;
    border: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a2233;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cdl-option-acc__head:hover {
    background: #eef2f9;
}

.cdl-option-acc__head:active {
    background: #e6ebf3;
}

.cdl-option-acc .encar-detail-accordion__body {
    padding: 14px 16px;
}

.cdl-option-chips {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cdl-option-chips li {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid transparent;
    background: #f6f8fb;
    color: #b6bcc6;
}

.cdl-option-chips li.is-on {
    background: #fff;
    border-color: #d8dee6;
    color: #1a2233;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ---------- 상담 폼 ---------- */

.cdl-consult-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.cdl-consult-form__car {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f6f8fb;
    border: 1px solid #eef1f5;
    margin-bottom: 4px;
}

.cdl-consult-form__car-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--main-color, #0086d8);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 4px;
}

.cdl-consult-form__car-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a2233;
}

.cdl-consult-form__label {
    font-size: 12px;
    font-weight: 700;
    color: #55606f;
    margin-bottom: -4px;
}

.cdl-consult-form__input {
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #dbe1e8;
    font-size: 13.5px;
    background: #fff;
}

.cdl-consult-form__input:focus {
    outline: none;
    border-color: var(--main-color, #0086d8);
}

.cdl-consult-form__agree {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8a94a3;
}

.cdl-consult-form__submit {
    margin-top: 2px;
    min-height: 44px;
}

/* ---------- 중고차 리스 특별 프로모션 (케이중고차형 좌우 2단) ---------- */

.cdl-promo__inner {
    display: flex;
    gap: 24px;
    padding: 18px;
    border-radius: 20px;
    background: #f3f4f6;
}

.cdl-promo__left {
    width: 275px;
    flex-shrink: 0;
    padding: 18px 18px 16px;
    border-radius: 18px;
    background: #fff;
    box-sizing: border-box;
}

.cdl-promo__field + .cdl-promo__field {
    margin-top: 18px;
}

.cdl-promo__tit {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a2233;
}

.cdl-promo__term-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cdl-promo__term-list li + li {
    margin-top: 8px;
}

.cdl-promo__term-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 14px 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.cdl-promo__term-row.is-active {
    border: 2px solid var(--main-color, #0086d8);
    background: color-mix(in srgb, var(--main-color, #0086d8) 10%, #fff);
    color: #111827;
    padding-left: 15px;
}

.cdl-promo__tit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cdl-promo__tit-row .cdl-promo__tit {
    margin: 0;
}

.cdl-promo__optional {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--main-color, #0086d8) 12%, #fff);
    color: var(--main-color, #0086d8);
    font-size: 11px;
    font-weight: 700;
}

/* 선납금: 작은 칩 버튼 3열 */
.cdl-promo__down-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.cdl-promo__down-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 6px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    font-size: 12.5px;
    font-weight: 700;
    color: #4b5563;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cdl-promo__down-btn:hover {
    border-color: color-mix(in srgb, var(--main-color, #0086d8) 40%, #e2e8f0);
    color: #111827;
}

.cdl-promo__down-btn.is-active {
    border-color: var(--main-color, #0086d8);
    background: var(--main-color, #0086d8);
    color: #fff;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--main-color, #0086d8) 22%, transparent);
}

.cdl-promo__hint {
    margin: 0;
    font-size: 11.5px;
    font-weight: 600;
    color: #9aa3b2;
    line-height: 1.35;
}

.cdl-promo__deposit-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 14px;
    padding: 12px 12px 11px;
    border-radius: 12px;
    background: #f6f8fb;
    border: 1px solid #eef1f5;
}

.cdl-promo__deposit-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cdl-promo__deposit-label {
    margin: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.cdl-promo__deposit-val {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cdl-promo__deposit-unit {
    margin-left: 2px;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
}

.cdl-promo__right {
    flex: 1;
    min-width: 0;
}

/* 오른쪽: 랭킹보드 (1위 강조 + 세로 리스트) */
.cdl-promo__board {
    height: 100%;
    border: 1px solid #e7ebf2;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
}

.cdl-promo__notice {
    padding: 11px 16px;
    background: color-mix(in srgb, var(--main-color, #0086d8) 10%, #fff);
    color: var(--main-color, #0086d8);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.cdl-promo__winner {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) minmax(180px, 220px);
    gap: 14px;
    align-items: center;
    padding: 18px 16px 18px 14px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--main-color, #0086d8) 12%, #fff), #fff 46%),
        #fff;
    border-bottom: 1px solid #eef1f5;
}

.cdl-promo__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--main-color, #0086d8);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 10px 20px color-mix(in srgb, var(--main-color, #0086d8) 30%, transparent);
}

.cdl-promo__winner-main {
    min-width: 0;
}

.cdl-promo__badge {
    display: inline-flex;
    margin-bottom: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #10182a;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.cdl-promo__site {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #10182a;
    letter-spacing: -0.03em;
    line-height: 1.2;
    word-break: keep-all;
}

.cdl-promo__winner-sub {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #8a94a3;
}

.cdl-promo__winner-price {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f6f8fb;
    border: 1px solid #e7ebf2;
    text-align: right;
}

.cdl-promo__hero-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #8a94a3;
}

.cdl-promo__hero-amount {
    margin: 4px 0 10px;
    font-size: 26px;
    font-weight: 800;
    color: var(--main-color, #0086d8);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.cdl-promo__hero-unit {
    margin-left: 2px;
    font-size: 14px;
    font-weight: 700;
    color: #55606f;
}

.cdl-promo__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    background: var(--main-color, #0086d8);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.cdl-promo__cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--main-color, #0086d8) 30%, transparent);
}

.cdl-promo__ladder {
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

.cdl-promo__rival {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #f0f3f7;
}

.cdl-promo__rival:first-child {
    border-top: 0;
}

.cdl-promo__rival:hover {
    background: #fafbfd;
}

.cdl-promo__rival-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eef2f7;
    color: #667284;
    font-size: 12px;
    font-weight: 800;
}

.cdl-promo__rival-name {
    font-size: 15px;
    font-weight: 800;
    color: #1a2233;
}

.cdl-promo__rival-price {
    text-align: right;
    font-size: 15px;
    font-weight: 800;
    color: #1a2233;
    white-space: nowrap;
}

.cdl-promo__rival-price small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #a0a8b5;
}

@media (max-width: 900px) {
    .cdl-promo__inner {
        flex-direction: column;
        gap: 16px;
        padding: 14px;
    }

    .cdl-promo__left {
        width: 100%;
    }

    .cdl-promo__winner {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .cdl-promo__winner-price {
        grid-column: 1 / -1;
        text-align: left;
    }

    .cdl-promo__site {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .cdl-promo__hero-amount {
        font-size: 24px;
    }

    .cdl-promo__rival {
        padding: 12px 14px;
    }
}

/* 모바일: 카드→회색박스→흰박스→버튼테두리 중첩을 풀고 기간은 칩 그리드로 */
@media (max-width: 1023px) {
    .cdl-card.cdl-promo {
        padding: 16px 14px 18px;
        box-shadow: none;
    }

    .cdl-promo__inner {
        flex-direction: column;
        gap: 14px;
        padding: 0;
        border-radius: 0;
        background: transparent;
    }

    .cdl-promo__left {
        width: 100%;
        padding: 0;
        border-radius: 0;
        background: transparent;
    }

    .cdl-promo__field + .cdl-promo__field {
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid #eef1f5;
    }

    .cdl-promo__term-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
        gap: 6px;
    }

    .cdl-promo__term-list li + li {
        margin-top: 0;
    }

    .cdl-promo__term-row {
        justify-content: center;
        min-height: 40px;
        padding: 0 4px;
        border: 0;
        border-radius: 10px;
        background: #f3f4f6;
        font-size: 13px;
        text-align: center;
    }

    .cdl-promo__term-row.is-active {
        border: 0;
        padding-left: 4px;
        background: var(--main-color, #0086d8);
        color: #fff;
        box-shadow: none;
    }

    .cdl-promo__down-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .cdl-promo__down-btn {
        border: 0;
        border-radius: 10px;
        background: #f3f4f6;
        color: #4b5563;
        min-height: 36px;
    }

    .cdl-promo__down-btn:hover:not(.is-active) {
        background: #e8eaed;
        color: #111827;
    }

    .cdl-promo__down-btn.is-active,
    .cdl-promo__down-btn.is-active:hover {
        box-shadow: none;
        background: var(--main-color, #0086d8);
        color: #fff;
    }

    .cdl-promo__deposit-row {
        margin-top: 12px;
        padding: 12px 0 0;
        border: 0;
        border-top: 1px solid #eef1f5;
        border-radius: 0;
        background: transparent;
    }

    .cdl-promo__deposit-val {
        font-size: 20px;
        text-align: left;
    }

    .cdl-promo__board {
        border: 0;
        border-radius: 14px;
        background: #f8fafc;
        overflow: hidden;
    }

    .cdl-promo__notice {
        padding: 10px 12px;
        font-size: 12.5px;
    }

    .cdl-promo__winner {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
        padding: 14px 12px;
        border-bottom: 0;
        background: transparent;
    }

    .cdl-promo__rank {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 18px;
        box-shadow: none;
    }

    .cdl-promo__winner-price {
        grid-column: 1 / -1;
        padding: 12px;
        border: 0;
        border-radius: 12px;
        background: #fff;
        text-align: left;
    }

    .cdl-promo__ladder {
        background: #fff;
        border-radius: 0 0 14px 14px;
    }

    .cdl-promo__rival {
        padding: 11px 12px;
    }

    .cdl-promo__rival:first-child {
        border-top: 1px solid #eef1f5;
    }
}

body.epc-layout-mobile .cdl-card.cdl-promo {
    padding: 16px 14px 18px;
    box-shadow: none;
}

body.epc-layout-mobile .cdl-promo__inner {
    flex-direction: column;
    gap: 14px;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

body.epc-layout-mobile .cdl-promo__left {
    width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

body.epc-layout-mobile .cdl-promo__term-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 6px;
}

body.epc-layout-mobile .cdl-promo__term-list li + li {
    margin-top: 0;
}

body.epc-layout-mobile .cdl-promo__term-row {
    justify-content: center;
    min-height: 40px;
    padding: 0 4px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    font-size: 13px;
    text-align: center;
}

body.epc-layout-mobile .cdl-promo__term-row.is-active {
    border: 0;
    padding-left: 4px;
    background: var(--main-color, #0086d8);
    color: #fff;
}

body.epc-layout-mobile .cdl-promo__down-btn {
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #4b5563;
}

body.epc-layout-mobile .cdl-promo__down-btn:hover:not(.is-active) {
    background: #e8eaed;
    color: #111827;
}

body.epc-layout-mobile .cdl-promo__down-btn.is-active,
body.epc-layout-mobile .cdl-promo__down-btn.is-active:hover {
    background: var(--main-color, #0086d8);
    color: #fff;
    box-shadow: none;
}

body.epc-layout-mobile .cdl-promo__deposit-row {
    margin-top: 12px;
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid #eef1f5;
    border-radius: 0;
    background: transparent;
}

body.epc-layout-mobile .cdl-promo__board {
    border: 0;
    border-radius: 14px;
    background: #f8fafc;
}

/* ---------- 특약 안내 ---------- */

.cdl-terms__title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cdl-terms__title::before {
    content: "";
    flex: 0 0 auto;
    width: 4px;
    height: 15px;
    border-radius: 2px;
    background: var(--main-color, #0086d8);
}

.cdl-terms__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.cdl-terms__list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 0;
    border-top: 1px solid #eef1f5;
    font-size: 13px;
    line-height: 1.5;
    color: #444d5c;
}

.cdl-terms__list li:first-child {
    border-top: 0;
}

.cdl-terms__num {
    flex: 0 0 auto;
    font-weight: 700;
    color: var(--main-color, #0086d8);
    white-space: nowrap;
}

.cdl-terms__text {
    word-break: keep-all;
}

/* ---------- 상세설명 ---------- */

.cdl-desc-viewers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #1e2536;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.cdl-desc-viewers strong {
    color: #4fd1c5;
    font-weight: 800;
}

.cdl-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #333c48;
    word-break: break-word;
}

.cdl-desc img {
    max-width: 100%;
}

/* ---------- 사진정보 ---------- */

.cdl-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.cdl-photo-item {
    padding: 0;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    overflow: hidden;
    background: #f6f8fb;
    aspect-ratio: 4 / 3;
    cursor: zoom-in;
}

.cdl-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cdl-photo-item:hover img {
    transform: scale(1.05);
}

/* ---------- 성능기록부 ---------- */

.cdl-perf-frame {
    width: 100%;
    height: 480px;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    background: #fff;
}

/* ---------- 약관 ---------- */

.cdl-legal {
    background: #f8f9fb;
    box-shadow: none;
}

.cdl-legal p {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.6;
    color: #8a94a3;
}

.cdl-legal p:last-child {
    margin-bottom: 0;
}

/* ---------- 반응형 ---------- */

@media (max-width: 900px) {
    .cdl-top {
        grid-template-columns: 1fr;
    }
}

/* 태블릿·좁은 PC 폭에서도 K-Lease와 같이 모바일 UI */
@media (max-width: 1023px) {
    .cdl-top {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        grid-template-columns: none;
    }

    .cdl-gallery.encar-gallery,
    .cdl-gallery {
        order: 0 !important;
        height: auto !important;
    }

    .cdl-hero {
        order: 1;
    }

    .cdl-float-counsel {
        display: none !important;
    }

    .cdl-lease-card__cta--pc,
    .cdl-counsel--pc {
        display: none !important;
    }

    .cdl-gallery__side,
    .cdl-page .encar-gallery__side {
        display: none !important;
    }

    .cdl-gallery .encar-gallery__main {
        aspect-ratio: 4 / 3;
        flex: none !important;
        min-height: 0 !important;
        border-radius: 12px;
        overflow: hidden;
    }

    .cdl-mo-strip {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 40;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin: 4px -4px 8px;
        padding: 10px 8px;
        background: rgba(248, 250, 252, 0.96);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
    }

    .cdl-mo-strip__price {
        margin: 0;
        min-width: 0;
        font-size: 14px;
        font-weight: 900;
        color: var(--main-color, #c41e3a);
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cdl-mo-strip__term {
        font-size: 12px;
        font-weight: 500;
        color: #9ca3af;
    }

    .cdl-mo-strip__btn {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 32px;
        padding: 0 12px;
        border-radius: 8px;
        background: var(--main-color, #c41e3a);
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
    }

    .cdl-mo-counsel {
        display: block;
        margin-top: 4px;
        border-color: color-mix(in srgb, var(--main-color, #c41e3a) 22%, #e5e7eb);
        scroll-margin-top: 72px;
    }

    .cdl-mo-dock {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 500;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        pointer-events: none;
    }

    .cdl-mo-dock__inner {
        display: flex;
        align-items: stretch;
        gap: 10px;
        max-width: 28rem;
        margin: 0 auto;
        pointer-events: auto;
    }

    .cdl-mo-dock__btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 48px;
        padding: 0 16px;
        border-radius: 999px;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        line-height: 1;
        white-space: nowrap;
        transition: transform 0.15s ease;
    }

    .cdl-mo-dock__btn:active {
        transform: scale(0.98);
    }

    .cdl-mo-dock__btn--sms {
        background: #fff;
        color: var(--main-color, #c41e3a);
        border: 1.5px solid var(--main-color, #c41e3a);
        box-shadow: 0 2px 10px color-mix(in srgb, var(--main-color, #c41e3a) 12%, transparent);
    }

    .cdl-mo-dock__btn--tel {
        background: var(--main-color, #c41e3a);
        color: #fff;
        border: 1.5px solid var(--main-color, #c41e3a);
        box-shadow: 0 4px 16px color-mix(in srgb, var(--main-color, #c41e3a) 35%, transparent);
        animation: cdl-tel-glow 2s ease-in-out infinite;
    }

    .cdl-mo-dock__ico {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .cdl-page.epc-car-detail-page {
        padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
        margin-top: 12px;
    }

    .cdl-columns {
        grid-template-columns: 1fr;
    }

    .cdl-spec-grid {
        gap: 6px;
        grid-template-columns: repeat(2, 1fr);
    }

    .cdl-spec-box {
        padding: 10px 6px;
        min-height: 64px;
        border-radius: 12px;
    }

    .cdl-spec-box__value {
        font-size: 13px;
    }

    .cdl-hero__title {
        font-size: 19px;
    }

    .cdl-lease-card {
        border-radius: 16px;
        padding: 16px;
    }

    .cdl-sale-card {
        padding: 18px 16px 16px;
    }

    .cdl-sale-card__amount strong {
        font-size: 34px;
    }

    .cdl-mo-strip--sale .cdl-mo-strip__label {
        margin-right: 6px;
        font-size: 12px;
        font-weight: 700;
        color: #64748b;
    }

    .cdl-mo-strip--sale .cdl-mo-strip__price strong {
        font-size: 18px;
        font-weight: 900;
        letter-spacing: -0.04em;
    }

    .cdl-mo-strip--sale .cdl-mo-strip__unit {
        margin-left: 2px;
        font-size: 13px;
        font-weight: 800;
        color: #334155;
    }

    .cdl-lease-card__num {
        font-size: 28px;
    }

    .cdl-lease-card__tabs {
        grid-template-columns: repeat(4, 1fr);
    }

    .cdl-basic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cdl-basic-sale {
        flex-wrap: wrap;
    }

    .cdl-dealer__actions {
        grid-template-columns: 1fr 1fr;
    }

    .cdl-lease-card__down-tabs {
        grid-template-columns: repeat(3, 1fr);
    }

    .cdl-lease-card__down-tabs .cdl-lease-tab {
        padding: 7px 2px;
        font-size: 11.5px;
    }
}

/* UA 모바일 레이아웃(쿠키/호스트)에서도 동일하게 강제 */
body.epc-layout-mobile .cdl-float-counsel {
    display: none !important;
}

body.epc-layout-mobile .cdl-lease-card__cta--pc,
body.epc-layout-mobile .cdl-counsel--pc {
    display: none !important;
}

body.epc-layout-mobile .cdl-mo-strip {
    display: flex;
}

body.epc-layout-mobile .cdl-mo-counsel {
    display: block;
}

body.epc-layout-mobile .cdl-mo-dock {
    display: block;
}

body.epc-layout-mobile .cdl-page.epc-car-detail-page {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
}

/*
 * encar 모바일 CSS가 .encar-gallery { order:1 } 을 걸어 두어,
 * 리스스킨(.cdl-top)에서는 히어로가 위로·메인사진이 아래로 뒤바뀌었다.
 * 메인 차량 사진을 항상 최상단으로 되돌린다.
 */
body.epc-layout-mobile .car-detail-lease-page .cdl-top,
body.epc-layout-mobile .cdl-page .cdl-top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
}

body.epc-layout-mobile .car-detail-lease-page .cdl-gallery.encar-gallery,
body.epc-layout-mobile .car-detail-lease-page .cdl-gallery,
body.epc-layout-mobile .cdl-page .cdl-gallery.encar-gallery,
body.epc-layout-mobile .cdl-page .cdl-gallery {
    order: 0 !important;
    height: auto !important;
    margin: 0 !important;
}

body.epc-layout-mobile .car-detail-lease-page .cdl-hero,
body.epc-layout-mobile .cdl-page .cdl-hero {
    order: 1;
}

body.epc-layout-mobile .car-detail-lease-page .cdl-gallery__side,
body.epc-layout-mobile .cdl-page .cdl-gallery__side,
body.epc-layout-mobile .car-detail-lease-page .encar-gallery__side {
    display: none !important;
}

body.epc-layout-mobile .car-detail-lease-page .cdl-gallery .encar-gallery__main,
body.epc-layout-mobile .cdl-page .cdl-gallery .encar-gallery__main {
    aspect-ratio: 4 / 3;
    flex: none !important;
    min-height: 0 !important;
    border-radius: 0;
}

body.epc-layout-mobile .car-detail-lease-page.cdl-page.epc-car-detail-page,
body.epc-layout-mobile .cdl-page.epc-car-detail-page {
    margin-top: 0;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
}

body.epc-layout-mobile .car-detail-lease-page .cdl-hero,
body.epc-layout-mobile .car-detail-lease-page .cdl-body,
body.epc-layout-mobile .cdl-page .cdl-hero,
body.epc-layout-mobile .cdl-page .cdl-body {
    padding-left: 10px;
    padding-right: 10px;
}

@keyframes cdl-tel-glow {
    0%, 100% { box-shadow: 0 4px 16px color-mix(in srgb, var(--main-color, #c41e3a) 35%, transparent); }
    50% { box-shadow: 0 4px 22px color-mix(in srgb, var(--main-color, #c41e3a) 55%, transparent); }
}

/* 리스 모바일 하단독 위에 AI / 맨위로 / 비교하기가 겹치지 않도록 스택 */
body:has(.car-detail-lease-page) {
    --cdl-mo-dock-h: calc(68px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 1023px) {
    body:has(.car-detail-lease-page) .cdl-mo-dock {
        z-index: 900;
    }

    /* 갤러리 화살표(우측 하단) ↔ AI 런처 겹침 → 컨트롤을 왼쪽으로 */
    body:has(.car-detail-lease-page) .cdl-gallery .encar-gallery__controls {
        right: auto;
        left: 12px;
    }

    body:has(.car-detail-lease-page) .site-ai-sidebar {
        bottom: calc(var(--cdl-mo-dock-h) + 12px) !important;
    }

    body:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon) .site-ai-sidebar {
        bottom: calc(var(--cdl-mo-dock-h) + 108px) !important;
    }

    body:has(.car-detail-lease-page) .epc-cmp-tray,
    body:has(.car-detail-lease-page) .epc-cmp-toast {
        bottom: calc(var(--cdl-mo-dock-h) + 12px) !important;
    }

    body:has(.car-detail-lease-page) .sw21-mo-top-btn,
    body:has(.car-detail-lease-page) .sw22-mo-top-btn,
    body:has(.car-detail-lease-page) .sw23-mo-top-btn,
    body:has(.car-detail-lease-page) .sw24-mo-top-btn,
    body:has(.car-detail-lease-page) .sw88-mo-top-btn,
    body:has(.car-detail-lease-page) .sw91-mo-top-btn {
        bottom: calc(var(--cdl-mo-dock-h) + 12px) !important;
        right: 10px;
    }

    body:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw21-mo-top-btn,
    body:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw22-mo-top-btn,
    body:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw23-mo-top-btn,
    body:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw24-mo-top-btn,
    body:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw88-mo-top-btn,
    body:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw91-mo-top-btn {
        /* 독 + AI 런처(~110px) 위 */
        bottom: calc(var(--cdl-mo-dock-h) + 12px + 118px) !important;
    }

    body:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw21-mo-top-btn,
    body:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw22-mo-top-btn,
    body:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw23-mo-top-btn,
    body:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw24-mo-top-btn,
    body:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw88-mo-top-btn,
    body:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw91-mo-top-btn {
        bottom: calc(var(--cdl-mo-dock-h) + 12px + 118px + 96px) !important;
    }
}

body.epc-layout-mobile:has(.car-detail-lease-page) .cdl-gallery .encar-gallery__controls {
    right: auto;
    left: 12px;
}

body.epc-layout-mobile:has(.car-detail-lease-page) .site-ai-sidebar {
    bottom: calc(var(--cdl-mo-dock-h) + 12px) !important;
}

body.epc-layout-mobile:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon) .site-ai-sidebar {
    bottom: calc(var(--cdl-mo-dock-h) + 108px) !important;
}

body.epc-layout-mobile:has(.car-detail-lease-page) .epc-cmp-tray,
body.epc-layout-mobile:has(.car-detail-lease-page) .epc-cmp-toast {
    bottom: calc(var(--cdl-mo-dock-h) + 12px) !important;
}

body.epc-layout-mobile:has(.car-detail-lease-page) .sw21-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page) .sw22-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page) .sw23-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page) .sw24-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page) .sw88-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page) .sw91-mo-top-btn {
    bottom: calc(var(--cdl-mo-dock-h) + 12px) !important;
    right: 10px;
}

body.epc-layout-mobile:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw21-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw22-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw23-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw24-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw88-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(.site-ai-sidebar.is-ready) .sw91-mo-top-btn {
    bottom: calc(var(--cdl-mo-dock-h) + 12px + 118px) !important;
}

body.epc-layout-mobile:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw21-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw22-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw23-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw24-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw88-mo-top-btn,
body.epc-layout-mobile:has(.car-detail-lease-page):has(#chatterbox-root .chat-icon):has(.site-ai-sidebar.is-ready) .sw91-mo-top-btn {
    bottom: calc(var(--cdl-mo-dock-h) + 12px + 118px + 96px) !important;
}

@media (min-width: 1024px) {
    body:not(.epc-layout-mobile) .cdl-mo-strip,
    body:not(.epc-layout-mobile) .cdl-mo-counsel,
    body:not(.epc-layout-mobile) .cdl-mo-dock {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cdl-lease-card__cta,
    .cdl-btn,
    .cdl-float-counsel,
    .cdl-float-counsel__submit,
    .cdl-quickdock,
    .cdl-quickdock__btn,
    .cdl-lease-tab {
        transition: none;
    }

    .cdl-lease-card__cta:hover,
    .cdl-btn:hover,
    .cdl-float-counsel__submit:hover,
    .cdl-quickdock__btn:hover,
    .cdl-lease-card__cta:active,
    .cdl-btn:active,
    .cdl-float-counsel__submit:active,
    .cdl-lease-tab:active {
        transform: none;
    }
}

/* 리스/엔카 스킨 페이지는 car_detail.css(기본 스킨)를 로드하지 않아서 공용 컴포넌트인
   section_help_tip.php(.epc-section-help / .epc-sale-method-help)의 말풍선 스타일이
   전혀 적용되지 않았다(버튼은 브라우저 기본 스타일, 툴팁은 위치 지정 없이 그냥 텍스트로
   흘러나옴). 여기서 동일한 모양으로 다시 정의한다. */
.epc-section-help,
.epc-sale-method-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.epc-section-help__btn,
.epc-sale-method-help__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    border: 1px solid #94a3b8;
    border-radius: 50%;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.epc-section-help__tip,
.epc-sale-method-help__tip {
    display: none;
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 20;
    min-width: 120px;
    max-width: 260px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    white-space: normal;
    word-break: keep-all;
    text-align: left;
}

.epc-section-help__tip::after,
.epc-sale-method-help__tip::after {
    content: '';
    position: absolute;
    left: 14px;
    bottom: -6px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    transform: rotate(45deg);
}

.epc-section-help.is-open .epc-section-help__tip,
.epc-sale-method-help.is-open .epc-sale-method-help__tip {
    display: block;
}

.epc-section-help--wide .epc-section-help__tip {
    min-width: 280px;
    max-width: min(420px, 94vw);
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
}

.epc-section-help--below .epc-section-help__tip {
    bottom: auto;
    top: calc(100% + 8px);
}

.epc-section-help--below .epc-section-help__tip::after {
    bottom: auto;
    top: -6px;
    border-right: 1px solid #cbd5e1;
    border-bottom: none;
    border-top: 1px solid #cbd5e1;
    border-left: 1px solid #cbd5e1;
}
