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

/* Общая палитра: светлая и тёмная темы гармонично */
:root {
    --accent: #d5e300;
    --accent-hover: #b8c900;
    --accent-muted: #e9f7d0;
    --accent-on-dark: #d5e300;
    --bg-body: #f5f5f5;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f8f9fa;
    --text-primary: #313131;
    --text-secondary: #333333;
    --text-muted: #777777;
    --header-bg: #313131;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    color-scheme: dark;
    --accent: #d5e300;
    --accent-hover: #c4d000;
    --accent-muted: rgba(213, 227, 0, 0.15);
    --accent-on-dark: #d5e300;
    --bg-body: #0d0f12;
    --bg-body-end: #12151a;
    --bg-surface: rgba(22, 26, 32, 0.95);
    --bg-surface-elevated: rgba(32, 36, 44, 0.95);
    --bg-header: #0a0c0e;
    --text-primary: #f0f2f5;
    --text-secondary: #e4e6eb;
    --text-muted: #9ca3af;
    --text-muted-2: #b0b3b8;
    --text-soft: #c8ccd4;
    --header-bg: #0d0f12;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-strong: rgba(0, 0, 0, 0.45);
}

body {
    background-color: var(--bg-body);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}
a{
    text-decoration: none;
}
.user > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
    background-color: var(--accent);
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}
.user > .user-dropdown{
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
    background-color: var(--accent);
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}


.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}
/* Стили для заголовков и текста */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 700;
}
p {

    margin-bottom: 15px;
}
.highlight {
    color: var(--accent);
}
.accent-bg {
    background-color: var(--accent);
    color: var(--text-primary);
}
.dark-bg {
    background-color: var(--header-bg);
    color: #ffffff;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    
}
/* Шапка сайта (только верхняя, не любой <header> в контенте) */
body > header {
    background: linear-gradient(135deg, #2b2b2b 0%, #171717 100%);
    width: 100%;
    color: #ffffff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* В светлой теме делаем шапку непрозрачной, чтобы не было "засвета" */
.header-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: start;
    justify-content: space-between;
    position: relative;
    
    
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
}
.logo-icon {
    color: var(--accent);
    margin-right: 10px;
    font-size: 28px;
}
.logo-text {
    color: #ffffff;
}
.logo-text a {
    color: inherit;
}
.logo .highlight {
    color: var(--accent);
}
.user-dropdown {
    position: relative;
    display: inline-block;
}
nav ul {
    display: flex;
    list-style: none;
}
nav ul li {
    margin-left: 30px;
}
nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
nav ul li a:hover {
    color: var(--accent);
}
.cart-icon, .wishlist-icon {
    position: relative;
    margin-left: 30px;
}
.cart-icon a, .wishlist-icon a {
    justify-content: flex-start;
    min-width: auto;
    padding: 0;
}
.cart-count, .wishlist-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: var(--accent);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cart-count.visible, .wishlist-count.visible {
    display: inline-flex;
}
/* Герой секция */
.hero {
    background: linear-gradient(to right, var(--header-bg) 0%, var(--header-bg) 50%, var(--accent) 50%, var(--accent) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}
.hero-content {
    flex: 1;
    padding-right: 40px;
}
.hero-title {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
}
.hero-title .highlight {
    color: var(--accent);
}
.hero-text {
    font-size: 18px;
    margin-bottom: 30px;
    color: #cccccc;
    max-width: 600px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}
.hero-actions .btn {
    flex: 0 1 auto;
    min-width: min(100%, 200px);
}
.btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--text-primary);
    padding: 14px 32px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow-strong);
}
.btn-dark {
    background-color: var(--header-bg);
    color: #ffffff;
}
.btn-dark:hover {
    background-color: #252525;
}
.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
    padding: 12px 28px;
}
.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.hero-image {
    flex: 1;
    text-align: center;
    position: relative;
}
.hero-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.5s;
}
.hero-image:hover img {
    transform: perspective(1000px) rotateY(0deg);
}
/* Секция с категориями фигурок */
.categories {
    padding: 80px 0;
    background-color: #ffffff;
}
.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    position: relative;
}
.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent);
    margin: 15px auto 0;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}
