/* ГОСТ шрифты */
@font-face {
    font-family: 'GOST';
    src: url('../fonts/GOST_A.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'GOST', 'Arial Narrow', sans-serif;
    line-height: 1.4;
    color: #000;
    background: #fff;
    font-size: 16px;
    letter-spacing: 0.3px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('B25.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    opacity: 0.4; /* Полупрозрачность самого изображения */
    z-index: -1;
}

/* Класс для блокировки скролла основного сайта */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

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

/* Шапка в ГОСТ стиле */
.header {
    background: #fff;
    border-bottom: 3px double #000;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: none;
}

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

.logo {
    font-family: 'GOST', sans-serif;
    font-size: 24px; /* Было 20px */
    font-weight: normal;
    letter-spacing: 2px;
    border: 2px solid #000;
    padding: 8px 16px; /* Увеличиваем отступы */
    background: #fff;
}

.cart {
    background: #fff;
    border: 2px solid #000;
    padding: 10px 20px; /* Увеличиваем отступы */
    font-family: 'GOST', sans-serif;
    font-size: 18px; /* Увеличиваем размер текста */
    cursor: pointer;
    min-width: 140px; /* Минимальная ширина */
    text-align: center;
}

.cart:hover {
    background: #000;
    color: #fff;
}

/* Главный баннер */
.hero {
    background: #fff;
    color: #000;
    padding: 25px 0;
    text-align: center;
    border-bottom: 1px solid #666;
}

.hero h1 {
    font-size: 32px; /* Было 26px */
    margin-bottom: 12px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'GOST', sans-serif;
}

.hero p {
    font-size: 18px; /* Было 16px */
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Сетка наборов */
.kits {
    padding: 25px 0;
    background: #fff;
}

.kits h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #000;
    font-size: 28px; /* Было 22px */
    font-weight: normal;
    text-transform: uppercase;
    text-decoration: underline;
    font-family: 'GOST', sans-serif;
    letter-spacing: 1.5px;
}

.kits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Карточка набора в ГОСТ стиле */
.kit-card {
    background: #fff;
    border: 3px double #000;
    overflow: hidden;
    position: relative;
}

.kit-card:hover {
    border-style: solid;
}

.kit-image {
    background: #f0f0f0;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    border-bottom: 3px double #000;
    background-image: linear-gradient(45deg, #f8f8f8 25%, transparent 25%), 
                      linear-gradient(-45deg, #f8f8f8 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #f8f8f8 75%), 
                      linear-gradient(-45deg, transparent 75%, #f8f8f8 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.kit-content {
    padding: 20px;
}

.kit-card h3 {
    color: #000;
    margin-bottom: 15px;
    font-size: 22px; /* Было 18px */
    font-weight: normal;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    text-transform: uppercase;
    font-family: 'GOST', sans-serif;
    letter-spacing: 1.2px;
}

.kit-description {
    color: #000;
    margin-bottom: 15px;
    line-height: 1.4;
    text-align: justify;
    font-size: 14px;
    text-indent: 1.5em;
}

.kit-features {
    margin-bottom: 15px;
    border: 2px solid #000;
    padding: 12px;
    background: #f8f8f8;
    font-family: 'GOST', sans-serif;
}

.feature {
    background: #fff;
    padding: 4px 10px;
    margin-bottom: 4px;
    border-left: 3px solid #000;
    font-family: 'GOST', sans-serif;
    position: relative;
    padding-left: 25px;
}

.feature:before {
    content: "—";
    position: absolute;
    left: 8px;
    color: #000;
}

.feature:last-child {
    margin-bottom: 0;
}

.kit-price {
    font-size: 24px; /* Было 20px */
    font-weight: normal;
    color: #000;
    margin-bottom: 15px;
    text-align: center;
    border: 2px solid #000;
    padding: 10px;
    background: #f0f0f0;
    font-family: 'GOST', sans-serif;
    letter-spacing: 1.2px;
}

.buy-btn {
    width: 100%;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    padding: 12px; /* Увеличиваем отступы */
    font-size: 18px; /* Было 16px */
    font-weight: normal;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-family: 'GOST', sans-serif;
}

.buy-btn:hover {
    background: #000;
    color: #fff;
}

/* Стили для "Скоро" */
.coming-soon {
    opacity: 0.8;
    background: #f5f5f5;
    position: relative;
}

.coming-soon:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.1) 10px,
        rgba(0,0,0,0.1) 20px
    );
    pointer-events: none;
}

.kit-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fff;
    color: #000;
    padding: 5px 12px;
    font-weight: normal;
    font-size: 12px;
    border: 2px solid #000;
    text-transform: uppercase;
    font-family: 'GOST', sans-serif;
    letter-spacing: 1px;
    z-index: 2;
}

.buy-btn.disabled {
    background: #e0e0e0;
    color: #666;
    border-color: #666;
    cursor: not-allowed;
    font-style: italic;
    text-transform: none;
}

.buy-btn.disabled:hover {
    background: #e0e0e0;
    color: #666;
}

/* Модальное окно корзины в ГОСТ стиле - ИСПРАВЛЕННОЕ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    overflow: auto; /* Разрешаем скролл для всего модального окна */
    -webkit-overflow-scrolling: touch; /* Для плавного скролла на iOS */
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border: 4px double #000;
    width: 90%;
    max-width: 600px;
    max-height: 90vh; /* Ограничиваем максимальную высоту */
    position: relative;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.2);
    font-family: 'GOST', sans-serif;
    overflow: hidden; /* Скрываем переполнение контейнера */
}

