/* ===== css/style.css ===== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --red-border: #22d3ee;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main-content { flex: 1; }

/* ===== ТЕМЫ ===== */
body.theme-light {
    --header-bg: #ffffff;
    --page-bg: #e4e4e4;
    --text-color: #212529;
    --border-color: #dee2e6;
    --icon-color: #495057;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --input-bg: #f8f9fa;
    --red-border-color: rgba(37, 99, 235, 0.3);
    --toggle-bg: #f0f0f0;
    --toggle-switch-bg: #ffffff;
    --toggle-sun-color: #f39c12;
    --toggle-moon-color: #95a5a6;
    --card-bg: #ffffff;
    background: var(--page-bg);
}

body.theme-dark {
    --header-bg: #000000;
    --page-bg: #383837;
    --text-color: #f8f9fa;
    --border-color: #444;
    --icon-color: #adb5bd;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --input-bg: #2a2a2a;
    --red-border-color: rgba(37, 99, 235, 0.5);
    --toggle-bg: #2c3e50;
    --toggle-switch-bg: #ffffff;
    --toggle-sun-color: #f1c40f;
    --toggle-moon-color: #ecf0f1;
    --card-bg: #2a2a2a;
    background: var(--page-bg);
}

/* ===== ХЕДЕР ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 20px;
    background: var(--page-bg);
    transition: var(--transition);
}

.header-container {
    max-width: 1450px;
    margin: 0 auto;
}

.header-content {
    background: var(--header-bg);
    border-radius: 16px;
    padding: 38px 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);  
    border: 3px solid rgba(37, 99, 235, 0.3);     
    box-sizing: border-box;                      
    transition: background 0.2s, color 0.2s;      
}

/* ===== ЛОГОТИП ===== */
.logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 50%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    display: inline-block;
}

body.theme-dark .logo-text {
    background: linear-gradient(135deg, #22d3ee 0%, #67e8f9 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 180px;
    flex-shrink: 0;
}

.logo {
    display: block;
    margin-bottom: 8px;
    position: relative;
    width: 185px;
    height: 52px;
}

.logo img {
    transition: opacity 0.2s ease;
}

.logo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

.logo-dark {
    display: none;
}

body.theme-dark .logo-light {
    display: none;
}

body.theme-dark .logo-dark {
    display: block;
    /* Компенсация — тёмный PNG нарисован с большими полями внутри картинки */
    transform: scale(1.12);
    transform-origin: left center;
}

.find-part-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

.find-part-link:hover {
    color: var(--primary-hover);
    transform: translateY(-1px);
}

.find-part-link i {
    font-size: 12px;
}
/* ===== КАТАЛОГ ===== */
.catalog-container {
    position: static;
}

.catalog-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    z-index: 1002;
}

.catalog-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.catalog-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: 5px;
}

.catalog-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100vw;
    background-color: var(--header-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 3px solid var(--red-border-color);
    border-top: none;
    padding: 25px 30px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-left: calc(-50vw + 50%);
}

.catalog-dropdown-content {
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 20px;
    border-radius: 16px;
}

.catalog-container.active .catalog-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    border-radius: 16px;
}

.catalog-container.active .catalog-arrow {
    transform: rotate(180deg);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.catalog-item {
    display: block;
    text-decoration: none;
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.catalog-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    background-color: var(--input-bg);
}

.catalog-item-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.catalog-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
    padding: 5px;
    background-color: var(--page-bg);
}

.catalog-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-color);
}

/* ===== ПОИСК ===== */
.search-block {
    flex: 1;
    min-width: 300px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    overflow: hidden;
    height: 50px;
}

.search-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.search-icon {
    padding: 0 18px;
    color: var(--icon-color);
    font-size: 16px;
    flex-shrink: 0;
}

.search-container input {
    flex: 1;
    padding: 0 10px;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-color);
    font-size: 15px;
    height: 100%;
}

.search-btn-inside {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 25px;
    height: 100%;
    min-width: 60px;
    background: var(--primary-color);
    border: none;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 18px;
}

.search-btn-inside:hover {
    background: var(--primary-hover);
}

/* ===== ПРАВАЯ ЧАСТЬ ===== */
.header-right-area {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* ТЕЛЕФОН */
.phone-wrapper {
    display: flex;
    align-items: center;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.phone-link:hover {
    background: var(--page-bg);
    border-color: var(--red-border-color);
}

.phone-link i {
    font-size: 20px;
    color: var(--primary-color);
}

.phone-text {
    display: flex;
    flex-direction: column;
}

.phone-number {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}

.phone-subtext {
    font-size: 11px;
    color: var(--primary-color);
    opacity: 0.9;
}

/* ИКОНКИ */
.icon-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--icon-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 18px;
    border: 1px solid var(--border-color);
}

.icon-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--header-bg);
}

/* ===== КНОПКА ТЕМЫ ===== */
.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--icon-color);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.theme-btn:active {
    transform: scale(0.92);
}

/* ===== ФУТЕР ===== */
.footer {
    background-color: var(--header-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    padding: 32px 0;
    transition: var(--transition);
}
.footer-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-tagline { font-size: 13px; color: var(--text-secondary); margin: 0; }
.footer-social-links { display: flex; gap: 12px; }
.footer-social-links .social-link {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-color); font-size: 16px;
    text-decoration: none; transition: all .2s;
}
.footer-social-links .social-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.footer-container {
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.footer-logo-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-logo img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.footer-logo-light {
    display: block;
}

.footer-logo-dark {
    display: none;
}

body.theme-dark .footer-logo-light {
    display: none;
}

body.theme-dark .footer-logo-dark {
    display: block;
}

.footer-description {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 13px;
    line-height: 1.5;
    max-width: 400px;
}

.footer-subscribe {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subscribe-text {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

.subscribe-form {
    display: flex;
    gap: 10px;
}

.subscribe-input {
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 14px;
    min-width: 250px;
}

.subscribe-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.subscribe-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.subscribe-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-title {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-color);
    opacity: 0.75;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    opacity: 1;
    transform: translateX(3px);
}

.footer-links.two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
}

.footer-links.two-columns li {
    margin-bottom: 0;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 13px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--input-bg);
    color: var(--icon-color);
    transition: var(--transition);
    font-size: 16px;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.footer-payment {
    display: flex;
    gap: 15px;
    color: var(--icon-color);
    font-size: 24px;
    opacity: 0.7;
}

/* ===== СЛАЙДЕР ===== */
.slider-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 30px;
}

.slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-slide {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    max-height: 470px;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
    display: block;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
}

.slider:hover .slider-arrow {
    opacity: 1;
}

.slider-arrow.prev {
    left: 16px;
}

.slider-arrow.next {
    right: 16px;
}

.slider-arrow:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.slider-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
    border-color: white;
}

/* ===== ТРИ ПОЛОСЫ ДЛЯ СЛАЙДЕРА ===== */
.sale-ribbon-container {
    position: relative;
    max-width: 1000px;
    margin: 70px auto 0; /* Убрал нижний отступ */
    padding: 0 20px;
    overflow: visible;
}

