/* css/style.css */

/* ==========================================================================
   1. CSS Custom Properties (Переменные)
   ========================================================================== */
   :root {
    --color-primary: #FFCB00;
    --color-primary-dark: #FFCB00;
    --color-primary-light: #fff8e1;
    --color-primary-price: #FFD700;

    --color-accent-gold: #FFCB00;
    --color-background-dark-hero: #2e2e2e;
    --color-text-dark-hero: #2e2e2e;
    
    --color-text-dark: #333;
    --color-text-medium: #555;
    --color-text-muted: #666;
    --color-text-light: #fff;
    --color-text-black: black; 
    --color-text-heading: #2e2e2e;

    --color-background-main: #f5f7fa;
    --color-background-card: white;
    --color-background-overlay: rgba(0,0,0,0.7);
    --color-background-highlight: #f8f9fa;
    --color-background-button-inactive: #e0e0e0;
    --color-background-button-secondary: #f0f0f0;

    --color-border-extralight: #f0f0f0;
    --color-border-light: #eee;
    --color-border-medium: #ddd;
    --color-border-dark: #ccc;
    --color-border-price: #7D7D7D;
    --color-border-advantages: #e9ecef;
    --color-border-advantages-item: #dee2e6;

    --font-family-main: 'Onest', sans-serif;
    
    /* Базовые отступы */
    --spacing-xxs: 2px;
    --spacing-xs: 5px;
    --spacing-s: 8px;
    --spacing-m: 10px;
    --spacing-l: 15px;
    --spacing-xl: 20px;
    --spacing-xxl: 25px;
    --spacing-xxxl: 30px;
    --spacing-xxxxl: 40px;

    --border-radius-small: 4px;
    --border-radius-medium: 8px;
    --border-radius-large: 12px;
    --border-radius-xlarge: 15px;
    --border-radius-round: 20px; 
    --border-radius-price: 25px;
    --border-radius-circle: 50%;

    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 3px 15px rgba(0,0,0,0.1);
    --shadow-dark: 0 10px 20px rgba(0,0,0,0.15);
    --shadow-price: 0 3px 6px rgba(0,0,0,0.16);
    --shadow-advantages-item: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-close-btn: 0 1px 3px rgba(0,0,0,0.2);

    --z-index-sticky: 100;
    --z-index-filter-panels: 100;
    --z-index-filter-bar: 101;
    --z-index-cart-footer: 990;
    --z-index-modal-overlay: 1000;
    --z-index-modal-content: 1001;
    --z-index-modal-close: 1002;
    --z-index-mobile-nav: 1100;

    /* Safe Area для iOS */
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family-main);
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    height: auto; 
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-background-main);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Блокировка скролла */
html.modal-open,
body.modal-open {
    overflow: hidden !important;
    height: 100%;
    position: relative;
}

body.scroll-locked {
    position: fixed !important;
    left: 0;
    width: 100%;
    overflow: hidden;
}

body.mobile-nav-open {
    overflow: hidden !important;
}

/* Отступ для мобильной корзины */
body.mobile-cart-padding .footer {
    padding-bottom: calc(70px + var(--safe-area-bottom));
}

/* ==========================================================================
   3. Layout Utilities
   ========================================================================== */
.container {
    max-width: 100%;
    padding: 0 var(--spacing-l);
    margin-left: auto; 
    margin-right: auto;
    flex-grow: 1;
}

/* Микро-адаптация для 320px */
@media (max-width: 359.98px) {
    .container {
        padding: 0 12px;
    }
}

/* ==========================================================================
   4. Common Components
   ========================================================================== */

/* --- Buttons --- */
.btn-base { 
    font-size: 1.05rem; 
    width: 100%; 
    padding: 14px; 
    border-radius: var(--border-radius-medium); 
    font-weight: bold; 
    cursor: pointer; 
    letter-spacing: 0.03rem; 
    transition: all 0.2s; 
    min-height: 44px; 
    text-align: center; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    box-sizing: border-box; 
    line-height: 1.2;
}

