/* Car Detail Page Styles */

.header-white {
    background: var(--bg-dark, #0A0A0A);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Always show logo on car detail page */
body .header .logo-icon {
    opacity: 1 !important;
    transform: scale(1) !important;
    visibility: visible !important;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--bg-card, #111111);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color, #222222);
}

.breadcrumb {
    color: var(--text-secondary, #A0A0A0);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.breadcrumb:hover {
    color: var(--primary, #FF3366);
}

.breadcrumb.active {
    color: var(--text-primary, #FFFFFF);
    font-weight: 500;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--text-muted, #666666);
}

/* Car Detail Section */
.car-detail {
    padding: 60px 0;
    background: var(--bg-dark, #050505);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.detail-main {
    background: var(--bg-card, #111111);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--border-color, #222222);
}

.detail-header {
    margin-bottom: 30px;
}

.detail-date {
    display: inline-block;
    color: var(--text-secondary, #A0A0A0);
    font-size: 14px;
    margin-bottom: 12px;
}

.detail-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary, #FFFFFF);
    margin: 0;
}

/* Gallery */
.gallery {
    margin-bottom: 40px;
}

.gallery-main {
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-dark, #050505);
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border-color, #222222);
    margin-bottom: 16px;
    position: relative;
}

.gallery-main::after {
    content: '🔍';
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-main:hover::after {
    opacity: 1;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.02);
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid var(--border-color, #222222);
    transition: all 0.3s ease;
}

.gallery-thumb:hover {
    border-color: var(--primary, #FF3366);
    transform: translateY(-2px);
}

.gallery-thumb.active {
    border-color: var(--primary, #FF3366);
    box-shadow: 0 0 0 2px rgba(255, 51, 102, 0.2);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.gallery-placeholder p {
    font-size: 16px;
    color: var(--text-secondary, #A0A0A0);
    margin-top: 16px;
}

/* Specifications */
.specs-section {
    margin-bottom: 40px;
}

.specs-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary, #FFFFFF);
}

.specs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.specs-table tr {
    border-bottom: 1px solid var(--border-color, #222222);
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table th {
    text-align: left;
    padding: 16px 20px 16px 0;
    font-weight: 500;
    color: var(--text-secondary, #A0A0A0);
    font-size: 14px;
    width: 200px;
}

.specs-table td {
    padding: 16px 0;
    color: var(--text-primary, #FFFFFF);
    font-size: 16px;
}

/* Description */
.description-section {
    margin-bottom: 40px;
}

.description-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary, #FFFFFF);
}

.description-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary, #A0A0A0);
}

/* Similar Cars */
.similar-cars {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color, #222222);
}

.similar-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary, #FFFFFF);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.similar-card {
    display: block;
    background: var(--bg-card, #111111);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 1px solid var(--border-color, #222222);
}

.similar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 51, 102, 0.2);
    border-color: var(--primary, #FF3366);
}

.similar-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.similar-info {
    padding: 16px;
}

.similar-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-primary, #FFFFFF);
}

.similar-prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.similar-price-cny {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary, #FF3366);
}

.similar-price-krw {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary, #FF3366);
}

.similar-price-jpy {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary, #FF3366);
}

.similar-price-rub {
    font-size: 14px;
    color: var(--text-secondary, #A0A0A0);
}

.loading-text {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary, #A0A0A0);
    font-size: 16px;
}

/* Sidebar */
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.price-card,
.contact-card,
.info-card {
    background: var(--bg-card, #111111);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color, #222222);
}

.price-card {
    border: 2px solid var(--primary, #FF3366);
}

.price-main {
    margin-bottom: 20px;
}

.price-cny {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary, #FF3366);
    font-family: 'Unbounded', sans-serif;
}

.price-krw {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary, #FF3366);
    font-family: 'Unbounded', sans-serif;
}

.price-jpy {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary, #FF3366);
    font-family: 'Unbounded', sans-serif;
}

.price-delivery {
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #222222);
}

.price-label {
    font-size: 14px;
    color: var(--text-secondary, #A0A0A0);
    margin-bottom: 8px;
}

.price-rub {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #FFFFFF);
    margin-bottom: 12px;
}

.price-note {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary, #A0A0A0);
}

.price-note a,
.result-contact-note a {
    color: var(--primary, #FF3366);
    text-decoration: none;
    font-weight: 600;
}

.price-note a:hover,
.result-contact-note a:hover {
    text-decoration: underline;
}

.calculator-link {
    display: block;
    width: 100%;
    background: var(--gradient);
    color: white !important;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

.calculator-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 51, 102, 0.5);
}

/* Contact Card */
.contact-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary, #FFFFFF);
}

.contact-description {
    font-size: 14px;
    color: var(--text-secondary, #A0A0A0);
    margin-bottom: 24px;
    line-height: 1.5;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-input {
    padding: 14px 16px;
    border: 1px solid var(--border-color, #222222);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: 'Manrope', sans-serif;
    background: var(--bg-dark, #050505);
    color: var(--text-primary, #FFFFFF);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary, #FF3366);
    box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted, #666666);
}

.form-button {
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Manrope', sans-serif;
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 51, 102, 0.3);
}

.form-button:active {
    transform: translateY(0);
}

.form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.privacy-notice {
    font-size: 12px;
    color: var(--text-secondary, #A0A0A0);
    margin-top: 12px;
    line-height: 1.4;
}

/* Info Card */
.info-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary, #FFFFFF);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.info-list li {
    padding: 10px 0;
    color: var(--text-secondary, #A0A0A0);
    font-size: 15px;
    border-bottom: 1px solid var(--border-color, #222222);
}

.info-list li:last-child {
    border-bottom: none;
}

.info-link {
    display: inline-block;
    color: var(--primary, #FF3366);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}

.info-link:hover {
    color: var(--primary-light, #FF6B35);
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .price-card,
    .contact-card,
    .info-card {
        position: static;
    }

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

@media (max-width: 768px) {

    .detail-main {
        padding: 24px 20px;
    }

    .detail-title {
        font-size: 24px;
    }

    .specs-table th {
        font-size: 13px;
        width: 120px;
    }

    .specs-table td {
        font-size: 14px;
    }

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

    .price-cny {
        font-size: 28px;
    }

    .price-krw {
        font-size: 28px;
    }

    .price-jpy {
        font-size: 28px;
    }

    .price-rub {
        font-size: 20px;
    }

    .breadcrumbs {
        padding: 12px 0;
    }

    .breadcrumb {
        font-size: 13px;
    }
}

/* Calculator Modal */
.calculator-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.calculator-modal-content {
    background: var(--bg-card, #1A1A1A);
    margin: 3% auto;
    padding: 40px;
    border: 1px solid var(--border-color, #333);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
    position: relative;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.calculator-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: var(--text-secondary, #999);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
}

.calculator-close:hover {
    color: var(--primary, #FF3366);
}

.calculator-modal h2 {
    color: var(--text-primary, #FFF);
    margin-bottom: 30px;
    font-size: 24px;
}

.calculator-form {
    margin-bottom: 30px;
}

.calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.calc-field {
    margin-bottom: 20px;
}

.calc-field label {
    display: block;
    color: var(--text-secondary, #999);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.calc-field input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark, #0A0A0A);
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    color: var(--text-primary, #FFF);
    font-size: 16px;
    transition: border-color 0.2s;
}

.calc-field input[type="number"]:focus {
    outline: none;
    border-color: var(--primary, #FF3366);
}

.calc-radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.calc-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 16px;
    background: var(--bg-dark, #0A0A0A);
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    transition: all 0.2s;
}

.calc-radio:hover {
    border-color: var(--primary, #FF3366);
}

.calc-radio input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--primary, #FF3366);
}

.calc-radio span {
    color: var(--text-primary, #FFF);
    font-size: 14px;
}

.calc-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.calc-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary, #FF3366);
}

.calc-checkbox span {
    color: var(--text-primary, #FFF);
    font-size: 15px;
}

.calc-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted, #666);
    font-style: italic;
}

.calc-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 51, 102, 0.4);
}

/* Calculator Result */
.calculator-result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color, #333);
}

.calculator-result h3 {
    color: var(--text-primary, #FFF);
    font-size: 20px;
    margin-bottom: 15px;
}

.result-total {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary, #FF3366);
    margin-bottom: 30px;
}

.result-main {
    background: rgba(255, 51, 102, 0.1);
    border: 2px solid var(--primary, #FF3366);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.result-main h4 {
    color: var(--text-secondary, #999);
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 12px;
}

.result-details h4 {
    color: var(--text-primary, #FFF);
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9em;
}

.result-table tr {
    border-bottom: 1px solid var(--border-color, #333);
}

.result-table tr:last-child {
    border-bottom: none;
}

.result-table th,
.result-table td {
    padding: 10px 8px;
    color: var(--text-primary, #FFF);
    font-size: 13px;
    text-align: left;
    line-height: 1.4;
}

.result-table th {
    font-weight: 600;
}

.result-table th:last-child,
.result-table td:last-child {
    text-align: right;
}

.result-main-row {
    background: rgba(255, 255, 255, 0.05);
}

.result-main-row th {
    color: var(--text-primary, #FFF);
    font-size: 14px;
    padding: 12px 8px;
}

.result-main-row th:last-child {
    color: var(--primary, #FF3366);
    font-size: 15px;
}

.result-info td {
    padding: 6px 12px;
    font-size: 11px;
    color: var(--text-muted, #666);
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
}

.result-sub td {
    padding-left: 24px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 12px;
    color: var(--text-secondary, #999);
}

.result-sub td:first-child {
    color: var(--text-secondary, #999);
}

.result-sub td:last-child {
    color: var(--text-primary, #FFF);
    font-weight: 400;
}

.result-note-block {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 20px;
}

.result-contact-note {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary, #999);
}

.result-note {
    font-size: 13px;
    color: var(--text-secondary, #999);
    margin-bottom: 12px;
    line-height: 1.6;
}

.result-note:last-child {
    margin-bottom: 0;
}

.result-note strong {
    color: var(--text-primary, #FFF);
}

.result-disclaimer {
    font-size: 12px;
    color: var(--text-muted, #666);
    font-style: italic;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #333);
}

@media (max-width: 768px) {
    .calculator-modal-content {
        padding: 24px;
        margin: 5% auto;
    }

    .calc-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .calc-radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .result-total {
        font-size: 28px;
    }
}

/* Lightbox for Image Gallery */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    transition: all 0.3s;
    z-index: 10002;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 20px 25px;
    border-radius: 8px;
    transition: all 0.3s;
    z-index: 10002;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 51, 102, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 36px;
        width: 50px;
        height: 50px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 32px;
        padding: 15px 18px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-counter {
        bottom: 20px;
        font-size: 16px;
        padding: 8px 16px;
    }

    .lightbox-content img {
        max-height: 80vh;
    }
}