/* ВЕРХНЯЯ ЧЕРНО-ЖЕЛТАЯ ПОЛОСА */
.sale-ribbon-top-stripe {
    position: absolute;
    top: -45px;
    left: 0;
    width: 100vw;
    height: 12px;
    background: repeating-linear-gradient(
        45deg,
        #000000 0px,
        #000000 15px,
        #ffd700 15px,
        #ffd700 30px
    );
    margin-left: calc(-50vw + 50%);
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

/* НИЖНЯЯ ЧЕРНО-ЖЕЛТАЯ ПОЛОСА - СОЕДИНЕНА С ЖЕЛТЫМ ПОЛЕМ */
.sale-ribbon-bottom-stripe {
    position: absolute;
    bottom: -2px; /* Прижато к слайдеру */
    left: 0;
    width: 100vw;
    height: 12px;
    background: repeating-linear-gradient(
        45deg,
        #000000 0px,
        #000000 15px,
        #ffd700 15px,
        #ffd700 30px
    );
    margin-left: calc(-50vw + 50%);
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

/* СРЕДНЯЯ ЖЕЛТАЯ ПОЛОСА С ТЕКСТОМ */
.sale-ribbon-middle {
    position: absolute;
    top: -35px;
    left: 0;
    width: 100vw;
    height: 44px;
    background: #ffd700;
    overflow: hidden;
    z-index: 11;
    margin-left: calc(-50vw + 50%);
    box-shadow: 0 5px 18px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    border-top: 2px solid rgba(0,0,0,0.15);
    border-bottom: 2px solid rgba(0,0,0,0.15);
}

.ribbon-middle-content {
    display: flex;
    align-items: center;
    height: 100%;
    width: fit-content;
    animation: scrollRibbon 50s linear infinite;
    white-space: nowrap;
    padding-left: 20px;
}

.ribbon-middle-text {
    color: #000000;
    font-weight: 900;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin: 0 50px;
    font-family: 'Segoe UI', Arial, sans-serif;
    text-shadow: 2px 2px 0 rgba(255,255,255,0.3);
}

@keyframes scrollRibbon {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Темная тема */
.theme-dark .sale-ribbon-top-stripe,
.theme-dark .sale-ribbon-bottom-stripe {
    background: repeating-linear-gradient(
        45deg,
        #000000 0px,
        #000000 15px,
        #ffd700 15px,
        #ffd700 30px
    );
}

.theme-dark .sale-ribbon-middle {
    background: #ffd700;
}

.theme-dark .ribbon-middle-text {
    color: #000000;
    text-shadow: 2px 2px 0 rgba(255,255,255,0.5);
}

/* Адаптивность */
@media (max-width: 768px) {
    .sale-ribbon-middle {
        height: 40px;
        top: -28px;
    }
    
    .sale-ribbon-top-stripe,
    .sale-ribbon-bottom-stripe {
        height: 10px;
    }
    
    .sale-ribbon-top-stripe {
        top: -38px;
    }
    
    .sale-ribbon-bottom-stripe {
        bottom: -2px;
    }
    
    .ribbon-middle-text {
        font-size: 20px;
        letter-spacing: 6px;
        margin: 0 40px;
    }
}

@media (max-width: 480px) {
    .sale-ribbon-middle {
        height: 36px;
        top: -26px;
    }
    
    .sale-ribbon-top-stripe,
    .sale-ribbon-bottom-stripe {
        height: 8px;
    }
    
    .sale-ribbon-top-stripe {
        top: -32px;
    }
    
    .sale-ribbon-bottom-stripe {
        bottom: -2px;
    }
    
    .ribbon-middle-text {
        font-size: 18px;
        letter-spacing: 5px;
        margin: 0 30px;
    }
}
/* ===== КНОПКА "ВСЕ ТОВАРЫ" ===== */
.all-products-btn-container {
    text-align: center;
    margin: 50px auto 40px;
    max-width: 1000px;
}

.all-products-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 35px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.all-products-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    gap: 12px;
}

.btn-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.all-products-btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .all-products-btn {
        padding: 10px 30px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .all-products-btn {
        padding: 8px 25px;
        font-size: 14px;
        width: 90%;
    }
}

/* ===== РАЗДЕЛ "О НАС" ===== */
.about-section {
    max-width: 1000px;
    margin: 60px auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.about-title {
    color: var(--text-color);
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.about-text p {
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

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

.feature-check {
    color: var(--primary-color);
    font-size: 20px;
}

.feature-text {
    color: var(--text-color);
}

.about-stats {
    background: var(--primary-color);
    padding: 30px;
    border-radius: 20px;
    color: white;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 5px;
}

.stat-subtitle {
    font-size: 20px;
    opacity: 0.9;
}

.stat-number {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ===== ПРЕИМУЩЕСТВА ===== */
.advantages-grid {
    max-width: 1000px;
    margin: 60px auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.advantage-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.advantage-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 24px;
}

.advantage-title {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.advantage-desc {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 14px;
}

/* ===== БРЕНДЫ ===== */
.brands-section {
    max-width: 1000px;
    margin: 60px auto;
    text-align: center;
}

.brands-title {
    color: var(--text-color);
    font-size: 28px;
    margin-bottom: 30px;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.brand-item {
    background: var(--primary-color);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    color: white;
    font-weight: 600;
    text-align: center;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .header-content {
        padding: 15px 20px;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .logo-area {
        min-width: auto;
    }
    
    .search-block {
        order: 1;
        flex: 100%;
        margin-top: 15px;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .logo-area {
        align-items: center;
        text-align: center;
    }
    
    .catalog-button {
        align-self: center;
    }
    
    .search-block {
        margin: 10px 0;
    }
    
    .header-right-area {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .catalog-dropdown {
        padding: 20px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px;
    }
    
    .header-content {
        padding: 15px;
        gap: 10px;
    }
    
    .phone-text {
        display: none;
    }
    
    .phone-link {
        padding: 8px;
    }
    
    .icon-button {
        width: 44px;
        height: 44px;
    }
    
    .search-container {
        height: 44px;
    }
    
    .search-btn-inside {
        padding: 0 15px;
        min-width: 50px;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .catalog-button span {
        display: none;
    }
    
    .catalog-button {
        padding: 12px 15px;
    }
    
    .catalog-icon {
        width: 40px;
        height: 40px;
    }
    
    .catalog-name {
        font-size: 13px;
    }
    
    .catalog-dropdown {
        padding: 15px;
    }
    
    .sale-ribbon-middle {
        height: 36px;
        top: -23px;
    }
    
    .sale-ribbon-top-stripe,
    .sale-ribbon-bottom-stripe {
        height: 6px;
    }
    
    .sale-ribbon-top-stripe {
        top: -30px;
    }
    
    .sale-ribbon-bottom-stripe {
        bottom: -30px;
    }
    
    .ribbon-middle-text {
        font-size: 18px;
        letter-spacing: 4px;
        margin: 0 30px;
    }
    
    .slider-container {
        margin: 20px auto;
        max-width: 100%;
    }
    
    .slider {
        border-radius: 20px;
    }
    
    .slider-slide {
        max-height: 200px;
    }
    
    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 14px;
        opacity: 0.8;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 50px;
    }
    
    .catalog-button span {
        display: none;
    }
    
    .catalog-button {
        padding: 10px;
        width: 50px;
        height: 50px;
        justify-content: center;
    }
    
    .catalog-arrow {
        display: none;
    }
    
    .catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .sale-ribbon-middle {
        height: 32px;
        top: -21px;
    }
    
    .sale-ribbon-top-stripe,
    .sale-ribbon-bottom-stripe {
        height: 5px;
    }
    
    .sale-ribbon-top-stripe {
        top: -25px;
    }
    
    .sale-ribbon-bottom-stripe {
        bottom: -25px;
    }
    
    .ribbon-middle-text {
        font-size: 16px;
        letter-spacing: 3px;
        margin: 0 25px;
    }
    
    .slider-slide {
        max-height: 160px;
    }
    
    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .brands-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-logo img {
        height: 45px;
    }
    
    .footer-links.two-columns {
        grid-template-columns: 1fr;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ ЭФФЕКТЫ ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}


body {
    overflow-x: hidden;
    width: 100%;
}

.header, .main-content, .footer {
    overflow-x: visible;
}

/* ===== КАТАЛОГ ТОВАРОВ ===== */
.catalog-container {
    max-width: 1450px;
    margin: 40px auto;
    padding: 0 20px;
}

.catalog-header {
    margin-bottom: 30px;
    text-align: center;
}

.catalog-title {
    color: var(--text-color);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.catalog-description {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 16px;
}


/* ===== СЕТКА ТОВАРОВ ===== */
.products-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: visible;       /* visible — чтобы бейджи вылезали */
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;            /* разрешаем grid-ячейке сжиматься */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.product-image {
    height: 200px;
    background: var(--input-bg);
    display: block;
    border-radius: 11px 11px 0 0;
    overflow: hidden;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-image .product-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-color);
    font-size: 48px;
    opacity: 0.3;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    color: var(--text-color);
}

.product-title {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
}

.product-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-brand {
    font-size: 13px;
    font-weight: 600;
    color: var(--icon-color);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.product-article {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 12px;
    margin-bottom: 8px;
}

.product-category {
    color: var(--primary-color);
    font-size: 13px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.product-stock {
    font-size: 13px;
    margin-bottom: 15px;
}

.product-stock.in-stock {
    color: #2ecc71;
}

.product-stock.out-of-stock {
    color: #e74c3c;
}

.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination-page,
.pagination-prev,
.pagination-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-page:hover,
.pagination-prev:hover,
.pagination-next:hover {
    background: var(--primary-color);
    color: white;
}

.pagination-page.active {
    background: var(--primary-color);
    color: white;
}

/* ===== НЕТ ТОВАРОВ ===== */
.no-products {
    text-align: center;
    padding: 60px 20px;
}

.no-products i {
    font-size: 64px;
    color: var(--icon-color);
    opacity: 0.3;
    margin-bottom: 20px;
}

.no-products h3 {
    color: var(--text-color);
    font-size: 24px;
    margin-bottom: 10px;
}

.no-products p {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 16px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


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

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-title {
        font-size: 28px;
    }
}

/* ===== СТРАНИЦА ТОВАРА ===== */
.product-page-container {
    max-width: 1450px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Хлебные крошки */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
}

.breadcrumbs a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--icon-color);
    font-size: 16px;
}

.breadcrumbs .current {
    color: var(--primary-color);
    font-weight: 500;
}

/* Основная карточка */
.product-card-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

/* Галерея */
.product-gallery {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-main-image {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--input-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: opacity .2s;
}

/* Миниатюры галереи */
.gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    transition: border-color .18s, box-shadow .18s, transform .12s;
    flex-shrink: 0;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,.2);
}

.gallery-thumb.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.product-no-image-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--icon-color);
    opacity: 0.5;
}

.product-no-image-large i {
    font-size: 80px;
    margin-bottom: 15px;
}

.product-no-image-large span {
    font-size: 16px;
}

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    z-index: 10;
}

.in-stock-badge {
    background: #2ecc71;
}

.out-of-stock-badge {
    background: #e74c3c;
}

/* Информация о товаре */
.product-info-detailed {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.product-title-large {
    color: var(--text-color);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--input-bg);
    padding: 15px 20px;
    border-radius: 12px;
}

.product-meta-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.meta-label {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 14px;
}

.meta-value {
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
}

.article-value {
    color: var(--primary-color);
    font-family: monospace;
    font-size: 15px;
}

.brand-value {
    color: var(--primary-color);
}

/* Цена */
.product-price-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    padding: 25px;
    border-radius: 16px;
    color: white;
}

.product-price-large {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 15px;
}

.product-stock-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.stock-status i {
    font-size: 18px;
}

.stock-status.in-stock i {
    color: #fff;
}

.stock-status.out-of-stock i {
    color: #fff;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

/* Действия с товаром */
.product-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--input-bg);
}

.quantity-btn {
    width: 44px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-input {
    width: 60px;
    height: 50px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    background: transparent;
}

.add-to-cart-large {
    flex: 1;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-large:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.favorite-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--icon-color);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

/* Информация об оплате */
.product-payment-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 14px;
}

.payment-method i {
    color: var(--primary-color);
    font-size: 16px;
}

/* Табы */
.product-tabs {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.tabs-header {
    display: flex;
    gap: 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs-header::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 15px 0;
    background: transparent;
    border: none;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    opacity: 1;
    color: var(--primary-color);
}

.tab-btn.active {
    opacity: 1;
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Описание */
.product-description {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 16px;
}

.product-description p {
    margin-bottom: 15px;
}

/* Характеристики */
.specs-table {
    display: flex;
    flex-direction: column;
}

.spec-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.spec-name {
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 500;
}

.spec-value {
    color: var(--text-color);
    font-weight: 600;
}

/* Совместимость */
.product-compatibility h3 {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 20px;
}

.compatibility-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.compatibility-item {
    padding: 10px 15px;
    background: var(--input-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.compatibility-brand {
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 8px;
}

.compatibility-model {
    color: var(--text-color);
}

.compatibility-note {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 14px;
    font-style: italic;
}

/* Отзывы */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.reviews-header h3 {
    color: var(--text-color);
    font-size: 20px;
}

.write-review-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.write-review-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
}

.no-reviews i {
    font-size: 48px;
    color: var(--icon-color);
    opacity: 0.3;
    margin-bottom: 20px;
}

.no-reviews p {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 10px;
}

.no-reviews-sub {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 14px;
}

/* Похожие товары */
.similar-products {
    margin-bottom: 40px;
}

.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

/* Недавно просмотренные */
.recently-viewed {
    margin-bottom: 40px;
}

.recently-viewed-grid {
    margin-top: 30px;
}

.recently-viewed-placeholder {
    text-align: center;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    opacity: 0.7;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .similar-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .product-card-detailed {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-main-image {
        height: 350px;
    }
    
    .similar-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .compatibility-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-card-detailed {
        padding: 25px;
    }
    
    .product-title-large {
        font-size: 24px;
    }
    
    .product-price-large {
        font-size: 36px;
    }
    
    .product-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .product-actions {
        flex-wrap: wrap;
    }
    
    .quantity-selector {
        width: 100%;
    }
    
    .add-to-cart-large {
        flex: 0 0 100%;
    }
    
    .product-payment-info {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        gap: 14px;
        padding-bottom: 4px;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 10px 2px;
        font-size: 14px;
    }
    
    .similar-products-grid {
        grid-template-columns: 1fr;
    }
    
    .spec-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .product-main-image {
        height: 250px;
    }
    
    .product-title-large {
        font-size: 20px;
    }
    
    .product-price-large {
        font-size: 30px;
    }
    
    .breadcrumbs {
        flex-wrap: wrap;
    }
}
/* ===== СТАТУСЫ НАЛИЧИЯ ===== */
.stock-status.in-stock-high {
    color: #27ae60;
}

.stock-status.in-stock-high i {
    color: #27ae60;
}

.stock-status.coming-soon {
    color: #f39c12;
}

.stock-status.coming-soon i {
    color: #f39c12;
}

.stock-quantity {
    font-weight: 700;
    background: rgba(46, 204, 113, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
}

.stock-warning {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(243, 156, 18, 0.15);
    border-left: 3px solid #f39c12;
    border-radius: 4px;
    color: #f39c12;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-warning i {
    font-size: 16px;
}

.stock-preorder {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.15);
    border-left: 3px solid #3498db;
    border-radius: 4px;
    color: #3498db;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Кнопка предзаказа */
.add-to-cart-large.preorder-btn {
    background: #f39c12;
}

.add-to-cart-large.preorder-btn:hover {
    background: #e67e22;
}

/* Отключенная кнопка */
.add-to-cart-large.disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

.add-to-cart-large.disabled:hover {
    transform: none;
    box-shadow: none;
    background: #95a5a6;
}

/* Фильтр "В наличии" */
.filter-option.in-stock-filter {
    color: #27ae60;
    font-weight: 600;
}

.filter-option.in-stock-filter i {
    margin-right: 8px;
}

.filter-option.in-stock-filter.active {
    background: #27ae60;
    color: white;
}

/* ===== ИСПРАВЛЕНИЯ ДЛЯ СТРАНИЦЫ ТОВАРА ===== */
.product-page-container {
    max-width: 1450px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Хлебные крошки */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
}

.breadcrumbs a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--icon-color);
    font-size: 16px;
}

.breadcrumbs .current {
    color: var(--primary-color);
    font-weight: 500;
}

/* Основная карточка - ИСПРАВЛЕНО */
.product-card-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

/* Галерея */
.product-gallery {
    position: relative;
    width: 100%;
}

.product-main-image {
    position: relative;
    width: 100%;
    height: 450px;
    background: var(--input-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-main-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.product-no-image-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--icon-color);
    opacity: 0.5;
    width: 100%;
    height: 100%;
}

.product-no-image-large i {
    font-size: 80px;
    margin-bottom: 15px;
}

.product-no-image-large span {
    font-size: 16px;
}

/* Бейджи */
.product-badges-detailed {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.badge-detailed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.badge-detailed i {
    font-size: 14px;
}

.badge-success {
    background: #2ecc71;
}

.badge-warning {
    background: #f39c12;
}

.badge-danger {
    background: #e74c3c;
}

.badge-info {
    background: #3498db;
}

/* Информация о товаре - ИСПРАВЛЕНО */
.product-info-detailed {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.product-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.product-title-large {
    color: var(--text-color);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: var(--input-bg);
    padding: 20px;
    border-radius: 12px;
}

.product-meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-label {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    color: var(--text-color);
    font-weight: 600;
    font-size: 15px;
}

.article-value {
    color: var(--primary-color);
    font-family: monospace;
    font-size: 16px;
}

.brand-value {
    color: var(--primary-color);
}

/* Цена и наличие - ИСПРАВЛЕНО */
.product-price-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    padding: 25px;
    border-radius: 16px;
    color: white;
}

.product-price-large {
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 15px;
}

.product-stock-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.stock-status i {
    font-size: 18px;
}

.stock-quantity {
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 8px;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.stock-warning {
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(243, 156, 18, 0.2);
    border-left: 3px solid #f39c12;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-preorder {
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(52, 152, 219, 0.2);
    border-left: 3px solid #3498db;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Действия с товаром - ИСПРАВЛЕНО */
.product-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--input-bg);
    height: 54px;
}

.quantity-btn {
    width: 48px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-input {
    width: 70px;
    height: 54px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    background: transparent;
}

.add-to-cart-large {
    flex: 1;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 25px;
}

.add-to-cart-large:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.add-to-cart-large.preorder-btn {
    background: #f39c12;
}

.add-to-cart-large.preorder-btn:hover {
    background: #e67e22;
}

.add-to-cart-large.disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

.add-to-cart-large.disabled:hover {
    transform: none;
    box-shadow: none;
}

.favorite-btn {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--icon-color);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
    transform: translateY(-2px);
}

.favorite-btn.active {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

/* Информация об оплате */
.product-payment-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 14px;
}

.payment-method i {
    color: var(--primary-color);
    font-size: 16px;
    width: 20px;
}

/* Краткие характеристики */
.product-short-specs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 15px;
}

.short-spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
    font-size: 14px;
}

.short-spec-item i {
    color: var(--primary-color);
    font-size: 16px;
    width: 20px;
}

/* Табы - ИСПРАВЛЕНО */
.product-tabs {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.tabs-header {
    display: flex;
    gap: 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: none;
}
.tabs-header::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 15px 2px;
    background: transparent;
    border: none;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    opacity: 1;
    color: var(--primary-color);
}

.tab-btn.active {
    opacity: 1;
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Описание */
.product-description {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 16px;
}

.product-description p {
    margin-bottom: 20px;
}

.description-features {
    margin-top: 30px;
    padding: 25px;
    background: var(--input-bg);
    border-radius: 12px;
}

.description-features h3 {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 15px;
}

.description-features ul {
    list-style: none;
    padding: 0;
}

.description-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.description-features li i {
    color: #2ecc71;
    font-size: 16px;
}

/* Характеристики */
.specs-table {
    display: flex;
    flex-direction: column;
}

.spec-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.spec-name {
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 500;
}

.spec-value {
    color: var(--text-color);
    font-weight: 600;
}

.spec-value-success {
    color: #2ecc71;
    font-weight: 700;
}

.spec-value-danger {
    color: #e74c3c;
    font-weight: 700;
}

/* Совместимость */
.product-compatibility h3 {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 20px;
}

.compatibility-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.compatibility-item {
    padding: 15px;
    background: var(--input-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.compatibility-brand {
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 8px;
}

.compatibility-model {
    color: var(--text-color);
    font-weight: 600;
}

.compatibility-year {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 13px;
    margin-left: 5px;
}

.compatibility-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 8px;
    margin-bottom: 25px;
}

.compatibility-note i {
    color: var(--primary-color);
    font-size: 18px;
    margin-top: 2px;
}

.compatibility-note p {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
}

.vin-check h4 {
    color: var(--text-color);
    font-size: 16px;
    margin-bottom: 15px;
}

.vin-input-group {
    display: flex;
    gap: 10px;
}

.vin-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 15px;
}

.vin-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.vin-check-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.vin-check-btn:hover {
    background: var(--primary-hover);
}

/* Отзывы */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.reviews-header h3 {
    color: var(--text-color);
    font-size: 20px;
}

.write-review-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.write-review-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
}

.no-reviews i {
    font-size: 48px;
    color: var(--icon-color);
    opacity: 0.3;
    margin-bottom: 20px;
}

.no-reviews p {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 10px;
}

.no-reviews-sub {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 14px;
}

/* Доставка */
.delivery-info-tab {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.delivery-methods h3,
.payment-methods-tab h3 {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 20px;
}

.delivery-method-item,
.payment-method-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: var(--input-bg);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.delivery-method-item i,
.payment-method-item i {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 2px;
}

.delivery-method-content h4 {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.delivery-method-content p {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 14px;
}

.payment-method-item span {
    color: var(--text-color);
    font-size: 15px;
}

/* Похожие товары */
.similar-products {
    margin-bottom: 40px;
}

.similar-products .section-title {
    color: var(--text-color);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: left;
}

.similar-products .section-title::after {
    left: 0;
    transform: none;
}

.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .product-card-detailed {
        gap: 30px;
        padding: 30px;
    }
    
    .similar-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .product-card-detailed {
        grid-template-columns: 1fr;
    }
    
    .product-main-image {
        height: 400px;
    }
    
    .similar-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .delivery-info-tab {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-card-detailed {
        padding: 20px;
    }
    
    .product-main-image {
        height: 300px;
    }
    
    .product-title-large {
        font-size: 24px;
    }
    
    .product-meta {
        grid-template-columns: 1fr;
    }
    
    .product-price-large {
        font-size: 36px;
    }
    
    .product-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .quantity-selector {
        width: 100%;
    }
    
    .add-to-cart-large {
        width: 100%;
    }
    
    .favorite-btn {
        width: 100%;
    }
    
    .product-payment-info {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        gap: 20px;
    }
    
    .spec-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .compatibility-list {
        grid-template-columns: 1fr;
    }
    
    .vin-input-group {
        flex-direction: column;
    }
    
    .similar-products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        font-size: 12px;
    }
    
    .product-main-image {
        height: 250px;
    }
    
    .product-title-large {
        font-size: 20px;
    }
    
    .product-price-large {
        font-size: 30px;
    }
    
    .product-badges-detailed {
        left: 15px;
        top: 15px;
    }
    
    .badge-detailed {
        padding: 6px 12px;
        font-size: 12px;
    }
}
/* ===== СОРТИРОВКА В КАТАЛОГЕ ===== */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.products-count {
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.products-sort label {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 14px;
}

.sort-select {
    padding: 10px 35px 10px 15px;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e3160b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    min-width: 200px;
}

.sort-select:hover {
    border-color: var(--primary-color);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

@media (max-width: 768px) {
    .products-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-sort {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
        min-width: auto;
    }
}

/* ===== БЕЙДЖИ НА КАРТОЧКЕ ===== */
/* position:relative нужен для абсолютных бейджей,
   overflow:visible чтобы бейдж вылезал за пределы карточки.
   Разрыв рамки закрывает border-radius+overflow:hidden на .product-image */

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 20;
    max-width: calc(100% - 20px);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    width: fit-content;
    border: 1px solid rgba(255,255,255,0.3);
    line-height: 1.2;
    white-space: nowrap;
}

.badge-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-color: rgba(255,255,255,0.4);
}

.badge-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: rgba(255,255,255,0.4);
}

.badge-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: rgba(255,255,255,0.4);
}

.badge-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: rgba(255,255,255,0.4);
}

/* Для мобильных */
@media (max-width: 768px) {
    .badge {
        padding: 4px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .badge {
        padding: 3px 8px;
        font-size: 10px;
        white-space: nowrap;
    }
}

/* ===== CART TOAST ===== */
#cart-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
#cart-toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cart-toast-inner {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    font-size: 14px;
    color: var(--text-color);
    max-width: 340px;
}
.cart-toast-inner .fa-check-circle { color: #2ecc71; font-size: 20px; flex-shrink: 0; }
.cart-toast-link {
    margin-left: auto;
    white-space: nowrap;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}
.cart-toast-link:hover { color: var(--primary-hover); }

/* ===== ОБЩИЕ СТРАНИЧНЫЕ СТИЛИ ===== */
.page-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}
.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-title i { color: var(--primary-color); }
.cart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
}
.btn-primary-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}
.btn-primary-lg:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(37,99,235,0.35); }
.btn-outline-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}
.btn-outline-lg:hover { background: var(--primary-color); color: #fff; transform: translateY(-2px); }
.btn-block { width: 100%; margin-top: 12px; }
.text-green { color: #2ecc71; font-weight: 600; }

/* ===== КОРЗИНА ===== */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 25px;
    align-items: start;
}
.cart-items-col { display: flex; flex-direction: column; gap: 0; }
.cart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}
.cart-clear-btn {
    background: none;
    border: none;
    color: var(--icon-color);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: 8px;
}
.cart-clear-btn:hover { color: var(--primary-color); background: rgba(37,99,235,0.06); }
.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.25s ease;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
    width: 90px;
    height: 80px;
    background: var(--input-bg);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cart-item-no-img { color: var(--icon-color); font-size: 28px; opacity: 0.4; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 15px; font-weight: 600; color: var(--text-color); line-height: 1.4; margin-bottom: 4px; }
.cart-item-article { font-size: 12px; color: var(--icon-color); margin-bottom: 4px; }
.cart-item-price-unit { font-size: 13px; color: var(--icon-color); }
.cart-item-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 120px; }
.qty-control { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.qty-btn {
    width: 34px;
    height: 34px;
    background: var(--input-bg);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover { background: var(--primary-color); color: #fff; }
.qty-btn-disabled { opacity: 0.35; cursor: not-allowed; }
.qty-btn-disabled:hover { background: none; color: var(--icon-color); }
.qty-max-note { font-size: 11px; color: var(--icon-color); margin-top: 3px; }
.qty-val { min-width: 36px; text-align: center; font-weight: 700; font-size: 15px; color: var(--text-color); }
.cart-item-total { font-size: 17px; font-weight: 700; color: var(--text-color); }
.cart-item-remove {
    background: none;
    border: none;
    color: var(--icon-color);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 6px;
}
.cart-item-remove:hover { color: var(--primary-color); background: rgba(37,99,235,0.08); }

/* Итог */
.cart-summary-col { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.cart-summary-card { }
.cart-summary-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--text-color); }
.cart-summary-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.cart-summary-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-color); opacity: 0.8; }
.cart-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    padding-top: 14px;
    border-top: 2px solid var(--border-color);
    margin-bottom: 20px;
}
.cart-payment-icons { display: flex; gap: 10px; justify-content: center; margin-top: 16px; font-size: 28px; color: var(--icon-color); opacity: 0.7; }
.cart-perks { display: flex; flex-direction: column; gap: 12px; }
.cart-perk { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-color); }
.cart-perk i { color: var(--primary-color); width: 20px; text-align: center; font-size: 16px; }

