* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --gray: #333333;
    --gray-light: #666666;
    --gray-lighter: #f5f5f5;
    --accent: #ff3333;
    --border: #e0e0e0;
    --radius: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--black);
    padding: 15px 0;
    transition: all 0.3s;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}

.logo-accent {
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--accent);
}

.phone {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: #cc0000;
}

.btn-outline {
    background: transparent;
    color: var(--black);
    border: 2px solid var(--black);
}

.btn-outline:hover {
    background: var(--black);
    color: var(--white);
}

/* Hero */
.hero {
    height: 100vh;
    min-height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 60px;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    max-width: 700px;
}

.hero-content h1 {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Section Title */
.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: 2px;
}

/* Why Us */
.why-us {
    padding: 100px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 40px 20px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    border-radius: 12px;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.feature-card p {
    color: var(--gray-light);
    font-size: 14px;
}

/* How Work */
.how-work {
    padding: 100px 0;
    background: var(--black);
    color: var(--white);
}

.how-work .section-title {
    color: var(--white);
}

.steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
    opacity: 0.3;
}

.step h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.step p {
    color: var(--gray-light);
    font-size: 14px;
}

/* Catalog */
.catalog {
    padding: 100px 0;
    background: var(--gray-lighter);
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 40px;
    border: 2px solid var(--black);
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-box button {
    padding: 15px 25px;
    background: var(--black);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filters select {
    padding: 12px 30px;
    border: 2px solid var(--black);
    background: var(--white);
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.car-card {
    background: var(--white);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s;
    border-radius: 12px;
}

.car-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.car-image {
    height: 250px;
    background: var(--gray-lighter);
    position: relative;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.car-card:hover .car-image img {
    transform: scale(1.05);
}

.car-info {
    padding: 25px;
}

.car-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.car-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--gray-light);
    font-size: 14px;
}

.car-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
}

.car-card .btn {
    width: 100%;
    text-align: center;
}

.load-more {
    text-align: center;
    margin-top: 50px;
}

/* Calculator */
.calculator {
    padding: 100px 0;
    background: var(--white);
}

.calc-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--black);
    font-size: 16px;
    outline: none;
    border-radius: 8px;
}

.calc-result {
    background: var(--black);
    color: var(--white);
    padding: 40px;
}

.calc-result h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.result-price {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 30px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray);
    font-size: 14px;
}

/* Reviews */
.reviews {
    padding: 100px 0;
    background: var(--gray-lighter);
}

.reviews-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.review-card {
    background: var(--white);
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    font-weight: 600;
    overflow: hidden;
}

.review-avatar.has-photo {
    padding: 0;
}

.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-stars {
    color: #ffc107;
    font-size: 18px;
    margin: 5px 0;
    letter-spacing: 2px;
}

.review-name {
    font-weight: 600;
    font-size: 18px;
}

.review-date {
    color: var(--gray-light);
    font-size: 14px;
}

.review-text {
    color: var(--gray-light);
    line-height: 1.8;
}

/* Contacts */
.contacts {
    padding: 100px 0;
    background: var(--black);
    color: var(--white);
}

.contacts .section-title {
    color: var(--white);
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    min-width: 0;
}

.contact-icon {
    font-size: 32px;
}

.contact-item h4 {
    font-size: 14px;
    color: var(--gray-light);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.contact-item > div {
    min-width: 0;
    overflow-wrap: break-word;
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
}

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

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 2px solid var(--gray);
    background: transparent;
    color: var(--white);
    font-size: 16px;
    outline: none;
    border-radius: 8px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--gray-light);
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 60px 0 30px;
    border-top: 1px solid var(--gray);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo p {
    color: var(--gray-light);
    margin-top: 10px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--gray);
    font-size: 14px;
    color: var(--gray-light);
}

.admin-link {
    color: var(--gray-light);
    text-decoration: none;
}