.category-card {
    position: relative;
    background: radial-gradient(circle at top left, rgba(213, 227, 0, 0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.04), transparent 60%),
                #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(213, 227, 0, 0.0);
    pointer-events: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.category-card:hover::before {
    border-color: rgba(213, 227, 0, 0.6);
    box-shadow: 0 0 0 1px rgba(213, 227, 0, 0.25);
}
.category-icon {
    padding: 28px;
    text-align: center;
    color: var(--accent);
    font-size: 42px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-icon i {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
}
.category-content {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.category-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}
.category-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.category-content .btn {
    width: 100%;
    font-size: 14px;
    padding: 10px 18px;
    margin-top: auto;
}
/* Секция с популярными фигурками */
.featured-products {
    padding: 80px 0;
    background-color: #f8f9fa;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Популярные фигурки: 2 карточки в ряд на планшетах и телефонах (2x2 для 4 товаров) */
@media (max-width: 992px) {
    .featured-products .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.product-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
}
.product-image {
    height: 200px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 60px;
    position: relative;
    overflow: hidden;
}
.product-image > img {
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}
.product-image i {
    z-index: 2;
}
.product-age-rating {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    z-index: 2;
}
.product-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.product-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}
.product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}
.product-price .highlight {
    color: var(--accent);
}
.featured-products .product-content .btn {
    margin-top: auto;
}
.rating {
    color: #ffc107;
    margin-bottom: 15px;
}
.material-tag {
    display: inline-block;
    background-color: var(--accent-muted);
    color: #5a6e07;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 10px;
}
.size-info {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.size-info i {
    margin-right: 8px;
    color: var(--accent);
}
/* Секция преимуществ — сдержанные карточки, акцент слева */
.benefits {
    padding: 76px 0 88px;
    background: #f5f5f3;
}
.benefits-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px 32px;
    align-items: start;
    max-width: 1080px;
    margin: 0 auto 44px;
    padding: 0 4px;
    text-align: left;
    position: static;
}
.benefits-intro-mark {
    width: 4px;
    min-height: 4.5rem;
    margin-top: 0.2em;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent, #d5e300) 0%, rgba(213, 227, 0, 0.45) 100%);
    flex-shrink: 0;
}
.benefits-intro-copy {
    min-width: 0;
}
.benefits-heading {
    margin: 0 0 12px;
    font-size: clamp(1.625rem, 3.2vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.18;
    color: var(--text-primary, #141414);
}
.benefits-lead {
    margin: 0;
    max-width: 34rem;
    font-size: 15px;
    line-height: 1.62;
    color: #636363;
    font-weight: 400;
}
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 1080px;
    margin: 0 auto;
    align-items: stretch;
}
.benefit-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
    padding: 26px 22px 26px 20px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-left: 3px solid var(--accent, #d5e300);
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}
.benefit-card:hover {
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.08);
    border-left-color: var(--accent-hover, #c4d000);
}
.benefit-card .benefit-icon {
    width: 46px;
    height: 46px;
    margin: 2px 0 0;
    border-radius: 11px;
    background: #ecece8;
    color: #353535;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}
.benefit-card-body {
    min-width: 0;
}
.benefit-card-title {
    margin: 0 0 8px;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.28;
}
.benefit-card-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.62;
    color: #5a5a5a;
}
@media (max-width: 900px) and (min-width: 641px) {
    .benefits-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 720px;
        margin: 0 auto;
    }
}
@media (max-width: 640px) {
    .benefits-intro {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 32px;
    }
    .benefits-intro-mark {
        width: 36px;
        min-height: 3px;
        height: 3px;
        margin-top: 0;
    }
    .benefits-heading {
        font-size: 1.45rem;
    }
    .benefits-grid {
        grid-template-columns: 1fr;
        max-width: 28rem;
        margin: 0 auto;
    }
    .benefit-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px 26px;
        border-left: 1px solid rgba(0, 0, 0, 0.07);
        border-top: 3px solid var(--accent, #d5e300);
    }
    .benefit-card .benefit-icon {
        margin: 0 0 4px;
    }
    [data-theme="dark"] .benefit-card {
        border-left-color: var(--border);
        border-top-color: var(--accent);
    }
    [data-theme="dark"] .benefit-card:hover {
        border-left-color: var(--border-strong);
        border-top-color: var(--accent-hover);
    }
}
/* Секция персонализации */
.customization {
    padding: 80px 0;
    background-color: #f8f9fa;
    overflow-x: hidden;
    max-width: 100%;
}
.customization-content {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: start;
    gap: 48px 40px;
    margin-bottom: 24px;
    min-width: 0;
    width: 100%;
}
.customization-text {
    min-width: 0;
    max-width: 100%;
}
.customization-lead-title {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    margin: 0 0 16px;
    line-height: 1.25;
    color: var(--text-primary, #1a1a1a);
}
.customization-lead {
    font-size: 17px;
    line-height: 1.6;
    color: #444;
    margin: 0 0 28px;
    max-width: 52em;
}
.customization-paths {
    display: grid;
    /* min(100%, 240px): колонка не шире контейнера — иначе на телефоне сетка вылезает */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
    margin-bottom: 32px;
    list-style: none;
    padding: 0;
    min-width: 0;
}
.customization-path-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px 20px 18px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
}
.customization-path-card:hover {
    border-color: rgba(213, 227, 0, 0.55);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.customization-path-card:focus-visible {
    outline: 2px solid var(--accent, #d5e300);
    outline-offset: 2px;
}
.customization-path-card-secondary {
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}
.customization-path-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(213, 227, 0, 0.25);
    color: #3d3d00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 4px;
}
.customization-path-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary, #1a1a1a);
}
.customization-path-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    flex: 1;
    min-width: 0;
    align-self: stretch;
}
.customization-path-cta {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-hover, #b8c400);
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 100%;
}
.customization-path-card:hover .customization-path-cta {
    color: var(--text-primary, #1a1a1a);
}
.customization-subheading {
    font-size: 1.1rem;
    margin: 0 0 14px;
    color: var(--text-primary, #1a1a1a);
}
.customization-features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    gap: 12px;
}
.customization-feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}
.customization-feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(213, 227, 0, 0.2);
    color: #4a4a00;
    display: flex;
    align-items: center;
    justify-content: center;
}
.customization-feature-text {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}
.customization-materials-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    margin: 0 0 8px;
}
.customization-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.customization-material-chip {
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.customization-material-chip:hover {
    border-color: rgba(213, 227, 0, 0.6);
}
.customization-material-chip--active {
    background: rgba(213, 227, 0, 0.35);
    border-color: rgba(213, 227, 0, 0.85);
    color: #1a1a1a;
}
.customization-material-chip:focus-visible {
    outline: 2px solid var(--accent, #d5e300);
    outline-offset: 2px;
}
.customization-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 20px;
}
.customization-extra-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
    user-select: none;
}
.customization-extra-check {
    width: 18px;
    height: 18px;
    accent-color: var(--accent, #d5e300);
    cursor: pointer;
}
.customization-interactive {
    display: grid;
    gap: 20px;
    margin-bottom: 28px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}
.customization-palette-label,
.customization-size-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text-primary, #1a1a1a);
}
.customization-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    min-width: 0;
    padding: 4px;
    margin-left: -4px;
    margin-right: -4px;
    box-sizing: border-box;
}
.customization-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.customization-swatch:hover {
    transform: scale(1.08);
}
.customization-swatch:focus-visible {
    outline: 2px solid var(--accent, #d5e300);
    outline-offset: 2px;
}
.customization-swatch[aria-pressed="true"] {
    border-color: #313131;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(49, 49, 49, 0.35);
}
.customization-swatch-hint {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: break-word;
}
.customization-palette-block,
.customization-size-block {
    min-width: 0;
    max-width: 100%;
}
.customization-size-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    min-width: 0;
}
.customization-size-range {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 6px;
    accent-color: var(--accent, #d5e300);
    cursor: pointer;
}
.customization-size-output {
    font-weight: 700;
    font-size: 1rem;
    min-width: 3.5em;
    flex-shrink: 0;
    color: var(--text-primary, #1a1a1a);
}
.customization-size-help {
    font-size: 12px;
    color: #777;
    margin: 8px 0 0;
    line-height: 1.4;
}
.customization-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}
.customization-btn-secondary {
    font-weight: 600;
}
.customization-aside {
    position: sticky;
    top: 100px;
    min-width: 0;
    max-width: 100%;
}
.customization-visual {
    margin: 0 0 24px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
}
.customization-visual img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.customization-visual figcaption {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}
.customization-process {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
}
.customization-process li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 14px;
    line-height: 1.45;
    min-width: 0;
}
.customization-process li > div {
    min-width: 0;
    flex: 1;
    overflow-wrap: break-word;
    word-break: break-word;
}
.customization-process li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.customization-process-step {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent, #d5e300);
    color: var(--text-primary, #1a1a1a);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.customization-process strong {
    display: block;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 2px;
}
.customization-process span:not(.customization-process-step) {
    color: #666;
    font-size: 13px;
}
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}
.color-option:hover {
    transform: scale(1.2);
}
.color-option.active {
    border-color: #313131;
}
/* Футер */
footer {
    background:
        radial-gradient(900px 300px at 18% -10%, rgba(213, 227, 0, 0.10) 0%, rgba(213, 227, 0, 0.0) 62%),
        radial-gradient(700px 260px at 85% 0%, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.0) 66%),
        linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    color: #ffffff;
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-column h3 {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}
.footer-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #d5e300;
}
.footer-column ul {
    list-style: none;
}
.footer-column ul li {
    margin-bottom: 12px;
}
.footer-column ul li a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-column ul li a:hover {
    color: #d5e300;
}

/* Категории в футере: подгружаются динамически, ссылки на каталог с категорией */
.footer-column-categories .footer-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-column-categories .footer-category-item {
    margin: 0;
}
.footer-column-categories .footer-category-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}
.footer-column-categories .footer-category-item a:hover {
    background: rgba(213, 227, 0, 0.2);
    color: #d5e300;
}
.footer-column-categories .footer-category-personalization a {
    background: rgba(213, 227, 0, 0.15);
    color: #d5e300;
}
.footer-column-categories .footer-category-personalization a:hover {
    background: rgba(213, 227, 0, 0.25);
}
.footer-category-loading {
    color: #999;
    font-size: 14px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 24px;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 14px;
}
.footer-links a:hover {
    color: #d5e300;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.58);
    font-size: 14px;
}
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease;
}
.social-links a:hover {
    background-color: #d5e300;
    color: #313131;
    transform: translateY(-2px);
}