/* Пустая корзина */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.cart-empty-icon { font-size: 80px; color: var(--icon-color); opacity: 0.25; margin-bottom: 10px; }
.cart-empty h2 { font-size: 24px; color: var(--text-color); }
.cart-empty p { color: var(--icon-color); font-size: 15px; }

/* ===== ПРОФИЛЬ ===== */
.profile-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 25px;
    align-items: start;
}
.profile-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.profile-avatar-card { text-align: center; }
.profile-avatar { font-size: 80px; color: var(--primary-color); margin-bottom: 10px; }
.profile-name { font-size: 18px; font-weight: 700; color: var(--text-color); }
.profile-email { font-size: 13px; color: var(--icon-color); margin-top: 4px; }
.profile-member-since { font-size: 12px; color: var(--icon-color); opacity: 0.7; margin-top: 4px; }
.profile-nav { display: flex; flex-direction: column; gap: 4px; }
.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}
.profile-nav-item:hover, .profile-nav-item.active {
    background: rgba(37,99,235,0.08);
    color: var(--primary-color);
}
.profile-nav-item i { width: 18px; text-align: center; }
.profile-cart-badge {
    margin-left: auto;
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.profile-main { display: flex; flex-direction: column; gap: 0; }
.profile-tab { display: none; }
.profile-tab.active { display: block; }
.profile-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-section-title i { color: var(--primary-color); }
.profile-form { display: flex; flex-direction: column; gap: 16px; }
.profile-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-form-group { display: flex; flex-direction: column; gap: 6px; }
.profile-form-group label { font-size: 13px; font-weight: 600; color: var(--text-color); opacity: 0.8; }
.profile-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}
.profile-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.profile-save-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2ecc71;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}
.profile-save-msg.error { color: var(--primary-color); }
.profile-empty { text-align: center; padding: 40px 20px; color: var(--icon-color); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.profile-empty i { font-size: 50px; opacity: 0.3; }
.profile-empty p { font-size: 14px; }

/* Заказы */
.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}
.order-row:last-child { border-bottom: none; }
.order-row-info { display: flex; flex-direction: column; gap: 3px; }
.order-number { font-weight: 700; color: var(--text-color); }
.order-date { font-size: 12px; color: var(--icon-color); }
.order-row-right { display: flex; align-items: center; gap: 16px; }
.order-total { font-weight: 700; font-size: 16px; color: var(--text-color); }
.order-status { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.order-status-pending   { background: rgba(241,196,15,0.15);  color: #d4a017; }
.order-status-confirmed { background: rgba(52,152,219,0.15);  color: #2980b9; }
.order-status-shipped   { background: rgba(155,89,182,0.15);  color: #8e44ad; }
.order-status-done      { background: rgba(46,204,113,0.15);  color: #27ae60; }
.order-status-cancelled { background: rgba(231,76,60,0.15);   color: #c0392b; }

/* ── Компактные кнопки в контексте профиля ───────────── */
/* Кнопки «Сохранить», «Добавить автомобиль», «Изменить пароль» */
#save-info-btn, #save-address-btn, #save-pass-btn, #add-car-btn {
    padding: 10px 22px;
    font-size: 13px;
    border-radius: 8px;
    margin-top: 4px;
}
/* Кнопки в пустых состояниях — маленькие и ненавязчивые */
.profile-empty .btn-primary-lg {
    padding: 7px 20px !important;
    font-size: 12px !important;
    border-radius: 20px !important;
    background: transparent !important;
    color: var(--primary-color) !important;
    border: 1.5px solid var(--primary-color) !important;
    box-shadow: none !important;
    font-weight: 600;
}
.profile-empty .btn-primary-lg:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Автомобили */
.profile-add-car { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border-color); }
/* Форма добавления авто — 3 колонки в одну строку */
.profile-add-car .profile-form-row {
    grid-template-columns: 1fr 1fr 90px;
    align-items: end;
    gap: 14px;
    margin-bottom: 0;
}
.profile-add-car .btn-primary-lg {
    margin-top: 16px;
    padding: 10px 22px;
    font-size: 13px;
    border-radius: 8px;
}
.car-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--border-color);
}
.car-row:last-child { border-bottom: none; }
.car-icon { font-size: 22px; color: var(--primary-color); }
.car-row-info { flex: 1; }
.car-name { font-weight: 600; font-size: 15px; color: var(--text-color); }
.car-year { font-size: 12px; color: var(--icon-color); display: block; margin-top: 2px; }
.car-remove-btn { background: none; border: none; color: var(--icon-color); cursor: pointer; font-size: 14px; padding: 5px 8px; border-radius: 6px; transition: var(--transition); }
.car-remove-btn:hover { color: var(--primary-color); background: rgba(37,99,235,0.08); }

/* Уведомления */
.profile-toggles { display: flex; flex-direction: column; gap: 14px; }
.profile-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
}
.profile-toggle-cb { width: 40px; height: 22px; cursor: pointer; accent-color: var(--primary-color); }

/* ===== ОФОРМЛЕНИЕ ЗАКАЗА ===== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 25px;
    align-items: start;
}
.checkout-left { display: flex; flex-direction: column; gap: 20px; }
.checkout-step { }
.checkout-step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.checkout-step-num {
    width: 34px;
    height: 34px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}
.checkout-step-header h2 { font-size: 17px; font-weight: 700; color: var(--text-color); margin: 0; }
.delivery-options { display: flex; flex-direction: column; gap: 10px; }
.delivery-option {
    display: block;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition);
}
.delivery-option input { display: none; }
.delivery-option.active, .delivery-option:hover { border-color: var(--primary-color); background: rgba(37,99,235,0.04); }
.delivery-option-inner { display: flex; align-items: center; gap: 14px; }
.delivery-option-inner i { font-size: 22px; color: var(--primary-color); width: 26px; text-align: center; }
.delivery-option-inner strong { display: block; font-size: 14px; color: var(--text-color); }
.delivery-option-inner span { font-size: 12px; color: var(--icon-color); display: block; margin-top: 2px; }
.pickup-points { display: flex; flex-direction: column; gap: 10px; }
.pickup-point {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    color: var(--text-color);
}
.pickup-point input[type="radio"] { accent-color: var(--primary-color); margin-top: 2px; flex-shrink: 0; }
.pickup-point.active-pickup {
    border-color: var(--primary-color);
    background: rgba(231,76,60,.04);
    box-shadow: 0 0 0 3px rgba(231,76,60,.1);
}
/* Fallback через :has для браузеров с поддержкой */
.pickup-point:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(231,76,60,.04);
    box-shadow: 0 0 0 3px rgba(231,76,60,.1);
}

