:root {
    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --primary-color: #00AFFF;
    --text-color: #E0E0E0;
    --text-secondary-color: #A0A0A0;
    --border-color: #333333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header */
.header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header nav a {
    color: var(--text-secondary-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.header nav a:hover {
    color: var(--primary-color);
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.action-btn {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    margin-left: 10px;
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: var(--surface-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 0;
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.8)), url('https://images.unsplash.com/photo-1623950782164-42b39f3a6135?auto=format&fit=crop&q=80&w=2070') no-repeat center center/cover;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2em;
    color: var(--text-secondary-color);
    margin-bottom: 30px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: transform 0.3s;
    display: inline-block;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
}

/* Sections */
.catalog, .contacts {
    padding: 80px 0;
}

h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--surface-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.5em;
    color: var(--primary-color);
}

.product-info .description {
    color: var(--text-secondary-color);
    margin: 10px 0;
    flex-grow: 1;
}

.product-specs {
    list-style: none;
    margin: 15px 0;
    font-size: 0.9em;
}

.product-specs li {
    margin-bottom: 5px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 1.8em;
    font-weight: 700;
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
    background-color: #008fcc;
}

/* Contacts */
.contacts {
    text-align: center;
}

.contact-details {
    margin-top: 30px;
    font-size: 1.1em;
    color: var(--text-secondary-color);
}
.contact-details p {
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background-color: var(--surface-color);
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary-color);
}
.footer a {
    color: var(--text-secondary-color);
}
.footer a:hover {
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 101;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: var(--surface-color);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.3s;
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    color: var(--text-secondary-color);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #fff;
}

#cart-items .cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
#cart-items .cart-item:last-child {
    border: none;
}

.cart-summary {
    text-align: right;
    margin-top: 20px;
    font-size: 1.5em;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    font-size: 1.2em;
    border: none;
}

/* Стили для формы и юридических модалов */
#customer-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

#customer-form input,
#customer-form textarea {
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1em;
    font-family: 'Montserrat', sans-serif;
}

#customer-form textarea {
    min-height: 80px;
    resize: vertical;
}

#customer-form button {
    border: none;
    font-size: 1.1em;
}

.legal-modal p {
    color: var(--text-secondary-color);
    margin-top: 20px;
    white-space: pre-wrap;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2em; }
    h2 { font-size: 2em; }
}