/* Зелёный чекбокс выбора ПВЗ с большой галочкой */
.widget__location-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}
.widget__location-checkbox-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.widget__location-checkbox-label {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #4CAF50;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    transition: all 0.2s ease;
    overflow: visible;
}
.widget__location-checkbox-label::after {
    content: '✓';
    font-size: 20px; /* больше самого квадрата */
    line-height: 1;
    color: transparent;
    transform: translateY(-1px);
    transition: color 0.2s ease;
}
.widget__location-checkbox-input:checked + .widget__location-checkbox-label {
    background-color: #4CAF50;
    border-color: #4CAF50;
}
.widget__location-checkbox-input:checked + .widget__location-checkbox-label::after {
    color: #ffffff;
}
/* Анимация появления фигурок */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
.floating {
    animation: float 3s ease-in-out infinite;
}
/* Стили для кнопки бургер-меню */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}
.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #d5e300;
    border-radius: 3px;
    transition: all 0.3s ease;
}
/* Анимация при активном состоянии (иконка → крестик) */
.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}
/* Затемнение фона при открытом меню */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* Адаптивность */
@media (max-width: 992px) {
    
    .color-options{
        justify-content: center;
    }
    .hero {
        background: linear-gradient(165deg, var(--header-bg) 0%, var(--header-bg) 42%, #2a2a2a 55%, var(--accent) 100%);
    }
    .hero-container {
        flex-direction: column;
        background-color: #252525;
        border-radius: 12px;
        padding: 8px 0 4px;
    }
    .customization-content {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .customization-aside {
        position: static;
    }
    .category-grid{
        /* Категории: 2 карточки в ряд */
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
    .hero-content, .customization-text {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
        
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .customization-lead-title {
        font-size: 1.5rem;
    }
}
@media (max-width: 900px) {
    .logol{
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    .burger-menu {
        display: flex;
    }
    /* Панель навигации (выезжает справа) */
    .dropdown-menu {
    display: none;
    position: absolute;
    top: unset;
    bottom: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
    }
    .header-container {
        flex-direction: column;
        position: relative;
    }
    
    /* Навигация — выезжающая панель */
    body > header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
        z-index: 999;
        padding: 90px 28px 28px;
        padding-top: calc(90px + env(safe-area-inset-top, 0px));
        padding-bottom: 220px; /* место под блок .user внизу */
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
        border-left: 1px solid rgba(213, 227, 0, 0.15);
    }
    
    nav.show {
        right: 0;
    }
    
    nav.hide {
        right: -100%;
    }
    
    /* Стили для пунктов меню */
    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 8px;
    }
    
    nav ul li {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    body > header nav ul li a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 16px 0 16px 12px;
        color: rgba(255, 255, 255, 0.92);
        text-decoration: none;
        font-weight: 500;
        font-size: 1.05rem;
        letter-spacing: 0.02em;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        transition: color 0.25s ease, padding-left 0.25s ease, background-color 0.2s ease;
        border-left: 3px solid transparent;
        margin-left: -12px;
        padding-left: 12px;
    }
    body > header nav ul li a i {
        width: 20px;
        text-align: center;
        opacity: 0.9;
    }
    
    nav ul li a:hover {
        color: #d5e300;
        padding-left: 16px;
        background-color: rgba(213, 227, 0, 0.06);
        border-left-color: #d5e300;
    }
    
    .cart-icon, .wishlist-icon {
        margin-left: 0 !important;
        position: relative;
        display: flex;
        align-items: center;
    }
    .cart-icon a, .wishlist-icon a {
        display: inline-flex !important;
        flex: 1;
        align-items: center;
        gap: 10px;
        padding: 16px 0 16px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        margin-left: -12px;
        padding-left: 12px;
        border-left: 3px solid transparent;
        transition: color 0.25s ease, padding-left 0.25s ease, background-color 0.2s ease;
    }
    .cart-icon a:hover, .wishlist-icon a:hover {
        padding-left: 16px;
        background-color: rgba(213, 227, 0, 0.06);
        border-left-color: #d5e300;
    }
    .cart-icon .cart-count, .wishlist-icon .wishlist-count {
        position: static;
        margin-left: 6px;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        font-size: 11px;
        flex-shrink: 0;
    }
    
    /* Блок пользователя в выезжающем меню (только header, не .support-message-row.user) */
    body > header .user {
        position: fixed;
        bottom: 0;
        right: -100%;
        width: min(320px, 85vw);
        max-width: 320px;
        background: linear-gradient(0deg, #252525 0%, #1f1f1f 100%);
        padding: 20px 28px 28px;
        padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
        z-index: 1000;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    }
    
    body > header .user.show {
        right: 0;
    }
    
    body > header .user.hide {
        right: -100%;
    }
    
    /* Одна ссылка без dropdown — весь блок как кнопка */
    body > header .user > a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
        padding: 14px 20px;
        background-color: #d5e300;
        color: #1a1a1a;
        font-weight: 600;
        font-size: 1rem;
        border-radius: 8px;
        text-decoration: none;
        transition: background-color 0.2s ease, transform 0.2s ease;
        box-sizing: border-box;
    }
    .user > a:hover {
        background-color: #c4d000;
        transform: translateY(-1px);
    }
    
    /* Мобильное подменю профиля: по умолчанию скрыто, открывается по нажатию на строку с именем */
    body > header .user .user-dropdown .dropdown-menu {
        display: none !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        min-width: unset !important;
        width: 100%;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        border-radius: 0;
        border: none;
        opacity: 0;
        pointer-events: none;
        transition: margin-top 0.2s ease, max-height 0.28s ease, opacity 0.2s ease;
    }
    body > header .user .user-dropdown--mobile-open .dropdown-menu {
        display: block !important;
        margin-top: 12px;
        max-height: 480px;
        opacity: 1;
        pointer-events: auto;
        overflow: visible;
    }

    /* Свернута: одна «кнопка» как у «Вход»; развернута: акцентная строка + список */
    body > header .user .user-dropdown .user-link {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        min-height: 48px;
        padding: 14px 40px 14px 20px;
        box-sizing: border-box;
        border-radius: 8px;
        font-weight: 600;
        font-size: 1rem;
        text-decoration: none;
        transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
        position: relative;
        background-color: #d5e300;
        color: #1a1a1a;
    }
    body > header .user .user-dropdown .user-link::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        right: 16px;
        font-size: 0.75rem;
        opacity: 0.85;
        transition: transform 0.2s ease;
    }
    body > header .user .user-dropdown--mobile-open .user-link {
        justify-content: flex-start;
        padding: 12px 40px 12px 14px;
        min-height: unset;
        background: rgba(213, 227, 0, 0.12);
        color: #d5e300;
    }
    body > header .user .user-dropdown--mobile-open .user-link::after {
        transform: rotate(180deg);
    }
    body > header .user .user-dropdown .user-link i {
        font-size: 1.25rem;
        opacity: 0.95;
    }
    body > header .user .user-dropdown .user-link:hover {
        filter: brightness(1.03);
    }
    body > header .user .user-dropdown--mobile-open .user-link:hover {
        background: rgba(213, 227, 0, 0.18);
        color: #e5f000;
    }
    
    body > header .user .dropdown-menu a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px 12px 16px;
        color: rgba(255, 255, 255, 0.88);
        font-weight: 500;
        font-size: 0.95rem;
        text-decoration: none;
        border-radius: 6px;
        margin-top: 4px;
        border-left: 3px solid transparent;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }
    body > header .user .dropdown-menu a i {
        width: 20px;
        text-align: center;
        opacity: 0.85;
    }
    body > header .user .dropdown-menu a:hover {
        color: #d5e300;
        background: rgba(213, 227, 0, 0.08);
        border-left-color: #d5e300;
    }
    body > header .user .dropdown-menu .divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
        margin: 10px 0;
        padding: 0;
    }
    body > header .user .dropdown-menu .logout:hover {
        color: #ff6b6b;
        background: rgba(255, 107, 107, 0.1);
        border-left-color: #ff6b6b;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 30px;
    }
}
@media (max-width: 576px) {
    .container {
        padding: 0 16px;
    }
    footer .container div{
        justify-items: center;
    }
    .hero-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    /* Категории: 2 карточки в ряд (преимущества — одна колонка см. блок .benefits) */
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .btn {
        padding: 12px 24px;
        min-height: 44px;
    }
}