.modal-header {
    padding: 20px 25px 15px 25px;
    border-bottom: 3px double #000;
    background: #fff;
    position: relative;
    flex-shrink: 0;
}

.modal-body {
    padding: 25px;
    overflow-y: auto; /* Включаем прокрутку для контента */
    max-height: calc(90vh - 150px); /* Вычитаем высоту заголовка и футера */
}

.modal-footer {
    padding: 15px 25px 20px 25px;
    border-top: 3px double #000;
    background: #fff;
    flex-shrink: 0;
}

.close {
    color: #000;
    float: right;
    font-size: 24px;
    font-weight: normal;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
    background: #fff;
    border: 2px solid #000;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 25px;
    font-family: 'GOST', sans-serif;
    z-index: 2;
}

.close:hover {
    background: #000;
    color: #fff;
}

/* Стили для содержимого корзины */
#cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    border: 2px solid #000;
    padding: 15px;
    background: #f8f8f8;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px dashed #666;
    background: #fff;
    margin-bottom: 5px;
    font-family: 'GOST', sans-serif;
}

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

.cart-total {
    text-align: center;
    font-size: 18px;
    font-weight: normal;
    margin: 15px 0;
    color: #000;
    border-top: 3px double #000;
    padding-top: 15px;
    font-family: 'GOST', sans-serif;
}

.checkout-btn {
    width: 100%;
    background: #fff;
    color: #000;
    border: 3px double #000;
    padding: 12px;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'GOST', sans-serif;
    letter-spacing: 1px;
}

.checkout-btn:hover {
    background: #000;
    color: #fff;
    border-style: solid;
}

.remove-btn {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'GOST', sans-serif;
}

.remove-btn:hover {
    background: #000;
    color: #fff;
}

/* Подвал */
.footer {
    background: #fff;
    color: #000;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 3px double #000;
    font-size: 12px;
    font-family: 'GOST', sans-serif;
}

.footer p {
    margin: 4px 0;
    letter-spacing: 0.5px;
}

/* ГОСТ специфические элементы */
.technical-note {
    border: 2px solid #000;
    padding: 10px 12px;
    margin: 12px 0;
    background: #f8f8f8;
    font-size: 12px;
    font-style: italic;
    position: relative;
    padding-left: 35px;
    font-family: 'GOST', sans-serif;
}

.technical-note:before {
    content: "ПРИМЕЧАНИЕ:";
    position: absolute;
    left: 10px;
    top: 8px;
    font-size: 10px;
    font-style: normal;
    font-weight: bold;
}

.warning {
    border: 2px solid #000;
    background: #fffacd;
    padding: 10px 12px;
    margin: 12px 0;
    font-size: 12px;
    border-left: 5px solid #ff6b6b;
    position: relative;
    padding-left: 35px;
    font-family: 'GOST', sans-serif;
}

.warning:before {
    content: "ВНИМАНИЕ:";
    position: absolute;
    left: 10px;
    top: 8px;
    font-size: 10px;
    font-style: normal;
    font-weight: bold;
}

/* Стили для формы заказа */
.order-form {
    margin-top: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-family: 'GOST', sans-serif;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #000;
    background: #fff;
    font-family: 'GOST', sans-serif;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    background: #f8f8f8;
}

.form-input:required {
    border-left: 4px solid #e53e3e;
    padding-left: 8px;
}

.form-input:required:valid {
    border-left-color: #38a169;
}

.field-required {
    font-size: 0.8rem;
    color: #e53e3e;
    margin-top: 0.25rem;
    display: none;
}

.form-input:required:invalid + .field-required {
    display: block;
}

.order-summary {
    border: 2px solid #000;
    padding: 15px;
    margin: 20px 0;
    background: #f8f8f8;
}

.order-summary h3 {
    margin-bottom: 10px;
    font-family: 'GOST', sans-serif;
    text-align: center;
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
}

#order-items {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #666;
    font-family: 'GOST', sans-serif;
}

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

