/* Korea:Avto 브랜드 컬러 */
:root {
    --brand-color: rgb(118, 32, 246);
    --brand-color-dark: rgb(98, 22, 226);
    --brand-color-light: rgb(138, 52, 266);
}

/* HTML 배경색 설정 */
html {
    background-color: #ffffff;
}

/* 글로벌 스타일 재정의 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #ffffff;
}

@media (max-width: 767.98px) {
    body {
        padding-bottom: 80px; /* 모바일 하단 탭 메뉴 공간 */
    }
}

/* 브랜드 컬러 적용 */
.brand-color {
    color: var(--brand-color) !important;
}

.bg-brand {
    background-color: var(--brand-color) !important;
}

/* 버튼 스타일 재정의 */
.btn-brand {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
    color: white;
}

.btn-brand:hover {
    background-color: var(--brand-color-dark);
    border-color: var(--brand-color-dark);
    color: white;
}

/* 부트스트랩 버튼 컴포넌트 브랜드 컬러 재정의 */
.btn-primary {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: var(--brand-color-dark);
    border-color: var(--brand-color-dark);
    color: white;
}

.btn-outline-primary {
    color: #212529;
    border-color: #6c757d;
    background-color: #ffffff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #f8f9fa;
    border-color: #495057;
    color: #212529;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* 링크 스타일 브랜드 컬러 적용 */
a {
    color: var(--brand-color);
}

a:hover {
    color: var(--brand-color-dark);
}

.text-primary {
    color: var(--brand-color) !important;
}

/* 폼 컨트롤 포커스 시 브랜드 컬러 */
.form-control:focus,
.form-select:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.2rem rgba(118, 32, 246, 0.25);
}

/* 체크박스 및 라디오 버튼 브랜드 컬러 */
.form-check-input:checked {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
}

.form-check-input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.2rem rgba(118, 32, 246, 0.25);
}

.btn-black {
    background-color: #000;
    border-color: #000;
    color: white;
}

.btn-black:hover {
    background-color: #333;
    border-color: #333;
    color: white;
}

.btn-white {
    background-color: #fff;
    border-color: #000;
    color: #000;
}

.btn-white:hover {
    background-color: #f8f9fa;
    border-color: #000;
    color: #000;
}

/* 버튼 크기 - 모바일에서 크게 */
.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.375rem;
}

/* 작은 버튼 크기 (PC 및 모바일 공통) */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

@media (max-width: 767.98px) {
    .btn {
        padding: 1rem 2rem;
        font-size: 1.125rem;
        font-weight: 500;
        min-height: 48px;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
        min-height: auto;
        font-weight: 400;
    }
    
    /* 모바일에서 기본 폰트 크기 증가 */
    body {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.125rem;
    }
    
    h5 {
        font-size: 1.0625rem;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* 모바일 네비게이션 아이콘 크기 증가 */
    .mobile-nav-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }
    
    .mobile-nav-icon i {
        font-size: 1.5rem;
    }
    
    .mobile-nav-item {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .mobile-nav-item i {
        font-size: 1.75rem;
        margin-bottom: 0.375rem;
    }
    
    /* 입력 필드 크기 증가 */
    .form-control,
    .form-select {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    /* 모달 헤더 크기 증가 */
    .modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .btn-close {
        width: 2rem;
        height: 2rem;
        font-size: 1.25rem;
    }
}

/* 로딩 스피너 */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* 모바일 상단 네비게이션 */
.mobile-top-nav {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1040;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .mobile-top-nav {
        display: none;
    }
}

.mobile-top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    position: relative;
}

.mobile-top-nav-left,
.mobile-top-nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    min-width: 2.5rem;
}

.mobile-top-nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-logo {
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    color: #000;
}

.mobile-logo:hover {
    text-decoration: none;
    color: #000;
}

.mobile-logo strong {
    color: #000;
}

.mobile-logo .brand-color {
    color: var(--brand-color) !important;
}

.mobile-nav-icon {
    color: #000 !important;
    font-size: 1.25rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    transition: color 0.3s;
}