/* Экстра-малые экраны (смартфоны в портрете) */
@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }
    .hero-image img {
        transform: none;
    }
    .hero-image:hover img {
        transform: none;
    }
    .floating {
        animation: none;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-actions .btn {
        min-width: 0;
        width: 100%;
        text-align: center;
    }
    .categories {
        padding: 48px 0;
    }
    .featured-products {
        padding: 48px 0;
    }
    .customization {
        padding: 48px 0;
    }
    .customization-paths {
        grid-template-columns: 1fr;
    }
    .customization-interactive {
        padding: 14px;
    }
    .customization-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .customization-actions .btn,
    .customization-actions .btn-outline {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    .hero {
        padding: 40px 0;
    }
    .hero-title {
        font-size: 24px;
    }
    .hero-text {
        font-size: 15px;
    }
    .section-title {
        font-size: 24px;
    }
    /* Почему выбирают нас — компактнее на узких экранах */
    .benefits {
        padding: 48px 0 56px;
    }
    .benefits-intro {
        margin-bottom: 26px;
    }
    .benefits-heading {
        font-size: 1.4rem;
    }
    .benefits-lead {
        font-size: 13px;
    }
    .benefits-grid {
        gap: 12px;
    }
    .benefit-card {
        padding: 22px 18px 24px;
    }
    .benefit-card .benefit-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    .benefit-card-title {
        font-size: 1rem;
    }
    .benefit-card-text {
        font-size: 13px;
        line-height: 1.58;
    }
    .category-icon {
        height: 120px;
        font-size: 40px;
    }
    /* Популярные фигурки — миниатюрные, но информативные карточки */
    .featured-products .product-grid {
        column-gap: 10px;
        row-gap: 16px;
    }
    .featured-products .product-card {
        border-radius: 10px;
    }
    .featured-products .product-image {
        height: 120px;
        font-size: 36px;
    }
    .featured-products .product-content {
        padding: 12px 10px;
    }
    .featured-products .product-content h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    .featured-products .rating {
        font-size: 11px;
        margin-bottom: 6px;
    }
    .featured-products .material-tag {
        font-size: 10px;
        padding: 2px 6px;
        margin-bottom: 4px;
    }
    .featured-products .size-info {
        font-size: 11px;
        margin-bottom: 6px;
    }
    .featured-products .product-price {
        font-size: 16px;
        margin-bottom: 8px;
    }
    .featured-products .btn {
        padding: 8px 6px;
        font-size: 12px;
    }
    .logo {
        font-size: 20px;
    }
    .logo-icon {
        font-size: 24px;
    }
    body > header {
        padding: 14px 0;
    }
}

/* Очень узкие телефоны: одна колонка, читаемые карточки */
@media (max-width: 400px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .category-icon {
        height: 100px;
        padding: 20px;
        font-size: 36px;
    }
    .category-content {
        padding: 18px 18px 20px;
    }
    .featured-products .product-grid {
        grid-template-columns: 1fr;
        row-gap: 18px;
    }
    .featured-products .product-image {
        height: 160px;
        font-size: 44px;
    }
    .featured-products .product-content {
        padding: 16px 14px;
    }
    .featured-products .product-content h3 {
        font-size: 17px;
    }
    .featured-products .rating {
        font-size: 12px;
    }
    .featured-products .material-tag {
        font-size: 11px;
        padding: 3px 8px;
    }
    .featured-products .product-price {
        font-size: 18px;
    }
    .featured-products .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    .footer-column ul li {
        word-break: break-word;
    }
}

/* safe-area для вырезов экрана (iPhone X+) */
@supports (padding: max(0px)) {
    body > header {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    .scroll-to-top {
        right: max(20px, env(safe-area-inset-right));
        bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Кнопка прокрутки вверх */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Стили для модального окна деталей заказа */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #313131;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: #313131;
    background: #f0f0f0;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Список заказов в профиле */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    padding: 18px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.order-card-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.order-card-left {
    flex: 1;
    min-width: 0;
}

.order-number-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 14px;
    color: #777;
}

.order-number-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
    color: #9ca3af;
}

.order-number-value {
    font-weight: 600;
    color: #313131;
}

.order-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 13px;
    color: #777;
}

.order-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.order-date::before {
    content: '\f017';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 11px;
    opacity: 0.6;
}

.order-status {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.order-status.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.order-status.status-info {
    background-color: #e2e3ff;
    color: #383d7c;
}

.order-status.status-success {
    background-color: #d4edda;
    color: #155724;
}

.order-status.status-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.order-items-compact {
    margin-top: 10px;
    font-size: 14px;
}

.order-item-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.order-item-title {
    font-weight: 500;
    color: #313131;
}

.order-item-qty-price {
    font-size: 13px;
    color: #6b7280;
}

.order-card-right {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.order-total-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 15px;
    font-weight: 600;
}

.order-total-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.order-total-value {
    font-size: 18px;
    color: #111827;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 6px;
}

.btn-small {
    padding: 7px 14px;
    font-size: 13px;
    line-height: 1.4;
}

.order-delivery-snippet {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid #4CAF50;
    background: #f1fbf3;
    font-size: 13px;
    color: #374151;
}

.order-delivery-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    margin-bottom: 4px;
}

.order-delivery-address,
.order-delivery-status {
    font-size: 13px;
    color: #4b5563;
}

/* Детали заказа в модалке */
.order-details-loading {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.order-details-loading i {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
    color: var(--accent);
}

.order-details-header {
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.order-details-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.order-details-number {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.order-details-number i {
    color: var(--accent);
    font-size: 20px;
}

.order-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.order-status-badge.status-warning { background: #fff3cd; color: #856404; }
.order-status-badge.status-info { background: #cce5ff; color: #004085; }
.order-status-badge.status-success { background: #d4edda; color: #155724; }
.order-status-badge.status-danger { background: #f8d7da; color: #721c24; }

.order-details-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}
.order-details-date i {
    opacity: 0.7;
}

.order-detail-section {
    margin-bottom: 24px;
}

.order-detail-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.order-detail-title i {
    color: var(--accent);
    font-size: 16px;
}

.order-items-list {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item-detail {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.2s;
}
.order-item-detail:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.order-item-image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.order-item-image i {
    color: #bbb;
    font-size: 28px;
}

.order-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.order-item-main {
    flex: 1;
    min-width: 0;
}

.order-item-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}
.order-item-name:hover {
    color: var(--accent);
}

.order-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.order-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
}

.order-item-pricing {
    text-align: right;
    white-space: nowrap;
}
.order-item-qty {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}
.order-item-unit {
    font-size: 13px;
    color: var(--text-muted);
}
.order-item-total {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
    font-size: 15px;
}

.order-items-empty {
    margin: 0;
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
}

.order-summary-box {
    padding: 18px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}
.order-summary-row span:last-child {
    font-weight: 600;
}
.order-summary-discount {
    color: #28a745;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px solid #dee2e6;
    font-size: 18px;
    font-weight: 700;
}

.order-info-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
}

.order-delivery-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.order-delivery-recipient {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}
.order-delivery-recipient i {
    color: var(--accent);
    font-size: 18px;
}

.order-delivery-pvz {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
}
.order-delivery-pvz i {
    color: var(--accent);
    margin-top: 2px;
}
.order-delivery-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.order-delivery-value {
    font-weight: 500;
    color: var(--text-primary);
}

.order-delivery-phone {
    display: flex;
    align-items: center;
    gap: 10px;
}
.order-delivery-phone i {
    color: var(--accent);
}
.order-delivery-phone a {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
}
.order-delivery-phone a:hover {
    color: var(--accent);
}

.order-tracking-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.order-tracking-status {
    display: flex;
    align-items: center;
    gap: 8px;
}
.order-tracking-label {
    color: var(--text-muted);
}
.order-tracking-value {
    font-weight: 600;
}
.btn-track {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
}
.order-tracking-hint {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.order-tracking-number {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 1px;
}

.order-notes-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
}

/* Стили для баннера согласия на использование cookies */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #313131 0%, #2a2a2a 100%);
    color: #ffffff;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #d5e300;
    display: none;
}

#cookie-consent-banner.show {
    display: block;
    transform: translateY(0);
}

#cookie-consent-banner .cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

#cookie-consent-banner .cookie-banner-content {
    flex: 1;
    min-width: 250px;
}

#cookie-consent-banner .cookie-banner-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #d5e300;
}

#cookie-consent-banner .cookie-banner-text {
    font-size: 14px;
    line-height: 1.5;
    color: #e0e0e0;
    margin-bottom: 0;
}

#cookie-consent-banner .cookie-banner-text a {
    color: #d5e300;
    text-decoration: underline;
    transition: color 0.2s;
}

#cookie-consent-banner .cookie-banner-text a:hover {
    color: #c4d000;
}

#cookie-consent-banner .cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

#cookie-consent-banner .cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#cookie-consent-banner .cookie-btn-primary {
    background-color: #d5e300;
    color: #313131;
}

#cookie-consent-banner .cookie-btn-primary:hover {
    background-color: #c4d000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(213, 227, 0, 0.3);
}

#cookie-consent-banner .cookie-btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

#cookie-consent-banner .cookie-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #d5e300;
    color: #d5e300;
}

#cookie-consent-banner .cookie-btn-outline {
    background-color: transparent;
    color: #d5e300;
    border: 2px solid #d5e300;
}

#cookie-consent-banner .cookie-btn-outline:hover {
    background-color: #d5e300;
    color: #313131;
}

/* Панель настроек cookies */
#cookie-settings {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    color: #313131;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    border-top: 3px solid #d5e300;
}

#cookie-settings.show {
    display: block;
    transform: translateY(0);
}

#cookie-settings .cookie-settings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

#cookie-settings .cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

#cookie-settings .cookie-settings-title {
    font-size: 24px;
    font-weight: 700;
    color: #313131;
    margin: 0;
}

#cookie-settings .cookie-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

#cookie-settings .cookie-close-btn:hover {
    color: #313131;
    background-color: #f0f0f0;
}

#cookie-settings .cookie-settings-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

#cookie-settings .cookie-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

#cookie-settings .cookie-category:hover {
    border-color: #d5e300;
    box-shadow: 0 2px 8px rgba(213, 227, 0, 0.1);
}

#cookie-settings .cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#cookie-settings .cookie-category-title {
    font-size: 18px;
    font-weight: 600;
    color: #313131;
    margin: 0;
}