.btn-primary { background: var(--color-accent-gold); color: var(--color-text-dark-hero); border: 2px solid var(--color-accent-gold); }
.btn-secondary { background: transparent; color: var(--color-accent-gold); border: 2px solid var(--color-accent-gold); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.btn-outline { background: transparent; color: var(--color-accent-gold); border: 2px solid var(--color-accent-gold); }

.product-btn { background: var(--color-accent-gold); color: var(--color-text-dark-hero); border: 2px solid var(--color-accent-gold); }
.product-btn.in-cart { background: #6c757d; color: var(--color-text-light); border-color: #5a6268; pointer-events: auto; }
.product-btn.in-cart i { margin-right: var(--spacing-s); }
.product-btn-details { background: transparent; color: var(--color-accent-gold); border: 2px solid var(--color-accent-gold); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.form-submit, .advantages-order-btn { background: var(--color-accent-gold); color: var(--color-text-dark-hero); border: 2px solid var(--color-accent-gold); }
.addon-continue-btn { background: transparent; color: var(--color-accent-gold); border: 2px solid var(--color-accent-gold); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.product-action-btn { display: inline-flex; align-items: center; justify-content: center; padding: var(--spacing-s) var(--spacing-l); background-color: var(--color-background-button-secondary); border: 1px solid var(--color-border-dark); border-radius: var(--border-radius-round); font-weight: 600; color: var(--color-text-dark); cursor: pointer; transition: background-color 0.3s, color 0.3s, border-color 0.3s, font-size 0.2s, padding 0.2s; font-size: 0.9rem; white-space: normal; text-decoration: none; text-align: center; min-width: 150px; max-width: 100%; min-height: 40px; }
.alt-style-button { width: 100%; background-color: var(--color-primary-light); cursor: pointer; border: 1px dashed var(--color-accent-gold); border-radius: var(--border-radius-medium); padding: var(--spacing-m); font-weight: bold; color: var(--color-text-dark-hero); font-size: 1.0rem; line-height: 1.4; text-align: center; transition: background-color 0.3s, color 0.3s; display: flex; align-items: center; justify-content: center; min-height: 50px; }

.scroll-to-top-btn { position: fixed; bottom: calc(20px + var(--safe-area-bottom)); right: 20px; width: 50px; height: 50px; background-color: rgba(46, 46, 46, 0.7); color: #fff; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; z-index: 999; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s, background-color 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.scroll-to-top-btn.visible { opacity: 1; visibility: visible; }


/* --- Modals --- */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--color-background-overlay); z-index: var(--z-index-modal-overlay); justify-content: center; align-items: center; padding: 10px; }
.modal-content { background: var(--color-background-card); border-radius: var(--border-radius-medium); padding: var(--spacing-xxl); max-width: 800px; width: 100%; max-height: calc(100dvh - 40px); overflow-y: auto; position: relative; z-index: var(--z-index-modal-content); box-shadow: var(--shadow-dark); display: flex; flex-direction: column; }
.close-modal-btn { position: absolute; top: var(--spacing-l); right: var(--spacing-l); font-size: 24px; cursor: pointer; background: rgba(255,255,255,0.9); border: none; color: var(--color-text-dark); padding: 0; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1; z-index: var(--z-index-modal-close); touch-action: manipulation; }

.modal-title { font-size: 1.4rem; margin-bottom: var(--spacing-xl); color: var(--color-text-heading); text-align: center; }
#mainProductForAddonName { display: block; font-size: 1rem; color: var(--color-text-medium); margin-top: var(--spacing-xs); text-align: center; }
.addon-items-list { max-height: 50vh; overflow-y: auto; margin-bottom: var(--spacing-xl); padding-right: var(--spacing-xs); }
.addon-item { display: flex; align-items: center; padding: 12px var(--spacing-xs); border-bottom: 1px solid var(--color-border-extralight); gap: var(--spacing-m); }
.addon-item:last-child { border-bottom: none; }
.addon-thumbnail { width: 50px; height: 50px; object-fit: cover; border-radius: var(--border-radius-small); flex-shrink: 0; border: 1px solid var(--color-border-light); }
.addon-info { flex-grow: 1; display: flex; flex-direction: column; cursor: pointer; }
.addon-label { font-size: 0.95rem; font-weight: 500; color: var(--color-text-dark); margin-bottom: var(--spacing-xxs); }
.addon-price { font-size: 0.85rem; color: var(--color-text-muted); display: flex; align-items: baseline; gap: var(--spacing-s); }
.addon-price .old-price { text-decoration: line-through; color: var(--color-text-muted); font-size: 0.9em; }
.addon-price .current-price { color: var(--color-text-dark); font-weight: 700; font-size: 1.1em; }
.addon-controls { display: flex; align-items: center; gap: var(--spacing-l); margin-left: auto; }
.addon-controls input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--color-accent-gold); cursor: pointer; flex-shrink: 0; }
.addon-quantity-wrapper { display: flex; align-items: center; border: 1px solid var(--color-border-medium); border-radius: var(--border-radius-small); overflow: hidden; }
.quantity-btn { background-color: var(--color-background-button-secondary); border: none; color: var(--color-text-dark); font-size: 1.2rem; font-weight: bold; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; padding: 0; }
.quantity-btn.minus { border-right: 1px solid var(--color-border-medium); border-radius: 0; }
.quantity-btn.plus { border-left: 1px solid var(--color-border-medium); border-radius: 0; }
.addon-quantity-input { width: 36px; text-align: center; border: none; font-size: 0.95rem; padding: 0; height: 32px; -webkit-appearance: none; appearance: none; margin: 0; }

.advantages-images-container { display: flex; flex-direction: column; align-items: center; gap: var(--spacing-xl); margin: var(--spacing-xl) 0; padding: var(--spacing-l); background-color: var(--color-background-highlight); border: 1px solid var(--color-border-advantages); border-radius: var(--border-radius-small); min-height: 120px; }
.advantage-item-wrapper { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 320px; }
.advantage-caption { background-color: var(--color-accent-gold); padding: var(--spacing-s) var(--spacing-m); text-align: center; border-radius: var(--border-radius-medium); margin-bottom: var(--spacing-s); width: auto; display: inline-block; max-width: 100%; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.advantage-caption p { color: var(--color-text-dark-hero); font-size: 0.9rem; font-weight: 700; line-height: 1.3; margin: 0; text-transform: uppercase; }
.advantage-image-item { width: 100%; max-width: 300px; height: auto; object-fit: contain; border-radius: var(--border-radius-small); background-color: var(--color-background-card); box-shadow: var(--shadow-advantages-item); padding: var(--spacing-xs); border: 1px solid var(--color-border-advantages-item); display: block; }
#advantagesModalTitle { font-size: 1.3rem; margin-bottom: var(--spacing-l); }
.order-details-preview { background-color: var(--color-background-highlight); border: 1px solid var(--color-border-light); border-radius: var(--border-radius-small); padding: var(--spacing-l); margin-bottom: var(--spacing-xl); }
.order-details-preview h4 { margin-top: 0; margin-bottom: var(--spacing-m); font-size: 1.1rem; color: var(--color-text-dark); }
.order-details-preview ul { list-style: none; padding-left: 0; margin-bottom: 0; }
.order-details-preview li { padding: var(--spacing-s) 0; border-bottom: 1px dashed var(--color-border-medium); display: flex; align-items: center; gap: var(--spacing-m); }
.order-details-preview li:last-child { border-bottom: none; }
.order-item-thumbnail { width: 40px; height: 40px; object-fit: cover; border-radius: var(--border-radius-small); border: 1px solid var(--color-border-medium); flex-shrink: 0; }
.order-details-preview ul li:first-child .order-item-thumbnail { width: 60px; height: 60px; }
.order-item-info { flex-grow: 1; display: flex; justify-content: space-between; align-items: center; gap: var(--spacing-m); flex-wrap: wrap; }
.order-details-preview .item-name { font-size: 0.95rem; color: var(--color-text-medium); margin-right: 0; }
.order-details-preview .item-name strong { color: var(--color-text-dark); }
.order-details-preview li.order-details-title { gap: 0; border-bottom: none; padding-bottom: 0; margin-top: 5px; }
.order-details-preview li.order-details-title .item-name { font-style: italic; color: #555; width: 100%; }
.order-details-preview li.order-detail-item { padding-left: 20px; }
.order-details-preview li.order-detail-item .item-name { font-size: 0.9em; }
.order-details-preview .item-details { white-space: nowrap; color: var(--color-text-dark); font-weight: 500; font-size: 0.95rem; }
.order-total-summary { margin-top: var(--spacing-l); padding-top: var(--spacing-m); border-top: 1px solid var(--color-border-dark); font-size: 1.1rem; font-weight: bold; text-align: right; }
.order-form { display: flex; flex-direction: column; gap: var(--spacing-l); }
.form-group { margin-bottom: var(--spacing-l); }
.form-group:last-child { margin-bottom: 0; }
.form-label { font-weight: 600; font-size: 0.95rem; display: block; margin-bottom: var(--spacing-xs); }
.form-input { padding: 12px; border: 1px solid var(--color-border-medium); border-radius: var(--border-radius-medium); font-size: 1rem; width: 100%; box-shadow: none; -webkit-appearance: none; appearance: none; }
textarea.form-input { resize: vertical; min-height: 80px; }
.form-group-checkbox { display: flex; align-items: center; margin-bottom: var(--spacing-l); gap: var(--spacing-s); }
.form-group-checkbox input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--color-accent-gold); cursor: pointer; margin: 0; flex-shrink: 0; }
.form-label-checkbox { font-weight: normal; font-size: 0.95rem; cursor: pointer; line-height: 1.2; }
.form-group-checkbox.disabled { opacity: 0.6; cursor: not-allowed; }
.form-group-checkbox.disabled .form-label-checkbox, .form-group-checkbox.disabled input[type="checkbox"] { cursor: not-allowed; }
#legalModal .modal-content { max-width: 700px; }
.document-content { padding: var(--spacing-l) 0; line-height: 1.6; }

/* --- Component: Image Slider Modal --- */
/* Z-INDEX ИСПРАВЛЕНИЕ: Это модальное окно должно быть выше всех остальных (например выше окна заказа) */
#componentImageSliderModal { z-index: 10050 !important; }

.modal-content.image-slider-content { max-width: 90%; width: auto; padding: var(--spacing-xl); display: flex; flex-direction: column; align-items: center; }
.image-slider-container { position: relative; width: 100%; max-width: 600px; margin-bottom: var(--spacing-l); overflow: hidden; display: flex; justify-content: center; align-items: center; min-height: 300px; background-color: var(--color-background-highlight); border-radius: var(--border-radius-medium); }
.image-slider-main-image { display: block; max-width: 100%; max-height: 70vh; height: auto; object-fit: contain; border-radius: var(--border-radius-small); }
#imageSliderDescription { width: 100%; max-width: 600px; padding: var(--spacing-l); margin-top: var(--spacing-m); background-color: var(--color-background-highlight); border-radius: var(--border-radius-medium); font-size: 0.95rem; line-height: 1.6; color: var(--color-text-medium); border-top: 1px solid var(--color-border-light); }
.slider-nav-button { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0, 0, 0, 0.5); color: white; border: none; padding: var(--spacing-m) var(--spacing-s); cursor: pointer; font-size: 1.5rem; border-radius: var(--border-radius-small); z-index: 10; transition: background-color 0.2s; }
.slider-nav-button.prev { left: var(--spacing-m); }
.slider-nav-button.next { right: var(--spacing-m); }
.slider-dots-container-modal { display: flex; justify-content: center; gap: var(--spacing-s); margin-top: var(--spacing-m); }
.dot-modal { width: 10px; height: 10px; border-radius: 50%; background-color: var(--color-border-medium); cursor: pointer; transition: background-color 0.3s; }
.dot-modal.active { background-color: var(--color-accent-gold); }
/* Крестик для слайдера */
#componentImageSliderModal .close-modal-btn { background-color: rgba(0, 0, 0, 0.5); color: #fff; border: 2px solid rgba(255,255,255,0.5); top: 20px; right: 20px; width: 44px; height: 44px; font-size: 28px; }


/* --- Стили для модального окна корзины --- */
#cartModal .modal-content { max-width: 650px; display: flex; flex-direction: column; padding: 0; overflow: hidden; height: 90vh; max-height: 800px; }
#cartModal .modal-title { padding: 15px 20px; margin: 0; border-bottom: 1px solid var(--color-border-light); background: #fff; flex-shrink: 0; text-align: left; }
#cartModal > .modal-content > .close-modal-btn { top: 12px; right: 15px; background: transparent; border: none; color: #999; }