/* Товары в сводке */
.co-items { display: flex; flex-direction: column; gap: 8px; }
.co-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.co-item-name { flex: 1; color: var(--text-color); }
.co-item-qty { color: var(--icon-color); white-space: nowrap; }
.co-item-price { font-weight: 700; white-space: nowrap; color: var(--text-color); }

.checkout-error {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    background: rgba(37,99,235,0.07);
    border-radius: 8px;
    margin-top: 10px;
}

/* Успех */
.checkout-success {
    text-align: center;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.success-icon { font-size: 90px; color: #2ecc71; margin-bottom: 10px; }
.checkout-success h2 { font-size: 30px; font-weight: 700; color: var(--text-color); }
.checkout-success p { color: var(--text-color); font-size: 16px; }
.success-sub { font-size: 13px; color: var(--icon-color); }
.success-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

.req { color: var(--primary-color); }

/* ===== СБП ПАНЕЛЬ ===== */
.sbp-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.sbp-tab {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: border-color .2s, background .2s, color .2s;
}
.sbp-tab.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}
.sbp-tab:not(.active):hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.sbp-content { }
.sbp-hint {
    text-align: center;
    font-size: 14px;
    color: var(--icon-color);
    margin-bottom: 16px;
}
.sbp-qr-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 14px;
}
.sbp-qr-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.sbp-qr-fallback {
    width: 200px;
    height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--icon-color);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}