#cookie-settings .cookie-category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0;
}

#cookie-settings .cookie-category-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    appearance: none;
    background-color: #ccc;
    border-radius: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
    outline: none;
}

#cookie-settings .cookie-category-toggle:checked {
    background-color: #d5e300;
}

#cookie-settings .cookie-category-toggle::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#cookie-settings .cookie-category-toggle:checked::before {
    transform: translateX(24px);
}

#cookie-settings .cookie-category-toggle[data-category="necessary"] {
    opacity: 0.6;
    cursor: not-allowed;
}

#cookie-settings .cookie-settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

@media (max-width: 768px) {
    #cookie-consent-banner {
        padding: 16px;
    }

    #cookie-consent-banner .cookie-banner-container {
        flex-direction: column;
        align-items: stretch;
    }

    #cookie-consent-banner .cookie-banner-content {
        margin-bottom: 16px;
    }

    #cookie-consent-banner .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    #cookie-consent-banner .cookie-btn {
        width: 100%;
    }

    #cookie-settings .cookie-settings-container {
        padding: 20px 16px;
    }

    #cookie-settings .cookie-settings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    #cookie-settings .cookie-settings-footer {
        flex-direction: column;
    }

    #cookie-settings .cookie-btn {
        width: 100%;
    }
}

/* --- Тёмная тема (использует переменные из [data-theme="dark"] выше) --- */
[data-theme="dark"] body {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-end) 100%);
    color: var(--text-secondary);
}

[data-theme="dark"] body .container,
[data-theme="dark"] main {
    color: var(--text-secondary);
}

[data-theme="dark"] .catalog-page,
[data-theme="dark"] .profile-page {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-end) 100%) !important;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .cart-count,
[data-theme="dark"] .wishlist-count,
[data-theme="dark"] .badge {
    color: #000 !important;
}

[data-theme="dark"] body > header {
    background: linear-gradient(135deg, var(--bg-body) 0%, var(--bg-header) 100%);
    color: #fff;
    box-shadow: 0 4px 20px var(--shadow-strong);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] body > header nav a {
    color: var(--accent);
}

[data-theme="dark"] body > header nav a:hover {
    color: var(--accent-hover);
    filter: brightness(1.1);
}

[data-theme="dark"] body > header .user a {
    color: #1a1a1a !important;
}

[data-theme="dark"] body > header .user a:hover {
    color: #000 !important;
}

[data-theme="dark"] .product-card,
[data-theme="dark"] .catalog-filters {
    background: var(--bg-surface);
    color: var(--text-secondary);
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border);
    border-radius: 12px;
}

[data-theme="dark"] .filter-title,
[data-theme="dark"] .filter-group-title,
[data-theme="dark"] .filter-option label,
[data-theme="dark"] .sort-label {
    color: #fff !important;
}

[data-theme="dark"] .catalog-filters .price-input {
    color: #fff !important;
}

[data-theme="dark"] .catalog-filters .price-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .profile-section {
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
}

[data-theme="dark"] .product-card:hover {
    box-shadow: 0 8px 28px var(--shadow-strong);
    border-color: rgba(213, 227, 0, 0.25);
}

[data-theme="dark"] .product-content h3,
[data-theme="dark"] .product-price {
    color: var(--text-primary);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    border-radius: 8px;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus {
    border-color: rgba(213, 227, 0, 0.5);
    outline: none;
}

[data-theme="dark"] footer {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-header) 100%);
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

[data-theme="dark"] footer h3 {
    color: var(--text-secondary);
}

[data-theme="dark"] footer a:hover {
    color: var(--accent);
}

[data-theme="dark"] .footer-column-categories .footer-category-item a {
    background: var(--border);
    color: var(--text-muted);
}
[data-theme="dark"] .footer-column-categories .footer-category-item a:hover {
    background: var(--accent-muted);
    color: var(--accent);
}
[data-theme="dark"] .footer-column-categories .footer-category-personalization a {
    background: var(--accent-muted);
    color: var(--accent);
}
[data-theme="dark"] .footer-category-loading {
    color: var(--text-muted);
}

[data-theme="dark"] .dropdown-menu {
    background: rgba(18, 21, 26, 0.98);
    border: 1px solid var(--border);
    border-radius: 10px;
}

[data-theme="dark"] .dropdown-menu a:hover {
    background: var(--accent-muted);
    color: var(--accent);
}

[data-theme="dark"] .setting-control {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    border-radius: 8px;
}

[data-theme="dark"] .btn {
    background: rgba(213, 227, 0, 0.2);
    border: 1px solid rgba(213, 227, 0, 0.4);
    color: var(--accent);
    border-radius: 8px;
}

[data-theme="dark"] .btn:hover {
    background: rgba(213, 227, 0, 0.3);
    border-color: var(--accent);
    color: var(--bg-body);
}