.order-total {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px solid #000;
    font-family: 'GOST', sans-serif;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.submit-order-btn {
    flex: 2;
    background: #fff;
    color: #000;
    border: 3px double #000;
    padding: 12px;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'GOST', sans-serif;
    letter-spacing: 1px;
}

.submit-order-btn:hover {
    background: #000;
    color: #fff;
    border-style: solid;
}

.cancel-order-btn {
    flex: 1;
    background: #fff;
    color: #000;
    border: 3px double #000;
    padding: 12px;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'GOST', sans-serif;
    letter-spacing: 1px;
}

.cancel-order-btn:hover {
    background: #000;
    color: #fff;
    border-style: solid;
}

/* Стили для уведомлений */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #fff;
    color: #000;
    padding: 15px 20px;
    border: 3px double #000;
    z-index: 1001;
    animation: slideIn 0.3s ease;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.3);
    font-size: 13px;
    max-width: 300px;
    font-family: 'GOST', sans-serif;
}

.success-notification {
    border-color: #00aa00;
    background: #f0fff0;
}

.error-notification {
    border-color: #aa0000;
    background: #fff0f0;
}

/* Анимации */
@keyframes slideIn {
    from { 
        transform: translateY(-20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@keyframes slideOut {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* Кастомный скроллбар в ГОСТ стиле */
::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-left: 1px solid #000;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #000;
    border: 1px solid #000;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #333;
}

#cart-items::-webkit-scrollbar,
#order-items::-webkit-scrollbar {
    width: 6px;
}

#cart-items::-webkit-scrollbar-track,
#order-items::-webkit-scrollbar-track {
    background: #e0e0e0;
}

#cart-items::-webkit-scrollbar-thumb,
#order-items::-webkit-scrollbar-thumb {
    background: #666;
}

/* Улучшенная поддержка ГОСТ шрифта */
.uppercase {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.monospace {
    font-family: 'GOST', monospace;
    letter-spacing: 0.5px;
}

/* Специальные классы для ГОСТ типографики */
.gost-title {
    font-family: 'GOST', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: normal;
}

.gost-technical {
    font-family: 'GOST', sans-serif;
    letter-spacing: 0.3px;
}

.gost-border {
    border: 2px solid #000;
}

.gost-border-double {
    border: 3px double #000;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        font-size: 15px; /* Было 13px */
    }
    
    .hero h1 {
        font-size: 26px; /* Было 22px */
    }
    
    .logo {
        font-size: 20px; /* Было 18px */
    }
    
    .cart {
        font-size: 16px;
        padding: 8px 16px;
        min-width: 120px;
    }
    
    .kit-card h3 {
        font-size: 20px;
    }
    
    .kit-price {
        font-size: 22px;
    }
    
    .buy-btn {
        font-size: 16px;
        padding: 10px;
    }
}

/* Стиль для пустой корзины */
.empty-cart {
    text-align: center;
    color: #718096;
    padding: 2rem;
    font-style: italic;
}
/* Стили для модального окна товара */
.product-modal .modal-content {
    max-width: 800px;
}

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

.main-image {
    grid-column: 1 / -1;
    background: #f8f8f8;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px double #000;
    font-size: 72px;
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnail {
    background: #f8f8f8;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 24px;
}

.thumbnail:hover {
    border-color: #666;
}

.product-details {
    border-top: 3px double #000;
    padding-top: 20px;
}

.product-description {
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: justify;
}

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

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #666;
}

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

.spec-label {
    font-weight: bold;
    font-family: 'GOST', sans-serif;
}

.spec-value {
    color: #000;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.detail-buy-btn {
    flex: 2;
    background: #fff;
    color: #000;
    border: 3px double #000;
    padding: 12px;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'GOST', sans-serif;
    letter-spacing: 1px;
}

.detail-buy-btn:hover {
    background: #000;
    color: #fff;
    border-style: solid;
}

.detail-close-btn {
    flex: 1;
    background: #fff;
    color: #000;
    border: 3px double #000;
    padding: 12px;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'GOST', sans-serif;
    letter-spacing: 1px;
}

.detail-close-btn:hover {
    background: #000;
    color: #fff;
    border-style: solid;
}

/* Ссылки в описании */
.description-link {
    color: #000;
    text-decoration: underline;
    border-bottom: 1px dotted #000;
    cursor: pointer;
}

.description-link:hover {
    background: #000;
    color: #fff;
    text-decoration: none;
}

/* Адаптивность для модального окна товара */
@media (max-width: 768px) {
    .product-gallery {
        grid-template-columns: 1fr;
    }
    
    .thumbnail-images {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-image {
        height: 200px;
        font-size: 52px;
    }
    
    .product-actions {
        flex-direction: column;
    }
}

/* Курсор-указатель для карточек товаров */
.kit-card {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kit-card:hover {
    transform: translateY(-2px);
    border-style: solid;
}