.sbp-qr-fallback i { font-size: 50px; opacity: .3; }
.sbp-note {
    text-align: center;
    font-size: 12px;
    color: var(--icon-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.sbp-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(46,204,113,.1);
    border: 1px solid rgba(46,204,113,.3);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
}
.sbp-disclaimer i {
    color: #2ecc71;
    font-size: 16px;
    margin-top: 1px;
    flex-shrink: 0;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
    .cart-layout, .checkout-layout {
        grid-template-columns: 1fr;
    }
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-sidebar { position: static; }
    .cart-summary-col { position: static; }
}
@media (max-width: 600px) {
    .cart-item { grid-template-columns: 70px 1fr; }
    .cart-item-controls { grid-column: 1/-1; flex-direction: row; align-items: center; justify-content: space-between; }
    .profile-form-row { grid-template-columns: 1fr; }
}

/* ===== AUTH MODAL ===== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: authFadeIn .2s ease;
}
.auth-modal {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 44px 52px 40px;
    width: 100%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    animation: authSlideUp .25s ease;
}
.auth-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none; border: none;
    font-size: 18px; cursor: pointer;
    color: var(--icon-color);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s;
}
.auth-modal-close:hover { background: var(--border-color); color: var(--text-color); }
.auth-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: .5px;
}
.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding: 10px 8px;
    background: none; border: none;
    font-size: 15px; font-weight: 600;
    color: var(--icon-color);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}
.auth-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.auth-tab-content { display: none; }
.auth-tab-content.active { display: block; }
.auth-form-group { margin-bottom: 20px; }
.auth-form-group label {
    display: block;
    font-size: 14px; font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}
.auth-modal .profile-input {
    padding: 15px 18px;
    font-size: 15px;
    border-radius: 12px;
    width: 100%;
}
.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.auth-error {
    background: rgba(231,76,60,.1);
    border: 1px solid rgba(231,76,60,.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px; color: #c0392b;
    margin-bottom: 14px;
}
.auth-submit-btn { width: 100%; margin-top: 4px; }
.auth-switch-hint {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--icon-color);
}
.auth-switch-hint a { color: var(--primary-color); text-decoration: none; font-weight: 600; }
.auth-switch-hint a:hover { text-decoration: underline; }

/* ===== USER DROPDOWN ===== */
.user-dropdown-wrap { position: relative; }
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px); right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 8px;
    min-width: 210px;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    z-index: 2000;
}
.user-dropdown.open { display: block; }
.user-dropdown-name {
    padding: 8px 12px 4px;
    font-weight: 700; font-size: 14px;
    color: var(--text-color);
}
.user-dropdown-email {
    padding: 0 12px 10px;
    font-size: 12px; color: var(--icon-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px; color: var(--text-color);
    text-decoration: none;
    transition: background .15s;
}
.user-dropdown-item:hover { background: var(--input-bg); }
.user-dropdown-logout { color: #e74c3c !important; }
.user-dropdown-logout:hover { background: rgba(231,76,60,.08) !important; }

@keyframes authFadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes authSlideUp { from { transform:translateY(24px); opacity:0; } to { transform:translateY(0); opacity:1; } }

@media (max-width: 560px) {
    .auth-modal { padding: 28px 20px 24px; margin: 0 12px; border-radius: 16px; }
    .auth-form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ── Admin panel button in header ── */
.admin-panel-btn {
    position: relative;
    color: var(--primary-color) !important;
}
.admin-panel-btn i {
    animation: adminSpin 8s linear infinite;
}
@keyframes adminSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ===== AVATAR UPLOAD ===== */
.avatar-upload-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}
.avatar-upload-label {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-radius: 50%;
}
.profile-avatar-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    display: block;
}
.profile-avatar-icon {
    font-size: 88px;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}
.avatar-upload-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
    color: #fff;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
}
.avatar-upload-overlay i { font-size: 20px; }
.avatar-upload-label:hover .avatar-upload-overlay { opacity: 1; }
.avatar-upload-msg {
    font-size: 12px;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    text-align: center;
}
.avatar-upload-msg.success { background: rgba(46,204,113,.15); color: #27ae60; }
.avatar-upload-msg.error   { background: rgba(231,76,60,.12);  color: #c0392b; }

/* ===== FAVORITES GRID ===== */
.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
    padding-top: 4px;
}
.fav-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.fav-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    transform: translateY(-3px);
}
.fav-card-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    background: var(--input-bg);
    text-decoration: none;
    overflow: hidden;
    font-size: 48px;
    color: var(--border-color);
}
.fav-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fav-card-body {
    padding: 12px 14px;
    flex: 1;
}
.fav-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    margin-bottom: 4px;
}
.fav-card-name:hover { color: var(--primary-color); }
.fav-card-cat {
    font-size: 11px;
    color: var(--icon-color);
    margin-bottom: 8px;
}
.fav-card-price {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 6px;
}
.fav-card-stock {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.fav-card-stock.in  { color: #27ae60; }
.fav-card-stock.out { color: #e74c3c; }
.fav-card-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.fav-btn-go {
    flex: 1;
    text-align: center;
    font-size: 12px !important;
    padding: 7px 10px !important;
    border-radius: 8px !important;
    line-height: 1.3;
}
.fav-remove-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: none;
    cursor: pointer;
    color: var(--icon-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all .2s;
    flex-shrink: 0;
}
.fav-remove-btn:hover {
    background: rgba(231,76,60,.1);
    border-color: #e74c3c;
    color: #e74c3c;
}
@keyframes fadeFavOut {
    to { opacity: 0; transform: scale(.9); }
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT v2 — новые компоненты
═══════════════════════════════════════════════════════════════ */

/* --- Опции доставки / оплаты (.dopt) --- */
.delivery-options { display: flex; flex-direction: column; gap: 10px; }

.dopt {
    display: block;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .18s, background .18s, box-shadow .18s;
    position: relative;
    overflow: hidden;
}
.dopt input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.dopt-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
}
.dopt-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: var(--icon-color);
    flex-shrink: 0;
    transition: background .18s, color .18s;
}
.dopt-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dopt-text strong { font-size: 14px; font-weight: 600; color: var(--text-color); }
.dopt-text span   { font-size: 12px; color: var(--icon-color); }

.dopt.active {
    border-color: var(--primary-color);
    background: rgba(231,76,60,.04);
    box-shadow: 0 0 0 3px rgba(231,76,60,.1);
}
.dopt.active .dopt-icon {
    background: var(--primary-color);
    color: #fff;
}
.dopt.active .dopt-text strong { color: var(--primary-color); }
.dopt:not(.active):hover { border-color: var(--primary-color); }

/* Бейдж "единственный вариант" */
.pay-only-badge {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: var(--primary-color);
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Доп. блоки доставки --- */
.delivery-extra-block { }
.post-info-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 12px;
    color: var(--icon-color);
    margin-top: 8px;
}
.post-info-note i { color: var(--primary-color); }

/* --- Онлайн-оплата: таб СБП / Карта --- */
.pay-method-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.pay-method-tab {
    flex: 1;
    padding: 11px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    transition: border-color .18s, background .18s, color .18s;
}
.pay-method-tab.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}
.pay-method-tab:not(.active):hover { border-color: var(--primary-color); color: var(--primary-color); }

.opanel { }
.opanel-hint {
    font-size: 13px;
    color: var(--icon-color);
    margin-bottom: 12px;
    line-height: 1.5;
}
.sbp-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sbp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 12px;
    color: var(--text-color);
}
.sbp-badge i { color: #21A038; }

/* --- Визуальная карта --- */
.card-secure-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(46,204,113,.08);
    border: 1px solid rgba(46,204,113,.25);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 14px;
}
.card-secure-note i { color: #2ecc71; font-size: 15px; flex-shrink: 0; margin-top: 1px; }

.card-visual {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    padding: 20px 22px;
    color: #fff;
    position: relative;
    min-height: 150px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    font-family: 'Courier New', monospace;
}
.card-visual-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.card-visual-chip i { font-size: 28px; color: #f0c040; opacity: .9; }
.card-visual-type { font-size: 28px; color: rgba(255,255,255,.7); }
.card-visual-number {
    font-size: 18px;
    letter-spacing: 3px;
    margin-bottom: 16px;
    word-spacing: 6px;
}
.card-visual-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,.7);
}
.card-visual-bottom > div { display: flex; flex-direction: column; gap: 2px; }
.card-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; opacity: .7; }
.card-visual-bottom span:last-child { color: #fff; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════
   СБП МОДАЛЬНОЕ ОКНО
═══════════════════════════════════════════════════════════════ */
.sbp-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}
.sbp-modal {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 28px 28px 24px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
    animation: sbpModalIn .25s ease;
}
@keyframes sbpModalIn {
    from { opacity: 0; transform: scale(.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1)  translateY(0); }
}
.sbp-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--bg-secondary);
    border: none; border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; color: var(--icon-color);
    transition: background .15s, color .15s;
}
.sbp-modal-close:hover { background: var(--border-color); color: var(--text-color); }