[data-theme="dark"] .profile-sidebar,
[data-theme="dark"] .profile-page .user-info {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

[data-theme="dark"] .user-level {
    background: linear-gradient(135deg, color-mix(in srgb, var(--level-color) 18%, var(--bg-surface)) 0%, var(--bg-surface) 100%) !important;
    border: 1px solid var(--border);
    border-left: 4px solid var(--level-color);
}

[data-theme="dark"] .profile-content {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
}

[data-theme="dark"] .profile-stats .stat-item {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
}

[data-theme="dark"] .profile-page .user-name,
[data-theme="dark"] .profile-page .user-email,
[data-theme="dark"] .profile-page .level-label,
[data-theme="dark"] .profile-page .level-text,
[data-theme="dark"] .profile-page .profile-nav a,
[data-theme="dark"] .profile-page .profile-stats h3,
[data-theme="dark"] .profile-page .profile-stats .stat-value,
[data-theme="dark"] .profile-page .profile-stats .stat-label,
[data-theme="dark"] .profile-page .section-header h2,
[data-theme="dark"] .profile-page .info-label,
[data-theme="dark"] .profile-page .info-value,
[data-theme="dark"] .profile-page .profile-preferences h3,
[data-theme="dark"] .profile-page .preferences-note,
[data-theme="dark"] .profile-page .pref-tag,
[data-theme="dark"] .profile-page .section-header p,
[data-theme="dark"] .profile-page .setting-info h3,
[data-theme="dark"] .profile-page .setting-info p,
[data-theme="dark"] .profile-page .security-info h3,
[data-theme="dark"] .profile-page .security-info p,
[data-theme="dark"] .profile-page .notification-info h3,
[data-theme="dark"] .profile-page .notification-info p,
[data-theme="dark"] .profile-page .privacy-info h3,
[data-theme="dark"] .profile-page .privacy-info p,
[data-theme="dark"] .profile-page .payment-info h3,
[data-theme="dark"] .profile-page .payment-info p,
[data-theme="dark"] .profile-page .address-empty-state p,
[data-theme="dark"] .profile-page .address-widget p,
[data-theme="dark"] .profile-page .about-level-name,
[data-theme="dark"] .profile-page .about-level-stat,
[data-theme="dark"] .profile-page .level-next-display,
[data-theme="dark"] .profile-page .about-level-description h4,
[data-theme="dark"] .profile-page .level-rewards-text,
[data-theme="dark"] .profile-page .setting-control,
[data-theme="dark"] .profile-page .currency-example,
[data-theme="dark"] .profile-page .wishlist-item-content h4 a,
[data-theme="dark"] .profile-page .wishlist-item-content .item-price,
[data-theme="dark"] .profile-page .empty-state h3,
[data-theme="dark"] .profile-page .empty-state p,
[data-theme="dark"] .profile-page .empty-state i,
[data-theme="dark"] .profile-page .address-card,
[data-theme="dark"] .profile-page .filter-btn,
[data-theme="dark"] .profile-page .order-card,
[data-theme="dark"] .profile-page .order-number-label,
[data-theme="dark"] .profile-page .order-item-title,
[data-theme="dark"] .profile-page .order-total-row,
[data-theme="dark"] .profile-page .order-item,
[data-theme="dark"] .profile-page .order-items-list,
[data-theme="dark"] .profile-page .danger-zone h3,
[data-theme="dark"] .profile-page .danger-zone p,
[data-theme="dark"] .profile-page .badge {
    color: #fff !important;
}

[data-theme="dark"] .address-card {
    background: var(--bg-surface-elevated) !important;
    border-color: var(--border-strong);
}

/* Избранное — тёмная тема */
[data-theme="dark"] .wishlist-grid {
    border-color: var(--border-strong);
    background: var(--bg-surface);
}

[data-theme="dark"] .wishlist-item {
    background: var(--bg-surface-elevated);
    border-color: var(--border);
}

[data-theme="dark"] .wishlist-item-content h4 a,
[data-theme="dark"] .wishlist-item-content .item-price {
    color: var(--text-primary);
}

[data-theme="dark"] .wishlist-item .remove-wishlist {
    background: var(--bg-surface);
    border-color: var(--border-strong);
    color: var(--text-muted);
}

[data-theme="dark"] .wishlist-item .remove-wishlist:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

/* Пустое состояние избранного — тёмная тема */
[data-theme="dark"] .wishlist-grid .empty-state,
[data-theme="dark"] .empty-state {
    background: var(--bg-surface-elevated) !important;
    border: 1px solid var(--border-strong);
    box-shadow: 0 2px 12px var(--shadow);
}

[data-theme="dark"] .wishlist-grid .empty-state i,
[data-theme="dark"] .empty-state i {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .wishlist-grid .empty-state h3,
[data-theme="dark"] .empty-state h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .wishlist-grid .empty-state p,
[data-theme="dark"] .empty-state p {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .profile-nav a:hover,
[data-theme="dark"] .profile-nav a.active {
    color: var(--accent);
    background: var(--accent-muted);
    border-radius: 8px;
}

[data-theme="dark"] .highlight {
    color: var(--accent);
}

[data-theme="dark"] .dropdown-menu a {
    color: var(--text-secondary);
}

[data-theme="dark"] .dropdown-menu.show a,
[data-theme="dark"] .dropdown-menu.show a span,
[data-theme="dark"] .dropdown-menu.show a i {
    color: #fff !important;
}

[data-theme="dark"] .section-header p,
[data-theme="dark"] .setting-info p,
[data-theme="dark"] .setting-info h3 {
    color: var(--text-secondary);
}

[data-theme="dark"] a {
    color: var(--text-muted-2);
}

[data-theme="dark"] a:hover {
    color: var(--accent);
}

/* Страница товара — тёмная тема */
[data-theme="dark"] .product-page {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-end) 100%);
}

[data-theme="dark"] .product-container,
[data-theme="dark"] .product-content {
    color: var(--text-secondary);
}

[data-theme="dark"] .product-info .product-category {
    color: var(--text-muted);
}

[data-theme="dark"] .product-title {
    color: var(--text-primary);
}

[data-theme="dark"] .product-price {
    color: var(--accent);
    font-weight: 700;
}

[data-theme="dark"] .product-description,
[data-theme="dark"] .product-description p {
    color: var(--text-soft);
}

[data-theme="dark"] .product-meta .meta-label,
[data-theme="dark"] .product-rating .rating-count {
    color: var(--text-muted);
}

[data-theme="dark"] .product-meta .meta-value {
    color: var(--text-secondary);
}

[data-theme="dark"] .product-main-image,
[data-theme="dark"] .product-gallery {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

[data-theme="dark"] .product-thumbnail {
    background: var(--bg-surface);
    border-color: var(--border-strong);
}

[data-theme="dark"] .product-thumbnail.active {
    border-color: var(--accent);
    background: var(--accent-muted);
}

[data-theme="dark"] .option-title {
    color: var(--text-secondary);
}

[data-theme="dark"] .color-option,
[data-theme="dark"] .material-option {
    background: var(--bg-surface);
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

[data-theme="dark"] .color-option:hover,
[data-theme="dark"] .material-option:hover {
    border-color: rgba(213, 227, 0, 0.5);
    background: rgba(213, 227, 0, 0.08);
}

[data-theme="dark"] .color-option.active,
[data-theme="dark"] .material-option.active {
    border-color: var(--accent);
    background: var(--accent-muted);
    color: var(--text-primary);
}

[data-theme="dark"] .tab-btn {
    background: var(--bg-surface);
    border-color: var(--border);
    color: var(--text-muted-2);
}

[data-theme="dark"] .tab-btn:hover,
[data-theme="dark"] .tab-btn.active {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
}

[data-theme="dark"] .tab-content {
    background: transparent;
    color: var(--text-secondary);
}

[data-theme="dark"] .tab-content h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .tab-content p {
    color: var(--text-soft);
}

[data-theme="dark"] table,
[data-theme="dark"] .specs-table,
[data-theme="dark"] .security-table {
    background: var(--bg-surface);
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="dark"] table th,
[data-theme="dark"] table td,
[data-theme="dark"] .specs-table th,
[data-theme="dark"] .specs-table td {
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="dark"] table th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted-2);
}

[data-theme="dark"] .add-to-cart.disabled {
    opacity: 0.5;
    color: var(--text-muted);
}

[data-theme="dark"] .product-content p,
[data-theme="dark"] .product-content .material-tag {
    color: var(--text-soft);
}

[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .breadcrumb a {
    color: var(--text-muted);
}

[data-theme="dark"] .breadcrumb a:hover {
    color: var(--accent);
}

[data-theme="dark"] .same-orders-products .product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

[data-theme="dark"] .same-orders-products .product-card h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .rating-stars {
    color: #fbbf24;
}

/* Секции главной и общие блоки — тёмный фон */
[data-theme="dark"] .categories,
[data-theme="dark"] .featured-products,
[data-theme="dark"] .benefits,
[data-theme="dark"] .customization {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-end) 100%) !important;
}

[data-theme="dark"] .section-title {
    color: var(--text-primary);
}

[data-theme="dark"] .category-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
}

[data-theme="dark"] .category-card:hover {
    box-shadow: 0 8px 28px var(--shadow-strong);
}

[data-theme="dark"] .category-icon {
    background: rgba(0, 0, 0, 0.25) !important;
    color: var(--accent);
}

[data-theme="dark"] .category-content h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .category-content p {
    color: var(--text-soft);
}

[data-theme="dark"] .product-image {
    background: var(--bg-surface) !important;
    color: var(--text-muted-2);
}

[data-theme="dark"] .benefits-heading {
    color: var(--text-primary);
}

[data-theme="dark"] .benefits-lead {
    color: var(--text-muted);
}

[data-theme="dark"] .benefits-intro-mark {
    background: linear-gradient(180deg, var(--accent) 0%, rgba(213, 227, 0, 0.25) 100%);
}

[data-theme="dark"] .benefit-card {
    background: var(--bg-surface);
    border-color: var(--border);
    border-left-color: var(--accent);
    box-shadow: 0 2px 12px var(--shadow);
}

[data-theme="dark"] .benefit-card:hover {
    border-color: var(--border-strong);
    border-left-color: var(--accent-hover);
    box-shadow: 0 12px 32px var(--shadow-strong);
}

[data-theme="dark"] .benefit-card-title {
    color: var(--text-primary);
}

[data-theme="dark"] .benefit-card-text {
    color: var(--text-soft);
}

[data-theme="dark"] .benefit-card .benefit-icon {
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent);
}

[data-theme="dark"] .customization-text h2,
[data-theme="dark"] .customization-lead-title {
    color: var(--text-primary);
}

[data-theme="dark"] .customization-text p,
[data-theme="dark"] .customization-lead {
    color: var(--text-soft);
}

[data-theme="dark"] .customization-path-card {
    background: var(--bg-surface);
    border-color: var(--border);
    box-shadow: 0 4px 20px var(--shadow);
}
[data-theme="dark"] .customization-path-card:hover {
    border-color: rgba(213, 227, 0, 0.45);
}
[data-theme="dark"] .customization-path-card-secondary {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-surface) 100%);
}
[data-theme="dark"] .customization-path-desc,
[data-theme="dark"] .customization-feature {
    color: var(--text-secondary);
}
[data-theme="dark"] .customization-path-title,
[data-theme="dark"] .customization-subheading {
    color: var(--text-primary);
}
[data-theme="dark"] .customization-path-cta {
    color: var(--accent);
}
[data-theme="dark"] .customization-path-card:hover .customization-path-cta {
    color: var(--accent-hover);
}
[data-theme="dark"] .customization-feature {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--border);
}
[data-theme="dark"] .customization-materials-label {
    color: var(--text-muted);
}
[data-theme="dark"] .customization-material-chip {
    background: var(--bg-surface);
    border-color: var(--border);
    color: var(--text-secondary);
}
[data-theme="dark"] .customization-material-chip--active {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--text-primary);
}
[data-theme="dark"] .customization-extra-label {
    color: var(--text-secondary);
}
[data-theme="dark"] .customization-interactive {
    background: var(--bg-surface);
    border-color: var(--border);
}
[data-theme="dark"] .customization-swatch-hint,
[data-theme="dark"] .customization-size-help {
    color: var(--text-muted);
}
[data-theme="dark"] .customization-swatch[aria-pressed="true"] {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px rgba(213, 227, 0, 0.35);
}
[data-theme="dark"] .customization-visual figcaption {
    color: var(--text-muted);
}
[data-theme="dark"] .customization-process li {
    border-bottom-color: var(--border);
}
[data-theme="dark"] .customization-process strong {
    color: var(--text-primary);
}
[data-theme="dark"] .customization-process span:not(.customization-process-step) {
    color: var(--text-muted);
}
[data-theme="dark"] .btn-outline {
    color: var(--text-primary);
    border-color: var(--border-strong);
}
[data-theme="dark"] .btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