.mobile-nav-icon:hover {
    color: var(--brand-color);
    text-decoration: none;
}

.mobile-nav-icon i {
    font-size: 1.25rem;
    color: #000 !important;
}

/* PC 상단 메뉴 */
.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: block;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .desktop-nav .navbar .container-fluid {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* About, CarList 페이지의 상단 메뉴는 full-screen */
    .about-page .desktop-nav .navbar .container-fluid,
    .carlist-page .desktop-nav .navbar .container-fluid {
        max-width: 100%;
        margin: 0;
    }
}

.desktop-nav .navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
}

.desktop-nav .navbar-brand strong {
    color: #000;
}

.desktop-nav .navbar-brand .brand-color {
    color: var(--brand-color) !important;
}

.desktop-nav .nav-link {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    color: #444;
    font-weight: 500;
    transition: color 0.3s;
}

.desktop-nav .nav-link:hover,
.desktop-nav .nav-link.active {
    color: var(--brand-color);
}

/* 모바일 하단 탭 메뉴 */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #343a40;
    border-top: 1px solid #495057;
    z-index: 1050;
    display: flex;
    justify-content: space-around;
    padding: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    text-decoration: none;
    color: #ffffff;
    font-size: 0.75rem;
    transition: color 0.3s;
    flex: 1;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: #ffffff;
    text-decoration: none;
}

.mobile-nav-item i {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #ffffff !important;
}

.mobile-nav-item span {
    color: #ffffff !important;
}

/* 맨 위로 가기 버튼 */
/* WhatsApp 플로팅 버튼 (scroll-to-top 대체) */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: #128C7E;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(18, 140, 126, 0.5);
    z-index: 1001;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    text-decoration: none;
}

.whatsapp-float:hover {
    background: #0d6e62;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(18, 140, 126, 0.7);
    text-decoration: none;
}

.whatsapp-float.show {
    display: flex;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(18, 140, 126, 0.5);
    }
    50% {
        box-shadow: 0 5px 30px rgba(18, 140, 126, 0.8);
    }
}

@media (max-width: 767.98px) {
    .whatsapp-float {
        bottom: 90px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

/* 부드러운 스크롤 */
html {
    scroll-behavior: smooth;
}

/* 언어 선택 */
.language-selector {
    display: inline-flex;
    gap: 0.5rem;
}

.language-selector a {
    padding: 0.25rem 0.75rem;
    text-decoration: none;
    color: #6c757d;
    border-radius: 0.25rem;
    transition: all 0.3s;
}

.language-selector a:hover,
.language-selector a.active {
    color: var(--brand-color);
    background-color: rgba(118, 32, 246, 0.1);
}

/* 컨테이너 패딩 조정 */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* About, CarList 페이지의 container-fluid는 full-screen */
    .about-page .container-fluid,
    .carlist-page .container-fluid {
        max-width: 100%;
        margin: 0;
    }
}

/* 메인 컨텐츠 영역 */
main {
    flex: 1;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

@media (min-width: 768px) {
    main {
        padding-top: 0rem;
        padding-bottom: 3rem;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }
    
    /* About, CarList 페이지는 full-screen */
    .about-page main,
    .carlist-page main {
        max-width: 100%;
        margin: 0;
    }
}

/* Footer 스타일 - 항상 full-screen */
.site-footer {
    background-color: #f5f5f5;
    color: #495057;
    padding: 2rem 0 1rem;
    margin-top: auto;
    margin-bottom: 0;
    width: 100%;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative;
    z-index: 1;
}

.footer-content {
    margin-bottom: 1.5rem;
}

.footer-column {
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .footer-column {
        margin-bottom: 0;
    }
}

.footer-title {
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: #495057;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--brand-color);
}

.footer-info {
    font-size: 0.7rem;
    line-height: 1.6;
}

.footer-info p {
    margin-bottom: 0.4rem;
    color: #6c757d;
}

.footer-info strong {
    font-weight: bold;
    color: #495057;
}

.language-selector-footer {
    margin-top: 1rem;
}

.language-selector-footer label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: #495057;
}

.language-dropdown {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.4rem;
    font-size: 0.75rem;
    color: #495057;
    width: 100%;
    max-width: 200px;
    cursor: pointer;
}

.language-dropdown:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.2rem rgba(118, 32, 246, 0.25);
}

