/* ========================================
   가격 섹션 & CTA 버튼
======================================== */

/* 기본 정보 패널 */
.vehicle-info-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.price-section {
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.current-price {
    font-size: 1.8rem;
    color: #1a1a1a;
}

.current-price strong {
    font-weight: 700;
    color: #3b82f6;
}

.original-price {
    margin-top: 4px;
    font-size: 0.9rem;
}

.original-price del {
    color: #9ca3af;
    margin-right: 8px;
}

.discount {
    color: #ef4444;
    font-weight: 600;
}

/* 새 구조: 가격 섹션 */
.vehicle-price-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vehicle-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #3b82f6;
}

.price-unit {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4b5563;
}

/* ========================================
   CTA 버튼
======================================== */

.vehicle-cta-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-cta {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cta .btn-text {
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-cta .btn-phone {
    display: none;
}

/* 전화 문의 버튼 */
.btn-cta.btn-call {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-cta.btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* 구매 상담 버튼 */
.btn-cta.btn-inquiry {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    color: #4b5563;
}

.btn-cta.btn-inquiry:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #f8fafc;
}

/* 액션 버튼 (기존) */
.info-actions {
    display: flex;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #3b82f6;
    border: none;
    color: #ffffff;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #4b5563;
}

.btn-secondary:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* 판매자 정보 */
.seller-info {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.seller-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.seller-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
}

.seller-avatar {
    width: 48px;
    height: 48px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.seller-details {
    flex: 1;
}

.seller-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.seller-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #6b7280;
}

.seller-phone {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #3b82f6;
    text-decoration: none;
}

.seller-phone:hover {
    text-decoration: underline;
}

.seller-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* ========================================
   성능점검 미니 프리뷰 (CTA 아래)
======================================== */

.inspection-preview-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.inspection-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.inspection-preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
}

.inspection-preview-title svg {
    color: #22c55e;
}

.inspection-badge-mini {
    padding: 4px 10px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.btn-view-inspection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-view-inspection:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-view-inspection svg {
    flex-shrink: 0;
}

/* ========================================
   성능점검표 전체화면 이미지 뷰어
======================================== */

/* 오버레이 (배경) - 검정 배경 */
.inspection-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.inspection-viewer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 전체화면 뷰어 컨테이너 */
.inspection-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.inspection-viewer.active {
    opacity: 1;
    visibility: visible;
}

/* 뷰어 헤더 */
.viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
    z-index: 10;
}

.viewer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.viewer-page-indicator {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.viewer-page-indicator .current {
    color: #ffffff;
    font-weight: 600;
}

.btn-viewer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-viewer-close:hover {
    background: rgba(255,255,255,0.2);
}

/* 이미지 컨테이너 - 핀치 줌 영역 */
.viewer-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none; /* 브라우저 기본 제스처 비활성화 */
}

.viewer-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

.viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    display: none;
}

.viewer-image.active {
    display: block;
}

/* 줌 컨트롤 */
.viewer-zoom-controls {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.6);
    border-radius: 24px;
    z-index: 10;
}

.btn-zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-zoom:hover {
    color: #3b82f6;
}

.zoom-level {
    font-size: 0.85rem;
    color: #ffffff;
    min-width: 50px;
    text-align: center;
}

/* 네비게이션 버튼 */
.btn-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.btn-viewer-nav:hover {
    background: rgba(255,255,255,0.2);
}

.btn-viewer-nav.prev {
    left: 16px;
}

.btn-viewer-nav.next {
    right: 16px;
}

/* 썸네일 바 */
.viewer-thumbs {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    justify-content: center;
    overflow-x: auto;
    z-index: 10;
    -webkit-overflow-scrolling: touch;
}

.viewer-thumb {
    width: 60px;
    height: 45px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    flex-shrink: 0;
    background: transparent;
}

.viewer-thumb:hover {
    opacity: 0.8;
}

.viewer-thumb.active {
    border-color: #3b82f6;
    opacity: 1;
}

.viewer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* iframe 뷰어 (이미지 없을 때) */
.viewer-iframe-container {
    flex: 1;
    background: #ffffff;
    overflow: hidden;
}

.viewer-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 데이터 없음 플레이스홀더 */
.viewer-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.viewer-placeholder svg {
    color: #6b7280;
    margin-bottom: 16px;
}

.viewer-placeholder p {
    margin: 0 0 20px;
    font-size: 1rem;
    color: #ffffff;
}

.btn-contact-viewer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3b82f6;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-contact-viewer:hover {
    background: #2563eb;
}

/* body 스크롤 방지 */
body.viewer-open {
    overflow: hidden;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .viewer-header {
        padding: 8px 12px;
        padding-top: env(safe-area-inset-top, 8px);
    }

    .viewer-title {
        font-size: 0.9rem;
    }

    .btn-viewer-close {
        width: 40px;
        height: 40px;
    }

    .btn-viewer-nav {
        width: 40px;
        height: 40px;
    }

    .btn-viewer-nav.prev {
        left: 8px;
    }

    .btn-viewer-nav.next {
        right: 8px;
    }

    .viewer-zoom-controls {
        bottom: 80px;
    }

    .viewer-thumbs {
        padding: 12px;
        padding-bottom: env(safe-area-inset-bottom, 12px);
    }

    .viewer-thumb {
        width: 50px;
        height: 38px;
    }
}