.sbp-modal-header { text-align: center; margin-bottom: 20px; }
.sbp-modal-logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 16px; font-weight: 700; color: var(--text-color);
    margin-bottom: 6px;
}
.sbp-modal-sub { font-size: 13px; color: var(--icon-color); }

.sbp-modal-qr-area { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 16px; }
.sbp-modal-qr-wrap {
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    line-height: 0;
}
.sbp-modal-qr-wrap canvas,
.sbp-modal-qr-wrap img { display: block; border-radius: 4px; }
#sbp-qr-container { line-height: 0; }
.sbp-modal-amount {
    font-size: 22px; font-weight: 700; color: var(--text-color);
}
.sbp-modal-amount strong { color: #21A038; }

.sbp-modal-banks {
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    margin-bottom: 14px;
}
.sbp-modal-banks span {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 11px;
    font-size: 11px;
    color: var(--icon-color);
}

.sbp-modal-timer {
    text-align: center;
    font-size: 13px;
    color: var(--icon-color);
    margin-bottom: 10px;
}
.sbp-modal-timer i { color: #e67e22; }
#sbp-timer { font-weight: 700; color: #e67e22; }

.sbp-modal-note {
    display: flex; align-items: flex-start; gap: 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px; color: var(--icon-color);
    margin-bottom: 14px; line-height: 1.5;
}
.sbp-modal-note i { color: #21A038; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   КВИТАНЦИЯ ЗАКАЗА (в профиле)
═══════════════════════════════════════════════════════════════ */
.order-receipt {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--card-bg);
    transition: box-shadow .2s;
}
.order-receipt:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }

.receipt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}
.receipt-head-left { display: flex; align-items: center; gap: 12px; }
.receipt-number { font-weight: 700; font-size: 15px; color: var(--text-color); }
.receipt-date   { font-size: 13px; color: var(--icon-color); }

