/* Общие сбросы и настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #fff;
    color: #273352;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== ШАПКА САЙТА ==================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 50px;
    box-sizing: border-box;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    height: 80px;
    width: auto;
    position: absolute;
    left: 50px;
}

.logo img {
    height: 100%;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #273352;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 1px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link.active {
    font-weight: 600;
    border-bottom: 2px solid #273352;
}

/* ==================== СИНЯЯ ПОЛОСА ==================== */

.blue-stripe {
    position: fixed;
    width: 100%;
    height: 70px;
    top: 120px;
    background: #273352;
    z-index: 99;
}

/* ==================== ОСНОВНОЙ КОНТЕНТ ==================== */
main {
    flex: 1;
}

.main-content {
    margin-top: 220px;
    width: 100%;
    padding: 0 50px;
    box-sizing: border-box;
    flex: 1;
}

.content {
    width: 100%;
    max-width: 1200px;
    margin: 220px auto 0;
    padding: 0 20px;
    box-sizing: border-box;
    flex: 1;
}

/* ==================== СТРАНИЦА "О НАС" ==================== */

.red-section {
    width: 82.6%;
    height: 400px;
    margin: 0 auto;
    background: #651413;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.about-image {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 50%;
    object-fit: cover;
}

.red-content-center {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding-left: 52%;
    box-sizing: border-box;
}

.red-text-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
    margin-left: 20px;
}

.red-main-heading {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-size: 64px;
    line-height: 1;
    color: #FFFFFF;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.red-sub-heading {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-size: 32px;
    line-height: 1.2;
    color: #FFFFFF;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.red-sub-heading.dash {
    margin-left: 0;
    text-indent: -15px;
    padding-left: 15px;
}

.text-block {
    width: 82.6%;
    max-width: 1200px;
    margin: 30px 0 0 8.7%;
    padding: 0;
    box-sizing: border-box;
}

.text-paragraph {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.2;
    color: #000000;
    margin-bottom: 10px;
}

/* ==================== СТРАНИЦА "AI-КОНСТРУКТОР" ==================== */

.constructor-wrapper {
    display: flex;
    gap: 50px;
    width: 100%;
    max-width: 1400px;
    margin: 220px auto 0;
    padding: 0 50px;
    box-sizing: border-box;
    flex: 1;
}

/* Обновлённый стиль для описания — выравнивание по левому краю */
.constructor-description {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300;
    font-size: 18px;
    line-height: 1.4;
    color: #273352;
    margin-bottom: 30px;
    padding: 0;
    text-align: left;
    width: 100%;
}
.consent-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 16px;
    line-height: 1.4;
}

.consent-text a {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 500;
}

.consent-text a:hover {
    color: #004080;
}
.desc-line-1,
.desc-line-2 {
    margin: 0 0 8px 0;
    line-height: 1.4;
    white-space: normal;
}

.image-container {
    flex: 1;
    min-height: 700px;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    border: none;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    outline: none;
    box-shadow: none;
}

.base-shirt {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
    outline: none;
}

.print-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 20%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 3;
    pointer-events: none;
    border: none;
}

.print-area.show {
    opacity: 1;
}

.constructor-content {
    flex: 1;
    padding-top: 50px;
}

.constructor-title {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-size: 58px;
    line-height: 71px;
    color: #000000;
    margin-bottom: 40px;
}

.editable-box {
    width: 100%;
    height: 300px;
    border: 2px solid #273352;
    padding: 20px;
    margin-bottom: 30px;
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300;
    font-size: 24px;
    line-height: 36px;
    color: #000000;
    resize: none;
}

/* Кнопка "СГЕНЕРИРОВАТЬ" */
.generate-btn {
    background: #651413;
    color: #ffffff;
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-size: 24px;
    line-height: 29px;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: auto;
}

.generate-btn:hover:not(:disabled) {
    background-color: #5b1315;
}

