/* ===== БАЗОВЫЙ СБРОС ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f5f7fc;
    color: #1e293b;
    line-height: 1.4;
    scroll-behavior: smooth;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== ХЕДЕР ===== */
.shop-header {
    background: white;
    border-bottom: 1px solid #e9eef3;
    padding: 20px 0;
    margin-bottom: 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    cursor: pointer;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: inherit;
}

.logo .logo-blue {
    color: #1e4a6e;
}

.logo .logo-red {
    color: #dc2626;
}

.tagline {
    color: #5b6e8c;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.calc-link {
    background: #1e4a6e;
    color: white;
    padding: 8px 18px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.calc-link:hover {
    background: #0f3a56;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 40px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    transition: 0.2s;
}

.cart-icon:hover {
    background: #e2e8f0;
}

.cart-count {
    background: #dc2626;
    color: white;
    border-radius: 30px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

/* ===== КНОПКА "НАЗАД" В ХЕДЕРЕ ===== */
.back-button {
    background: none;
    border: 1px solid #dce3ec;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 1.2rem;
    color: #1e4a6e;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    align-self: center;
}

.back-button:hover {
    background: #f1f5f9;
}

/* ===== БУРГЕР-МЕНЮ ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid #dce3ec;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 1.5rem;
    color: #1e4a6e;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    margin-left: auto;
    align-self: center;
}

.mobile-menu-toggle:hover {
    background: #f1f5f9;
}

/* Мобильное выпадающее меню */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: white;
    border-top: 1px solid #eef2f8;
    padding: 16px 24px;
    gap: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.04);
}

.mobile-menu a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f4fa;
}

.mobile-menu a i {
    width: 24px;
    color: #2c7da0;
}

.mobile-menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

.mobile-experience {
    color: #2c7da0;
    font-weight: 500;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Строка с корзиной/калькулятором — по умолчанию скрыта (покажется только на мобильных) */
.mobile-actions-row {
    display: none;
}

/* ===== НАВИГАЦИЯ В ШАПКЕ (десктоп) ===== */
.header-nav {
    display: flex;
    gap: 24px;
    margin-left: auto;
    margin-right: 30px;
}

.header-nav .nav-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.header-nav .nav-link i {
    color: #2c7da0;
    font-size: 0.9rem;
}

.header-nav .nav-link:hover {
    color: #1e4a6e;
    border-bottom-color: #2c7da0;
}

.experience-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2c7da0;
    font-weight: 500;
    white-space: nowrap;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ (≤768px) ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header-nav {
        display: none;
    }

    .experience-badge {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-menu.open {
        display: flex;
    }

    .header-inner {
        align-items: center !important;
    }

    .logo {
        flex: 1;
    }

    .header-actions {
        gap: 10px;
    }

    .cart-icon span:not(.cart-count) {
        display: none;
    }

    .cart-icon {
        padding: 8px 12px;
    }

    .calc-link span {
        display: none;
    }

    .calc-link {
        padding: 8px 12px;
    }
}

/* ===== ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ (≤480px) ===== */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.4rem;
    }

    .tagline {
        font-size: 0.7rem;
    }
}

/* ===== МОБИЛЬНЫЙ ХЕДЕР – ИСПРАВЛЕННАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .back-button {
        order: 1;
        margin-right: 0;
        flex-shrink: 0;
    }

    .logo {
        order: 2;
        flex: 1;
        text-align: center;
    }

    .mobile-menu-toggle {
        order: 3;
        display: block;
        margin-left: 0;
        flex-shrink: 0;
    }

    .header-nav,
    .experience-badge {
        display: none;
    }

    .header-actions .calc-link,
    .header-actions .cart-icon {
        display: none;
    }

    .mobile-actions-row {
        order: 4;
        width: 100%;
        display: flex;
        margin-top: 8px;
    }

    .mobile-action-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 0;
        background: #f1f5f9;
        border-radius: 40px;
        text-decoration: none;
        font-weight: 500;
        color: #1e293b;
        font-size: 0.9rem;
        transition: 0.2s;
    }

    .mobile-action-btn i {
        font-size: 1rem;
        color: #2c7da0;
    }

    .mobile-action-btn:hover {
        background: #e2e8f0;
    }

    .mobile-action-btn--calc {
        background: #1e4a6e;
        color: white;
    }

    .mobile-action-btn--calc i {
        color: inherit;
    }

    .mobile-action-btn--calc:hover {
        background: #0f3a56;
    }

    .mobile-action-btn--cart {
        background: #f1f5f9;
        color: #1e293b;
        border: 1px solid #dce3ec;
    }

    .mobile-action-btn--cart i {
        color: #2c7da0;
    }

    .mobile-action-btn .cart-count {
        background: #dc2626;
        color: white;
        border-radius: 30px;
        padding: 2px 8px;
        font-size: 0.75rem;
        font-weight: bold;
        min-width: 24px;
        text-align: center;
    }
}

/* ===== КНОПКА "НАВЕРХ" ===== */
.go-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #1e4a6e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    font-size: 1.4rem;
}