.receipt-items {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.receipt-items td {
    padding: 8px 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-color);
}
.receipt-items tbody tr:last-child td { border-bottom: none; }
.receipt-item-name { width: 60%; }
.receipt-item-qty  { color: var(--icon-color); text-align: center; white-space: nowrap; }
.receipt-item-price { text-align: right; font-weight: 600; white-space: nowrap; }
.receipt-total-row td {
    padding: 10px 18px;
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color) !important;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}
.receipt-total-row td:first-child { color: var(--icon-color); font-weight: 400; }
.receipt-total-row td:last-child  { text-align: right; font-size: 16px; color: var(--primary-color); }

.receipt-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0;
    border-top: 1px solid var(--border-color);
}
.receipt-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 18px;
    border-right: 1px solid var(--border-color);
}
.receipt-meta-item:last-child { border-right: none; }
.receipt-meta-item > i {
    font-size: 16px;
    color: var(--primary-color);
    margin-top: 2px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}
.receipt-meta-item > div { display: flex; flex-direction: column; gap: 2px; }
.rmeta-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--icon-color); }
.rmeta-val   { font-size: 13px; color: var(--text-color); line-height: 1.4; }
.rmeta-val small { display: block; font-size: 11px; color: var(--icon-color); }

.receipt-comment {
    padding: 10px 18px;
    font-size: 13px;
    color: var(--icon-color);
    border-top: 1px solid var(--border-color);
    display: flex; align-items: flex-start; gap: 8px;
}
.receipt-comment i { color: var(--primary-color); flex-shrink: 0; margin-top: 1px; }