/* Состояние загрузки: кнопка заблокирована */
.generate-btn:disabled {
    background-color: #a05252;
    color: #ffffff;
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

/* Дополнительно: анимация спиннера после текста (необязательно) */
.generate-btn.btn-loading::after {
    content: ' ⏳';
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== СООБЩЕНИЕ ОБ ОШИБКЕ ==================== */

.error-message {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
    text-align: center;
    font-style: italic;
}

/* ==================== СТРАНИЦА "КОНТАКТЫ" ==================== */

.contacts-title {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-size: 64px;
    line-height: 76px;
    color: #273352;
    text-align: center;
    margin-bottom: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border: 1px solid #273352;
    border-radius: 10px;
    background: #fff;
}

.contact-label,
.contact-value {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-size: 24px;
    line-height: 30px;
    color: #273352;
}

.contact-value {
    font-weight: 300;
}

/* ==================== СТРАНИЦА "ТОВАРЫ" ==================== */

.products-container {
    width: 100%;
    max-width: 1400px;
    margin: 220px auto 0;
    padding: 0 50px;
    box-sizing: border-box;
    flex: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 10px 0;
    align-items: stretch;
}

.product-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-image-container {
    width: 100%;
    height: 320px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f8f8;
    flex-shrink: 0;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-weight: 500;
    font-size: 22px;
    line-height: 1.4;
    color: #000;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 60px;
}

.product-details {
    margin-bottom: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-description {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.4;
    color: #000000;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Выравнивание спецификаций между карточками */
.product-specs-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 8px;
    align-items: center;
    margin-bottom: 20px;
}

.spec-label {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    color: #000000;
    min-width: 70px;
}

.spec-value {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    color: #000000;
}

.price-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.price-label {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    color: #000000;
    min-width: 70px;
}

.price {
    font-weight: 600;
    font-size: 24px;
    color: #000;
    margin: 0;
}

.btn-more {
    display: block;
    width: 100%;
    padding: 14px;
    background: #273352;
    color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px;
    margin-top: auto;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn-more:hover {
    background: #1a243b;
}


/* g____D-sadas-d-as-d
/* Контейнер для цветовых квадратов */
.color-selector {
    margin-top: 20px;
    text-align: left;
}

/* Цветные квадраты */
.color-swatch {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 8px;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
}

/* Обводка активного элемента */
.color-swatch.active {
    border-color: #000;
    transform: scale(1.1);
}

/* Стили под цвет */
.color-swatch.white {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.color-swatch.black {
    background-color: #000000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Для экранов без цвета (опционально) */
.color-swatch::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
    pointer-events: none;
}

.constructor-Color {
    font-size: 25px;
    margin-bottom: 25px;
}


/* Адаптивность для товаров */
@media (max-width: 1024px) {
    .products-grid {
        gap: 30px;
    }
    
    .product-specs-grid {
        gap: 10px 6px;
    }
    
    .spec-label, .price-label {
        min-width: 60px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 25px;
    }
    
    .product-image-container {
        height: 280px;
    }
    
    .product-title {
        font-size: 18px;
        min-height: auto;
    }
    
    .product-description {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .spec-label, .spec-value, .price-label {
        font-size: 14px;
    }
    
    .spec-label, .price-label {
        min-width: 55px;
    }
    
    .price {
        font-size: 20px;
    }
    
    .product-specs-grid {
        gap: 8px 5px;
    }
    
    .btn-more {
        font-size: 15px;
    }
}

/* ==================== АДАПТИВНЫЕ МЕДИА-ЗАПРОСЫ ==================== */

/* Планшеты (до 1024px) */
@media (max-width: 1024px) {
    .header {
        padding: 0 30px;
    }
    .logo {
        left: 30px;
        height: 70px;
    }
    .main-nav {
        gap: 30px;
    }
    .nav-link {
        font-size: 15px;
        padding: 6px 10px;
    }

    .blue-stripe {
        top: 120px;
    }

    .red-content-center {
        padding-left: 52%;
    }
    
    .red-main-heading {
        font-size: 56px;
    }
    .red-sub-heading {
        font-size: 28px;
    }
    
    .text-block {
        width: 90%;
        margin: 30px auto 0;
    }

    .constructor-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    .image-container {
        min-height: 400px;
        padding: 0;
    }

    .constructor-description {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .products-container,
    .main-content,
    .content {
        padding: 0 30px;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .header {
        height: auto;
        min-height: 100px;
        padding: 15px 20px;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }
    .logo {
        position: static;
        margin-bottom: 5px;
        height: 60px;
        flex-shrink: 0;
    }
    .main-nav {
        width: 100%;
        justify-content: space-around;
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 5px;
    }
    .nav-link {
        font-size: 14px;
        padding: 6px 8px;
        flex-shrink: 0;
    }

    .blue-stripe {
        height: 60px;
        position: fixed;
        top: 120px;
        width: 100%;
        background: #273352;
        z-index: 99;
    }

    .main-content,
    .content,
    .constructor-wrapper,
    .products-container {
        margin-top: 200px;
        padding: 0 20px;
    }

    .red-section {
        width: 90%;
        height: auto;
        padding: 30px 0;
        flex-direction: column;
    }
    
    .about-image {
        position: relative;
        width: 100%;
        height: 250px;
        margin-bottom: 20px;
    }
    
    .red-content-center {
        padding-left: 0;
        text-align: center;
        justify-content: center;
    }
    
    .red-text-content {
        align-items: center;
        text-align: center;
        margin-left: 0;
    }
    
    .red-main-heading {
        font-size: 48px;
    }
    .red-sub-heading {
        font-size: 24px;
        text-align: center;
    }
    .red-sub-heading.dash {
        text-indent: 0;
        padding-left: 0;
        margin-left: 0;
    }
    
    .text-block {
        width: 90%;
        margin: 20px auto 0;
    }

    .text-paragraph {
        line-height: 1.2;
        margin-bottom: 8px;
    }

    .constructor-title,
    .contacts-title {
        font-size: 48px;
        line-height: 1.2;
        margin-bottom: 30px;
    }

    .constructor-description {
        font-size: 16px;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    .editable-box {
        height: 180px;
        font-size: 20px;
        line-height: 1.4;
    }

    .generate-btn {
        font-size: 20px;
        padding: 14px;
        width: 100%;
    }

    .contact-label,
    .contact-value {
        font-size: 20px;
    }

    .image-container {
        min-height: 300px;
        padding: 0;
    }

    .product-image-container {
        height: 280px;
    }
    .product-title {
        font-size: 18px;
        height: auto;
        -webkit-line-clamp: 2;
    }
    .price {
        font-size: 20px;
    }
    .btn-more {
        font-size: 15px;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .header {
        height: auto;
        min-height: 90px;
        padding: 12px 15px;
        gap: 5px;
    }
    .logo {
        height: 50px;
        flex-shrink: 0;
    }
    .main-nav {
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 5px;
    }
    .nav-link {
        font-size: 12px;
        padding: 4px 6px;
        flex-shrink: 0;
    }

    .blue-stripe {
        height: 50px;
        position: fixed;
        top: 110px;
        width: 100%;
        background: #273352;
        z-index: 99;
    }

    .main-content,
    .content,
    .constructor-wrapper,
    .products-container {
        margin-top: 180px;
        padding: 0 15px;
    }
    
    .red-main-heading {
        font-size: 36px;
    }
    .red-sub-heading {
        font-size: 20px;
    }
    
    .text-block {
        width: 95%;
        margin: 15px auto 0;
    }

    .text-paragraph {
        line-height: 1.2;
        margin-bottom: 6px;
    }

    .constructor-title,
    .contacts-title {
        font-size: 36px;
        line-height: 1.3;
        margin-bottom: 25px;
    }

    .constructor-description {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .editable-box {
        height: 140px;
        font-size: 18px;
        line-height: 1.4;
    }

    .generate-btn {
        font-size: 18px;
        padding: 12px;
        width: 100%;
    }

    .contact-label,
    .contact-value {
        font-size: 18px;
    }

    .image-container {
        min-height: 250px;
        padding: 0;
    }

    .product-image-container {
        height: 240px;
    }
    .product-title {
        font-size: 16px;
        line-height: 1.4;
    }
    .price {
        font-size: 18px;
    }
    .btn-more {
        font-size: 13px;
        padding: 12px;
    }
}

/* Дополнительная адаптация для вертикальных мобильных экранов */
@media (max-height: 600px) and (max-width: 768px) {
    .image-container {
        min-height: 250px;
        padding: 0;
    }
    .product-image-container {
        height: 240px;
    }
}
/* Дополнительная адаптация для вертикальных мобильных экранов */
@media (max-height: 600px) and (max-width: 768px) {
    .image-container {
        min-height: 250px;
        padding: 0;
    }
    .product-image-container {
        height: 240px;
    }
}


/* ==================== ФУТЕР ==================== */
.footer {
    background: #273352;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer * {
    background: transparent !important;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
    color: #e0e6ed;
    margin-bottom: 8px;
    background: transparent;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    font-size: 18px;
    background: transparent;
    padding: 0;
    margin: 0;
}

.contact-text {
    color: #e0e6ed;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #3a4a6b;
}

.footer-bottom p {
    color: #a0aec0;
    font-size: 12px;
}

/* Адаптивность футера для мобильных устройств */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0 15px;
        margin-top: auto;
    }

    .footer-content {
        padding: 0 20px;
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 20px;
    }

    .footer-section h4 {
        font-size: 16px;
    }

    .contact-item {
        justify-content: center;
    }
}