.go-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.go-top:hover {
    background: #0f3a56;
    transform: translateY(-3px);
}

/* ===== ОБЩИЕ UI-ЭЛЕМЕНТЫ ===== */
.btn-verify {
    background: #2c7da0;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(44, 125, 160, 0.2);
}

.btn-verify:hover {
    background: #1e6b8c;
    box-shadow: 0 4px 8px rgba(44, 125, 160, 0.3);
}

.btn-verify:disabled {
    background: #a0aec0;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-primary-small {
    background: #1e4a6e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-primary-small:hover {
    background: #0f3a56;
}

.btn-primary-small:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.btn-link {
    background: none;
    border: none;
    color: #1e4a6e;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
}

.btn-link:hover {
    color: #0f3a56;
}

.btn-link:disabled {
    color: #a0aec0;
    cursor: not-allowed;
    text-decoration: none;
}

.input-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.out-of-stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 2;
}

.product-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 30px;
    background: #eef2fa;
    color: #1e4a6e;
}

.product-type-badge.inverter {
    background: #d4edda;
    color: #155724;
}

.product-type-badge.onoff {
    background: #fff3cd;
    color: #856404;
}

.loading {
    text-align: center;
    padding: 60px;
    font-size: 1.2rem;
    color: #5b6e8c;
}

.tooltip-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    cursor: pointer;
    color: #2c7da0;
}

.tooltip-icon i {
    font-size: 0.85rem;
    width: auto;
    margin-top: 0;
}

.tooltip-text {
    visibility: hidden;
    width: 260px;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.75rem;
    font-weight: normal;
    white-space: normal;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tooltip-icon:hover .tooltip-text,
.tooltip-icon:active .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== FAQ (улучшенный) ===== */
.faq-section {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.faq-item.active {
    border-color: #cbdde9;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 18px 24px;
    background: #f8fafd;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
    line-height: 1.4;
}

.faq-question span {
    flex: 1;
}

.faq-question::after {
    content: "\f107"; /* Font Awesome chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1rem;
    color: #5b6e8c;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-question {
    background: #eef2fa;
    color: #0f2b3d;
}

.faq-item.active .faq-question::after {
    transform: rotate(180deg);
    color: #1e4a6e;
}

.faq-question:hover {
    background-color: #eef2fa;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    background: white;
    padding: 0 24px;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 400px; /* достаточно для самого длинного ответа */
    padding: 18px 24px;
}

/* ===== УНИВЕРСАЛЬНЫЕ КНОПКИ (КОРЗИНА/ВОЗВРАТ) ===== */
.back-btn {
    background: #eef2fa;
    color: #1e4a6e;
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.back-btn:hover {
    background: #e2e8f0;
}

.add-to-cart-btn {
    background: #1e4a6e;
    color: white;
    border: none;
    padding: 10px 0;
    margin-top: 12px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: #0f3a56;
}

.add-to-cart-btn.disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* ===== КНОПКИ ОФОРМЛЕНИЯ (checkout / thank you) ===== */
.checkout-btn,
.submit-order,
.thankyou-btn {
    background: #1e4a6e;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.checkout-btn:hover,
.submit-order:hover,
.thankyou-btn:hover {
    background: #0f3a56;
}

/* ===== ФУТЕР ===== */
.footer-requisites p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-requisites i {
    width: 20px;
    color: #2c7da0;
}

.site-footer {
    background: white;
    border-top: 1px solid #eef2f8;
    margin-top: 48px;
    padding: 40px 0 24px;
    color: #334155;
}

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

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #0f2b3d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col h4 i {
    color: #2c7da0;
}

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

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #475569;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: #1e4a6e;
}

.footer-col ul li i {
    width: 20px;
    color: #2c7da0;
    margin-right: 8px;
    font-size: 0.9rem;
}

.footer-contact p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    width: 20px;
    color: #2c7da0;
}

.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 50%;
    color: #1e4a6e;
    font-size: 1.2rem;
    transition: 0.2s;
    text-decoration: none;
}

.footer-social a:hover {
    background: #1e4a6e;
    color: white;
}

.footer-bottom {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #62748c;
}

.footer-bottom a {
    color: #2c7da0;
    text-decoration: none;
    margin-left: 16px;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.developer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.developer-link:hover {
    color: #1e4a6e;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-bottom a {
        margin: 0 8px;
    }
}