/* 리스·실시간 조회 매물 상세 공용 UI (body.car-detail-lease-site / body.car-detail-viewer-ui) */

body.car-detail-viewer-ui .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- 실시간 조회 pill ---- */
body.car-detail-viewer-ui .shm-detail-viewer-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #fff;
    letter-spacing: -0.03em;
    border-radius: 999px;
    background: #2b2b2b;
}

body.car-detail-viewer-ui .shm-detail-viewer-pill__icon {
    flex-shrink: 0;
    display: inline-block;
    font-size: 15px;
    line-height: 1;
    animation: shm-detail-eye-bounce 1.1s ease-in-out infinite;
}

@keyframes shm-detail-eye-bounce {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.car-detail-viewer-ui .shm-detail-viewer-pill__icon {
        animation: none;
    }
}

body.car-detail-viewer-ui .shm-detail-viewer-pill__num {
    font-weight: 800;
    color: #ffd400;
}

/* ---- 리스구매시 가격 바 ---- */
body.car-detail-lease-site .shm-detail-lease-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0;
    font-size: 14px;
    color: #666;
    letter-spacing: -0.03em;
}

body.car-detail-lease-site .shm-detail-lease-price__label {
    font-weight: 500;
    color: #888;
}

body.car-detail-lease-site .shm-detail-lease-price__term-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 20;
}

body.car-detail-lease-site .shm-detail-lease-price__term-wrap.is-open {
    z-index: 40;
}