/* Статусы заказов */
.order-status {
    display: inline-flex; align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px; font-weight: 600;
    white-space: nowrap;
}
.order-status-pending   { background: rgba(230,168,34,.15);  color: #b8860b; }
.order-status-confirmed { background: rgba(52,152,219,.15);  color: #1a6fa0; }
.order-status-shipped   { background: rgba(155,89,182,.15);  color: #7d3c98; }
.order-status-done      { background: rgba(46,204,113,.15);  color: #1a7a43; }
.order-status-cancelled { background: rgba(231,76,60,.15);   color: #c0392b; }

@media (max-width: 600px) {
    .receipt-meta { grid-template-columns: 1fr 1fr; }
    .receipt-meta-item { border-right: none; border-bottom: 1px solid var(--border-color); }
    .receipt-meta-item:nth-child(odd) { border-right: 1px solid var(--border-color); }
    .sbp-modal { padding: 22px 18px 18px; }
    .card-visual-number { font-size: 15px; letter-spacing: 2px; }
    .pay-method-tabs { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════
   ОТЗЫВЫ И ВОПРОСЫ — страница товара
═══════════════════════════════════════════════════════════════ */

/* Счётчик на табе */
.tab-count { font-size: 11px; font-weight: 700; color: var(--primary-color); margin-left: 2px; }

/* Сводка рейтинга */
.reviews-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.reviews-avg-num { font-size: 44px; font-weight: 800; color: var(--text-color); line-height: 1; }
.reviews-avg-stars .stars-row { font-size: 22px; color: #f59e0b; }
.reviews-avg-cnt { font-size: 13px; color: var(--icon-color); }

/* Звёзды (общее) */
.stars-row { display: inline-flex; gap: 2px; }
.stars-row i { color: #f59e0b; font-size: inherit; }

/* Форма отзыва */
.review-form-wrap {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}
.review-form-title { font-size: 15px; font-weight: 700; color: var(--text-color); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.review-form-title i { color: var(--primary-color); }
.review-form-actions { margin-top: 12px; }

/* Поля внутри форм отзывов и вопросов */
.rv-form-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
}
.review-form-wrap .profile-input,
.qa-form-wrap .profile-input {
    width: 100%;
    display: block;
    box-sizing: border-box;
}
.qa-form-wrap .profile-input {
    margin-bottom: 0;
}

.star-input-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; font-size: 14px; color: var(--text-color); }
.star-input { display: flex; gap: 4px; }
.si-star {
    background: none; border: none; cursor: pointer;
    font-size: 26px; color: #d1d5db; padding: 0;
    transition: color .15s, transform .1s;
    line-height: 1;
}
.si-star:hover, .si-star.active { color: #f59e0b; transform: scale(1.15); }
.si-star i { pointer-events: none; }
.star-hint { font-size: 13px; color: var(--icon-color); font-style: italic; }

/* Подсказка при входе */
.review-login-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 14px;
    color: var(--icon-color);
    margin-bottom: 20px;
}
.review-login-prompt i { font-size: 20px; color: var(--primary-color); flex-shrink: 0; }
.review-login-prompt a { color: var(--primary-color); font-weight: 600; }

/* Спиннер загрузки */
.rv-spinner { text-align: center; padding: 30px; color: var(--icon-color); font-size: 14px; }
.rv-spinner i { font-size: 22px; display: block; margin-bottom: 8px; }

/* Пустое состояние */
.rv-empty-block {
    text-align: center;
    padding: 40px 20px;
    color: var(--icon-color);
}
.rv-empty-block i { font-size: 40px; opacity: .3; display: block; margin-bottom: 12px; }

/* Inline сообщение */
.rv-inline-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
}
.rv-inline-msg.ok  { background: rgba(46,204,113,.1);  color: #1a7a43; border: 1px solid rgba(46,204,113,.3);  }
.rv-inline-msg.err { background: rgba(231,76,60,.08);  color: #c0392b; border: 1px solid rgba(231,76,60,.2);   }

/* Карточка отзыва */
.rv-item {
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
}
.rv-item:last-child { border-bottom: none; }
.rv-item-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}
.rvi-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #c0392b);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.rvi-meta { flex: 1; }
.rvi-name { font-weight: 600; font-size: 14px; color: var(--text-color); display: block; }
.rvi-date { font-size: 12px; color: var(--icon-color); }
.rvi-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.rvi-right .stars-row { font-size: 14px; }

.rvi-title { font-weight: 600; font-size: 14px; color: var(--text-color); margin-bottom: 5px; }
.rvi-body  { font-size: 14px; color: var(--text-color); line-height: 1.6; margin-bottom: 10px; }

.rvi-admin-reply {
    background: rgba(231,76,60,.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
}
.rvi-admin-label {
    font-size: 11px; font-weight: 700; color: var(--primary-color);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px;
    display: flex; align-items: center; gap: 5px;
}

.rvi-del-btn {
    background: none; border: none; cursor: pointer;
    color: var(--icon-color); font-size: 13px; padding: 4px;
    border-radius: 4px; transition: color .15s;
}
.rvi-del-btn:hover { color: var(--primary-color); }

/* ── Q&A ────────────────────────────────────────── */
.product-qa { }
.qa-form-wrap {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}
.qa-item {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}
.qa-item:last-child { border-bottom: none; }
.qa-question, .qa-answer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.qa-q-icon, .qa-a-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.qa-q-icon { background: #fef3c7; color: #d97706; }
.qa-a-icon { background: rgba(231,76,60,.1); color: var(--primary-color); }
.qa-q-body, .qa-a-body { flex: 1; }
.qa-q-text { font-size: 14px; font-weight: 600; color: var(--text-color); line-height: 1.5; margin-bottom: 4px; }
.qa-q-meta { font-size: 12px; color: var(--icon-color); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.qa-a-label { font-size: 11px; font-weight: 700; color: var(--primary-color); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.qa-answer { margin-top: 10px; margin-left: 44px; }
.qa-pending { margin-top: 8px; margin-left: 44px; font-size: 12px; color: var(--icon-color); font-style: italic; }

/* ═══════════════════════════════════════════════════════════════
   ПРОФИЛЬ — вкладка «Мои отзывы»
═══════════════════════════════════════════════════════════════ */
.profile-rv-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: box-shadow .18s;
}
.profile-rv-card:hover { box-shadow: 0 3px 14px rgba(0,0,0,.07); }
.prv-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.prv-product {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text-color);
    font-size: 13px; font-weight: 600;
}
.prv-product img {
    width: 40px; height: 40px; object-fit: cover;
    border-radius: 6px; border: 1px solid var(--border-color);
}
.prv-product i { font-size: 22px; color: var(--icon-color); }
.prv-product:hover span { text-decoration: underline; color: var(--primary-color); }
.prv-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prv-stars .stars-row { font-size: 13px; }
.prv-date { font-size: 12px; color: var(--icon-color); }

.rv-status-badge {
    display: inline-flex; align-items: center;
    padding: 2px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
}
.rv-badge-approved { background: rgba(46,204,113,.12); color: #1a7a43; }
.rv-badge-rejected { background: rgba(231,76,60,.1);   color: #c0392b; }
.rv-badge-open     { background: rgba(245,158,11,.12); color: #b45309; }
.rv-badge-answered { background: rgba(46,204,113,.12); color: #1a7a43; }
.rv-badge-new      { background: rgba(245,158,11,.12); color: #b45309; }
.rv-badge-read     { background: rgba(100,116,139,.1); color: #64748b; }
.rv-badge-replied  { background: rgba(46,204,113,.12); color: #1a7a43; }

.prv-title { font-weight: 600; font-size: 14px; color: var(--text-color); margin-bottom: 5px; }
.prv-body  { font-size: 13px; color: var(--text-color); line-height: 1.6; margin-bottom: 10px; }
.prv-admin-reply {
    background: rgba(231,76,60,.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 10px;
}
.prv-admin-label {
    font-size: 11px; font-weight: 700; color: var(--primary-color);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px;
    display: flex; align-items: center; gap: 5px;
}
.prv-pending { font-size: 12px; color: var(--icon-color); font-style: italic; margin-bottom: 10px; }
.prv-actions { display: flex; gap: 8px; }

.profile-btn-sm {
    padding: 6px 12px;
    border-radius: 7px;
    border: 1.5px solid;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex; align-items: center; gap: 5px;
    transition: .15s;
    background: transparent;
}
.profile-btn-danger {
    border-color: #ef4444;
    color: #ef4444;
}
.profile-btn-danger:hover { background: #ef4444; color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   КОНТАКТНАЯ СТРАНИЦА
═══════════════════════════════════════════════════════════════ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
.contact-sub { font-size: 14px; color: var(--icon-color); margin-bottom: 20px; line-height: 1.5; }
.contact-info-list { display: flex; flex-direction: column; gap: 18px; }
.contact-info-item { display: flex; align-items: flex-start; gap: 14px; }
.ci-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(231,76,60,.1); color: var(--primary-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.ci-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--icon-color); margin-bottom: 3px; }
.ci-val   { font-size: 14px; font-weight: 600; color: var(--text-color); text-decoration: none; display: block; }
.ci-val:hover { color: var(--primary-color); }
.ci-hint  { font-size: 12px; color: var(--icon-color); }

.contact-messengers { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.messenger-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px;
    font-size: 14px; font-weight: 600; text-decoration: none;
    transition: .18s; flex: 1; justify-content: center;
}
.messenger-tg { background: #2196F3; color: #fff; }
.messenger-tg:hover { background: #1565C0; }
.messenger-wa { background: #4CAF50; color: #fff; }
.messenger-wa:hover { background: #2E7D32; }

@media (max-width: 800px) {
    .contact-layout { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════════════ */
.hero-section {
    max-width: 1000px;
    margin: 30px auto 0;
    padding: 0 20px;
}
.hero-inner {
    background: var(--card-bg);
    border-radius: 22px;
    padding: 44px 52px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-bg-icons {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 24px;
    pointer-events: none;
    align-items: center;
}

.hero-bg-icons i {
    font-size: 80px;
    color: var(--primary-color);
    opacity: 0.06;
}
.hero-title {
    font-size: 34px;
    font-weight: 900;
    color: var(--text-color);
    line-height: 1.2;
    margin: 0 0 12px;
}
.hero-subtitle {
    font-size: 15px;
    color: var(--icon-color);
    line-height: 1.6;
    margin: 0 0 32px;
    max-width: 520px;
}
.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 36px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 40px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(37,99,235,.25);
}
.hero-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,.35);
    color: #fff;
}
.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    background: transparent;
    color: var(--primary-color);
    border-radius: 40px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
}
.hero-btn-secondary:hover {
    background: rgba(37,99,235,.08);
    transform: translateY(-2px);
    color: var(--primary-color);
}
@media (max-width: 600px) {
    .hero-inner    { padding: 28px 22px; }
    .hero-title    { font-size: 24px; }
    .hero-subtitle { font-size: 14px; margin-bottom: 24px; }
    .hero-btn-primary, .hero-btn-secondary { padding: 13px 22px; font-size: 15px; flex: 1; justify-content: center; }
}

/* ── О нас ───────────────────────────────────────────────────────────────── */
.about-section {
    padding: 64px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
}
.about-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch; /* было: center — из-за этого высоты "плавали" */
    box-sizing: border-box;
}
.about-text { min-width: 0; }
.about-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 12px;
}
.about-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-color);
    margin-bottom: 16px;
}
.about-desc {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.about-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.about-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.about-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--page-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    min-height: 76px;          /* фикс — высота не плавает */
}
.about-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.about-feature-title { font-size: 14px; font-weight: 700; color: var(--text-color); }
.about-feature-desc  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Стабильный скроллбар (страница не "прыгает" при переключении темы) */
html { scrollbar-gutter: stable; }

@media (max-width: 768px) {
    .about-inner { grid-template-columns: 1fr; gap: 32px; }
    .about-title { font-size: 22px; }
}

body.theme-dark .about-title        { color: #f1f5f9; }
body.theme-dark .about-desc         { color: #94a3b8; }
body.theme-dark .about-label        { color: #60a5fa; }
body.theme-dark .about-feature-title { color: #f1f5f9; }
body.theme-dark .about-feature-desc  { color: #94a3b8; }
body.theme-dark .about-feature       { border-color: #4b5563; } 
/* ═══════════════════════════════════════════════════════════════
   APP SECTION (статический блок на главной)
═══════════════════════════════════════════════════════════════ */
.app-section {
    max-width: 1000px;
    margin: 20px auto 0;
    padding: 0 20px;
}
.app-section-inner {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 22px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}
.app-section-icon {
    flex-shrink: 0;
    width: 52px; height: 52px;
    border-radius: 14px;
    overflow: hidden;
}
.app-section-logo { width: 52px; height: 52px; object-fit: cover; display: block; }
.app-section-logo-dark  { display: none; }
body.theme-dark .app-section-logo-light { display: none; }
body.theme-dark .app-section-logo-dark  { display: block; }
.app-section-text {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.app-section-text strong {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-color);
}
.app-section-text span {
    font-size: 13px;
    color: var(--icon-color);
    line-height: 1.45;
}
.app-section-btns {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    white-space: nowrap;
}
.app-store-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.app-store-btn i    { font-size: 20px; }
.app-store-btn span { display: flex; flex-direction: column; line-height: 1.2; }
.app-store-btn small{ font-size: 10px; font-weight: 400; opacity: .85; }
@media (max-width: 640px) {
    .app-section-inner { padding: 18px 18px; gap: 14px; }
    .app-section-text  { min-width: 0; }
    .app-store-btn     { flex: 1; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════
   FORM VALIDATION STYLES
═══════════════════════════════════════════════════════════════ */
.profile-input.input-error {
    border-color: #2563eb !important;
    background: rgba(37,99,235,.05) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.profile-input.input-ok {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34,197,94,.12);
}
.field-error-msg {
    font-size: 12px;
    color: #2563eb;
    margin-top: 4px;
    display: none;
    align-items: center;
    gap: 4px;
}
.field-error-msg.visible {
    display: flex;
}
.auth-input-wrap { position: relative; }
.auth-input.input-error {
    border-color: #2563eb !important;
    background: rgba(37,99,235,.05) !important;
}

/* ═══════════════════════════════════════════════════════════════
   CATALOG LAYOUT WITH CATEGORIES
═══════════════════════════════════════════════════════════════ */
.catalog-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.catalog-cats {
    flex: 0 0 220px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 90px;
}
.cats-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: background .15s;
    margin-bottom: 2px;
}
.cat-item:hover  { background: var(--hover-bg); }
.cat-item.active { background: rgba(37,99,235,.1); color: var(--primary-color); font-weight: 600; }
.cat-item i      { font-size: 11px; opacity: .6; }

@media (max-width: 768px) {
    .catalog-layout { flex-direction: column; }
    .catalog-cats   { flex: none; width: 100%; position: static; }
    .catalog-cats .cat-item { display: inline-flex; margin: 2px; }
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT: PROMO
═══════════════════════════════════════════════════════════════ */
.promo-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.promo-input   { flex: 1; text-transform: uppercase; letter-spacing: 1px; }
.promo-check-btn { white-space: nowrap; }
.promo-result  {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}
.promo-loading { background: rgba(0,0,0,.05); color: var(--text-secondary); }
.promo-ok      { background: rgba(16,185,129,.1); color: #059669; }
.promo-err     { background: rgba(239,68,68,.08); color: #dc2626; }
.promo-note    {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(37,99,235,.08);
    border-radius: 8px;
    font-size: 13px;
    color: var(--primary-color);
    line-height: 1.5;
}
.field-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ── Тёмная тема: фикс черного текста в формах/модалках/категориях ──────── */
body.theme-dark .cat-item,
body.theme-dark .cats-title,
body.theme-dark .auth-modal label,
body.theme-dark .auth-form-group label,
body.theme-dark .auth-modal p,
body.theme-dark .auth-logo,
body.theme-dark .profile-form-group label,
body.theme-dark .cart-card label,
body.theme-dark .checkout-step label,
body.theme-dark .cart-summary-title {
    color: #f1f5f9 !important;
}

body.theme-dark .field-hint,
body.theme-dark .auth-modal p,
body.theme-dark .auth-modal .text-muted {
    color: #cbd5e1 !important;
}

body.theme-dark .profile-input,
body.theme-dark .auth-modal .profile-input {
    color: #f1f5f9;
    background: #1f1f1f;
    border-color: #444;
}
body.theme-dark .profile-input::placeholder {
    color: #6b7280;
}