[data-theme="dark"] .material-tag {
    background: var(--accent-muted);
    color: var(--accent-hover);
}

[data-theme="dark"] .size-info {
    color: var(--text-muted);
}

/* Корзина */
[data-theme="dark"] .cart-page {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-end) 100%) !important;
}

[data-theme="dark"] .cart-items,
[data-theme="dark"] .cart-summary {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
}

[data-theme="dark"] .cart-title,
[data-theme="dark"] .summary-title,
[data-theme="dark"] .cart-item-title {
    color: var(--text-primary);
}

[data-theme="dark"] .cart-item-meta,
[data-theme="dark"] .cart-item-price {
    color: var(--text-secondary);
}

[data-theme="dark"] .cart-item-image {
    background: var(--bg-surface) !important;
    color: var(--text-muted-2);
}

[data-theme="dark"] .cart-item {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .quantity-btn {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
}

[data-theme="dark"] .quantity-btn:hover:not(:disabled) {
    background: var(--accent-muted) !important;
}

[data-theme="dark"] .quantity-input {
    background: var(--bg-surface);
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

/* Страница оформления заказа */
[data-theme="dark"] .checkout-page {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-end) 100%) !important;
}

[data-theme="dark"] .checkout-summary,
[data-theme="dark"] .checkout-form-section {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
}

/* Персонализация и настройки из других файлов */
[data-theme="dark"] .settings-section,
[data-theme="dark"] .settings-content .settings-section {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
}

[data-theme="dark"] .auth-page,
[data-theme="dark"] .settings-page {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-end) 100%) !important;
}

[data-theme="dark"] .auth-card,
[data-theme="dark"] .settings-form,
[data-theme="dark"] .security-items .security-item,
[data-theme="dark"] .setting-item {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
}

[data-theme="dark"] .cookie-consent-banner,
[data-theme="dark"] #cookie-consent-banner {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-strong);
}

[data-theme="dark"] .modal,
[data-theme="dark"] .modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-strong);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--border);
}

[data-theme="dark"] .modal-header h3,
[data-theme="dark"] .modal-body {
    color: var(--text-secondary);
}

[data-theme="dark"] .order-details-header {
    background: var(--bg-surface-elevated) !important;
    border-left-color: var(--accent);
}

[data-theme="dark"] .order-details-number,
[data-theme="dark"] .order-details-date,
[data-theme="dark"] .order-detail-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .order-delivery-card {
    background: var(--bg-surface-elevated) !important;
    border-color: var(--border);
}