.cart-items-list { flex-grow: 1; overflow-y: auto; padding: 15px; border: none; -webkit-overflow-scrolling: touch; }
.cart-empty-message { text-align: center; color: var(--color-text-muted); padding: var(--spacing-xxxl) 0; }
.cart-item { display: flex; align-items: center; gap: var(--spacing-m); padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid var(--color-border-extralight); }
.cart-item:last-child { border-bottom: none; margin-bottom: 0; }
.cart-item-thumbnail { width: 60px; height: 60px; object-fit: cover; border-radius: var(--border-radius-small); border: 1px solid var(--color-border-light); flex-shrink: 0; cursor: pointer; }
.cart-item-info { flex-grow: 1; min-width: 0; }
.cart-item-name { font-weight: 600; color: var(--color-text-dark); font-size: 0.95rem; line-height: 1.3; display: block; margin-bottom: 4px; }
.cart-item-addons-list { list-style: none; padding-left: 0; font-size: 0.8rem; color: var(--color-text-muted); margin-top: var(--spacing-xxs); }
.cart-item-addons-list li { padding-left: 1.2em; position: relative; }
.cart-item-addons-list li::before { content: '+'; position: absolute; left: 0; }
.cart-item-price { font-size: 0.9rem; color: var(--color-text-medium); margin-top: var(--spacing-xs); }
.cart-item-controls { display: flex; align-items: center; gap: var(--spacing-m); margin-left: auto; }
.cart-item-controls .quantity-wrapper { display: flex; align-items: center; border: 1px solid var(--color-border-medium); border-radius: var(--border-radius-small); background: #fff; }
.cart-item-controls .quantity-btn { width: 30px; height: 30px; padding: 0; background: transparent; border: none; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }
.cart-item-controls .quantity-input { width: 35px; height: 30px; text-align: center; border: none; border-left: 1px solid #eee; border-right: 1px solid #eee; font-size: 0.95rem; margin: 0; }
.cart-item-remove-btn { background: none; border: none; color: #bbb; font-size: 1.1rem; cursor: pointer; padding: 5px; transition: color 0.2s; }
.cart-item-remove-btn:hover { color: #d32f2f; }
.cart-summary { background-color: #f9f9f9; border-top: 1px solid var(--color-border-light); padding: 20px; flex-shrink: 0; margin: 0; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.2rem; margin-bottom: 15px; }
.cart-total strong { font-size: 1.5rem; color: var(--color-text-heading); }
.cart-actions { display: flex; gap: var(--spacing-m); flex-direction: column; }
/* ФИКС КНОПКИ В КОРЗИНЕ */
.cart-actions .btn-secondary.close-modal-btn { position: static; font-size: 1.05rem; font-weight: bold; color: var(--color-accent-gold); background: transparent; border: 2px solid var(--color-accent-gold); box-shadow: none; width: 100%; height: auto; padding: 12px 14px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.cart-clear-btn { background: none; border: none; color: #888; text-decoration: underline; cursor: pointer; font-size: 0.85rem; margin-top: 15px; display: block; width: 100%; text-align: center; }
.cart-clear-btn:hover { color: red; }

@media (max-width: 480px) {
    #cartModal .modal-content { height: 100%; max-height: 100%; border-radius: 0; }
    .cart-item { flex-wrap: wrap; position: relative; }
    .cart-item-info { width: calc(100% - 80px); padding-right: 30px; }
    .cart-item-controls { flex-direction: row; width: 100%; justify-content: space-between; margin-left: 0; margin-top: 5px; padding-top: 10px; border-top: 1px dashed #f0f0f0; }
    .cart-item-remove-btn { position: absolute; top: 0; right: 0; padding: 10px; }
}


/* --- Мобильная панель корзины --- */
.mobile-cart-footer { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--color-background-card); padding: 10px 15px; padding-bottom: calc(10px + var(--safe-area-bottom)); box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: var(--z-index-cart-footer); display: none; align-items: center; justify-content: space-between; gap: 15px; transition: transform 0.3s ease-in-out; }
.mobile-cart-info { display: flex; flex-direction: column; align-items: flex-start; }
.mobile-cart-total-label { font-size: 0.8rem; color: var(--color-text-muted); }
.mobile-cart-total-value { font-size: 1.2rem; font-weight: 700; color: var(--color-text-heading); }
.mobile-cart-button { flex-shrink: 0; width: auto; max-width: 60%; padding: 10px 20px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.mobile-cart-button i { font-size: 1.1em; }


/* --- Боковое мобильное меню --- */
.mobile-nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--color-background-overlay); z-index: calc(var(--z-index-mobile-nav) - 1); opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.mobile-nav { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 280px; 
    max-width: 85%; 
    height: 100%; 
    background-color: var(--color-background-card); 
    z-index: var(--z-index-mobile-nav); 
    transform: translateX(-100%); 
    display: flex; 
    flex-direction: column; 
    transition: transform 0.3s ease-in-out;
}
body.mobile-nav-open .mobile-nav { transform: translateX(0); }
body.mobile-nav-open .mobile-nav-overlay { opacity: 1; visibility: visible; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid var(--color-border-light); flex-shrink: 0; }
.mobile-nav-logo { height: 32px; }
.mobile-nav-close { background: none; border: none; font-size: 1.5rem; color: var(--color-text-dark); cursor: pointer; padding: 5px; }
.mobile-nav-content { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 10px 0; }
.main-nav-mobile { display: flex; flex-direction: column; }
.main-nav-link-mobile { padding: 12px 20px; font-size: 1rem; font-weight: 500; color: var(--color-text-dark); text-decoration: none; border-bottom: 1px solid #f5f5f5; transition: background-color 0.2s; }
.main-nav-link-mobile.active { font-weight: 700; color: var(--color-accent-gold); background-color: var(--color-primary-light); }
.mobile-nav-footer { margin-top: auto; padding: 20px; border-top: 1px solid var(--color-border-light); }
.contact-actions-mobile { display: flex; flex-direction: column; gap: 10px; }
.contact-actions-mobile .btn-base { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ==========================================================================
   5. Page Specific Sections
   ========================================================================== */

/* --- Hero Section (Common) --- */
/* Эти стили используются на внутренних страницах (motors, receivers и т.д.) */
.hero-landing {
    position: relative;
    width: 100%;
    height: 100svh;
    background-color: var(--color-background-dark-hero);
    color: var(--color-text-light);
    display: flex;
    flex-direction: column;
}

.hero-landing-content {
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-l);
    width: 100%;
    margin: 0 auto;
    z-index: 2;
    padding: var(--spacing-l);
}

.hero-landing .btn-primary {
    background: var(--color-accent-gold);
    color: var(--color-text-dark-hero);
    border-color: var(--color-accent-gold);
}

.hero-landing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/bg-noise.png');
    opacity: 0.1;
    z-index: -1;
}

.hero-logo {
    flex-shrink: 0;
    width: 100%;
    z-index: 2;
    text-align: left;
    padding: var(--spacing-l);
}

.hero-logo-img {
    height: 40px;
    width: auto;
}

.hero-left-column {
    display: contents;
}

.hero-main-info {
    order: 1;
    width: 100%;
    text-align: center;
}

.hero-main-info h1 {
    font-size: clamp(1.6rem, 7vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-main-info h2 {
    font-size: clamp(1.6rem, 7vw, 2.5rem);
    font-weight: 700;
    color: var(--color-accent-gold);
    margin-top: -0.2em;
}

.hero-product-image {
    order: 2;
    width: 100%;
    max-width: 80%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    margin: var(--spacing-s) auto;
    flex-grow: 1;
    flex-shrink: 1;
    min-height: 0;
}

.features-block {
    order: 3;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-l);
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-m);
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
}

.features-block .feature-item strong {
    color: var(--color-accent-gold);
}

img.feature-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.hero-actions {
    order: 4;
    max-width: 350px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m);
    width: 100%;
}

@media (min-width: 768px) {
    .hero-landing {
        justify-content: center;
    }
    .hero-logo {
        position: static;
        text-align: center;
        padding: 0 0 var(--spacing-xl) 0;
    }
    .hero-landing-content {
        max-width: 600px;
    }
    .hero-product-image {
        max-height: 40vh;
    }
    .features-block {
        flex-direction: column;
        align-items: flex-start;
        margin: 0 auto;
        width: 100%;
        max-width: 400px;
        margin-bottom: var(--spacing-xxxl);
    }
    .hero-actions {
        position: static;
        transform: none;
        margin: 0 auto;
        flex-direction: row;
        max-width: 450px;
    }
    .hero-actions .btn-base {
        flex: 1;
        white-space: nowrap;
    }
}

@media (min-width: 992px) {
    .hero-landing {
        padding: var(--spacing-xl) 30px;
    }
    .hero-logo {
        position: absolute;
        top: var(--spacing-xl);
        left: 30px;
        text-align: left;
        padding: 0;
    }
    .hero-landing-content {
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: 1fr;
        align-items: center;
        gap: 30px;
        max-width: 1140px;
    }
    .hero-left-column {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        order: 1;
    }
    .hero-product-image {
        order: 2;
        max-width: 100%;
        height: auto;
        max-height: 60vh;
        align-self: center;
    }
    .hero-main-info, .features-block, .hero-actions {
        order: initial;
    }
    .hero-main-info {
        text-align: left;
    }
    .hero-main-info h1, .hero-main-info h2 {
        font-size: 2.5rem;
    }
    .features-block {
        margin: 30px 0;
    }
    .hero-actions {
        position: static;
        margin: 0;
        width: 100%;
        max-width: 500px;
        display: flex;
        flex-direction: row;
        gap: var(--spacing-m);
    }
    .hero-actions .btn-base {
        white-space: nowrap;
        flex: 1;
    }
}

/* --- Блок фильтров --- */
.filters-container { background-color: var(--color-background-dark-hero); box-shadow: var(--shadow-light); border-top: 2px solid var(--color-accent-gold); transition: border-top-color 0.3s ease; width: 100%; }
.filters-container.is-sticky { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-index-sticky); border-top-color: transparent; }
.filters-content-wrapper { position: relative; width: 100%; }
.filter-bar { display: flex; justify-content: space-between; align-items: center; padding: var(--spacing-m) var(--spacing-l); height: 60px; position: relative; z-index: 2; }
.filter-bar-left { display: flex; align-items: center; gap: var(--spacing-l); }
.filter-bar-right { display: flex; align-items: center; gap: var(--spacing-s); }
.filter-icon-btn { position: relative; background: none; border: 1px solid var(--color-accent-gold); border-radius: var(--border-radius-medium); cursor: pointer; color: var(--color-accent-gold); width: 44px; height: 44px; padding: var(--spacing-s); display: flex; justify-content: center; align-items: center; gap: 0; transition: all 0.3s ease; }
/* ФИКС ЛОГОТИПА В ФИЛЬТРЕ */
.filter-bar-logo { height: 40px; width: auto; display: block; }

.filter-icon-wrapper { position: relative; width: 1.5rem; height: 1.5rem; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.filter-icon-btn .fas { position: absolute; transition: opacity 0.3s ease, transform 0.3s ease; }
.filter-icon-default { opacity: 1; transform: scale(1) rotate(0deg); }
.filter-icon-active { opacity: 0; transform: scale(0.7) rotate(-90deg); font-size: 1.2em; }
.filters-container.filter-panel-open #filter-toggle-btn .filter-icon-default, .filters-container.panel-is-scrolled-away #filter-toggle-btn .filter-icon-active { opacity: 0; transform: scale(0.7) rotate(90deg); }
.filters-container.filter-panel-open #filter-toggle-btn .filter-icon-active, .filters-container.panel-is-scrolled-away #filter-toggle-btn .filter-icon-default { opacity: 1; transform: scale(1) rotate(0deg); }
.filters-container.contact-panel-open #contact-toggle-btn .filter-icon-default, .filters-container.panel-is-scrolled-away #contact-toggle-btn .filter-icon-active { opacity: 0; transform: scale(0.7) rotate(90deg); }
.filters-container.contact-panel-open #contact-toggle-btn .filter-icon-active, .filters-container.panel-is-scrolled-away #contact-toggle-btn .filter-icon-default { opacity: 1; transform: scale(1) rotate(0deg); }
#cart-toggle-btn { position: relative; }

/* ФИКС СЧЕТЧИКА (БЕЙДЖА) */
.cart-counter {
    position: absolute;
    top: -5px;
    right: -5px; /* Прижато вправо */
    left: auto;  /* Сброс left */
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    min-width: 20px;
    text-align: center;
    border: 2px solid var(--color-background-dark-hero);
}

.contact-actions { display: flex; gap: var(--spacing-m); padding: var(--spacing-l); }
.contact-actions .btn-base { flex: 1; gap: var(--spacing-s); align-items: center; justify-content: center; font-size: 1rem; white-space: nowrap; }
.contact-btn-text-desktop { display: none; }
.contact-btn-text-mobile { display: inline; }
#burger-btn { display: flex; flex-direction: column; justify-content: center; align-items: center; }
#burger-btn .burger-line { display: block; width: 22px; height: 2px; background-color: var(--color-accent-gold); margin: 4px 0; transition: all 0.3s ease-in-out; }
body.mobile-nav-open #burger-btn .burger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.mobile-nav-open #burger-btn .burger-line:nth-child(2) { opacity: 0; }
body.mobile-nav-open #burger-btn .burger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.btn-label-desktop { display: none; }

.filter-content-panel, .contact-content-panel { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--color-background-dark-hero); box-shadow: inset 0 5px 10px -5px rgba(0,0,0,0.3); z-index: 1; padding: 15px; }
.filters-container.filter-panel-open .filter-content-panel { display: block; }
.filters-container.contact-panel-open .contact-content-panel { display: block; }
.filter-content-panel.is-hidden-on-scroll, .contact-content-panel.is-hidden-on-scroll { transform: translateY(-100%); opacity: 0; pointer-events: none; }

.main-nav { display: none; }
.main-nav-link { font-size: 1.1rem; font-weight: 500; color: var(--color-text-light); text-decoration: none; padding: var(--spacing-l); border-bottom: 1px solid rgba(255,255,255,0.1); }
.main-nav-link.active { font-weight: bold; color: var(--color-accent-gold); }
.power-filters { display: flex; flex-wrap: nowrap; gap: var(--spacing-s); padding: var(--spacing-l); }
.power-btn { flex: 1; height: auto; min-height: 50px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: none; border-radius: var(--border-radius-medium); background-color: #444; color: var(--color-text-light); box-shadow: var(--shadow-light); cursor: pointer; transition: all 0.2s ease-in-out; padding: var(--spacing-s); }
.power-btn .filter-label { font-size: 0.7rem; text-transform: uppercase; line-height: 1; opacity: 0.8; }
.power-btn .filter-value { font-size: 1.1rem; font-weight: 600; line-height: 1.2; }
.power-btn[data-power="all"] .filter-value { font-size: 1rem; }
.power-btn.active { background-color: var(--color-accent-gold); color: var(--color-text-dark-hero); }


/* --- Product Listing --- */
.products-container { padding-top: var(--spacing-xl); }
.product-category { margin-bottom: var(--spacing-xxxxl); }
.category-title { font-size: 1.5rem; margin-bottom: var(--spacing-xl); padding-bottom: var(--spacing-m); border-bottom: 2px solid var(--color-accent-gold); display: flex; align-items: center; gap: var(--spacing-m); color: var(--color-text-heading); }
.category-title i { color: var(--color-accent-gold); }
.products-list { display: grid; grid-template-columns: 1fr; gap: var(--spacing-xxl); }
.product-item { background: var(--color-background-card); border-radius: var(--border-radius-large); overflow: hidden; box-shadow: var(--shadow-medium); display: flex; flex-direction: column; }
.product-gallery { position: relative; overflow: hidden; width: 100%; height: auto; aspect-ratio: 1 / 1; background-color: var(--color-background-highlight); }
.slider-track { display: flex; height: 100%; transition: transform 0.5s ease; }
.slide { flex: 0 0 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.slider-dots { position: absolute; bottom: var(--spacing-m); left: 0; right: 0; display: flex; justify-content: center; gap: var(--spacing-s); }
.slider-dot { width: var(--spacing-s); height: var(--spacing-s); border-radius: var(--border-radius-circle); background: rgba(255,255,255,0.5); cursor: pointer; }
.slider-dot.active { background: var(--color-accent-gold); }
.product-info { padding: var(--spacing-xl); flex-grow: 1; display: flex; flex-direction: column; gap: var(--spacing-l); container-type: inline-size; }
.product-info .product-title { order: 1; font-size: clamp(1.1rem, 4.5vw, 1.3rem); font-weight: 700; text-align: center; margin-bottom: 5px; line-height: 1.3; }
.product-info .product-specs { order: 2; font-size: 0.95rem; }
.product-info .product-price-wrapper { order: 3; margin-top: auto; text-align: left; } 
.product-info .product-btn-details { order: 4; }
.product-info .product-btn { order: 5; }
.product-info .product-action-btn.alt-style-button { order: 6; }
.spec-item { display: flex; align-items: center; gap: var(--spacing-s); margin-bottom: var(--spacing-s); }
.spec-item:last-child { margin-bottom: 0; }
.product-price { display: block; background-color: transparent; color: var(--color-text-heading); padding: 0; border-radius: 0; font-weight: 600; font-size: 1.2rem; box-shadow: none; border: none; text-align: left; animation: none; text-shadow: 1px 1px 3px rgba(0,0,0,0.1); }
.product-gallery .slider-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; background-color: rgba(46, 46, 46, 0.5); color: white; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; line-height: 34px; text-align: center; cursor: pointer; transition: background-color 0.2s, opacity 0.3s; opacity: 0; }
.product-gallery:hover .slider-nav-btn { opacity: 1; }
.product-gallery .slider-nav-btn:hover { background-color: rgba(46, 46, 46, 0.8); }
.product-gallery .slider-nav-btn.prev { left: 10px; }
.product-gallery .slider-nav-btn.next { right: 10px; }
.product-gallery .slider-nav-btn:disabled { opacity: 0.2 !important; cursor: not-allowed; }
.product-price-new { display: flex; flex-direction: column; align-items: flex-start; gap: var(--spacing-xs); }
.old-price { font-size: 1.1rem; color: var(--color-text-muted); text-decoration: line-through; font-weight: 500; }
.current-price { font-size: 1.5rem; font-weight: 700; color: var(--color-text-heading); }
.installment-info { font-size: 0.95rem; font-weight: 600; color: var(--color-text-dark); margin-top: var(--spacing-xs); }
@container (width < 320px) { .alt-style-button { font-size: 0.9rem; padding: var(--spacing-s); } }


/* --- Footer --- */
.footer { background: var(--color-background-dark-hero); color: #a9a9a9; padding: 30px 0; line-height: 1.7; padding-bottom: calc(30px + var(--safe-area-bottom)); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; text-align: left; }
.footer-column h4 { font-size: 1.2rem; font-weight: 600; color: var(--color-text-light); margin-bottom: var(--spacing-l); text-transform: uppercase; letter-spacing: 0.5px; }
.footer-column p { margin: 0; font-size: 0.95rem; }
.footer-contacts, .footer-links { list-style: none; padding: 0; margin: 0; }
.footer-contacts li, .footer-links li { margin-bottom: var(--spacing-m); }
.footer-contacts li:last-child, .footer-links li:last-child { margin-bottom: 0; }
.footer a { color: var(--color-accent-gold); text-decoration: none; transition: color 0.2s; }
.footer-contacts li { display: flex; align-items: flex-start; justify-content: flex-start; gap: var(--spacing-m); }
.footer-contacts i { color: var(--color-accent-gold); margin-top: 5px; flex-shrink: 0; }
.footer-contacts span, .footer-contacts a { color: #a9a9a9; }
.footer-address-group { text-align: left; }
.footer-address-group .address-title { font-weight: 600; margin-bottom: var(--spacing-xs); color: #ccc; }
.footer-address-group p { line-height: 1.5; }


/* --- :hover эффекты --- */
@media (hover: hover) {
    .btn-primary:hover { background: transparent; color: var(--color-accent-gold); border-color: var(--color-accent-gold); }
    .btn-secondary:hover { background-color: var(--color-accent-gold); color: var(--color-text-dark-hero); box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateY(-2px); }
    .btn-outline:hover { background: var(--color-accent-gold); color: var(--color-text-dark-hero); border-color: var(--color-accent-gold); }
    .product-btn:hover { background: transparent; color: var(--color-accent-gold); }
    .product-btn.in-cart:hover { background: #5a6268; border-color: #545b62; }
    .product-btn-details:hover { background-color: var(--color-accent-gold); color: var(--color-text-dark-hero); box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateY(-2px); }
    .form-submit, .advantages-order-btn:hover { background: transparent; color: var(--color-accent-gold); }
    .addon-continue-btn:hover { background-color: var(--color-accent-gold); color: var(--color-text-dark-hero); box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateY(-2px); }
    .product-action-btn:hover { background-color: var(--color-accent-gold); color: var(--color-text-dark-hero); border-color: #e0ac00; }
    .alt-style-button:hover { background-color: var(--color-accent-gold); }
    .close-modal-btn:hover { color: var(--color-text-black); }
    .quantity-btn:hover { background-color: var(--color-background-button-inactive); }
    .slider-nav-button:not(:disabled):hover { background-color: rgba(0, 0, 0, 0.8); }
    .main-nav-link:not(.active):hover { color: var(--color-accent-gold); }
    .footer a:hover { color: #ffffff; }
}


/* --- НОВОЕ МОДАЛЬНОЕ ОКНО: КАТАЛОГ --- */
.catalog-modal-content {
    background-color: #1a1a1a; 
    color: var(--color-text-light);
    max-width: 400px;
    max-height: 90vh; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
    padding: var(--spacing-xxl) var(--spacing-xl); 
    text-align: center;
    border-radius: 8px; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-text { font-size: 1.2rem; font-weight: 700; margin-bottom: var(--spacing-m); color: #fff; line-height: 1.2; }
.welcome-logo { height: 40px; width: auto; margin-bottom: var(--spacing-l); display: block; }
.select-section-text { font-size: 1.1rem; font-weight: 700; margin-bottom: var(--spacing-l); color: #fff; }
.catalog-grid { display: flex; flex-direction: column; gap: var(--spacing-m); width: 100%; }

.catalog-card {
    display: flex; align-items: center; justify-content: flex-start; gap: var(--spacing-l);
    background-color: #333; border: none; border-radius: 8px; padding: 12px var(--spacing-l);
    text-decoration: none; color: var(--color-text-light); transition: background-color 0.2s ease;
    cursor: pointer; min-height: 60px; width: 100%; 
}
.catalog-icon-wrapper { width: 40px; height: 40px; background-color: var(--color-accent-gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.catalog-icon-wrapper i { font-size: 1.2rem; color: var(--color-text-dark-hero); }
.catalog-card span { font-size: 1rem; font-weight: 600; text-align: left; color: #fff; }
@media (hover: hover) { .catalog-card:hover { background-color: #444; transform: none; } }

/* ==========================================================================
   6. Media Queries
   ========================================================================== */
@media (max-width: 991.98px) {
    .product-gallery .slider-nav-btn { opacity: 0.7; width: 40px; height: 40px; line-height: 38px; }
    .product-gallery:hover .slider-nav-btn { opacity: 0.9; }
    .filters-container .filter-bar-logo-link { display: none !important; }
    
    /* ИЗМЕНЕНИЕ: Текст вместо иконки в бургере на мобильных */
    #burger-btn { width: auto; padding: 0 12px; }
    #burger-btn .burger-icon-wrapper { display: none; }
    #burger-btn .btn-label-desktop { display: inline-block !important; font-size: 0.9rem; font-weight: 600; }
}

/* Мобильные кнопки контактов */
@media (max-width: 480px) {
    .contact-actions { flex-direction: column; gap: var(--spacing-m); }
    .contact-actions .btn-base { width: 100%; white-space: normal; padding: 10px; height: auto; min-height: 44px; font-size: 1rem; }
    .catalog-modal-content { padding: var(--spacing-l); width: 95%; }
}

@media (max-width: 767.98px) { 
    .hero { display: none; } 
    .modal-content { width: 100%; height: 100%; max-height: none; border-radius: 0; padding: var(--spacing-xl) var(--spacing-l); display: flex; flex-direction: column; } 
    .catalog-modal-content { height: auto; max-height: 90vh; border-radius: 8px; justify-content: center; padding: var(--spacing-xl); overflow-y: auto; }
    #addonModal .modal-content .addon-items-list, #cartModal .modal-content .cart-items-list { flex-grow: 1; max-height: none; }
    .modal-content.image-slider-content { width: 95%; height: auto; max-height: 90vh; border-radius: var(--border-radius-medium); padding: var(--spacing-l); }
    .image-slider-main-image { max-height: 70vh; }
    .slider-nav-button { padding: var(--spacing-s); font-size: 1.2rem; }
    .footer-grid { text-align: left; }
    .footer-contacts li, .footer-links li { justify-content: flex-start; }
    .cart-actions { flex-direction: column; }
    .cart-actions .btn-secondary.close-modal-btn { border-radius: var(--border-radius-medium); }
    .cart-item { flex-wrap: wrap; }
    .cart-item-controls { width: 100%; justify-content: space-between; }
    .cart-item-info { flex-basis: calc(100% - 70px); }
}

@media (min-width: 768px) {
    .container { max-width: 720px; }
    .products-list { grid-template-columns: repeat(2, 1fr); } 
    .modal-content.image-slider-content { max-width: 700px; }
    .filters-content-wrapper { max-width: 720px; margin: 0 auto; }
    .power-filters { justify-content: center; }
    .power-btn { flex: 0 1 90px; }
    .footer-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); text-align: left; }
    .footer-contacts li { justify-content: flex-start; }
}

@media (min-width: 992px) {
    .container { max-width: 1140px; padding: 0; }
    .products-list { grid-template-columns: repeat(3, 1fr); }
    .scroll-to-top-btn { display: none !important; }
    
    /* ИСПРАВЛЕНИЕ: Восстановление стандартного full-width хедера для десктопа */
    .filters-container {
        background-color: var(--color-background-dark-hero);
        width: 100%;
        box-shadow: var(--shadow-light);
        border-top: 2px solid var(--color-accent-gold);
    }
    .filters-content-wrapper {
        max-width: 1140px;
        margin: 0 auto;
        padding: 0 var(--spacing-l); /* Внутренние отступы как у контейнера */
        background-color: transparent; /* Убираем дублирование фона */
        box-shadow: none;
        border: none;
    }
    
    .filters-container .filter-bar-left, .filters-container .filter-bar-right { gap: var(--spacing-m); }
    .filters-container .filter-icon-btn { border: none; background: 0 0; color: var(--color-accent-gold); width: auto; gap: var(--spacing-s); padding: var(--spacing-s) var(--spacing-m); display: flex; align-items: center; flex-direction: row; }
    .filters-container .filter-icon-btn:hover { color: var(--color-text-light); background: transparent; }
    .filters-container .btn-label-desktop { display: inline; font-size: 1rem; font-weight: 500; }
    .filters-container .filter-icon-wrapper { color: var(--color-accent-gold); transition: color 0.3s; position: relative; font-size: 1.2rem; width: 1.2em; height: 1.2em; }
    #burger-btn { flex-direction: row; width: auto; padding: var(--spacing-s) var(--spacing-m); }
    #burger-btn .burger-icon-wrapper { width: 22px; height: 16px; display: flex; flex-direction: column; justify-content: space-between; }
    #burger-btn .burger-line { margin: 0; }
    .filters-container .filter-icon-btn:hover .filter-icon-wrapper, .filters-container .filter-icon-btn:hover .fas { color: var(--color-text-light); }
    .filters-container .filter-icon-btn:hover .burger-line { background-color: var(--color-text-light); }
    .filters-container .cart-counter { border-color: var(--color-background-card); right: -5px; left: auto; }
    
    .contact-actions { justify-content: center; }
    .contact-actions .btn-base { flex: 0 1 250px; }
    .contact-btn-call { cursor: default; pointer-events: none; }
    .contact-btn-text-desktop { display: inline; }
    .contact-btn-text-mobile { display: none; }
    .power-filters { flex-direction: row; justify-content: center; }
    .power-btn { flex: 0 1 auto; flex-direction: row; gap: var(--spacing-xs); padding: var(--spacing-s) var(--spacing-l); }
    .power-btn .filter-label { display: none; }
    .power-btn .filter-value::after { content: ' кВт'; font-size: 0.9em; font-weight: 500; opacity: 0.8; }
    .power-btn[data-power="all"] .filter-value::after { content: ''; }
    .power-btn[data-power="all"] .filter-value { content: 'Все мощности'; }
    .power-btn .filter-value { font-size: 1rem; }
    
    /* Логика "прилипания" для десктопа: контейнер остается 100%, контент центрируется */
    .filters-container.is-sticky .filters-content-wrapper {
        border-radius: 0; /* Убираем скругления */
    }

    .products-container { padding-top: var(--spacing-xxl); }
    
    .footer-grid { grid-template-columns: 1fr 1.5fr 1fr; }
    .mobile-cart-footer { display: none !important; }
    body.mobile-cart-padding .footer { margin-top: 0; }
    body.mobile-cart-padding { padding-bottom: 0; }
}


@media (min-width: 1200px) {
    .container { max-width: 1140px; } 
    .filters-content-wrapper { max-width: 1140px; }
}

@media (min-width: 1440px) {
    .container { max-width: 1320px; }
    .products-list { grid-template-columns: repeat(4, 1fr); }
    .filters-content-wrapper { max-width: 1320px; }
}

@media (max-width: 359px) {
    .container { padding: 0 var(--spacing-m); }
    .product-info { padding: var(--spacing-l); }
    .product-title { font-size: clamp(1.0rem, 4.5vw, 1.2rem); }
    .product-price { font-size: 1.1rem; }
    .spec-item { font-size: 0.9rem; }
}

/* --- Стили для страницы товара --- */
.site-header { background-color: var(--color-background-dark-hero); padding: var(--spacing-m) 0; box-shadow: var(--shadow-light); }
.main-nav-product { display: flex; justify-content: space-between; align-items: center; }
.main-nav-product .logo-link img { height: 40px; display: block; }
.main-nav-product .nav-link { color: var(--color-accent-gold); text-decoration: none; font-weight: 600; font-size: 1.1rem; padding: var(--spacing-s) var(--spacing-l); border: 1px solid var(--color-accent-gold); border-radius: var(--border-radius-medium); transition: all 0.2s ease; }
@media (hover: hover) { .main-nav-product .nav-link:hover { background-color: var(--color-accent-gold); color: var(--color-text-dark-hero); } }
.product-availability { font-weight: 600; color: #28a745; margin-bottom: var(--spacing-xl); }
.reviews-section, .qa-section { margin-top: var(--spacing-xxxxl); padding-top: var(--spacing-xxl); border-top: 1px solid var(--color-border-light); }
.qa-section { margin-bottom: var(--spacing-xxxxl); }
.reviews-section h2, .qa-section h2 { font-size: 1.5rem; color: var(--color-text-heading); margin-bottom: var(--spacing-xl); text-align: left; }
.reviews-section h2 i { color: #2AABEE; margin-right: var(--spacing-m); }
.reviews-chat-container { background-color: #e9ebee; border-radius: var(--border-radius-large); padding: var(--spacing-l); display: flex; flex-direction: column; gap: var(--spacing-l); }
.review-bubble { background-color: #ffffff; border-radius: var(--border-radius-medium); padding: var(--spacing-m) var(--spacing-l); max-width: 80%; align-self: flex-start; box-shadow: var(--shadow-light); word-wrap: break-word; }
.review-author { font-weight: 700; color: #007bff; margin-bottom: var(--spacing-xs); }
.review-text { line-height: 1.6; color: var(--color-text-dark); }
.review-date { font-size: 0.8rem; color: var(--color-text-muted); text-align: right; margin-top: var(--spacing-s); }
.qa-accordion { display: flex; flex-direction: column; gap: var(--spacing-m); }
.qa-item { border: 1px solid var(--color-border-medium); border-radius: var(--border-radius-medium); overflow: hidden; }
.qa-question { width: 100%; background: none; border: none; padding: var(--spacing-l); font-size: 1.1rem; font-weight: 600; color: var(--color-text-heading); display: flex; justify-content: space-between; align-items: center; cursor: pointer; text-align: left; }
.qa-question i { transition: transform 0.3s ease; }
.qa-question[aria-expanded="true"] i { transform: rotate(180deg); }
.qa-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.qa-answer p { padding: 0 var(--spacing-l) var(--spacing-l); margin: 0; line-height: 1.7; }
.error-page { display: flex; flex-direction: column; min-height: 100vh; }
.error-page main.container { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding-top: var(--spacing-xxxl); padding-bottom: var(--spacing-xxxxl); }
.error-404-container { text-align: center; max-width: 600px; }
.error-404-icon { font-size: 5rem; color: var(--color-border-medium); margin-bottom: var(--spacing-xl); }
.error-404-container h1 { font-size: 3.5rem; font-weight: 700; color: var(--color-text-heading); margin-bottom: var(--spacing-s); }
.error-404-container h2 { font-size: 1.5rem; font-weight: 500; color: var(--color-text-medium); margin-bottom: var(--spacing-xxl); }
.error-404-container p { font-size: 1.1rem; line-height: 1.7; color: var(--color-text-muted); margin-bottom: var(--spacing-xxxl); }
.error-404-actions { display: flex; flex-direction: column; gap: var(--spacing-m); max-width: 350px; margin: 0 auto; }
@media (min-width: 768px) { .error-404-actions { flex-direction: row; } }

/* ==========================================================================
   7. Homepage New Design (Dark Theme Cards) - LEGACY STYLES (DO NOT REMOVE)
   ========================================================================== */

/* Main wrapper for homepage banners */
.home-page-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 0; /* Remove gap between header and hero */
    padding-bottom: 40px;
    max-width: 800px; /* Ограничиваем ширину для мобильного вида на десктопе, если нужно */
    margin: 0 auto;
}

@media (min-width: 992px) {
    .home-page-container {
        max-width: 1140px; /* Возвращаем полную ширину на десктопе */
        display: grid;
        grid-template-columns: 1fr; /* 2 columns grid */
        gap: 25px;
    }
}

/* Base Banner Card Style */
.home-banner {
    background-color: #262626; /* Dark grey from mockup */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    color: #fff;
    text-decoration: none; /* For links */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* --- Hero Banner (Banner 1) --- */
.hero-banner {
    background-color: var(--color-background-dark-hero); /* Match header color */
    padding: 20px;
    min-height: 200px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    /* Ensure content stacks properly with absolute image */
    display: flex;
    flex-direction: column; 
    overflow: hidden; /* Cut off image if needed */
}

.hero-banner-content {
    z-index: 2;
    position: relative;
}

.hero-banner h1 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 5px;
    color: var(--color-primary);
    text-transform: uppercase;
}

.hero-banner h1 span {
    display: block;
    color: #fff;
}

.hero-banner p {
    font-size: 0.9rem;
    color: #ccc;
    font-weight: 300;
    margin-bottom: 0;
    max-width: 60%;
}

.hero-banner-img {
    position: absolute;
    right: 0;
    bottom: 0;
    height: auto;
    max-height: 95%; /* Scale relative to container height, don't hit top */
    width: auto;
    max-width: 55%; /* Prevent covering text */
    object-fit: contain;
    z-index: 1;
}

/* --- Constructor Banner (Banner 2) --- */
/* NEW DESIGN IMPLEMENTATION */
.constructor-banner {
    padding: 0; /* Remove default padding, handle inside cols */
    display: flex;
    flex-direction: column; /* Stack on mobile by default */
    background-color: #262626;
    overflow: hidden;
    text-decoration: none;
}

/* Image Column (Left on Desktop, Top/Bottom on Mobile depending on design) */
.constructor-img-col {
    width: 100%;
    background-color: #262626;
    display: flex;
    align-items: flex-end; /* Align image to bottom */
    justify-content: center;
    padding-top: 20px; /* Space above image */
    position: relative;
}

.constructor-img {
    width: auto;
    max-width: 80%; /* Don't be full width on mobile */
    height: auto;
    max-height: 200px; /* Limit height on mobile */
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Content Column (Right on Desktop) */
.constructor-content-col {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Title Styling */
.constructor-title {
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.title-white {
    color: #fff;
    display: block;
    font-weight: 800;
    font-size: 1.5rem;
}

.title-yellow {
    color: var(--color-primary);
    display: block;
    font-weight: 800;
    font-size: 1.5rem;
}

/* Features List Styling */
.constructor-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.constructor-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.4;
}

.constructor-features-list li i {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-top: 3px; /* Align icon with first line of text */
    flex-shrink: 0;
}

/* Button Styling */
.constructor-btn-wrapper {
    margin-top: auto;
}

.constructor-btn {
    background-color: var(--color-primary);
    color: #000;
    font-weight: 700;
    padding: 10px 30px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s, transform 0.2s;
}

.home-banner:hover .constructor-btn {
    background-color: #ffe066; /* Lighter yellow on hover */
    transform: scale(1.05);
}


/* --- Category Split Banner (Banners 3, 4, 5) --- */
/* NEW DESIGN IMPLEMENTATION */
.category-banner {
    display: flex;
    flex-direction: column; /* Mobile first: Stack */
    min-height: 250px;
    background-color: #262626;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
}

/* Column Styles */
.category-content-col {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.category-image-col {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-color: #262626;
    min-height: 200px; /* Ensure space for image on mobile */
    overflow: hidden;
}

/* Titles Wrapper */
.category-titles-wrapper {
    margin-bottom: 20px;
}

.cat-title-main {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
}

.cat-title-sub {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-primary);
    margin: 0;
    text-transform: uppercase;
}

/* Benefits List (Reused from constructor styles partially) */
.category-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-benefits li {
    font-size: 0.95rem;
    color: #ccc;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.3;
}

.category-benefits li i {
    color: var(--color-primary);
    margin-top: 3px;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Category Button (Matches Constructor Button) */
.category-btn-wrapper {
    margin-top: auto;
}

.category-action-btn {
    background-color: var(--color-primary);
    color: #000;
    font-weight: 700;
    padding: 10px 30px;
    border-radius: 25px;
    text-align: center;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s, transform 0.2s;
    width: auto;
    max-width: none;
}

.home-banner:hover .category-action-btn {
    background-color: #ffe066;
    transform: scale(1.05);
}

/* Category Image Handling */
.category-img {
    width: auto;
    max-width: 90%;
    height: auto;
    max-height: 90%; /* Scale inside container */
    object-fit: contain;
    display: block;
    margin-bottom: 0; /* Sit on bottom edge */
    z-index: 1;
}

/* Remove old overlay badge styles */
.overlay-badge { display: none; }
.category-bg-img { display: none; } /* Hide old bg image if present */


/* ==========================================================================
   8. Advanced Media Queries (Mobile & Desktop Specifics) - LEGACY
   ========================================================================== */

/* --- 1. Small Phones (320px - 375px) --- */
@media (max-width: 375px) {
    .container {
        padding: 0 10px;
    }
    
    /* Typography Adjustments */
    .hero-banner h1 { font-size: 1.3rem; }
    .hero-banner p { font-size: 0.8rem; max-width: 70%; }
    
    .category-title { font-size: 1rem; }
    
    /* Layout Adjustments */
    .hero-banner-img {
        max-width: 60%; 
        opacity: 0.3; /* Ensure readability on small screen */
        z-index: 0;
    }

    /* Constructor Adjustments */
    .constructor-title .title-white, 
    .constructor-title .title-yellow { font-size: 1.3rem; }
}

/* --- 2. Large Phones (376px - 480px) --- */
@media (min-width: 376px) and (max-width: 480px) {
    .hero-banner h1 { font-size: 1.6rem; }
}

/* --- 3. Tablets (481px - 768px) --- */
@media (min-width: 481px) and (max-width: 768px) {
    .home-page-container {
        max-width: 600px; /* Center content nicely */
    }
    
    .hero-banner {
        min-height: 220px;
    }
    .hero-banner h1 { font-size: 2rem; }
}

/* --- 4. Mobile General (Max-width 768px) --- */
@media (max-width: 768px) {
    .home-page-container {
        padding: 0;
        gap: 15px;
    }

    .hero-banner {
        min-height: 280px;
    }
    
    .hero-banner h1 { font-size: 1.5rem; }
    
    .hero-banner-img { 
        max-width: 60%; 
        max-height: 80%; 
        bottom: 0;
        opacity: 0.8; /* Slight opacity on small screens to prevent text interference */
    }

    /* Constructor Mobile */
    .constructor-banner {
        flex-direction: column; 
    }
    .constructor-img-col {
        padding-top: 15px;
        padding-bottom: 0;
    }
    .constructor-content-col {
        padding: 15px 20px 25px 20px;
        align-items: center; /* Center text on mobile if desired, or keep left */
        text-align: left;
    }
    .constructor-title { margin-bottom: 15px; }
    .constructor-btn-wrapper { width: 100%; text-align: center; } /* Center button on mobile */

    /* Categories Mobile */
    .category-banner {
        flex-direction: column; 
    }
    /* Reset order for reversed items on mobile so Image is visually consistent (e.g. top or bottom)
       Usually Image Top (order -1) or Image Bottom (order 1).
       Let's put Image on BOTTOM for all mobile cards to let text introduce the category first.
    */
    .category-content-col { order: 0; padding-bottom: 10px; align-items: flex-start; }
    .category-image-col { order: 1; min-height: 180px; }
    
    .category-banner.reversed .category-image-col { order: 1; }
    .category-banner.reversed .category-content-col { order: 0; }
    
    .cat-title-main, .cat-title-sub { font-size: 1.3rem; }
    .category-action-btn { width: 100%; max-width: 200px; }
}

/* --- 5. Desktop (Min-width 992px) --- */
@media (min-width: 992px) {
    /* Hero spans full width */
    .hero-banner {
        grid-column: 1 / -1;
        min-height: 300px;
        padding: 40px;
    }
    .hero-banner h1 { font-size: 3.5rem; }
    .hero-banner p { font-size: 1.2rem; }
    .hero-banner-img { max-width: 40%; max-height: 95%; opacity: 1; }

    /* Constructor spans full width */
    .constructor-banner {
        grid-column: 1 / -1;
        flex-direction: row; /* Horizontal layout */
        min-height: 350px; /* Increase height for impact */
    }
    
    .constructor-img-col {
        width: 45%; /* Image takes ~45% */
        justify-content: flex-start; /* Align image to left inside col? No, col is left. Align content inside. */
        align-items: flex-end; /* Align bottom */
        padding: 40px 0 0 40px; /* Padding left/top */
    }
    
    .constructor-img {
        max-width: 100%; /* Can fill the column width */
        max-height: 320px; /* Don't get too tall */
        margin: 0; /* Reset auto margin */
        /* Align to left/bottom of the column */
        align-self: flex-end; 
    }

    .constructor-content-col {
        width: 55%; /* Text takes remaining */
        padding: 40px 60px 40px 20px; /* More padding right for balance */
        align-items: flex-start;
    }
    
    .title-white, .title-yellow {
        font-size: 2.2rem; /* Larger font */
    }
    
    .constructor-features-list {
        margin-bottom: 30px;
    }
    
    .constructor-features-list li {
        font-size: 1.1rem; /* Larger text */
        gap: 15px;
    }
    .constructor-features-list li i {
        font-size: 1.3rem;
        margin-top: 4px;
    }

    .constructor-btn {
        padding: 12px 40px;
        font-size: 1.1rem;
    }

    /* Categories grid */
    .category-banner {
        height: 100%; /* Fill grid cell */
        min-height: 320px; /* Taller boxes */
        flex-direction: row; 
    }
    
    .category-content-col {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 30px;
    }
    
    .category-image-col {
        flex: 0 0 50%;
        max-width: 50%;
        padding-top: 20px;
    }
    
    .category-img {
        max-height: 280px;
        max-width: 90%;
    }
    
    /* Reversed Layout for Motors (Image Left, Text Right) */
    .category-banner.reversed {
        flex-direction: row-reverse; /* Swap columns visually */
    }
    
    /* Make the last odd item span full width or center? */
    .category-banner:last-child {
        grid-column: 1 / -1; /* Make the last receiver banner full width */
    }
    
    /* Increase font sizes on desktop */
    .cat-title-main, .cat-title-sub { font-size: 1.8rem; }
    
    .category-benefits li { font-size: 1rem; margin-bottom: 12px; }
}

/* ==========================================================================
   9. NEW HOMEPAGE SECTIONS - Fully Adaptive Mobile First
   ========================================================================== */

/* --- 1. HERO SECTION --- */
.new-hero-section {
    /* Mobile Base (< 375px) */
    background: #2e2e2e;
    color: #fff;
    padding: 20px 15px 25px;
    /*border-radius: var(--border-radius-large);*/
    border-bottom-left-radius: var(--border-radius-large);
    border-bottom-right-radius: var(--border-radius-large);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 480px; /* Ensure space for vertical layout */
}

/* Content */
.new-hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.new-hero-title {
    font-size: 1.5rem; /* ~24px for small screens */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.new-hero-title .highlight-text {
    color: var(--color-primary);
    display: block; /* Break line on mobile */
}

.new-hero-subtitle {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #ccc;
    margin-bottom: 20px;
    max-width: 100%;
}

/* Buttons */
.new-hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 25px;
}

.hero-btn {
    width: 100%;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.95rem;
    text-transform: none;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px; /* Touch target size */
}

.hero-btn.btn-primary {
    background-color: var(--color-primary);
    color: #000;
    border: none;
}

.hero-btn.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
}

@media (hover: hover) {
    .hero-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
}

/* Features (Icons) */
.new-hero-features {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: auto; /* Push to bottom if space allows */
}

.feature-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.feature-box i {
    color: var(--color-primary);
    font-size: 1.1rem;
}

.feature-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.feature-text strong {
    font-size: 0.8rem;
    color: #fff;
}

.feature-text span {
    font-size: 0.65rem;
    color: #aaa;
}

/* Image Wrapper Mobile */
.new-hero-image-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    /* On mobile, image goes under text */
    order: 2; 
    margin-top: 10px;
}

.new-hero-image {
    width: 80%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

/* --- Responsive Breakpoints for Hero --- */

/* Small Phones (320px - 360px) */
@media (max-width: 360px) {
    .new-hero-section { padding: 15px 10px; min-height: auto; }
    .new-hero-title { font-size: 1.35rem; }
    .new-hero-subtitle { font-size: 0.8rem; }
    .hero-btn { font-size: 0.9rem; padding: 8px 12px; }
    .new-hero-features { gap: 10px; }
}

/* Large Phones / Small Tablets (480px+) */
@media (min-width: 480px) {
    .new-hero-section { padding: 30px; }
    .new-hero-title { font-size: 1.8rem; }
    .new-hero-buttons { flex-direction: row; }
    .hero-btn { width: auto; flex: 1; }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
    .new-hero-section {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 400px;
        padding: 40px;
    }
    
    .new-hero-content { 
        max-width: 55%; 
        padding-right: 20px;
    }
    
    .new-hero-image-wrapper {
        order: 2; /* Keep right */
        width: 45%;
        margin-top: 0;
        justify-content: flex-end;
    }
    
    .new-hero-image { width: 100%; }
}

/* Desktop (992px+) */
@media (min-width: 992px) {
    .new-hero-section {
        padding: 60px 80px;
        min-height: 500px;
    }

    .new-hero-content {
        flex: 1; /* Take available space */
        padding-right: 40px;
        max-width: 600px;
    }

    .new-hero-title {
        font-size: 3.5rem;
        margin-bottom: 15px;
    }
    
    .new-hero-title .highlight-text { display: inline; } /* Inline on desktop */

    .new-hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 40px;
    }

    .new-hero-buttons {
        width: auto;
        gap: 20px;
        justify-content: flex-start;
    }

    .hero-btn {
        width: auto;
        padding: 14px 35px;
        font-size: 1.1rem;
        flex: 0 0 auto;
    }

    .new-hero-image-wrapper {
        flex: 1;
        position: absolute;
        right: -50px;
        top: 50%;
        transform: translateY(-50%);
        width: 55%;
        height: 100%;
        overflow: visible;
    }

    .new-hero-image {
        max-width: none;
        width: 120%;
        height: auto;
        margin-right: -10%;
    }
    
    .new-hero-features {
        margin-top: 40px;
        gap: 40px;
    }
    
    .feature-box i { font-size: 2rem; }
    .feature-text strong { font-size: 1rem; }
    .feature-text span { font-size: 0.85rem; }
}


/* --- 2. CONSTRUCTOR SECTION --- */
.new-constructor-section {
    background-color: #fff;
    padding: 30px 15px;
    border-radius: var(--border-radius-large);
    display: flex;
    flex-direction: column;
    gap: 25px;
    box-shadow: var(--shadow-light);
    margin-top: 20px;
}

.constructor-text-content {
    display: flex;
    flex-direction: column;
}

.section-title-dark {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-heading);
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 20px;
}

.constructor-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.constructor-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--color-text-dark);
    font-weight: 500;
    line-height: 1.3;
}

.step-num {
    width: 28px;
    height: 28px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #000;
    flex-shrink: 0;
}

.constructor-cta-btn {
    width: 100%;
    border-radius: 25px;
    padding: 12px 15px;
    font-size: 1rem;
    text-transform: none;
    box-shadow: 0 4px 10px rgba(255, 203, 0, 0.4);
    min-height: 44px;
}

.constructor-visual {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.constructor-visual img {
    width: 100%;
    height: auto;
    display: block;
}

/* Breakpoints for Constructor */
@media (max-width: 360px) {
    .section-title-dark { font-size: 1.25rem; }
    .constructor-steps li { font-size: 0.85rem; }
}

@media (min-width: 768px) {
    .new-constructor-section {
        flex-direction: row;
        align-items: center;
        padding: 40px;
    }
    .constructor-text-content { flex: 1; padding-right: 30px; }
    .constructor-visual { flex: 1; }
    .constructor-cta-btn { width: auto; max-width: 300px; }
}

@media (min-width: 992px) {
    .new-constructor-section {
        padding: 60px 80px;
        justify-content: space-between;
    }
    .constructor-text-content { flex: 0 0 45%; }
    .section-title-dark { font-size: 2.5rem; margin-bottom: 30px; }
    
    .constructor-steps { gap: 20px; margin-bottom: 40px; }
    .constructor-steps li { font-size: 1.3rem; }
    .step-num { width: 40px; height: 40px; font-size: 1.2rem; }

    .constructor-visual {
        flex: 0 0 50%;
        transform: perspective(1000px) rotateY(-5deg);
        transition: transform 0.3s;
        box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    }
    
    .constructor-visual:hover {
        transform: perspective(1000px) rotateY(0deg);
    }
    
    .constructor-cta-btn { padding: 16px 40px; font-size: 1.1rem; }
}


/* --- 3. CATEGORIES SECTION --- */
.new-categories-section {
    padding: 20px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 15px;
}

.category-card {
    background-color: #2e2e2e; /* Dark theme */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

/* Hover effect only on devices that support it */
@media (hover: hover) {
    .category-card:hover { transform: translateY(-5px); }
}

.cat-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 2;
}

.cat-card-content h3 {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    text-transform: uppercase;
    min-height: 2.4em; /* Ensure space for 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Fix here */
    -webkit-box-orient: vertical;
    overflow: hidden; /* Often needed with line-clamp */
}

.cat-card-content h3 .sub-title {
    color: #aaa;
    font-weight: 400;
    display: block;
    font-size: 1rem;
    margin-top: 4px;
}

.cat-features-mini {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    font-size: 0.85rem;
    color: var(--color-primary);
}

.cat-features-mini li {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-image-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    margin-bottom: 20px;
    margin-top: 10px;
}

.cat-img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.cat-btn {
    align-self: center; /* Center aligned */
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.9rem;
    text-transform: none;
    width: 100%; /* Mobile full width */
    text-align: center;
}

/* Breakpoints for Categories */
@media (min-width: 480px) {
    .cat-btn { width: auto; min-width: 140px; }
}

/* Tablets: 2 columns */
@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .cat-img { max-height: 180px; }
}

/* Desktop: 3 columns */
@media (min-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .category-card { min-height: 450px; }
    .cat-card-content { padding: 30px; }
    .cat-card-content h3 { font-size: 1.5rem; margin-bottom: 15px; }
    .cat-card-content h3 .sub-title { font-size: 1.2rem; }
    .cat-features-mini { font-size: 0.9rem; margin-bottom: 20px; }
    
    .cat-image-wrapper { 
        margin: 20px 0; 
        margin-left: -30px; 
        margin-right: -30px;
        width: calc(100% + 60px);
    }
    .cat-img { 
        max-height: 220px; 
        transition: transform 0.3s;
    }
    
    .category-card:hover .cat-img { transform: scale(1.05); }
}


/* --- 4. TRUST SECTION --- */
.new-trust-section {
    background-color: #e5e7eb;
    padding: 30px 15px;
    border-radius: var(--border-radius-large);
    color: #333;
    margin-top: 20px;
}

.trust-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trust-top-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 15px;
}

.trust-top-row h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.partners-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    opacity: 0.7;
}

/* Новые стили для изображений логотипов */
.partner-logo-img {
    height: 30px; /* Базовая высота для мобильных */
    width: auto;  /* Ширина авто для сохранения пропорций */
    max-width: 120px; /* Ограничение ширины */
    object-fit: contain;
    filter: grayscale(100%); /* ЧБ стиль */
    transition: filter 0.3s ease;
}

/* При наведении (где есть hover) возвращаем цвет */
@media (hover: hover) {
    .partner-logo-img:hover {
        filter: grayscale(0%);
    }
}

.trust-features-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile 1 col */
    gap: 12px;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
}

.trust-item i {
    color: #f59e0b;
    font-size: 1.1rem;
    margin-top: 2px; /* Align checkmark */
    flex-shrink: 0;
}

/* Breakpoints for Trust Section */
@media (min-width: 480px) {
    .trust-features-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* Увеличиваем логотипы на планшетах */
    .partner-logo-img {
        height: 40px;
        max-width: 140px;
    }
}

@media (min-width: 768px) {
    .new-trust-section { padding: 40px; }
    .trust-top-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .trust-features-grid { gap: 20px; }
}

@media (min-width: 992px) {
    .new-trust-section { padding: 50px 80px; }
    
    .trust-top-row { padding-bottom: 30px; margin-bottom: 10px; }
    .trust-top-row h2 { font-size: 1.8rem; }
    
    .partners-logos { gap: 40px; }
    
    /* Увеличиваем логотипы на десктопах */
    .partner-logo-img {
        height: 50px;
        max-width: 160px;
    }
    
    .trust-features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .trust-item { font-size: 0.95rem; align-items: center; }
    .trust-item i { font-size: 1.2rem; margin-top: 0; }
}

/* ==========================================================================
   ИСПРАВЛЕНИЯ АДАПТИВНОСТИ (FIX #4, #5)
   ========================================================================== */

/* FIX #4: Модальные окна на маленьких экранах (< 400px) */
@media (max-width: 399.98px) {
    .modal { padding: 5px; }
    .modal-content {
        max-width: 100%;
        padding: 15px var(--spacing-m);
        max-height: calc(100dvh - 10px);
        border-radius: var(--border-radius-small);
    }
    .modal-title { font-size: 1.2rem; margin-bottom: var(--spacing-m); }
    .close-modal-btn {
        top: var(--spacing-s);
        right: var(--spacing-s);
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    #cartModal .modal-content {
        max-height: 100%;
        border-radius: 0;
    }
    .form-input { font-size: 0.9rem; padding: 10px; }
    .btn-base { font-size: 0.95rem; padding: 12px; min-height: 40px; }
}

/* FIX #5: Landscape-ориентация на мобильных устройствах */
@media (max-height: 500px) and (orientation: landscape) {
    /* Hero-секция */
    .hero-landing {
        height: auto;
        min-height: 200px;
    }
    .hero-landing-content {
        flex-direction: row;
        flex-wrap: wrap;
        padding: var(--spacing-m);
    }

    /* Модальные окна */
    .modal-content {
        max-height: 95dvh;
        padding: var(--spacing-m);
    }
    .modal-title { font-size: 1.1rem; margin-bottom: var(--spacing-s); }
    .addon-items-list { max-height: 40vh; }

    /* Мобильная корзина */
    .mobile-cart-footer { display: none; }

    /* Мобильное меню */
    .mobile-nav { width: 260px; }

    /* Конструктор */
    .svg-scheme-container {
        min-height: 200px;
        height: 40dvh;
    }
    .mobile-footer-wrapper { padding: 5px 10px; }
    .mobile-scroll-spacer { height: 120px; }

    /* Общие отступы */
    .container { padding: 0 var(--spacing-s); }
    .site-header { padding: 5px 0; }
}