/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: #e5e7eb;
    background-color: #000000;
}

/* Premium theme overrides */
body.premium {
    --bg: #0b0f17;
    --card-bg: #0f172a;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #1f2937;
    --accent: #d4af37; /* gold */
}

body.premium { color: #e5e7eb; background: #000000; }

body.premium .header,
body.premium .hero,
body.premium .catalog,
body.premium .contact,
body.premium .footer {
    background: var(--card-bg);
    border-color: var(--border);
}

body.premium .logo span { color: #f3f4f6; }
body.premium .logo i { color: var(--accent); }
body.premium .cta-btn,
body.premium .filter-btn,
body.premium .btn-primary { background: var(--accent); border-color: var(--accent); color: #0b0f17; }
body.premium .btn-primary:hover { background: #b89324; border-color: #b89324; }
body.premium .btn-secondary { color: var(--text); border-color: var(--border); }
body.premium .btn-secondary:hover { background: #0b1220; border-color: #2c3a52; }
/* Yellow header button for Request */
#openRequestBtn {
    background: var(--accent);
    border-color: var(--accent);
    color: #0b0f17;
    padding: 0.7rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    line-height: 1.1;
}
#openRequestBtn:hover { background: #b89324; border-color: #b89324; }
body.premium .car-card { background: #0e1626; border-color: var(--border); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
body.premium .car-card:hover { border-color: #2b3b55; box-shadow: 0 12px 28px rgba(0,0,0,.45); }
body.premium .car-title { color: var(--text); }
body.premium .car-details { color: var(--muted); }
body.premium .car-price { color: var(--text); }
body.premium .catalog-filters { background: #0b1220; border-color: var(--border); }
body.premium .contact-item { background: #0b1220; border-color: var(--border); }
/* Contacts: dark yellow text */
body.premium .contact-item h4 { color: var(--accent); }
body.premium .contact-item p, 
body.premium .contact-item p a, 
body.premium .contact-item i { color: #caa131; }
body.premium .contact-item p a:hover { color: #e0bd4a; }
body.premium .footer { background: #0b1220; }
body.premium .footer-section h4 { color: var(--text); }
body.premium .footer-section p,
body.premium .footer-section a { color: var(--muted); }
body.premium .footer-section a:hover { color: var(--text); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #d1d5db;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 500;
    color: #374151;
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
    color: #6b7280;
}

.logo-img { width: 40px; height: 40px; display:block; }

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #e5e7eb;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: #ffffff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-btn {
    position: relative;
    background: #0b1220;
    color: #e5e7eb;
    border: 1px solid #1f2937;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s;
}

.cart-btn:hover {
    background: #111827;
    border-color: #2b3b55;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #6b7280;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 400;
}

/* Hero Section */
.hero {
    background: #ffffff;
    color: #374151;
    padding: 6rem 0 3rem;
    text-align: center;
    border-bottom: 1px solid #d1d5db;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #374151;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #6b7280;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.feature i {
    font-size: 1rem;
    color: #9ca3af;
}

.cta-btn {
    background: #6b7280;
    color: #fff;
    border: 1px solid #6b7280;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}

.cta-btn:hover {
    background: #4b5563;
    border-color: #4b5563;
}

/* Catalog Section */
.catalog {
    padding: 3rem 0;
    background: #ffffff;
}

.catalog h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #374151;
    font-weight: 500;
}

.catalog-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: end;
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 120px;
    background: #ffffff;
    color: #374151;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #6b7280;
}

.filter-btn {
    background: #6b7280;
    color: #fff;
    border: 1px solid #6b7280;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #4b5563;
    border-color: #4b5563;
}

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

.car-card {
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.car-card:hover {
    border-color: #9ca3af;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.car-image {
    width: 100%;
    height: 340px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Ensure gallery images in modal are fully visible and not cropped */
.gallery-container img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center !important;
}

/* Мобильные устройства - уменьшаем размер фотографий на 35% */
@media (max-width: 768px) {
    .car-image img {
        object-fit: contain;
        object-position: center;
        transform: none;
    }

    /* Apply the same scaling to images inside the modal gallery */
    .gallery-container img {
        transform: none;
    }
}

.car-info {
    padding: 1.2rem;
}

.car-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    color: #374151;
}

.car-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.2rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.car-price {
    font-size: 1.4rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 1.2rem;
}

.car-actions {
    display: flex;
    gap: 0.6rem;
}

.btn-primary {
    background: #6b7280;
    color: #fff;
    border: 1px solid #6b7280;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s;
    flex: 1;
}

.btn-primary:hover {
    background: #4b5563;
    border-color: #4b5563;
}

.btn-secondary {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

/* Delivery Section */
.delivery {
    padding: 3rem 0;
    background: #f3f4f6;
    border-top: 1px solid #d1d5db;
}

.delivery h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #374151;
    font-weight: 500;
}

.delivery-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.delivery-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.step-number {
    width: 40px;
    height: 40px;
    background: #6b7280;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 auto 1rem;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
}

.step p {
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.9rem;
}

.delivery-info {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Customs Calculator */
.customs { padding: 3rem 0; background: #0b1220; border-top: 1px solid #1f2937; }
.customs h2 { text-align:center; font-size: 2rem; margin-bottom: 1.5rem; color: #f9fafb; }
.customs-content { background:#0e1626; border:1px solid #1f2937; border-radius:8px; padding:1.5rem; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.calc-form { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; align-items:end; }
.calc-row { display:flex; flex-direction:column; gap:0.5rem; }
.calc-row label { color:#9ca3af; font-size:0.9rem; }
.calc-row input, .calc-row select { padding:0.6rem; border:1px solid #374151; border-radius:6px; background:#0b1220; color:#e5e7eb; }
.calc-actions { display:flex; gap:0.75rem; }
.calc-result { margin-top:1rem; padding:1rem; background:#0b1220; border:1px solid #1f2937; border-radius:6px; color:#e5e7eb; font-weight:500; }

.delivery-info h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #374151;
    font-weight: 500;
}

.delivery-info ul {
    list-style: none;
}

.delivery-info li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #374151;
    color: #d1d5db;
}

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

.delivery-info li i {
    color: #10b981;
    margin-right: 0.5rem;
}

/* About Section */
.about {
    padding: 4rem 0;
    background: #111827;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #f9fafb;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.about-feature {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s;
    background: #1f2937;
    border: 1px solid #374151;
}

.about-feature:hover {
    transform: translateY(-5px);
    border-color: #4b5563;
}

.about-feature i {
    font-size: 3rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.about-feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #f9fafb;
}

.about-feature p {
    color: #9ca3af;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 3rem 0;
    background: #ffffff;
    border-top: 1px solid #d1d5db;
}

.contact h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #374151;
    font-weight: 500;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.contact-item i {
    font-size: 1.25rem;
    color: #6b7280;
    width: 30px;
    text-align: center;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #374151;
    font-weight: 500;
}

.contact-item p {
    color: #6b7280;
    font-size: 0.9rem;
}

.contact-item p a {
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item p a:hover {
    color: #6b7280;
    text-decoration: underline;
}

.contact-form {
    background: #f3f4f6;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.contact-form h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #374151;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-family: inherit;
    background: #ffffff;
    color: #374151;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #6b7280;
}

.contact-form textarea {
    height: 120px;
    resize: vertical;
}

.contact-form button {
    background: #6b7280;
    color: #fff;
    border: 1px solid #6b7280;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s;
    width: 100%;
}

.contact-form button:hover {
    background: #4b5563;
    border-color: #4b5563;
}

/* Footer */
.footer {
    background: #f3f4f6;
    color: #6b7280;
    padding: 2rem 0 1rem;
    border-top: 1px solid #d1d5db;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #374151;
    font-weight: 500;
}

.footer-section p {
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.9rem;
}

.footer-section p a {
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section p a:hover {
    color: #6b7280;
    text-decoration: underline;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: 0.25rem 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #d1d5db;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}
.modal .modal-content h3 { color: var(--text-color); }
.modal input[type="text"], .modal input[type="tel"], .modal input[type="email"]{
    padding: 0.8rem 1rem; border-radius: 8px; border: 1px solid var(--border-color);
    background: var(--card-bg); color: var(--text-color);
}

.modal-content {
    background-color: #1f2937;
    margin: 8% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid #374151;
}

.car-modal .modal-content {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #374151;
}

.modal-header h3 {
    margin: 0;
    color: #f9fafb;
}

.close {
    color: #9ca3af;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #f3f4f6;
}

.modal-body {
    padding: 1.5rem;
    color: #d1d5db;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total {
    font-size: 1.25rem;
    color: #f9fafb;
}

.checkout-btn {
    background: #4b5563;
    color: #f3f4f6;
    border: 1px solid #6b7280;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.checkout-btn:hover {
    background: #6b7280;
    border-color: #9ca3af;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #374151;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info h4 {
    margin-bottom: 0.25rem;
    color: #f9fafb;
}

.cart-item-info p {
    color: #9ca3af;
    font-size: 0.9rem;
}

.cart-item-price {
    font-weight: 600;
    color: #f3f4f6;
}

.remove-item {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.remove-item:hover {
    background: #b91c1c;
}

/* Google Drive iframe styles to hide file names */
.car-image iframe,
.gallery-container iframe {
    pointer-events: auto;
}

/* Hide file names in Google Drive embedded view */
.car-image iframe::after,
.gallery-container iframe::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cars-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 1.5rem;
    }

    .car-image {
        height: 320px;
    }

    .delivery-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .catalog-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
        min-width: auto;
    }

    .delivery-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .delivery-steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cars-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .car-image {
        height: 350px;
        font-size: 2.5rem;
    }

    .car-info {
        padding: 1rem;
    }

    .car-title {
        font-size: 1.1rem;
    }

    .car-price {
        font-size: 1.3rem;
    }

    .car-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .modal-content { width: 96%; margin: 14% auto; padding: 1rem; }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero {
        padding: 5rem 0 2rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .catalog h2,
    .delivery h2,
    .about h2,
    .contact h2 {
        font-size: 1.75rem;
    }

    .car-image {
        height: 320px;
        font-size: 2rem;
    }

    .car-info {
        padding: 0.8rem;
    }

    .car-title {
        font-size: 1rem;
    }

    .car-price {
        font-size: 1.2rem;
    }

    .contact-item {
        padding: 0.8rem;
    }

    .step {
        padding: 1rem;
    }

    .delivery-info {
        padding: 1rem;
    }
}