[data-theme="dark"] .order-delivery-recipient,
[data-theme="dark"] .order-delivery-value {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .order-items-list,
[data-theme="dark"] .order-info-box {
    background: var(--bg-surface-elevated) !important;
    border: 1px solid var(--border);
}

[data-theme="dark"] .order-item-detail {
    background: var(--bg-surface) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .order-item-name,
[data-theme="dark"] .order-item-qty,
[data-theme="dark"] .order-item-total {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .order-total-row {
    border-top-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .order-info-box span {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .search-box,
[data-theme="dark"] .sort-select {
    background: var(--bg-surface) !important;
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

/* Персонализация */
[data-theme="dark"] .personalization-page {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-end) 100%) !important;
}

[data-theme="dark"] .personalization-hero,
[data-theme="dark"] .personalization-section,
[data-theme="dark"] .personalization-form .form-group,
[data-theme="dark"] .request-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .requests-empty,
[data-theme="dark"] .requests-error {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
    box-shadow: none;
}

[data-theme="dark"] .requests-empty,
[data-theme="dark"] .requests-error {
    border-style: dashed;
    color: var(--text-muted);
}

[data-theme="dark"] .checkout-form {
    background: var(--bg-surface) !important;
    box-shadow: none;
    border: 1px solid var(--border);
}

[data-theme="dark"] .checkout-form .form-group label,
[data-theme="dark"] .checkout-form .form-section-title {
    color: #fff !important;
}

[data-theme="dark"] .widget__location-content,
[data-theme="dark"] .widget__location-title,
[data-theme="dark"] .widget__location-desc,
[data-theme="dark"] .widget__location-desc span,
[data-theme="dark"] .ydw-point-desc,
[data-theme="dark"] #delivery-widget .widget__location-title,
[data-theme="dark"] #delivery-widget .widget__location-desc,
[data-theme="dark"] #delivery-widget .widget__location-content,
[data-theme="dark"] #delivery-widget .ydw-point-desc {
    color: #fff !important;
}

[data-theme="dark"] .checkout-docs {
    background: var(--bg-surface-elevated) !important;
    border: 1px solid var(--border);
}

[data-theme="dark"] .payment-method.selected {
    border-color: var(--accent);
    background: var(--accent-muted) !important;
}

[data-theme="dark"] .admin-main {
    background: var(--bg-body) !important;
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .table-container,
[data-theme="dark"] .stats-content,
[data-theme="dark"] .settings-content,
[data-theme="dark"] .log-item {
    background: var(--bg-surface) !important;
    box-shadow: none;
    border: 1px solid var(--border);
}

[data-theme="dark"] .log-details {
    border-top-color: var(--border);
    background: var(--bg-surface-elevated) !important;
}

[data-theme="dark"] .info-item {
    background: var(--bg-surface) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .personalization-title,
[data-theme="dark"] .personalization-intro,
[data-theme="dark"] .personalization-page .section-heading,
[data-theme="dark"] .personalization-page .personalization-form label,
[data-theme="dark"] .personalization-page .file-upload-text,
[data-theme="dark"] .personalization-page .file-upload-hint,
[data-theme="dark"] .personalization-page .auth-required-card h3,
[data-theme="dark"] .personalization-page .auth-required-card p,
[data-theme="dark"] .personalization-page .request-filename,
[data-theme="dark"] .personalization-page .request-card-body p,
[data-theme="dark"] .personalization-page .request-date,
[data-theme="dark"] .personalization-page .requests-empty,
[data-theme="dark"] .personalization-page .requests-error {
    color: #fff !important;
}

[data-theme="dark"] .personalization-page .personalization-form input,
[data-theme="dark"] .personalization-page .personalization-form select,
[data-theme="dark"] .personalization-page .personalization-form textarea {
    color: #fff !important;
}

[data-theme="dark"] .personalization-page .personalization-form input::placeholder,
[data-theme="dark"] .personalization-page .personalization-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .personalization-process-inline {
    background: var(--bg-surface);
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="dark"] .personalization-guest-hint {
    background: var(--accent-muted);
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="dark"] .personalization-guest-hint i {
    color: var(--accent);
}

[data-theme="dark"] .personalization-prefs-banner-inner {
    background: linear-gradient(135deg, rgba(213, 227, 0, 0.12) 0%, var(--bg-surface) 55%);
    border-color: var(--border);
}

[data-theme="dark"] .personalization-prefs-banner-text strong {
    color: var(--text-primary);
}

[data-theme="dark"] .personalization-prefs-summary,
[data-theme="dark"] .personalization-field-hint {
    color: var(--text-muted);
}

[data-theme="dark"] .personalization-extras-label,
[data-theme="dark"] .personalization-extra-row {
    color: var(--text-secondary);
}

[data-theme="dark"] .personalization-size-output {
    color: var(--text-primary);
}

[data-theme="dark"] .personalization-page .personalization-palette .customization-swatch[aria-pressed="true"] {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px rgba(213, 227, 0, 0.35);
}

[data-theme="dark"] .file-upload-zone {
    background: rgba(0, 0, 0, 0.25) !important;
    border-color: var(--border-strong);
}

.settings-list .currency-example {
    margin-top: 6px;
    margin-bottom: 0;
}

.settings-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: #313131;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: settings-toast-in 0.25s ease;
}

@keyframes settings-toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==== Поддержка / Чат ==== */
body > header {
    position: sticky;
}

@media (max-width: 1300px) and (min-width: 901px) {
    /* 901–1300: десктопный хедер, bubble в потоке */
    .header-container {
        flex-wrap: nowrap;
        column-gap: 18px;
    }

    nav ul {
        flex-wrap: nowrap;
        column-gap: 18px;
    }

    nav ul li {
        margin-left: 0 !important;
    }

    .cart-icon, .wishlist-icon {
        margin-left: 0 !important;
    }

    nav ul li a {
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .support-bubble {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        margin-left: 10px;
        margin-right: -10px; /* почти вплотную к блоку .user */
        flex-shrink: 0;
    }

    .header-container nav {
        flex: 1 1 auto;
        min-width: 0;
    }

    .header-container .user {
        flex: 0 0 auto;
        margin-left: 0;
    }
}

@media (min-width: 1301px) {
    /* 1301+: bubble в потоке, почти вплотную к .user */
    .support-bubble {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        margin-left: 10px;
        margin-right: -10px;
        flex-shrink: 0;
    }
}

.support-bubble {
    position: absolute;
    top: 50%;
    right: 26px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-primary);
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    z-index: 1001;
    text-decoration: none;
}

.support-bubble.visible {
    display: inline-flex;
}

.support-bubble i {
    font-size: 18px;
}

.support-bubble-count {
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 1002;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: var(--accent);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 900;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.support-page {
    padding: 30px 0 80px;
}

/* Мобильный пункт в меню (nav.show) */
.support-nav-item {
    display: none;
}

.support-nav-item a {
    position: relative;
}

.support-nav-count {
    position: absolute;
    top: 8px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: var(--accent);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 900;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (max-width: 900px) {
    .support-bubble {
        display: none !important;
    }
    .support-nav-item {
        display: block;
    }
}

.support-container {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.support-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    align-items: start;
}

.support-sidebar {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 14px;
    color: #1a1a1a;
}

.support-title {
    margin: 0 0 12px;
    font-size: 18px;
    color: #1a1a1a;
}

.support-hide-closed {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: rgba(0,0,0,0.7);
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.support-hide-closed input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

[data-theme="dark"] .support-hide-closed {
    color: var(--text-secondary) !important;
}

.support-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-ticket-item {
    width: 100%;
    text-align: left;
    background: #f7f7f7;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.05s ease, border-color 0.2s ease, background 0.2s ease;
}

.support-ticket-item:hover {
    border-color: rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.support-ticket-item.active {
    background: rgba(213,227,0,0.08);
    border-color: rgba(213,227,0,0.55);
}

.support-ticket-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.support-ticket-item-status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.support-ticket-item-status.open {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
}

.support-ticket-item-status.closed {
    background: rgba(244, 67, 54, 0.15);
    color: #c62828;
}

.support-ticket-item-subtitle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #1a1a1a;
}

.support-ticket-item-last {
    color: rgba(0,0,0,0.6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.support-ticket-view {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 14px;
    color: #1a1a1a;
}

.support-chat {
    min-height: 520px;
    overflow: visible;
}

.support-ticket-view {
    overflow: visible;
}

.support-ticket-meta {
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
    padding-bottom: 10px;
    color: #1a1a1a;
}

.support-ticket-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.support-messages {
    height: 360px;
    min-height: 0; /* Safari iOS: нужен для overflow внутри flex/grid */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}

.support-message-row {
    display: flex;
    flex-shrink: 0; /* не сжимать строки сообщений */
}

.support-message-row.user {
    justify-content: flex-start;
}

.support-message-row.admin {
    justify-content: flex-end;
}

.support-message-bubble {
    max-width: 78%;
    min-width: min-content; /* не схлопывать при flex */
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 10px 12px;
    color: #1a1a1a;
}

.support-message-row.admin .support-message-bubble {
    background: rgba(213,227,0,0.12);
    border-color: rgba(213,227,0,0.3);
    color: #1a1a1a;
}

.support-message-meta {
    margin-top: 6px;
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: rgba(0,0,0,0.55);
}

.support-send-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.support-send-form textarea {
    width: 100%;
    resize: vertical;
}

.support-attach-row,
.support-admin-attach-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.06);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(0,0,0,0.7);
    transition: background 0.2s;
}

.support-attach-btn:hover {
    background: rgba(0,0,0,0.1);
}

.support-attach-btn-inline {
    margin-top: 8px;
}

.support-attach-names {
    font-size: 12px;
    color: rgba(0,0,0,0.5);
}

.support-message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.support-attachment {
    max-width: 100%;
}

.support-attachment-image img {
    max-width: 200px;
    max-height: 180px;
    border-radius: 8px;
    object-fit: cover;
}

.support-attachment-video video {
    max-width: 260px;
    max-height: 180px;
    border-radius: 8px;
}

.support-attachment-video a,
.support-attachment-image a {
    display: block;
    font-size: 11px;
    color: rgba(0,0,0,0.5);
    margin-top: 4px;
}

.support-empty {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 18px;
    color: #1a1a1a;
}

.support-empty h3,
.support-empty p {
    color: #1a1a1a;
}

.support-empty-list {
    color: rgba(0,0,0,0.6);
}

.support-new-ticket {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 16px;
    color: #1a1a1a;
}

.support-new-ticket h2 {
    color: #1a1a1a;
}

.support-new-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: end;
}

.support-new-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-field-panel {
    background: #f7f7f7;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-field-panel label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: rgba(0,0,0,0.75);
}

.support-field-panel i {
    color: var(--accent);
}

.support-field-panel select,
.support-field-panel textarea {
    width: 100%;
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 12px;
    outline: none;
    color: var(--text-primary);
}

.support-field-panel textarea {
    resize: vertical;
}

[data-theme="dark"] .support-field-panel {
    background: var(--bg-surface) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .support-field-panel label {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .support-field-panel select,
[data-theme="dark"] .support-field-panel textarea {
    background: rgba(0,0,0,0.15) !important;
    border-color: var(--border-strong) !important;
    color: var(--text-primary) !important;
}

.support-rate-block {
    border-top: 1px dashed rgba(0,0,0,0.1);
    margin-top: 14px;
    padding-top: 14px;
}

.support-rate-stars {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 10px 0 12px;
    flex-wrap: wrap;
    flex-direction: row-reverse;
}

.support-rate-stars input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.support-rate-stars label {
    font-size: 26px;
    color: rgba(0,0,0,0.25);
    cursor: pointer;
    user-select: none;
}

.support-rate-stars input:checked ~ label,
.support-rate-stars label:hover,
.support-rate-stars label:hover ~ label {
    color: var(--accent);
}

.support-rate-block textarea {
    width: 100%;
    resize: vertical;
    margin-top: 10px;
}

.support-rate-already {
    margin-top: 12px;
    font-weight: 700;
    color: rgba(0,0,0,0.75);
}

.support-rating-stars-inline {
    font-weight: 900;
    letter-spacing: 1px;
}

.support-star {
    display: inline-block;
    width: 14px;
    text-align: center;
}

.support-star-filled {
    color: var(--accent);
}

.support-star-empty {
    color: rgba(0,0,0,0.22);
}

.support-admin-rating-summary {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(213,227,0,0.08);
    border: 1px solid rgba(213,227,0,0.25);
}

.support-admin-rating-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.support-admin-rating-summary-subtle {
    margin-top: 6px;
    color: rgba(0,0,0,0.6);
    font-weight: 700;
    font-size: 13px;
}

.support-admin-rating-comment {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.06);
    white-space: pre-wrap;
}

.support-messages-empty {
    color: #1a1a1a;
    padding: 12px 0;
}

@media (max-width: 900px) {
    .support-layout {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .support-chat {
        width: 100%;
    }
    .support-messages {
        height: 280px;
        min-height: 180px;
        -webkit-overflow-scrolling: touch;
    }
    .support-message-bubble {
        font-size: 15px;
        line-height: 1.5;
        padding: 12px 14px;
    }
    .support-new-form {
        grid-template-columns: 1fr;
    }
}