body.car-detail-lease-site .shm-detail-lease-price__term--native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.car-detail-lease-site .shm-detail-lease-price__term-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 82px;
    padding: 4px 28px 4px 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    letter-spacing: -0.03em;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.car-detail-lease-site .shm-detail-lease-price__term-btn:hover {
    border-color: var(--main-color, #0086d8);
}

body.car-detail-lease-site .shm-detail-lease-price__term-wrap.is-open .shm-detail-lease-price__term-btn {
    border-color: var(--main-color, #0086d8);
    box-shadow: 0 0 0 2px rgba(0, 134, 216, 0.12);
}

body.car-detail-lease-site .shm-detail-lease-price__term-value {
    white-space: nowrap;
}

body.car-detail-lease-site .shm-detail-lease-price__chev {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -5px;
    pointer-events: none;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: rotate(45deg);
    transition: transform 0.15s ease, margin-top 0.15s ease;
}

body.car-detail-lease-site .shm-detail-lease-price__term-wrap.is-open .shm-detail-lease-price__chev {
    margin-top: -2px;
    transform: rotate(-135deg);
    border-color: var(--main-color, #0086d8);
}

body.car-detail-lease-site .shm-detail-lease-price__term-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.car-detail-lease-site .shm-detail-lease-price__term-option {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    letter-spacing: -0.03em;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

body.car-detail-lease-site .shm-detail-lease-price__term-option:hover {
    background: #f3f9fd;
    color: var(--main-color, #0086d8);
}

body.car-detail-lease-site .shm-detail-lease-price__term-option.is-selected {
    background: var(--main-color, #0086d8);
    color: #fff;
}

body.car-detail-lease-site .shm-detail-lease-price__term-option.is-selected:hover {
    background: var(--main-color, #0086d8);
    color: #fff;
}

body.car-detail-lease-site .shm-detail-lease-price__monthly {
    margin-left: auto;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

body.car-detail-lease-site .shm-detail-lease-price__amount {
    font-size: 28px;
    font-weight: 800;
    color: var(--main-color, #0086d8);
    letter-spacing: -0.04em;
}

body.car-detail-lease-site .encar-detail-aside .shm-detail-aside-lease {
    margin: 4px 0 12px;
    overflow: visible;
}

body.car-detail-lease-site .encar-detail-aside .encar-aside-card {
    overflow: visible;
}

body.car-detail-lease-site .encar-detail-aside .shm-detail-lease-price__monthly {
    width: 100%;
    margin-left: 0;
    text-align: right;
}

body.car-detail-lease-site .encar-detail-aside .shm-detail-lease-price__amount {
    font-size: 32px;
}

body.car-detail-lease-site .charocha-detail-page .car-price-section .shm-detail-lease-price {
    width: 100%;
}

body.car-detail-lease-site .charocha-detail-page .car-price-section .shm-detail-lease-price__monthly {
    margin-left: auto;
}

body.car-detail-lease-site .epc-car-detail-topline-price--lease .shm-detail-lease-price {
    width: 100%;
    max-width: 420px;
}

body.car-detail-lease-site .epc-car-detail-topline-price--lease .shm-detail-lease-price__monthly {
    margin-left: auto;
}

/* ---- LIVE 배너 (운영 live-viewer-banner) ---- */
@keyframes shm-detail-live-pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

body.car-detail-viewer-ui .shm-detail-live-banner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 10px 12px;
    padding: 11px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

body.car-detail-viewer-ui .shm-detail-live-banner__badge-wrap {
    flex-shrink: 0;
}

body.car-detail-viewer-ui .shm-detail-live-banner__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 20px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.4);
}

body.car-detail-viewer-ui .shm-detail-live-banner__pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: shm-detail-live-pulse 2s infinite;
}

body.car-detail-viewer-ui .shm-detail-live-banner__text-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

body.car-detail-viewer-ui .shm-detail-live-banner__text {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #fff;
    letter-spacing: -0.03em;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

body.car-detail-viewer-ui .shm-detail-live-banner__text strong {
    font-weight: 700;
    color: #ffd700;
}

body.car-detail-viewer-ui .shm-detail-live-banner--car-info {
    margin: 0 0 14px;
}

body.car-detail-viewer-ui.epc-layout-mobile .shm-detail-live-viewer-banner {
    margin: 0 0 2vw;
    padding: 2.5vw 4vw;
    border-radius: 0;
}

body.car-detail-viewer-ui.epc-layout-mobile .shm-detail-live-banner__badge {
    padding: 1.2vw 2.5vw;
    font-size: 3.2vw;
    gap: 1.2vw;
}

body.car-detail-viewer-ui.epc-layout-mobile .shm-detail-live-banner__pulse {
    width: 1.2vw;
    height: 1.2vw;
}

body.car-detail-viewer-ui.epc-layout-mobile .shm-detail-live-banner__text {
    font-size: 3.5vw;
}

body.car-detail-viewer-ui.epc-layout-mobile .charocha-detail-mo-header .shm-detail-live-banner--car-info,
body.car-detail-viewer-ui.epc-layout-mobile .encar-detail-head .shm-detail-live-banner--car-info {
    margin: 0 0 12px;
}

body.car-detail-viewer-ui .encar-detail-main .shm-detail-live-banner--car-info {
    margin: 0 0 16px;
}

/* ---- 중고차 리스 특별 프로모션 (kimsy1899 전용 partial) ---- */
.shm-detail-lease-promo {
    margin: 0;
    padding: 0;
}

.shm-detail-lease-promo__title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.04em;
}

.shm-detail-lease-promo__box {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 14px;
    background: #f2f2f2;
}

.shm-detail-lease-promo__visual {
    flex: 0 0 200px;
    max-width: 200px;
    align-self: stretch;
}

.shm-detail-lease-promo__visual img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    object-position: top center;
}

.shm-detail-lease-promo__content {
    flex: 1 1 auto;
    min-width: 0;
}

.shm-detail-lease-promo__ticker {
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #111;
}

.shm-detail-lease-promo__ticker-track {
    display: flex;
    width: max-content;
    animation: shm-detail-promo-ticker 14s linear infinite;
}

.shm-detail-lease-promo__ticker-track span {
    flex: 0 0 auto;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    letter-spacing: -0.03em;
}

@keyframes shm-detail-promo-ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.shm-detail-lease-promo__table-wrap {
    overflow: hidden;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
}

.shm-detail-lease-promo__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.shm-detail-lease-promo__table thead th {
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-align: center;
    background: #ececec;
    border-bottom: 1px solid #ccc;
}

.shm-detail-lease-promo__table tbody th,
.shm-detail-lease-promo__table tbody td {
    padding: 10px 8px;
    font-size: 13px;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

.shm-detail-lease-promo__table tbody th {
    font-weight: 600;
    color: #333;
    background: #fafafa;
    border-right: 1px solid #e5e5e5;
}

.shm-detail-lease-promo__table tbody td strong {
    font-size: 14px;
    font-weight: 800;
    color: #111;
}

.shm-detail-lease-promo__table tbody tr.is-default td strong,
.shm-detail-lease-promo__table tbody tr.is-active td strong {
    color: var(--main-color, #0086d8);
}

.encar-detail-main .shm-detail-lease-promo {
    margin-bottom: 20px;
}

.encar-detail-main .shm-detail-lease-promo__box {
    flex-direction: row;
}

/* ---- 모바일 ---- */
body.car-detail-viewer-ui.epc-layout-mobile .charocha-detail-mo-header .shm-detail-viewer-pill {
    margin-bottom: 8px;
}

body.car-detail-lease-site.epc-layout-mobile .charocha-detail-mo-header .shm-detail-lease-price {
    width: 100%;
}

body.car-detail-lease-site.epc-layout-mobile .charocha-detail-mo-header .shm-detail-lease-price__monthly {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
    text-align: right;
}

body.car-detail-lease-site.epc-layout-mobile .charocha-detail-mo-header .shm-detail-lease-price__amount {
    font-size: 26px;
}

body.epc-layout-mobile .shm-detail-mo-lease {
    margin: 0 12px 12px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

body.epc-layout-mobile .shm-detail-mo-lease .shm-detail-lease-promo__title {
    font-size: 16px;
}

body.epc-layout-mobile .shm-detail-lease-promo__box {
    flex-direction: column;
    gap: 12px;
}

body.epc-layout-mobile .shm-detail-lease-promo__visual {
    flex: none;
    max-width: none;
    width: 100%;
}

body.epc-layout-mobile .shm-detail-lease-promo__visual img {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 1024px) {
    body:not(.epc-layout-mobile) .shm-detail-lease-promo__box {
        flex-direction: column;
    }

    body:not(.epc-layout-mobile) .shm-detail-lease-promo__visual {
        flex: none;
        max-width: none;
        width: 100%;
    }
}

/* 매물 상세 하단 리스 안내 */
body.car-detail-lease-site .shm-detail-lease-notice {
    max-width: var(--epc-detail-max-width, 1000px);
    width: 100%;
    margin: 20px auto;
    padding: 0 10px;
    box-sizing: border-box;
}

body.car-detail-lease-site .shm-detail-lease-notice__inner {
    padding: 10px 12px;
    border: 1px solid #7eb8e8;
    border-radius: 8px;
    background: #f3f9ff;
    text-align: center;
}

body.car-detail-lease-site .shm-detail-lease-notice__text {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: #444;
    word-break: keep-all;
    letter-spacing: -0.02em;
}

body.car-detail-lease-site.epc-layout-mobile .shm-detail-lease-notice {
    max-width: none;
    width: auto;
    margin: 0 12px 12px;
    padding: 0;
}

body.car-detail-lease-site.epc-layout-mobile .shm-detail-lease-notice__inner {
    padding: 8px 10px;
}

body.car-detail-lease-site.epc-layout-mobile .shm-detail-lease-notice__text {
    font-size: 10px;
    line-height: 1.48;
}