.footer-divider {
    border-top: 1px solid #dee2e6;
    margin: 1.5rem 0 0.75rem;
    opacity: 1;
}

.footer-copyright {
    text-align: center;
    padding-top: 0.75rem;
}

.footer-copyright p {
    margin: 0;
    font-size: 0.7rem;
    color: #6c757d;
}

@media (max-width: 767.98px) {
    .site-footer {
        padding: 1.5rem 0 0.75rem;
        margin-top: 2rem;
    }
    
    .footer-column {
        margin-bottom: 1.5rem;
    }
    
    .footer-title {
        font-size: 0.7rem;
        color: #6c757d;
    }
    
    .footer-links a {
        font-size: 0.7rem;
    }
    
    .footer-info {
        font-size: 0.6rem;
    }
    
    .footer-info p {
        color: #6c757d;
        margin-bottom: 0.3rem;
        font-size:0.7rem;
    }
    
    .footer-info strong {
        font-weight: 500;
        color: #6c757d;
    }
    
    .language-selector-footer label {
        font-size: 0.7rem;
        color: #6c757d;
    }
    
    .language-dropdown {
        max-width: 100%;
        font-size: 0.7rem;
    }
}

/* 페이지 헤더 스타일 (찜한 차량, 회원정보 등 공통 사용) */
.page-header {
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    border-bottom: 2px solid #f0f0f0;
}

.page-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand-color), var(--brand-color-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(118, 32, 246, 0.25);
}

.page-icon i {
    font-size: 1.1rem;
    color: white;
}

.page-title-content {
    flex: 1;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
}

@media (max-width: 767.98px) {
    .page-header {
        margin-bottom: 1.5rem;
        padding: 1rem 0;
    }
    
    .page-icon {
        width: 36px;
        height: 36px;
    }
    
    .page-icon i {
        font-size: 1rem;
    }
    
    .page-title {
        font-size: 1.1rem;
    }
    
    .page-subtitle {
        font-size: 0.875rem;
    }
    
    .page-title-wrapper {
        gap: 0.75rem;
    }
}

/* 톤다운 컬러 배지 스타일 (글로벌) */
.badge.custom-badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* 성능기록 색상 스타일 (파스텔 톤) */
.badge.custom-badge.performance-perfect {
    background-color: #95b695;
    color: white;
    font-weight: 500;
}

.badge.custom-badge.performance-no-accident {
    background-color: #a6a6a6;
    color: white;
    font-weight: 500;
}

.badge.custom-badge.performance-accident {
    background-color: #d99694;
    color: white;
    font-weight: 500;
}

.badge.custom-badge.performance-unknown {
    background-color: #d99694;
    color: white;
    font-weight: 500;
}

/* 관심 배지 색상 스타일 (톤다운) */
.badge.custom-badge.interest-very-low {
    background-color: #d99694 !important;
    color: white !important;
    font-weight: 500;
}

.badge.custom-badge.mid-high {
    background-color: #a6a6a6;
    color: white;
    font-weight: 500;
}

.badge.custom-badge.low {
    background-color: #95b695;
    color: white;
    font-weight: 500;
}

.badge.custom-badge.normal {
    background-color: #e9ecef;
    color: #6c757d;
    border: 1px solid #dee2e6;
    font-weight: 500;
}

/* 교체이력 랭크 배지 스타일 (파스텔/회색 톤) */
.badge.custom-badge.rank-badge,
.badge.rank-badge {
    background-color: #a6a6a6;
    color: white;
    font-weight: 500;
    font-size: 0.7rem;
    padding: 3px 6px;
}

.badge.custom-badge.rank-badge.rank-1,
.badge.rank-badge.rank-1 {
    background-color: #b8b8b8;
    color: white;
}

.badge.custom-badge.rank-badge.rank-a,
.badge.rank-badge.rank-a {
    background-color: #c4c4c4;
    color: white;
}