.admin-link:hover {
    color: var(--accent);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.modal-content {
    background: var(--white);
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: block;
    border-radius: 12px;
    margin: auto;
}

/* Order Modal - Small */
.modal-content.small {
    max-width: 500px;
    width: 92%;
    grid-template-columns: 1fr;
    padding: 0;
    border-radius: 16px;
    background: var(--white);
}

.modal-content.small h2 {
    font-size: 22px;
    margin: 0 0 8px 0;
    padding: 25px 25px 0 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.modal-content.small p {
    color: var(--gray-light);
    margin: 0 0 20px 0;
    padding: 0 25px;
    font-size: 15px;
}

.modal-content.small form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 25px 25px 25px;
}

.modal-content.small input,
.modal-content.small textarea {
    padding: 14px 16px;
    border: 2px solid #000;
    font-size: 16px;
    outline: none;
    font-family: inherit;
    width: 100%;
    border-radius: 10px;
}

.modal-content.small input::placeholder,
.modal-content.small textarea::placeholder {
    color: #888;
}

.modal-content.small textarea {
    min-height: 90px;
    resize: vertical;
}

.modal-content.small button[type="submit"] {
    margin-top: 8px;
    width: 100%;
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
}

.modal-content.small .modal-close {
    top: 12px;
    right: 15px;
    font-size: 28px;
    color: #000;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.5);
    border: none;
    font-size: 32px;
    cursor: pointer;
    z-index: 100;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(0,0,0,0.8);
}

.modal-gallery {
    width: 100%;
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 400px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 44px;
    height: 44px;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
    background: #000;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.gallery-thumbs img {
    width: 70px;
    height: 52px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    flex-shrink: 0;
    border-radius: 4px;
    border: 2px solid transparent;
}

.gallery-thumbs img.active,
.gallery-thumbs img:hover {
    opacity: 1;
    border-color: #ff3333;
}

.modal-info {
    padding: 25px;
}

.modal-info h2 {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 700;
}

.modal-specs {
    margin-bottom: 20px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    color: #666;
    font-weight: 400;
}

.spec-value {
    font-weight: 600;
    color: #000;
}

.modal-price {
    font-size: 32px;
    font-weight: 700;
    color: #ff3333;
    margin: 20px 0;
}

.modal-description {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.modal-description h3 {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.modal-description p {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.modal-info .btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--black);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        border-top: 1px solid #333;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav a {
        padding: 15px 20px;
        border-bottom: 1px solid #333;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .phone {
        display: none;
    }
    
    .calc-wrapper,
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    /* Modal car card - mobile fixes */
    .modal.active {
        padding: 10px;
        align-items: flex-start;
    }
    
    .modal-content {
        max-height: 95vh;
        border-radius: 10px;
        width: 100%;
    }
    
    .gallery-main {
        height: 280px;
    }
    
    .gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .gallery-thumbs img {
        width: 60px;
        height: 45px;
    }
    
    .modal-info {
        padding: 20px;
    }
    
    .modal-info h2 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .modal-price {
        font-size: 26px;
        margin: 15px 0;
    }
    
    .spec-row {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .modal-info .btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .modal-description {
        margin: 15px 0;
        padding: 12px 0;
    }
    
    .modal-description h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .modal-description p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .gallery-main {
        height: 280px;
    }
    
    .modal-info {
        padding: 20px;
    }
    
    .modal-info h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .modal-price {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .modal-specs {
        margin-bottom: 20px;
    }
    
    .spec-row {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .gallery-thumbs {
        padding: 10px;
    }
    
    .gallery-thumbs img {
        width: 70px;
        height: 50px;
    }
    
    .gallery-nav {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 26px;
        margin-bottom: 35px;
    }
    
    .hero {
        min-height: 500px;
        margin-top: 50px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 15px;
    }
    
    .why-us,
    .how-work,
    .catalog,
    .calculator,
    .reviews,
    .contacts {
        padding: 50px 0;
    }
    
    .features-grid,
    .steps {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .car-image {
        height: 220px;
    }
    
    .reviews-slider {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .review-card {
        padding: 25px;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-item a {
        font-size: 14px;
        word-break: break-all;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .calc-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input {
        border-right: 2px solid var(--black);
        border-bottom: none;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filters select {
        width: 100%;
    }
    
    .modal-content.small {
        width: 95%;
        max-width: none;
        margin: 20px auto;
        border-radius: 12px;
    }
    
    .modal-content.small h2 {
        font-size: 18px;
        padding: 20px 20px 0 20px;
    }
    
    .modal-content.small p {
        padding: 0 20px;
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .modal-content.small form {
        padding: 0 20px 20px 20px;
        gap: 10px;
    }
    
    .modal-content.small input,
    .modal-content.small textarea {
        padding: 12px 14px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .modal-content.small textarea {
        min-height: 80px;
    }
    
    .modal-content.small button[type="submit"] {
        padding: 14px;
        font-size: 14px;
    }
    
    .modal-content.small .modal-close {
        top: 10px;
        right: 12px;
        font-size: 24px;
    }
}