/* static/shop/css/main.css */
/* FORCE UPDATE v35 - ORIGINAL FULL VERSION + CRITICAL FIXES */

/*
=================================================================
=== 1. ШРИФТЫ И ГЛОБАЛЬНЫЕ СТИЛИ ===
=================================================================
*/
body {
    font-family: var(--body-font-family, sans-serif);
    font-size: var(--base-font-size, 16px);
    color: var(--main-text-color, #333);
    margin: 0;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #f4f4f4;
    overflow-x: hidden; /* Предотвращает горизонтальный скролл при full-width */
}
.site-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px 20px;
    min-height: 80vh;
    position: relative;
    z-index: 1;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font-family, sans-serif);
}
.product-composition-section h3, .product-description-section h3 {
    font-family: var(--product-header-font-family, sans-serif);
    font-size: var(--product-header-font-size, 1.2em);
    color: var(--product-header-text-color, #333);
}
a { color: var(--accent-color, #e53935); text-decoration: none; transition: color 0.2s; }
a, button, .product-card { -webkit-tap-highlight-color: transparent; }
a:active, button:active, .product-card:active { transform: scale(0.98); opacity: 0.9; transition: transform 0.1s ease, opacity 0.1s ease; }

/*
=================================================================
=== [FIX] ЛОГИКА ВИДИМОСТИ (ЧТОБЫ МЕНЮ НЕ НАКЛАДЫВАЛИСЬ) ===
=================================================================
*/
/* ПО УМОЛЧАНИЮ (DESKTOP) */
.mobile-nav-container { display: none !important; } /* Скрываем мобильное */
.desktop-nav { display: flex !important; }          /* Показываем десктопное */
.category-nav-desktop { display: block !important; }

/* МОБИЛЬНЫЕ УСТРОЙСТВА */
@media (max-width: 992px) {
    .desktop-nav { display: none !important; }          /* Скрываем десктоп */
    .category-nav-desktop { display: none !important; }
    .mobile-nav-container { display: block !important; } /* Показываем мобильное */

    /* Фикс отступов обертки на мобильном */
    .site-wrapper {
        margin: 10px;
        padding: 10px;
        width: auto;
    }
}

/*
=================================================================
=== 2. СТИЛИ НАВИГАЦИИ ===
=================================================================
*/
.user-navigation a:not(.btn),
.category-nav-desktop a:not(.btn),
.category-nav-header a:not(.btn),
.category-nav-mobile a:not(.btn),
.footer-links a:not(.btn) {
    text-decoration: none;
    position: relative;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    z-index: 1;
}
.user-navigation a:not(.btn):hover,
.category-nav-desktop a:not(.btn):hover,
.category-nav-header a:not(.btn):hover,
.category-nav-mobile a:not(.btn):hover,
.footer-links a:not(.btn):hover {
    text-decoration: none;
}
.logo a:hover, .cart a:hover, .back-link:hover { text-decoration: none; }

/* Подчеркивание */
.nav-style-underline .user-navigation a:not(.btn):hover,
.nav-style-underline .category-nav-desktop a:not(.btn):hover,
.nav-style-underline .footer-links a:not(.btn):hover {
    color: var(--main-text-color, #333);
}
.nav-style-underline .user-navigation a:not(.btn)::after,
.nav-style-underline .category-nav-desktop a:not(.btn)::after,
.nav-style-underline .footer-links a:not(.btn)::after {
    content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
    background-color: var(--accent-color, #e53935); transition: all 0.3s ease-in-out;
}
.nav-style-underline .user-navigation a:not(.btn)::after, .nav-style-underline .category-nav-desktop a:not(.btn)::after {
    bottom: -2px; /* Чуть ниже текста */
}
.nav-style-underline .user-navigation a:not(.btn):hover::after,
.nav-style-underline .category-nav-desktop a:not(.btn):hover::after,
.nav-style-underline .footer-links a:not(.btn):hover::after {
    left: 10%; width: 80%;
}

/* Подсветка */
.nav-style-highlight .user-navigation a:not(.btn):hover,
.nav-style-highlight .category-nav-desktop a:not(.btn):hover,
.nav-style-highlight .footer-links a:not(.btn):hover {
    background-color: #e9e9e9; color: var(--accent-color, #e53935);
}

/* Приподнимание */
.nav-style-lift .user-navigation a:not(.btn):hover,
.nav-style-lift .category-nav-desktop a:not(.btn):hover,
.nav-style-lift .footer-links a:not(.btn):hover {
    transform: translateY(-3px); color: var(--accent-color, #e53935);
}

/* Тень */
.nav-style-shadow .user-navigation a:not(.btn):hover,
.nav-style-shadow .category-nav-desktop a:not(.btn):hover,
.nav-style-shadow .footer-links a:not(.btn):hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    color: var(--accent-color, #e53935);
}

/* ВОЛНА */
.nav-style-wave .user-navigation a:not(.btn),
.nav-style-wave .category-nav-desktop a:not(.btn),
.nav-style-wave .footer-links a:not(.btn) {
    overflow: hidden;
}
.nav-style-wave .user-navigation a:not(.btn)::before,
.nav-style-wave .category-nav-desktop a:not(.btn)::before,
.nav-style-wave .footer-links a:not(.btn)::before {
    content: ''; position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 0%; /* Высота 0 */
    background-color: var(--accent-color, #e53935);
    transition: height 0.3s ease-out;
    z-index: -1;
}
.nav-style-wave .user-navigation a:not(.btn):hover::before,
.nav-style-wave .category-nav-desktop a:not(.btn):hover::before,
.nav-style-wave .footer-links a:not(.btn):hover::before {
    height: 100%; /* Заполняем вверх */
}
.nav-style-wave .user-navigation a:not(.btn):hover,
.nav-style-wave .category-nav-desktop a:not(.btn):hover,
.nav-style-wave .footer-links a:not(.btn):hover {
    color: var(--main-text-color, #333);
}

/*
=================================================================
=== 3. ОСНОВНЫЕ БЛОКИ (ШАПКА, МЕНЮ, КНОПКИ) ===
=================================================================
*/

.header {
    /* Собираем цвет из RGB (режим) + Alpha (прозрачность) */
    background: rgba(var(--header-rgb), var(--header-alpha)) !important;

    /* Размытие (если есть переменная) */
    backdrop-filter: blur(var(--blur-desktop));
    -webkit-backdrop-filter: blur(var(--blur-desktop));

    border-radius: 5px 5px 0 0;
}


.header-content { display: flex; justify-content: space-between; align-items: center; border-bottom: none; padding: 10px 0; gap: 20px; }

/*
.logo { flex-shrink: 1; margin-left: 6px !important; }
.logo a { font-weight: bold; display: flex; align-items: center; gap: 8px; }

.logo-icon {
    width: var(--icon-size, 22px);
    height: var(--icon-size, 22px);
    stroke: var(--icon-color, currentColor);
    transition: transform 0.3s ease;
}
*/

.desktop-nav { display: flex; align-items: center; gap: 20px; flex-grow: 1; justify-content: flex-end; }
.search-form-desktop { display: flex; max-width: 400px; flex-grow: 1; }
.search-form-desktop input[type="text"] { flex-grow: 1; border: 1px solid #ccc; padding: 8px; border-radius: 4px 0 0 4px; font-size: 14px; }
.user-navigation { font-size: 0.9em; display: flex; align-items: center; gap: 5px 20px; }
.user-nav-link { display: flex; align-items: center; gap: 6px; font-weight: bold; color: inherit; }
.user-nav-link svg {
    flex-shrink: 0;
    width: var(--icon-size, 22px);
    height: var(--icon-size, 22px);
    stroke: var(--icon-color, currentColor);
    transition: transform 0.3s ease;
}
.cart a { color: inherit; }
.user-nav-text.full-text { display: inline; white-space: nowrap; }

.category-nav-desktop, .category-nav-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 15px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 0 0 5px 5px;
}
.category-nav-desktop a, .category-nav-header a {
    font-weight: bold;
    font-family: var(--category-font-family, sans-serif);
    font-size: var(--category-font-size, 16px);
    color: var(--category-text-color, #333);
}

.category-nav-desktop {
    margin: 0 0 20px 0;
}

.category-nav-header { display: none; }

.icon-anim-scale .user-nav-link:hover svg, .icon-anim-scale .logo a:hover .logo-icon, .icon-anim-scale .benefit-item:hover svg { transform: scale(1.15); }
.icon-anim-rotate .user-nav-link:hover svg, .icon-anim-rotate .logo a:hover .logo-icon, .icon-anim-rotate .benefit-item:hover svg { transform: rotate(15deg); }
.icon-anim-bounce .user-nav-link:hover svg, .icon-anim-bounce .logo a:hover .logo-icon, .icon-anim-bounce .benefit-item:hover svg { transform: translateY(-4px); }

/* 1. SHAKE (Тряска) */
@keyframes iconShake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}
.icon-anim-shake .user-nav-link:hover svg,
.icon-anim-shake .logo a:hover .logo-icon,
.icon-anim-shake .benefit-item:hover svg {
    animation: iconShake 0.4s ease-in-out;
}

/* 2. PULSE (Пульсация) */
@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); }
}
.icon-anim-pulse .user-nav-link:hover svg,
.icon-anim-pulse .logo a:hover .logo-icon,
.icon-anim-pulse .benefit-item:hover svg {
    animation: iconPulse 0.8s infinite;
}

/* 3. SWING (Качание) */
@keyframes iconSwing {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}
.icon-anim-swing .user-nav-link:hover svg,
.icon-anim-swing .logo a:hover .logo-icon,
.icon-anim-swing .benefit-item:hover svg {
    transform-origin: top center;
    animation: iconSwing 0.6s ease-in-out;
}


/* КНОПКИ (Исключаем accordion-header И fav-btn) */
.btn, button:not(.accordion-header):not(.fav-btn):not(.mobile-list-toggle),
input[type="submit"],
a.btn-primary, a.btn-secondary, a.btn-danger,
/* ... остальные селекторы ... */
a.btn-primary, a.btn-secondary, a.btn-danger,
.btn-submit, .remove-btn,
/* .mobile-menu-mode-buttons a,  /* <--- ЭТО ПЕРЕОПРЕДЕЛЯЕТ КНОПКИ КАТЕГОРИЙ! */
.mobile-dropdown-content .btn,
.mobile-dropdown-content .btn-secondary,
.mobile-dropdown-content button[type="submit"],
.add-to-cart-btn, .add-to-cart-btn-new, .add-to-cart-btn-small {
    border: none;
    border-radius: var(--button-border-radius, 4px);
    font-family: var(--button-font-family, sans-serif);
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 20px;
    font-size: 1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    line-height: 1.2;
    background-color: var(--button-bg-color, #333);
    color: var(--button-text-color, #fff);
}

.btn:hover, button:not(.accordion-header):not(.fav-btn):hover, input[type="submit"]:hover, a.btn-primary:hover, .btn-submit:hover, .add-to-cart-btn:hover /*, .mobile-menu-mode-buttons a:hover { /* <--- ЭТО ПЕРЕОПРЕДЕЛЯЕТ HOVER! */
    background-color: var(--button-hover-bg-color, #000);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}
.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}
.btn-danger, .remove-btn {
    background-color: #dc3545;
    color: #fff;
}
.btn-danger:hover, .remove-btn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}
.btn:disabled, button:disabled, input[type="submit"]:disabled { background-color: #ccc; cursor: not-allowed; opacity: 0.7; transform: none; }

/* --- ВСЕ ВАШИ ПРЕСЕТЫ (ВОССТАНОВЛЕНЫ) --- */
.btn-preset-pill .btn, .btn-preset-pill button:not(.accordion-header):not(.fav-btn), .btn-preset-pill input[type="submit"], .btn-preset-pill a.btn-primary, .btn-preset-pill .btn-secondary, .btn-preset-pill .btn-danger, .btn-preset-pill .btn-submit, .btn-preset-pill .remove-btn, .btn-preset-pill .mobile-menu-mode-buttons a, .btn-preset-pill .mobile-dropdown-content .btn { border-radius: 50px; }
.btn-preset-soft .btn, .btn-preset-soft button:not(.accordion-header):not(.fav-btn), .btn-preset-soft input[type="submit"], .btn-preset-soft a.btn-primary, .btn-preset-soft .btn-submit, .btn-preset-soft .mobile-menu-mode-buttons a, .btn-preset-soft .mobile-dropdown-content .btn { background-color: #f0f0f3; color: #333; box-shadow: 5px 5px 10px #d1d9e6, -5px -5px 10px #ffffff; border-radius: 10px; }
.btn-preset-soft .btn-secondary { background-color: #e0e0e0; color: #555; box-shadow: 5px 5px 10px #bebebe, -5px -5px 10px #ffffff; }
.btn-preset-soft .btn-danger, .btn-preset-soft .remove-btn { background-color: #ffccd5; color: #d32f2f; box-shadow: 5px 5px 10px #e6b3bc, -5px -5px 10px #fff; }
.btn-preset-soft .btn:hover, .btn-preset-soft button:not(.accordion-header):not(.fav-btn):hover, .btn-preset-soft a:hover { transform: translateY(-2px); box-shadow: 2px 2px 5px #d1d9e6, -2px -2px 5px #ffffff; }
.btn-preset-gradient .btn, .btn-preset-gradient button:not(.accordion-header):not(.fav-btn), .btn-preset-gradient input[type="submit"], .btn-preset-gradient a.btn-primary, .btn-preset-gradient .btn-secondary, .btn-preset-gradient .btn-danger, .btn-preset-gradient .btn-submit, .btn-preset-gradient .remove-btn, .btn-preset-gradient .mobile-menu-mode-buttons a, .btn-preset-gradient .mobile-dropdown-content .btn { background: transparent; color: white; z-index: 1; border: none; }
.btn-preset-gradient .btn::before, .btn-preset-gradient button:not(.accordion-header):not(.fav-btn)::before, .btn-preset-gradient input[type="submit"]::before, .btn-preset-gradient a.btn-primary::before, .btn-preset-gradient .btn-secondary::before, .btn-preset-gradient .btn-danger::before, .btn-preset-gradient .btn-submit::before, .btn-preset-gradient .remove-btn::before, .btn-preset-gradient .mobile-menu-mode-buttons a::before, .btn-preset-gradient .mobile-dropdown-content .btn::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: 200% 200%; z-index: -1; transition: opacity 0.3s ease; background: linear-gradient(45deg, var(--button-bg-color, #333), var(--button-accent-color, #e53935)); }
.btn-preset-gradient .btn-secondary::before { background: linear-gradient(45deg, #6c757d, #495057); }
.btn-preset-gradient .btn-danger::before, .btn-preset-gradient .remove-btn::before { background: linear-gradient(45deg, #dc3545, #a71d2a); }
.btn-preset-gradient .btn:hover::before, .btn-preset-gradient button:not(.accordion-header):not(.fav-btn):hover::before, .btn-preset-gradient a:hover::before { background: linear-gradient(45deg, var(--button-accent-color, #e53935), var(--button-bg-color, #333)); }
.btn-preset-gradient .btn-secondary:hover::before { background: linear-gradient(45deg, #495057, #6c757d); }
.btn-preset-gradient .btn-danger:hover::before { background: linear-gradient(45deg, #a71d2a, #dc3545); }
.btn-preset-glass_frosted .btn, .btn-preset-glass_frosted button:not(.accordion-header):not(.fav-btn), .btn-preset-glass_frosted input[type="submit"], .btn-preset-glass_frosted a.btn-primary, .btn-preset-glass_frosted .btn-submit, .btn-preset-glass_frosted .add-to-cart-btn, .btn-preset-glass_frosted .mobile-menu-mode-buttons a, .btn-preset-glass_frosted .mobile-dropdown-content .btn { background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.5); color: #333; box-shadow: 0 4px 6px rgba(0,0,0,0.1); font-weight: 700; }
.btn-preset-glass_frosted .btn-secondary { background: rgba(0, 0, 0, 0.15); border: 1px solid rgba(0, 0, 0, 0.2); color: #fff; }
.btn-preset-glass_frosted .btn-danger, .btn-preset-glass_frosted .remove-btn { background: rgba(220, 53, 69, 0.25); border: 1px solid rgba(220, 53, 69, 0.5); color: #a71d2a; }
.btn-preset-glass_frosted .btn:hover, .btn-preset-glass_frosted button:not(.accordion-header):not(.fav-btn):hover, .btn-preset-glass_frosted a:hover { background: rgba(255, 255, 255, 0.4); color: var(--button-accent-color, #e53935); }
.btn-preset-glass_frosted .btn-secondary:hover { background: rgba(0, 0, 0, 0.3); }
.btn-preset-glass_frosted .btn-danger:hover { background: rgba(220, 53, 69, 0.4); }
@keyframes neonPulse { 0% { box-shadow: 0 0 5px var(--button-accent-color, #e53935), inset 0 0 5px var(--button-accent-color, #e53935); } 50% { box-shadow: 0 0 20px var(--button-accent-color, #e53935), inset 0 0 10px var(--button-accent-color, #e53935); } 100% { box-shadow: 0 0 5px var(--button-accent-color, #e53935), inset 0 0 5px var(--button-accent-color, #e53935); } }
@keyframes neonPulseGray { 0% { box-shadow: 0 0 5px #888, inset 0 0 5px #888; } 50% { box-shadow: 0 0 15px #888, inset 0 0 8px #888; } 100% { box-shadow: 0 0 5px #888, inset 0 0 5px #888; } }
@keyframes neonPulseRed { 0% { box-shadow: 0 0 5px #dc3545; } 50% { box-shadow: 0 0 15px #dc3545; } 100% { box-shadow: 0 0 5px #dc3545; } }
.btn-preset-neon_pulse .btn, .btn-preset-neon_pulse button:not(.accordion-header):not(.fav-btn), .btn-preset-neon_pulse input[type="submit"], .btn-preset-neon_pulse .add-to-cart-btn-new, .btn-preset-neon_pulse a.btn-primary, .btn-preset-neon_pulse .btn-submit, .btn-preset-neon_pulse .mobile-menu-mode-buttons a, .btn-preset-neon_pulse .mobile-dropdown-content .btn { background-color: #111; color: var(--button-accent-color, #e53935); border: 2px solid var(--button-accent-color, #e53935); box-shadow: 0 0 8px var(--button-accent-color, #e53935); text-shadow: 0 0 5px var(--button-accent-color, #e53935); text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; }
.btn-preset-neon_pulse .btn-secondary { background-color: #111; color: #ccc; border: 2px solid #ccc; box-shadow: 0 0 5px #ccc; text-shadow: 0 0 3px #ccc; }
.btn-preset-neon_pulse .btn-danger, .btn-preset-neon_pulse .remove-btn { background-color: #111; color: #dc3545; border: 2px solid #dc3545; box-shadow: 0 0 5px #dc3545; text-shadow: 0 0 3px #dc3545; }
.btn-preset-neon_pulse .btn:hover, .btn-preset-neon_pulse button:not(.accordion-header):not(.fav-btn):hover, .btn-preset-neon_pulse a:hover, .btn-preset-neon_pulse .add-to-cart-btn-new:hover { background-color: var(--button-accent-color, #e53935); color: #000; text-shadow: none; animation: neonPulse 1.5s infinite alternate; }
.btn-preset-neon_pulse .btn-secondary:hover { background-color: #ccc; color: #000; animation: neonPulseGray 1.5s infinite alternate; }
.btn-preset-neon_pulse .btn-danger:hover { background-color: #dc3545; color: #000; animation: neonPulseRed 1.5s infinite alternate; }
.btn-preset-brutal .btn, .btn-preset-brutal button:not(.accordion-header):not(.fav-btn), .btn-preset-brutal input[type="submit"], .btn-preset-brutal .add-to-cart-btn-new, .btn-preset-brutal a.btn-primary, .btn-preset-brutal .btn-secondary, .btn-preset-brutal .btn-danger, .btn-preset-brutal .remove-btn, .btn-preset-brutal .btn-submit, .btn-preset-brutal .mobile-menu-mode-buttons a, .btn-preset-brutal .mobile-dropdown-content .btn { border: 3px solid #000; border-radius: 0; box-shadow: 4px 4px 0 #000; font-weight: 900; text-transform: uppercase; transition: all 0.1s; }
.btn-preset-brutal .btn, .btn-preset-brutal .btn-submit, .btn-preset-brutal .mobile-menu-mode-buttons a, .btn-preset-brutal .add-to-cart-btn-new { background-color: #fff; color: #000; }
.btn-preset-brutal .btn-secondary { background-color: #e9ecef; color: #000; }
.btn-preset-brutal .btn-danger, .btn-preset-brutal .remove-btn { background-color: #ffebee; color: #c62828; }
.btn-preset-brutal .btn:hover, .btn-preset-brutal button:not(.accordion-header):not(.fav-btn):hover, .btn-preset-brutal a:hover, .btn-preset-brutal .add-to-cart-btn-new:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; background-color: var(--button-accent-color, #e53935); color: #fff; }
.btn-preset-brutal .btn-secondary:hover { background-color: #ced4da; }
.btn-preset-brutal .btn-danger:hover { background-color: #ef5350; color: #fff; }
.btn-preset-pushable_3d .btn, .btn-preset-pushable_3d button:not(.accordion-header):not(.fav-btn), .btn-preset-pushable_3d input[type="submit"], .btn-preset-pushable_3d a.btn, .btn-preset-pushable_3d .add-to-cart-btn-small, .btn-preset-pushable_3d .product-card button, .btn-preset-pushable_3d .add-to-cart-btn-new { border: none; border-radius: 8px; box-shadow: 0 4px 0 0 #333; transition: transform 0.1s ease, box-shadow 0.1s ease; }
.btn-preset-pushable_3d .btn:active, .btn-preset-pushable_3d button:not(.accordion-header):not(.fav-btn):active, .btn-preset-pushable_3d input[type="submit"]:active, .btn-preset-pushable_3d a.btn:active, .btn-preset-pushable_3d .add-to-cart-btn-small:active, .btn-preset-pushable_3d .product-card button:active, .btn-preset-pushable_3d .add-to-cart-btn-new:active { transform: translateY(4px); box-shadow: 0 0px 0 0 #333; }
.btn-preset-pushable_3d .btn-secondary { box-shadow: 0 4px 0 0 #495057; }
.btn-preset-pushable_3d .btn-secondary:active { box-shadow: 0 0px 0 0 #495057; }
.btn-preset-pushable_3d .btn-danger, .btn-preset-pushable_3d .remove-btn { box-shadow: 0 4px 0 0 #a71d2a; }
.btn-preset-pushable_3d .btn-danger:active, .btn-preset-pushable_3d .remove-btn:active { box-shadow: 0 0px 0 0 #a71d2a; }
.btn-preset-shine_hover .btn, .btn-preset-shine_hover button:not(.accordion-header):not(.fav-btn), .btn-preset-shine_hover input[type="submit"], .btn-preset-shine_hover a.btn, .btn-preset-shine_hover .add-to-cart-btn-small, .btn-preset-shine_hover .product-card button, .btn-preset-shine_hover .add-to-cart-btn-new { overflow: hidden; }
.btn-preset-shine_hover .btn::before, .btn-preset-shine_hover button:not(.accordion-header):not(.fav-btn)::before, .btn-preset-shine_hover input[type="submit"]::before, .btn-preset-shine_hover a.btn::before, .btn-preset-shine_hover .add-to-cart-btn-small::before, .btn-preset-shine_hover .product-card button::before, .btn-preset-shine_hover .add-to-cart-btn-new::before { content: ""; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); transform: skewX(-25deg); transition: left 0.6s ease; }
.btn-preset-shine_hover .btn:hover::before, .btn-preset-shine_hover button:not(.accordion-header):not(.fav-btn):hover::before, .btn-preset-shine_hover input[type="submit"]:hover::before, .btn-preset-shine_hover a.btn:hover::before, .btn-preset-shine_hover .add-to-cart-btn-small:hover::before, .btn-preset-shine_hover .product-card button:hover::before, .btn-preset-shine_hover .add-to-cart-btn-new:hover::before { left: 125%; }
.btn-preset-outline_fill .btn, .btn-preset-outline_fill button:not(.accordion-header):not(.fav-btn), .btn-preset-outline_fill input[type="submit"], .btn-preset-outline_fill a.btn, .btn-preset-outline_fill .add-to-cart-btn-small, .btn-preset-outline_fill .product-card button, .btn-preset-outline_fill .add-to-cart-btn-new { background-color: transparent; border: 2px solid var(--button-bg-color, #333); color: var(--button-bg-color, #333); transition: color 0.3s ease, background-color 0.3s ease; }
.btn-preset-outline_fill .btn:hover, .btn-preset-outline_fill button:not(.accordion-header):not(.fav-btn):hover, .btn-preset-outline_fill input[type="submit"]:hover, .btn-preset-outline_fill a.btn:hover, .btn-preset-outline_fill .add-to-cart-btn-small:hover, .btn-preset-outline_fill .product-card button:hover, .btn-preset-outline_fill .add-to-cart-btn-new:hover { background-color: var(--button-bg-color, #333); color: var(--button-text-color, #fff); }
.btn-preset-outline_fill .btn-secondary { border-color: #6c757d; color: #6c757d; }
.btn-preset-outline_fill .btn-secondary:hover { background-color: #6c757d; color: #fff; }
.btn-preset-outline_fill .btn-danger, .btn-preset-outline_fill .remove-btn { border-color: #dc3545; color: #dc3545; }
.btn-preset-outline_fill .btn-danger:hover, .btn-preset-outline_fill .remove-btn:hover { background-color: #dc3545; color: #fff; }


.add-to-cart-btn-small { width: 100%; padding: 8px; font-size: 0.9em; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product-card { border: 1px solid #e0e0e0; border-radius: 12px; background: white; transition: box-shadow 0.3s ease, transform 0.3s ease; display: flex; flex-direction: column; overflow: hidden; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.product-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex-grow: 1; padding: 20px; }
.product-card a:hover { text-decoration: none; }
.product-card .product-title:hover { color: var(--accent-color, #e53935); }
.product-image-wrapper { height: auto; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; margin: -20px -20px 15px -20px; position: relative; }
.product-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.product-card:hover .product-image { transform: scale(1.05); }
.product-title { margin: 0 0 10px 0; font-size: var(--product-title-font-size, 1.1em); line-height: 1.4; min-height: 2.8em; color: var(--product-title-text-color, #333); font-family: var(--product-title-font-family, sans-serif); transition: color 0.2s; }
.product-description { display: none; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; }
.product-price { font-size: 1.3em; font-weight: bold; color: var(--accent-color, #e53935); }
.add-to-cart-form { padding: 15px 20px 20px 20px; }
.add-to-cart-btn-small { width: 100%; }
.product-detail-container { display: flex; gap: 40px; flex-wrap: wrap; }
.product-left-column { flex: 1; min-width: 300px; display: flex; flex-direction: column; gap: 20px; }
.product-right-column { flex: 1; min-width: 300px; background-color: white; padding: 20px; border-radius: 8px; }
.product-gallery { background-color: white; padding: 20px; border-radius: 8px; }
.main-image img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 15px; aspect-ratio: 1 / 1; object-fit: cover; }
.thumbnails { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbnail { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; transition: border-color 0.3s ease; }
.thumbnail:hover { border-color: #cccccc; }
.thumbnail.active { border-color: var(--accent-color, #e53935); }
.product-composition-section { background-color: white; padding: 20px; border-radius: 8px; line-height: 1.6; }
.product-right-column h1 { font-size: 2em; margin-top: 0; margin-bottom: 10px; }
.product-right-column .price { font-size: 1.5em; font-weight: bold; color: var(--accent-color, #e53935); margin-top: 0; margin-bottom: 25px; }
.product-description-section { line-height: 1.6; margin-bottom: 25px; }
.product-actions-box { background-color: #f9f9f9; border: 1px solid #eee; border-radius: 8px; padding: 20px; margin-top: 20px; }

/* [ВОССТАНОВЛЕНО] Наличие товара */
.stock-status { font-size: 1.1em; margin-bottom: 15px; font-weight: bold; }
.in-stock { color: #4CAF50; }
.out-of-stock { color: #e53535; }

.add-to-cart-form-detail { display: flex; flex-direction: column; gap: 15px; }
.add-to-cart-form-detail .form-group { display: flex; align-items: center; gap: 10px; }
.add-to-cart-form-detail label { font-weight: bold; }
.add-to-cart-form-detail input { width: 60px; padding: 8px; text-align: center; border: 1px solid #ccc; border-radius: 4px; }
.add-to-cart-btn { padding: 15px 30px; width: 100%; }
.back-link { display: block; margin-top: 30px; text-decoration: none; color: #333; }
.form-container { max-width: 600px; margin: 2rem auto; padding: 30px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.form-container h1 { text-align: center; margin-top: 0; }
.form-container p { text-align: center; color: #666; margin-bottom: 30px; }
.styled-form .form-group { margin-bottom: 20px; }
.styled-form label { display: block; margin-bottom: 8px; font-weight: bold; font-size: 0.9em; }
.styled-form input[type="text"], .styled-form input[type="email"], .styled-form input[type="password"] { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 1em; font-family: inherit; transition: border-color 0.3s, box-shadow 0.3s; }
.styled-form input:focus { border-color: var(--accent-color, #e53935); box-shadow: 0 0 5px rgba(229, 57, 53, 0.5); outline: none; }
.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }
.form-error { color: #dc3545; font-size: 0.85em; margin-top: 5px; }
.form-error-main { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; padding: 15px; border-radius: 5px; margin-bottom: 20px; }
.form-actions { text-align: center; margin-top: 30px; }
.form-footer { text-align: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; font-size: 0.9em; }
.cabinet-container { padding-top: 2rem; padding-bottom: 2rem; }
.messages { padding-left: 0; list-style: none; }
.messages li { padding: .75rem 1.25rem; margin-bottom: 1rem; border-radius: .25rem; border: 1px solid transparent; }
.messages .success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.messages .error { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.cabinet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 15px; }
.orders-table { width: 100%; border-collapse: collapse; }
.orders-table thead { background-color: #f8f8f8; }
.orders-table th, .orders-table td { padding: 12px 15px; text-align: left; }
.order-item { border-bottom: 1px solid #eee; }
.status-cancelled { color: #dc3545; font-weight: bold; }
.status-delivered, .status-paid { color: #28a745; }
.status-unpaid { color: #ffc107; }
.order-actions { text-align: right; display: flex; gap: 10px; justify-content: flex-end; }
.cart-container { width: 100%; margin-bottom: 2rem; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table thead { background-color: #f8f8f8; }
.cart-table th { padding: 15px; text-align: left; font-weight: bold; }
.cart-item { border-bottom: 1px solid #eee; }
.cart-item td { padding: 15px; vertical-align: middle; }
.product-col { width: 50%; }
.product-info-cell { display: flex; align-items: center; gap: 15px; }
.product-image-link img { max-width: 100px; border-radius: 5px; }
.product-name { font-weight: bold; color: var(--main-text-color, #333); }
.variant-name { color: #666; }
.quantity-form { display: flex; align-items: center; gap: 10px; }
.quantity-form input { width: 50px; text-align: center; padding: 8px; }
.quantity-form button { padding: 8px 12px; font-size: 0.9em; }
.remove-btn .mobile-icon { display: none; }
.cart-summary { text-align: right; margin-top: 2rem; }
.cart-actions { margin-top: 1rem; display: flex; justify-content: flex-end; gap: 10px; }
.cart-empty { text-align: center; padding: 3rem 1rem; background: #f9f9f8; border-radius: 8px; }
.footer { max-width: 1200px; margin: 40px auto 20px auto; padding: 20px 40px; text-align: center; color: var(--footer-text-color, #555); font-family: var(--footer-font-family, sans-serif); font-size: var(--footer-font-size, 14px); opacity: 0.9; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 15px; margin-bottom: 15px; }
.footer-links a { color: var(--footer-text-color, #555); }

/*
.swiper-container { width: 100%; height: 55vh; min-height: 300px; max-height: 600px; color: white; border-radius: 0px; overflow: hidden; background: #eee; margin-top: 30px; position: relative; }
.swiper-slide { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background-color: transparent; }
.swiper-slide-image { width: 100%; height: 100%; object-fit: contain; object-position: center; font-family: 'object-fit: contain; object-position: center;'; }
*/

/* 1. КОНТЕЙНЕР СЛАЙДЕРА */
.swiper-container {
    /* Растягиваем на всю ширину (с компенсацией отступов) */
    width: calc(100% + 80px);
    margin-left: -40px;
    margin-right: -40px;
    margin-top: -20px;
    margin-bottom: 30px;

    /* ГЛАВНОЕ: Убираем ограничения высоты */
    height: auto !important;
    min-height: 0 !important;

    /* Убираем принудительные пропорции */
    aspect-ratio: auto !important;

    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* 2. САМ СЛАЙД (Обертка картинки) */
.swiper-slide {
    /* Слайд должен быть резиновым по высоте */
    height: auto !important;
    display: flex; /* Убирает лишние отступы снизу */
}

/* 3. КАРТИНКА */
.swiper-slide-image {
    width: 100%;

    /* ГЛАВНОЕ: Высота авто = сохранение родных пропорций картинки */
    height: auto !important;

    display: block;
    object-fit: cover;
}


.slide-content-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; padding: 40px; box-sizing: border-box; }
.slide-content { padding: 25px 45px; border-radius: 8px; max-width: 90%; }
.slide-content h1 { font-size: 2.8em; margin: 0 0 10px 0; font-weight: bold; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
.slide-content p { font-size: 1.3em; margin: 0 0 25px 0; }
.slide-btn { display: inline-block; padding: 12px 28px; background-color: #fff; color: #333; text-decoration: none; border-radius: 5px; font-weight: bold; transition: all 0.3s; font-family: var(--body-font-family, sans-serif); }
.slide-btn:hover { background-color: var(--accent-color, #e53935); color: #fff; transform: scale(1.05); }
.slide-full-link { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; }
.pos-center-center { justify-content: center; align-items: center; text-align: center; }
.pos-bottom-left { justify-content: flex-start; align-items: flex-end; text-align: left; }
.pos-bottom-right { justify-content: flex-end; align-items: flex-end; text-align: right; }
.pos-top-left { justify-content: flex-start; align-items: flex-start; text-align: left; }
.pos-top-right { justify-content: flex-end; align-items: flex-start; text-align: right; }
.swiper-button-next, .swiper-button-prev { color: #ffffff; background-color: rgba(0, 0, 0, 0.2); border-radius: 50%; width: 50px; height: 50px; transition: background-color: 0.3s; }
.swiper-button-next:hover, .swiper-button-prev:hover { background-color: rgba(0, 0, 0, 0.5); }
.swiper-button-next:after, .swiper-button-prev:after { font-size: 22px; font-weight: bold; }
.swiper-pagination-bullet-active { background-color: #ffffff; }

.mobile-view-desktop_icons .user-navigation .user-nav-text { display: none !important; }

/* --- МОБИЛЬНЫЙ БАННЕР (ФИКС ОТСТУПОВ И СТРЕЛОК) --- */
@media (max-width: 992px) {

    /* 1. Контейнер: Разрешаем ему растягиваться от содержимого */
    .swiper-container {
        /* Ширина = 100% + левый отступ (10) + правый отступ (10) = 20px */
        width: calc(100% + 8px) !important;

        /* Сдвигаем влево и вправо ровно на размер отступа родителя */
        margin-left: -4px !important;
        margin-right: -4px !important;

        margin-top: 0 !important;

        /* Остальные настройки высоты */
        height: auto !important;
        min-height: auto !important;
        aspect-ratio: auto !important;

        border-radius: 0 !important;
    }

    /* 2. Слайд: Тоже должен быть резиновым */
    .swiper-slide {
        height: auto !important;
        display: flex;
        align-items: flex-start; /* Прижимаем к верху */
    }

    /* 3. КАРТИНКА (ГЛАВНОЕ ИСПРАВЛЕНИЕ) */
    /* Раньше тут было position: absolute, из-за чего высота была 0 */
    .swiper-slide-image {
        position: relative !important; /* Возвращаем картинку в поток */
        width: 100% !important;
        height: auto !important;       /* Высота зависит от ширины картинки */
        object-fit: contain !important;
    }

    /* Уменьшаем текст на баннере для мобильного, если он есть */
    .slide-content h1 { font-size: 1.2em; }
    .slide-content p { font-size: 0.9em; }
    .slide-content { padding: 10px; }
}

    /* Уменьшаем стрелки */
    .swiper-button-next, .swiper-button-prev { width: 30px !important; height: 30px !important; }
    .swiper-button-next:after, .swiper-button-prev:after { font-size: 14px !important; }
}


/*
=================================================================
=== СТИЛИ ДЛЯ СТРАНИЦЫ ДЕТАЛЕЙ ТОВАРА (product_detail.html) ===
=================================================================
*/

/* 1. Основной макет */
.product-detail-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 15px; /* Для отступов на краях, если site-wrapper не справляется */
}
.product-gallery-new {
    grid-column: 1 / 7;
}
.product-info-new {
    grid-column: 7 / 13;
    padding: 1rem 0; /* Убрал лишний padding, если site-wrapper уже дает */
}

/* 2. Галерея */
.main-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12); /* Более выраженная тень */
    margin-bottom: 1rem;
    cursor: zoom-in;
}
.main-image-container img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.main-image-container:hover img {
    transform: scale(1.5); /* Фиксированный коэффициент масштабирования */
}
.thumbnails-new {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start; /* Выравнивание по левому краю */
}
.thumbnail-new {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* Мягкая тень */
}
.thumbnail-new:hover {
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.thumbnail-new.active {
    border-color: var(--accent-color, #e53935);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Более выраженная тень для активной */
    transform: translateY(-1px); /* Меньше сдвиг для активной */
}

/* 3. Правая колонка: Информация */
.product-title-new {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 0.75rem; /* Немного увеличен отступ */
    line-height: 1.2;
    color: var(--product-title-text-color, #222);
    font-family: var(--product-title-font-family, sans-serif);
    font-weight: var(--product-title-font-weight);
    font-style: var(--product-title-font-style);
}
.price-new {
    font-size: 2.2rem; /* Немного крупнее */
    font-weight: 700;
    color: var(--accent-color, #e53935);
    margin-bottom: 2.5rem; /* Увеличен отступ */
}

/* 4. Кнопки и селектор количества */
.actions-new {
    margin-bottom: 2.5rem; /* Увеличен отступ */
}
.add-to-cart-form-detail {
    display: flex;
    align-items: center; /* Выравнивание элементов по центру */
    gap: 1rem;
}
.quantity-selector {
    display: inline-flex;
    align-items: center;
    background: transparent !important;
    border: none !important; /* Убираем внешнюю рамку */
    gap: 5px; /* Расстояние между кнопками и цифрой */
}

/* Поле с цифрой: убираем рамку, делаем фон */
.quantity-selector input {
    width: 45px !important;
    text-align: center;
    border: none !important; /* Убираем рамку у цифры */
    background: #f5f5f5;     /* Легкий серый фон (или white) */
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1em;
    padding: 8px 0;
    -moz-appearance: textfield; /* Убираем стрелки браузера */
}
/* Убираем стрелки браузера (Chrome/Safari) */
.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Кнопки Плюс и Минус */
.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #e0e0e0; /* Цвет кнопки */
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: background 0.2s;
}
.qty-btn:hover {
    background: #d6d6d6;
}

/* --- МОБИЛЬНАЯ КОРРЕКЦИЯ --- */
@media (max-width: 992px) {
    /* Гарантируем, что на мобильном поле не растянется */
    .quantity-selector {
        width: auto !important;
        justify-content: center;
    }
}

.add-to-cart-btn-new {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Важно для позиционирования галочки */
    overflow: hidden;
    padding: 0.8rem 1.5rem; /* Адаптивный padding */
    font-size: 1.1em; /* Увеличенный шрифт */
    min-height: 50px; /* Минимальная высота для кнопки */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Мягкая тень */
}



.add-to-cart-btn-new .btn-text {
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.add-to-cart-btn-new .btn-icon {
    position: absolute;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    color: var(--button-text-color, #fff);
}
.add-to-cart-btn-new.added .btn-text {
    opacity: 0;
    transform: translateY(-10px);
}
.add-to-cart-btn-new.added .btn-icon {
    opacity: 1;
    transform: translateY(0);
}




/* 5. Аккордеон */
.accordion-new {
    border-top: 1px solid #eee;
    margin-bottom: 2.5rem; /* Увеличен отступ */
}
.accordion-item {
    border-bottom: 1px solid #eee;
}
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    font-size: 1.1em;
    font-weight: 600;
    font-family: var(--product-header-font-family, sans-serif);
    color: var(--product-header-text-color, #333);
    transition: color 0.3s ease; /* Плавный переход цвета */
}
.accordion-header:hover {
    color: var(--accent-color, #e53935); /* Цвет при наведении */
}
.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--accent-color, #e53935); /* Цвет иконки аккордеона */
    width: 22px; height: 22px; /* Чуть крупнее */
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 0.5rem;
    line-height: 1.7; /* Для лучшей читаемости */
    color: var(--main-text-color);
}
.accordion-content p {
    margin: 0;
    padding-bottom: 1.25rem;
}
.accordion-item.open .accordion-header {
    color: var(--accent-color, #e53935);
}
.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

/* 6. Блок преимуществ */
.benefits-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.2rem; /* Увеличил отступ */
    padding: 1.5rem 0; /* Увеличил padding */
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 2.5rem; /* Увеличил отступ */
}

/* --- СТИЛИ ДЛЯ ВСПЛЫВАЮЩИХ ПОДСКАЗОК (BENEFITS) --- */

.benefit-item {
    position: relative; /* Чтобы подсказка позиционировалась относительно иконки */
    cursor: help;       /* Курсор-вопросик, чтобы показать, что есть инфо */
}

/* Сам блок подсказки (скрыт по умолчанию) */
.benefit-tooltip {
    visibility: hidden;
    opacity: 0;
    width: 200px;           /* Ширина подсказки */
    background-color: #333; /* Темный фон */
    color: #fff;            /* Белый текст */
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85em;
    line-height: 1.4;

    /* Позиционирование */
    position: absolute;
    z-index: 10;
    bottom: 125%;  /* Поднимаем НАД элементом */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* Центрируем + сдвиг для анимации */

    /* Анимация появления */
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    pointer-events: none; /* Чтобы мышка не "спотыкалась" об него */
}

/* Стрелочка вниз у подсказки */
.benefit-tooltip::after {
    content: "";
    position: absolute;
    top: 100%; /* В самом низу блока */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent; /* Треугольник цвета фона */
}

/* Эффект при наведении */
/* ======================================================= */
/* === СТИЛИ ДЛЯ ПРЕИМУЩЕСТВ (ИКОНКИ + ТУЛТИПЫ) === */
/* ======================================================= */

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    cursor: help;

    /* ЗАПРЕТ ВЫДЕЛЕНИЯ */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Размер иконки */
.benefit-item svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--accent-color, #e53935);
    transition: transform 0.3s ease, color 0.2s ease;
}

.benefit-item:hover svg,
.benefit-item.active-tooltip svg {
    color: #333;
}

/* Всплывашка */
.benefit-tooltip {
    visibility: hidden;
    opacity: 0;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.85em;
    line-height: 1.4;
    font-weight: normal;

    position: absolute;
    z-index: 100;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);

    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    pointer-events: none;
}

.benefit-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Логика показа */
.benefit-item:hover .benefit-tooltip,
.benefit-item.active-tooltip .benefit-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ======================================================= */
/* === [конец] СТИЛИ ДЛЯ ПРЕИМУЩЕСТВ (ИКОНКИ+ ТУЛТИПЫ) === */
/* ======================================================= */

/* Кнопка "Вернуться в каталог" */
    .back-link-new {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: #777;
        text-decoration: none;
        font-size: 1em;
        margin-top: 20px;

        /* Анимация */
        transition: color 0.2s ease, transform 0.2s ease;

        /* ВАЖНО: Убираем любые фоны и рамки */
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* При наведении */
    .back-link-new:hover {
        /* Меняем цвет на акцентный (красный) */
        color: var(--accent-color, #e53935);

        /* Сдвигаем немного влево для эффекта возврата */
        transform: translateX(-5px);

        /* ГАРАНТИРОВАННО убираем фон при наведении */
        background: transparent !important;
        background-color: transparent !important;
        text-decoration: none !important;
    }

    /* Стрелочка */
    .back-link-new::before {
        content: "←";
        display: inline-block;
        margin-right: 5px;
        font-size: 1.2em;
        line-height: 1;
        /* Убираем фон у самой стрелочки, если вдруг он там есть */
        background: transparent !important;
    }




@media (max-width: 992px) {
    .site-wrapper { margin: 10px; padding: 10px 15px; }
    .mobile-view-adaptive .site-wrapper {padding-left: 4px !important; padding-right: 4px !important; border-radius: 6px; box-sizing: border-box !important; max-width: 100% !important; width: auto !important; margin: 6px !important; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }


    .mobile-view-adaptive .header {
            /* === ИСПРАВЛЕНИЕ: ДЛЯ МОБИЛЬНЫХ БЕРЕМ МОБИЛЬНУЮ ПЕРЕМЕННУЮ === */
            /* На десктопе сработает другое правило (см. ниже) */
            background-color: rgba(var(--mobile-header-rgb), var(--mobile-header-alpha)) !important;
        }

    .mobile-view-adaptive .header-content { border-bottom: none; padding: 10px 0; }

    .header {
                /* Компенсируем 10px отступов родителя */
                width: calc(100% + 8px) !important;
                margin-left: -4px !important;
                margin-right: -4px !important;

                /* Внутренние отступы, чтобы контент не прилип */


                border-radius: 0px 0px 0 0 !important;
            }

    .mobile-view-adaptive .content-wrapper { padding: 0; }
    .desktop-nav { display: none; }
    .mobile-nav-container { display: block; }
    .content-wrapper > .category-nav-desktop { display: none; }

    /* === [FIX] УБРАЛ ЛИШНИЙ ОТСТУП И ГРАНИЦУ В МОБИЛЬНОЙ ШАПКЕ === */
    .mobile-header-icons_plus_cat_full .header .category-nav-header {
        display: flex;
        margin: 0;
        padding: 10px;
        font-size: 0.9em;
        gap: 5px 10px;
        border-top: none;
    }

    .header-content { flex-wrap: nowrap; }

    /* 1. Логотип */
    .logo {
        flex-grow: 0 !important;
        margin-left: 6px !important;
        margin-right: auto !important; /* Толкает иконки вправо */
    }

    /* 2. Иконки: минимальный отступ, прижаты вправо */
    .user-navigation-mobile {
        margin-left: auto !important;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 5px; /* МИНИМАЛЬНЫЙ ОТСТУП */
        padding-right: 0 !important;
    }

    .user-navigation-mobile .user-nav-link { padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
    .user-navigation-mobile .user-nav-text { font-size: 0.7em; display: none; }
    .mobile-header-full .user-nav-text.full-text, .mobile-header-partial .user-nav-text.partial-text { display: inline !important; }
    .mobile-header-icons .user-nav-text { display: none !important; }

    /* 3. ВЫПАДАЮЩАЯ ПАНЕЛЬ (СТРОГО СПРАВА) */
    .mobile-dropdown-panel {
        display: block;
        position: absolute;
        top: 100%; /* Сразу под шапкой */
        z-index: 2000;

        /* ПРИЖИМАЕМ К ПРАВОМУ КРАЮ */
        right: 0 !important;
        left: auto !important;

        /* Ширина подстраивается, но не меньше 110px */
        width: max-content !important;
        min-width: 110px;
        max-width: 100vw;

        background: transparent;
        overflow: hidden; /* Скрываем всё, что вылезает */
        max-height: 0;
        transition: max-height 0.4s ease-out;

        /* Выравнивание содержимого по правому краю */
        display: flex;
        flex-direction: column;
        align-items: flex-end;

        /* Тень для всей панели */
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        border-radius: 0 0 0 10px; /* Скругление только левого нижнего угла */
    }

    .mobile-dropdown-panel.is-open {
        max-height: 80vh;
        overflow-y: auto; /* Скролл, если меню длинное */
    }

    /* Контейнер внутри панели */
    .mobile-dropdown-content {
        padding: 15px 20px;
        background: #fff; /* Белый фон только здесь */
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* Контент жмется вправо */
    }

    /* Скрытые обертки (Поиск, Категории...) */
    .mobile-dropdown-panel .category-nav-mobile-wrapper,
    .mobile-dropdown-panel .search-form-mobile-wrapper,
    .mobile-dropdown-panel .user-nav-mobile-wrapper,
    .mobile-dropdown-panel .cart-nav-mobile-wrapper {
        display: none;
        width: 100%;
    }

    /* Показываем активную обертку */
    .mobile-dropdown-panel .is-visible {
        display: block;
    }

    /* --- СТИЛИ ДЛЯ ПОИСКА (ЧТОБЫ НЕ БЫЛО БЕЛЫХ ПЯТЕН) --- */
    .search-form-mobile {
        display: flex;
        gap: 0; /* Слитно */
        width: 100%;
        margin: 0;
    }
    .search-form-mobile input {
        flex-grow: 1;
        border: 1px solid #ccc;
        border-right: none; /* Убираем границу стыка */
        padding: 10px;
        border-radius: 4px 0 0 4px;
        min-width: 0; /* Чтобы не вылезал */
    }
    .search-form-mobile button {
        border-radius: 0 4px 4px 0 !important;
        margin: 0 !important;
        width: auto !important;
        padding: 0 15px !important;
    }

    /* Категории */
    .category-nav-mobile { display: flex; flex-direction: column; gap: 0; width: 100%; }
    .category-nav-mobile a {
        white-space: normal; /* Разрешаем перенос текста */
        text-align: right; /* Текст категорий справа */
        padding: 10px 0;
        border-bottom: 1px solid #f5f5f5;
        display: block;
    }

    /* 4. КНОПКИ (Вход, Корзина) */
    .user-nav-mobile, .cart-summary-mobile {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: flex-end; /* Прижимаем кнопки вправо */
        text-align: right;
    }

    .user-greeting {
        font-weight: bold; margin: 0 0 10px 0;
        padding-bottom: 10px; border-bottom: 1px solid #eee;
        width: 100%; text-align: right;
    }

    .cart-summary-mobile p {
        margin: 0; font-size: 1rem;
        text-align: right;
        white-space: nowrap;
    }

    /* Кнопки: авто-ширина, прижаты вправо */
    .user-nav-mobile .btn, .cart-summary-mobile .btn {
        width: auto !important;
        display: inline-block !important;
        min-width: 120px;
        padding: 10px 20px !important;
        box-sizing: border-box;
        text-align: center;
        margin: 0 !important;
    }

    /* ========================================================= */
    /* === ИСПРАВЛЕННАЯ КАРТОЧКА ТОВАРА (MOBILE) === */
    /* ========================================================= */

    /* 1. КАРТОЧКА (Внешний контейнер) */
    .mobile-grid-col-0 .product-card {
        padding: 0 !important;
        background: #fff;

        /* === ИСПРАВЛЕНО: добавлено слово solid === */
        border: 1px solid #eee !important;

        /* === ЕДИНЫЙ РАДИУС: 10px === */
        border-radius: 10px !important;

        /* Используем visible, чтобы тень при подъеме не обрезалась */
        overflow: visible !important;

        display: flex !important;
        flex-direction: column !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease;

        /* Фикс, чтобы рамка отрисовывалась корректно */
        transform: translateZ(0);
    }



    /* Анимация подъема карточки */
    .mobile-grid-col-0 .product-card:active {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        z-index: 2;
    }

    /* 2. ОБЕРТКА ФОТО (Внутренний контейнер) */
    .mobile-grid-col-0 .product-image-wrapper {
        margin: 0 !important; /* Прижимаем к краям карточки */
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;

        /* === ЕДИНЫЙ РАДИУС: 10px === */
        border-radius: 10px !important;

        /* ГАРАНТИРОВАННАЯ ОБРЕЗКА (ножницы) */
        /* Вырезаем фото формой 10px */
        clip-path: inset(0 round 10px) !important;
        -webkit-clip-path: inset(0 round 10px) !important;

        overflow: hidden !important;

        /* Отступ снизу (между фото и ценой) */
        margin-bottom: 10px !important;
        background: #f5f5f5;

        /* Фикс для анимации */
        transform: translateZ(0);
    }

    /* 3. САМА КАРТИНКА */
    .mobile-grid-col-0 .product-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;

        /* Убираем радиус, так как обрезает Wrapper */
        border-radius: 0 !important;

        transition: transform 0.4s ease;
    }

    /* 4. ЗУМ ФОТО ВНУТРИ */
     .mobile-grid-col-0 .product-card:active .product-image {
        transform: scale(1.1);
    }




    /* 4. ТЕКСТ: Компактный */
    .mobile-grid-col-0 .product-title {
        font-size: 0.85rem !important;
        margin: 6px 6px 2px 6px !important;
        line-height: 1.2 !important;
        min-height: 2.4em;
        text-align: center;
        white-space: normal !important;
    }

    .mobile-grid-col-0 .product-price {
        font-size: 0.95rem !important;
        font-weight: bold;
        margin: 0 6px 6px 6px !important;
        text-align: center;
        margin-bottom: 6px !important; /* Добавляем отступ */
    }

    /* 5. КНОПКА: Широкая */
    .mobile-grid-col-0 .add-to-cart-form {
        padding: 0 4px 8px 4px !important;
        margin-top: auto;
        /* Добавляем отступ сверху
        margin-top: 6px !important; */
    }

    .mobile-grid-col-0 .add-to-cart-btn-small {
        width: 100% !important;
        display: block !important;
        padding: 8px 0 !important;
        font-size: 0.85rem !important;
        margin-top: 0;
        /* ЦВЕТА НЕ ПЕРЕОПРЕДЕЛЯЕМ */
    }

    /* ========================================================= */
    /* === СЕТКА ПО РАЗМЕРАМ (АДАПТИВНАЯ) === */
    /* ========================================================= */
    /* 1. Планшеты (от 590px до 992px) -> 4 колонки */
    @media (min-width: 590px) {
        .mobile-grid-col-0 .product-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 12px !important; }
    }

    /* 2. Большие телефоны (390px - 589px) -> 3 колонки */
    @media (min-width: 390px) and (max-width: 589px) {
        .mobile-grid-col-0 .product-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
        .mobile-grid-col-0 .product-title { font-size: 0.85rem !important; }
    }
    /* 3. Узкие телефоны (меньше 390px) -> 2 колонки */
    @media (max-width: 389px) {
        .mobile-grid-col-0 .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
    }

    /* Остальные режимы (фиксированные из админки) */
    .mobile-grid-col-1 .product-grid { grid-template-columns: 1fr !important; gap: 15px !important; }

    .mobile-grid-col-1 .product-title { font-size: 1.1rem !important; margin-bottom: 10px !important; }
    .mobile-grid-col-1 .product-price { font-size: 1.2rem !important; }
    .mobile-grid-col-1 .add-to-cart-btn-small { padding: 10px 0 !important; font-size: 1rem !important; }

    .mobile-grid-col-1 .product-card {padding: 0 !important; background: #fff; border: 1px solid #eee !important; border-radius: 10px !important; overflow: visible !important; display: flex !important; flex-direction: column !important; transition: transform 0.2s ease, box-shadow 0.2s ease; transform: translateZ(0); }
    /* Анимация подъема карточки */
    .mobile-grid-col-1 .product-card:active {transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); z-index: 2; }
    /* 2. ОБЕРТКА ФОТО (Внутренний контейнер) */
    .mobile-grid-col-1 .product-image-wrapper {margin: 0 !important; width: 100% !important; aspect-ratio: 1 / 1 !important; border-radius: 10px !important; clip-path: inset(0 round 10px) !important; -webkit-clip-path: inset(0 round 10px) !important; overflow: hidden !important; margin-bottom: 10px !important; background: #f5f5f5; transform: translateZ(0);}
    /* 3. САМА КАРТИНКА */
    .mobile-grid-col-1 .product-image {width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; border-radius: 0 !important; transition: transform 0.4s ease;}
    /* 4. ЗУМ ФОТО ВНУТРИ */
     .mobile-grid-col-1 .product-card:active .product-image {transform: scale(1.1);}




    .mobile-grid-col-2 .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }

    .mobile-grid-col-2 .product-title { font-size: 0.9rem !important; margin-bottom: 6px !important; line-height: 1.25 !important; height: 2.5em; }
    .mobile-grid-col-2 .product-price { font-size: 1rem !important; }
    .mobile-grid-col-2 .add-to-cart-btn-small { padding: 8px 0 !important; font-size: 0.9rem !important; }
    .mobile-grid-col-2 .product-card {padding: 0 !important; background: #fff; border: 1px solid #eee !important; border-radius: 10px !important; overflow: visible !important; display: flex !important; flex-direction: column !important; transition: transform 0.2s ease, box-shadow 0.2s ease; transform: translateZ(0); }
    /* Анимация подъема карточки */
    .mobile-grid-col-2 .product-card:active {transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); z-index: 2; }
    /* 2. ОБЕРТКА ФОТО (Внутренний контейнер) */
    .mobile-grid-col-2 .product-image-wrapper {margin: 0 !important; width: 100% !important; aspect-ratio: 1 / 1 !important; border-radius: 10px !important; clip-path: inset(0 round 10px) !important; -webkit-clip-path: inset(0 round 10px) !important; overflow: hidden !important; margin-bottom: 10px !important; background: #f5f5f5; transform: translateZ(0);}
    /* 3. САМА КАРТИНКА */
    .mobile-grid-col-2 .product-image {width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; border-radius: 0 !important; transition: transform 0.4s ease;}
    /* 4. ЗУМ ФОТО ВНУТРИ */
     .mobile-grid-col-2 .product-card:active .product-image {transform: scale(1.1);}

    .mobile-grid-col-3 .product-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }

    .mobile-grid-col-3 .product-title { font-size: 0.75rem !important; margin-bottom: 4px !important; line-height: 1.2 !important; height: 2.4em; }
    .mobile-grid-col-3 .product-price { font-size: 0.85rem !important; }
    .mobile-grid-col-3 .product-card {padding: 0 !important; background: #fff; border: 1px solid #eee !important; border-radius: 10px !important; overflow: visible !important; display: flex !important; flex-direction: column !important; transition: transform 0.2s ease, box-shadow 0.2s ease; transform: translateZ(0); }
    /* Анимация подъема карточки */
    .mobile-grid-col-3 .product-card:active {transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); z-index: 2; }
    /* 2. ОБЕРТКА ФОТО (Внутренний контейнер) */
    .mobile-grid-col-3 .product-image-wrapper {margin: 0 !important; width: 100% !important; aspect-ratio: 1 / 1 !important; border-radius: 10px !important; clip-path: inset(0 round 10px) !important; -webkit-clip-path: inset(0 round 10px) !important; overflow: hidden !important; margin-bottom: 10px !important; background: #f5f5f5; transform: translateZ(0);}
    /* 3. САМА КАРТИНКА */
    .mobile-grid-col-3 .product-image {width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; border-radius: 0 !important; transition: transform 0.4s ease;}
    /* 4. ЗУМ ФОТО ВНУТРИ */
     .mobile-grid-col-3 .product-card:active .product-image {transform: scale(1.1);}


    .mobile-grid-col-4 .product-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 10px !important; }

    .mobile-grid-col-4 .product-title { font-size: 0.65rem !important; margin-bottom: 3px !important; line-height: 1.1 !important; height: 2.2em; }
    .mobile-grid-col-4 .product-price { font-size: 0.75rem !important; }
    .mobile-grid-col-4 .add-to-cart-btn-small { width: 100% !important; height: 30px !important; min-height: 30px !important; padding: 0 2px !important;  font-size: 0.65rem !important; }
    .mobile-grid-col-4 .product-card {min-width: 95px !important; width: 100% !important; padding: 0 !important; background: #fff; border: 1px solid #eee !important; border-radius: 10px !important; overflow: visible !important; display: flex !important; flex-direction: column !important; transition: transform 0.2s ease, box-shadow 0.2s ease; transform: translateZ(0); }
    /* Анимация подъема карточки */
    .mobile-grid-col-4 .product-card:active {transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); z-index: 2; }
    /* 2. ОБЕРТКА ФОТО (Внутренний контейнер) */
    .mobile-grid-col-4 .product-image-wrapper {margin: 0 !important; width: 100% !important; aspect-ratio: 1 / 1 !important; border-radius: 10px !important; clip-path: inset(0 round 10px) !important; -webkit-clip-path: inset(0 round 10px) !important; overflow: hidden !important; margin-bottom: 10px !important; background: #f5f5f5; transform: translateZ(0);}
    /* 3. САМА КАРТИНКА */
    .mobile-grid-col-4 .product-image {width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; border-radius: 0 !important; transition: transform 0.4s ease;}
    /* 4. ЗУМ ФОТО ВНУТРИ */
    .mobile-grid-col-4 .product-card:active .product-image {transform: scale(1.1);}



    /* =============================================== */
    /* === [ИСПРАВЛЕНО] АДАПТИВ ДЕТАЛЬНОЙ СТРАНИЦЫ === */
    /* =============================================== */
    .product-detail-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    .product-gallery-new, .product-info-new { width: 100%; }

    .product-title-new {
        font-size: calc(1.5rem * var(--mobile-font-scale-css, 1));
        margin-bottom: 0.5rem;
    }
    .price-new {
        font-size: calc(1.5rem * var(--mobile-font-scale-css, 1));
        margin-bottom: 1.5rem;
    }

    .thumbnails-new { overflow-x: auto; padding-bottom: 5px; }
    .add-to-cart-form-detail { flex-direction: column; gap: 10px; }

    .quantity-selector, .add-to-cart-btn-new {
        width: 100%;
    }
    .benefits-block { grid-template-columns: 1fr; }


    /*
    =================================================================
    === [ИСПРАВЛЕНО] АДАПТИВ ТАБЛИЦ (КОРЗИНА И ЗАКАЗЫ) ===
    =================================================================
    */
    /* Скрываем заголовки таблицы */
    .cart-table thead, .orders-table thead { display: none; }

    /* Каждая строка таблицы -> карточка */
    .cart-table tr, .orders-table tr {
        display: block;
        margin-bottom: 15px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    /* Ячейка -> строка с флексом */
    .cart-table td, .orders-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .cart-table td:last-child, .orders-table td:last-child { border-bottom: none; }

    /* Добавляем подписи из data-label */
    .cart-table td::before, .orders-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: #555;
        font-size: 0.9em;
        margin-right: 10px;
    }

    /* Колонка с фото (без подписи, блок) */
    .cart-table .product-col, .orders-table .product-col {
        display: block;
        text-align: left;
    }
    .cart-table .product-col::before { display: none; }

    /* Кнопки кабинета на мобильном */
    .cabinet-actions-row {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
    }
    .action-btn {
        flex: 1;
        max-width: 48%;
    }
}

/*
=================================================================
=== 7. ЛОКАЛЬНЫЕ СТИЛИ ИЗ CABINET.HTML ДЛЯ ГАРАНТИИ ---
=================================================================
*/
.cabinet-actions-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end; /* Прижать вправо */
    align-items: center;
}
.action-btn {
    min-width: 110px !important; /* Фиксированная ширина */
    height: 38px !important;    /* Фиксированная высота */
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 10px !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
}
.action-btn-placeholder {
    width: 110px; /* Такой же размер, как у кнопки */
    height: 38px;
}

/* Мобильная адаптивность */
@media (max-width: 992px) {
    .cabinet-actions-row {
        width: 100%;
        flex-direction: row; /* Или column, если хотите одну под другой */
        justify-content: space-between; /* Растянуть по краям */
        margin-top: 10px;
    }
    .action-btn {
        flex: 1; /* Растянуть кнопки */
        max-width: 48%; /* Чтобы 2 кнопки влезли в ряд с отступом */
    }
}
/* --- КОНЕЦ ЛОКАЛЬНЫХ СТИЛЕЙ CABINET.HTML --- */

/*
=================================================================
=== ЛОКАЛЬНЫЕ СТИЛИ ИЗ ORDER_DETAIL.HTML ДЛЯ ГАРАНТИИ ---
=================================================================
*/
/* Базовый стиль: размер, отступы, шрифт */
.container .btn { /* Уточняем селектор, чтобы не конфликтовать с глобальными */
    display: inline-block;
    padding: 10px 15px;
    border: none;
    border-radius: 5px; /* Используем значение по умолчанию или глобальное */
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    margin: 5px 0;
    vertical-align: middle;
    transition: all 0.3s ease; /* Добавил переход */
}

/* Красная кнопка (опасное действие) */
.container .btn-danger {
    background-color: #dc3545;
}
.container .btn-danger:hover {
    background-color: #c82333;
}

/* Серая кнопка (второстепенное действие) */
.container .btn-secondary {
    background-color: #6c757d;
}
.container .btn-secondary:hover {
    background-color: #5a6268;
}

/* --- Стили для таблицы заказа, которые были инлайн --- */
.order-details-block { /* Общий контейнер для деталей заказа */
    text-align: left;
    margin-top: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.order-details-table { /* Таблица внутри блока деталей */
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}
.order-details-table th, .order-details-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left; /* Переопределено для td в мобильной версии */
}
.order-details-table th:nth-child(2),
.order-details-table td:nth-child(2) { text-align: center; } /* Количество */
.order-details-table th:nth-child(3),
.order-details-table td:nth-child(3) { text-align: right; } /* Цена */

.order-summary-footer { /* Блок с суммой и доставкой */
    text-align: right;
    margin-top: 20px;
}
.order-summary-footer p {
    margin: 5px 0;
}
.order-summary-footer h4 {
    margin-top: 10px;
    font-size: 1.2em;
    color: var(--main-text-color);
}
.cancel-zone { /* Блок отмены заказа */
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd; /* Более мягкий разделитель */
}
.cancel-zone p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #666;
}
.back-to-cabinet-btn { /* Кнопка "Назад в личный кабинет" */
    margin-top: 30px;
    display: inline-block;
}
/* --- КОНЕЦ ЛОКАЛЬНЫХ СТИЛЕЙ ORDER_DETAIL.HTML --- */

/*
=================================================================
=== ЛОКАЛЬНЫЕ СТИЛИ ИЗ PROFILE_EDIT.HTML ДЛЯ ГАРАНТИИ ---
=================================================================
*/
.profile-edit-container { /* Общий контейнер для профиля */
    max-width: 700px;
    margin: 2rem auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Мягкая тень */
}
.profile-edit-container h1 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--heading-font-family);
    font-size: 2em; /* Соответствует h1 на других страницах */
}
.profile-edit-container p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.profile-edit-container hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}
.user-form .form-group {
    margin-bottom: 15px;
}
.user-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--main-text-color);
}
.user-form input[type="text"],
.user-form input[type="email"],
.user-form input[type="tel"] { /* Добавил tel для телефона */
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.user-form input:focus {
    border-color: var(--accent-color, #e53935);
    box-shadow: 0 0 5px rgba(var(--sheet-rgb), 0.5); /* Использовал sheet-rgb для цвета тени */
    outline: none;
}
.user-form .form-row {
    display: flex;
    gap: 20px;
}
.user-form .form-row .form-group {
    flex: 1;
}
.profile-edit-actions { /* Общий контейнер для кнопок */
    text-align: right;
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}
@media (max-width: 768px) {
    .user-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    .profile-edit-actions {
        flex-direction: column;
        gap: 10px;
    }
    .profile-edit-actions .btn {
        width: 100%;
        box-sizing: border-box;
    }
}
/* --- КОНЕЦ ЛОКАЛЬНЫХ СТИЛЕЙ PROFILE_EDIT.HTML --- */

/*
=================================================================
=== ЛОКАЛЬНЫЕ СТИЛИ ИЗ SEARCH_RESULTS.HTML ДЛЯ ГАРАНТИИ ---
=================================================================
*/
.search-results-container { /* Общий контейнер для результатов поиска */
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 15px; /* Отступы по бокам */
}
.search-results-container h1 {
    margin-bottom: 20px;
    color: var(--heading-font-family);
    font-size: 2.2em;
}
.search-info-block { /* Блок с информацией о количестве найденных товаров */
    background: var(--site-sheet-bg-color, #e7f3ff); /* Используем CSS-переменную для фона */
    color: var(--main-text-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Мягкая тень */
    font-size: 1.1em;
}
.search-no-results { /* Блок "Ничего не найдено" */
    text-align: center;
    padding: 40px 20px;
    background-color: #fdfdfd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 30px;
}
.search-no-results h3 {
    color: var(--heading-font-family);
    margin-bottom: 10px;
}
.search-no-results p {
    color: #666;
    line-height: 1.6;
}
.search-no-results a {
    font-weight: bold;
}
/* --- КОНЕЦ ЛОКАЛЬНЫХ СТИЛЕЙ SEARCH_RESULTS.HTML --- */

/* --- АДАПТАЦИЯ ТАБЛИЦ ДЛЯ МОБИЛЬНЫХ --- */
@media (max-width: 768px) {
    /* Скрываем шапку таблицы */
    .cart-table thead, .orders-table thead { display: none; }

    /* Строка -> Карточка */
    .cart-table tr, .orders-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    /* Ячейка -> Строка с названием и значением */
    .cart-table td, .orders-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: right;
    }
    .cart-table td:last-child, .orders-table td:last-child { border-bottom: none; }

    /* Добавляем заголовки перед значением */
    .cart-table td::before, .orders-table td::before {
        content: attr(data-label);
        font-weight: bold;
        float: left;
        color: #555;
        font-size: 0.9em;
    }

    /* Исключение для первой колонки (Фото товара) */
    .cart-table .product-col, .orders-table .product-col { display: block; text-align: left; }
    .cart-table .product-col::before { display: none; }

    /* Кнопки в личном кабинете */
    .cabinet-actions-row { width: 100%; justify-content: space-between; margin-top: 10px; }
    .action-btn { flex: 1; max-width: 48%; }
}



/* --- СТИЛИ ДЛЯ СЕРДЕЧКА (ИЗБРАННОЕ) --- */
.fav-btn {
    position: absolute !important;
    /* НОВЫЕ КООРДИНАТЫ (Ближе к углу) */
    top: 7px !important;
    right: 7px !important;

    /* Размеры */
    width: 28px !important;
    height: 28px !important;

    /* Оформление - Белый круг */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);


    /* Центрирование иконки */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0;
    margin: 0;
    cursor: pointer;
    z-index: 10;

    transition: transform 0.2s ease, background-color 0.2s ease;
}

.fav-btn:hover {
    transform: scale(1.1);
    background: #fff;
}
/* УМЕНЬШИЛИ ИКОНКУ */
.fav-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #333; /* Темно-серый контур */
    stroke-width: 2;
    transition: all 0.3s ease;
}

/* Активное состояние */
.fav-btn.active svg {
    fill: #ff4081;   /* Розовая заливка */
    stroke: #ff4081; /* Розовый контур */
}

/* Убираем синее выделение при клике на мобильных */
summary,
.accordion-header,
.accordion-new,
button,
a {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

/* Если фон появляется именно у summary при фокусе */
summary:focus,
summary:active {
    background: transparent !important;
    outline: none !important;
}


/* ================================================================= */
/* === [FIX] ИСПРАВЛЕНИЕ ЦВЕТА ФОНА ШАПКИ НА DESKTOP === */
/* ================================================================= */
/* ПРИМЕНЯЕМ ЭТО ПРАВИЛО ТОЛЬКО ДЛЯ ШИРОКИХ ЭКРАНОВ */
@media (min-width: 993px) {
    .mobile-view-adaptive .header {
        /* Применяем переменную для десктопа */
        background-color: rgba(var(--header-rgb), var(--header-alpha)) !important;
    }

    /* === [FIX] ДЛЯ КАТЕГОРИЙ (STICKY) === */
    body.desktop-header-sticky_all .category-nav-desktop {
        position: -webkit-sticky;
        position: sticky;
        z-index: 1090;
        margin-top: 0;
        border-radius: 0 0 5px 5px;
    }

    /* ========================================================= */
    /* === [НОВОЕ] РЕЖИМЫ ШИРИНЫ ДЛЯ ЭЛЕМЕНТОВ (DESKTOP) === */
    /* ========================================================= */

    /* 1. Boxed (По умолчанию) */
    /* Ничего не делаем, отступы и ширина остаются как есть */

    /* 2. Sheet (По краям белого листа, игнорируем паддинги) */
    .header.desktop-width-sheet,
    .category-nav-desktop.desktop-width-sheet {
        /* Компенсируем padding родителя (.site-wrapper): 40px с каждой стороны */
        width: calc(100% + 80px) !important;
        margin-left: -40px !important;
        margin-right: -40px !important;

        /* Убираем скругление и выставляем border-box, чтобы не вылезало вправо */
        border-radius: 0 !important;
        box-sizing: border-box !important;
        max-width: none !important;
    }

    /* 3. Full (На весь экран монитора) */
    .header.desktop-width-full,
    .category-nav-desktop.desktop-width-full {
        width: 100vw !important;

        /* === [ИСПРАВЛЕНО] ФОРМУЛА ДЛЯ ТОЧНОГО ЦЕНТРИРОВАНИЯ === */
        /* Выравниваем центры родителя и экрана, игнорируя отступы */
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;

        /* Убираем скругление */
        border-radius: 0 !important;
        box-sizing: border-box !important;

        /* Убираем лишние свойства, которые сдвигали */
        left: auto !important;
        right: auto !important;

        /* УБИРАЕМ БЕЛУЮ ПОЛОСУ (отступы и тени) */
        box-shadow: none !important;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
    }

    /* Специфично для стыка в режиме Full - убираем линии */
    .header.desktop-width-full {
        border-bottom: none !important;
    }
    .category-nav-desktop.desktop-width-full {
        border-top: none !important;
    }

/* ========================================================= */
/* === НОВОЕ МЕНЮ КАТЕГОРИЙ (DESKTOP DROPDOWN) === */
/* ========================================================= */

.desktop-menu-list {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
}

.menu-item {
    position: relative;
    padding: 10px 0;
}

.menu-item > a {
    text-decoration: none;
    font-weight: bold;
    color: var(--category-text-color, #333);
    padding: 5px 10px;
    display: block;
}

/* Скрытое меню по умолчанию */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 20px;
    z-index: 1000;
    min-width: 300px;
    width: max-content;
    max-width: 90vw;
    border-top: 3px solid var(--accent-color, #e53935);
    animation: fadeInMenu 0.2s ease-out;
}

.menu-item:hover .dropdown-menu {
    display: block;
}

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

/* Сетка подкатегорий */
.submenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.submenu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 100px;
    transition: transform 0.2s;
}

.submenu-card:hover {
    transform: translateY(-3px);
    color: var(--accent-color, #e53935);
}

.submenu-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    background: #f5f5f5;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.submenu-card:hover .submenu-img {
    border-color: var(--accent-color, #e53935);
}

.submenu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-img-placeholder {
    width: 100%;
    height: 100%;
    background-color: #eee;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.submenu-title {
    font-size: 0.85em;
    text-align: center;
    line-height: 1.2;
}

/* ========================================================= */
/* === МОБИЛЬНЫЙ АККОРДЕОН === */
/* ========================================================= */

.mobile-accordion-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #eee;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-menu-header a {
    flex-grow: 1;
    padding: 12px 0;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.mobile-accordion-toggle {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    color: #777;
    transition: transform 0.3s;
}

.mobile-menu-item.active .mobile-accordion-toggle {
    transform: rotate(180deg);
    color: var(--accent-color, #e53935);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f9f9f9;
    padding-left: 20px;
}

.mobile-menu-item.active .mobile-submenu {
    max-height: 500px;
}

.submenu-item {
    display: block;
    padding: 10px 0;
    font-size: 0.95em;
    color: #555;
    border-bottom: 1px dashed #eee;
}

.submenu-item.show-all {
    font-weight: bold;
    color: var(--accent-color, #e53935);
}

/* ========================================================= */
/* === НОВЫЙ СТИЛЬ: COMPACT DROPDOWN (DESKTOP) === */
/* ========================================================= */

.desktop-menu-list {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 25px;
    flex-wrap: wrap;
    position: relative;
}

.menu-item {
    position: relative;
    padding: 10px 0;
}

.menu-item > a {
    text-decoration: none;
    font-weight: 600; /* Чуть жирнее */
    color: var(--category-text-color, #333);
    padding: 5px;
    display: block;
    white-space: nowrap;
}

/* Выпадающее меню (Контейнер) */
.dropdown-menu.compact-mode {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 10px 0; /* Вертикальные отступы внутри */
    z-index: 1000;
    min-width: 220px; /* Ширина списка */
    border: 1px solid #eee;
    animation: slideDown 0.2s ease-out;
}

/* Показываем при наведении */
.menu-item:hover .dropdown-menu {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Список внутри */
.submenu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submenu-list li {
    display: block;
}

/* Ссылка в подменю */
.submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px; /* Отступы внутри строки */
    text-decoration: none;
    color: #444;
    font-size: 0.95em;
    transition: background 0.2s, color 0.2s;
}

.submenu-item:hover {
    background-color: #f7f7f7;
    color: var(--accent-color, #e53935);
}

/* Маленькая иконка (если есть) */
.submenu-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%; /* Круглая */
    object-fit: cover;
    border: 1px solid #eee;
}

.submenu-text {
    line-height: 1.2;
}


/* ========================================================= */
/* === НОВЫЙ СТИЛЬ: MODERN LIST (MOBILE) === */
/* ========================================================= */

.mobile-modern-list {
    display: flex;
    flex-direction: column;
}

/* Базовая ссылка (верхний уровень) */
.mobile-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-list-link, .base-link {
    flex-grow: 1;
    padding: 12px 0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
}

/* Кнопка-стрелка справа (ИСПРАВЛЕНО: УБРАН ФОН И СТИЛИ КНОПОК) */
.mobile-list-toggle {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 10px !important; /* Отступы для удобства нажатия */
    margin: 0 !important;
    cursor: pointer;
    color: #999;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; /* Минимальная ширина для тача */
    height: 44px;
}

/* Поворот стрелки при открытии */
.mobile-list-item.active .mobile-list-toggle {
    transform: rotate(180deg);
    color: var(--accent-color, #e53935);
}

/* Контейнер подкатегорий (Скрыт) */
.mobile-list-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fafafa; /* Чуть серый фон */
}

/* Контейнер подкатегорий (Открыт) */
.mobile-list-item.active .mobile-list-submenu {
    max-height: 500px; /* Достаточно для раскрытия */
    border-bottom: 1px solid #f0f0f0;
}

/* Ссылки внутри подкатегорий */
.mobile-list-sublink {
    display: block;
    padding: 10px 0 10px 20px; /* Отступ слева */
    text-decoration: none;
    color: #666;
    font-size: 0.9em;
    border-top: 1px solid #f5f5f5;
}

.mobile-list-sublink:first-child {
    border-top: none;
}

.mobile-list-sublink.show-all {
    color: var(--accent-color, #e53935);
    font-weight: 500;
}

/* === FIX MOBILE MENU === */
.mobile-list-toggle {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px 15px !important;
    width: auto !important;
    min-width: 40px;
    height: 100%;
}
.mobile-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.mobile-list-item-link {
    flex-grow: 1;
    padding: 12px 5px;
    text-decoration: none;
    color: #333;
    display: block;
}
.mobile-list-submenu {
    display: none;
    background: #f9f9f9;
}
.mobile-list-item-wrapper.active .mobile-list-submenu {
    display: block;
}
/* ========================================================= */
/* === [НОВЫЕ] СТИЛИ ДЛЯ МНОГОУРОВНЕВОЙ НАВИГАЦИИ === */
/* ========================================================= */

/* Десктоп: выпадающее меню */
.desktop-menu-list {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 25px;
    flex-wrap: wrap;
}

.menu-item {
    position: relative;
    padding: 10px 0;
}

.menu-item > .category-link-item {
    text-decoration: none;
    font-weight: 600;
    color: var(--category-text-color, #333);
    padding: 8px 12px;
    display: block;
    white-space: nowrap;
    position: relative;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.menu-item > .category-link-item:hover {
    background-color: rgba(var(--accent-color-rgb, 229, 57, 53), 0.1);
    color: var(--accent-color, #e53935);
}

/* Выпадающее меню с иконками */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 20px;
    z-index: 1000;
    min-width: 350px;
    max-width: 90vw;
    border: 1px solid #eee;
    animation: slideDownFade 0.3s ease-out;
}

.menu-item:hover .dropdown-menu {
    display: block;
}

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

/* Сетка подкатегорий (адаптивная) */
.submenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.submenu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 100%;
    transition: all 0.2s;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid transparent;
}

.submenu-card:hover {
    transform: translateY(-3px);
    color: var(--accent-color, #e53935);
    background: #f9f9f9;
    border-color: #eee;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.submenu-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submenu-card:hover .submenu-img {
    border-color: var(--accent-color, #e53935);
    transform: scale(1.05);
}

.submenu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0, #cccccc);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 28px;
}

.submenu-title {
    font-size: 0.85em;
    text-align: center;
    line-height: 1.3;
    font-weight: 500;
    margin-top: 5px;
}

/* Мобильный аккордеон */
.mobile-modern-list {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mobile-list-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-list-item:last-child {
    border-bottom: none;
}

.mobile-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 15px;
}

.mobile-list-link, .base-link {
    flex-grow: 1;
    padding: 15px 0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
}

.mobile-list-toggle {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px !important;
    margin: 0 !important;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.mobile-list-toggle:hover {
    color: var(--accent-color, #e53935);
}

.mobile-list-item.active .mobile-list-toggle {
    transform: rotate(180deg);
    color: var(--accent-color, #e53935);
}

.mobile-list-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fafafa;
    padding-left: 20px;
}

.mobile-list-item.active .mobile-list-submenu {
    max-height: 500px;
}

.mobile-list-sublink {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: #666;
    font-size: 0.95em;
    border-top: 1px solid #f5f5f5;
    transition: color 0.2s;
}

.mobile-list-sublink:first-child {
    border-top: none;
    margin-top: 5px;
}

.mobile-list-sublink:last-child {
    margin-bottom: 10px;
}

.mobile-list-sublink:hover {
    color: var(--accent-color, #e53935);
}

.mobile-list-sublink.show-all {
    color: var(--accent-color, #e53935);
    font-weight: 600;
}

/* Индикатор для категорий с подкатегориями */
.has-children .mobile-list-link::after {
    content: "▼";
    font-size: 0.8em;
    margin-left: 5px;
    color: #ccc;
    transition: transform 0.3s;
}

.has-children.active .mobile-list-link::after {
    content: "▲";
    color: var(--accent-color, #e53935);
}

/* Адаптация для мобильных */
@media (max-width: 992px) {
    .dropdown-menu {
        min-width: 280px;
        padding: 15px;
    }

    .submenu-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .submenu-img {
        width: 60px;
        height: 60px;
    }

    .no-img-placeholder {
        font-size: 22px;
    }

    .submenu-title {
        font-size: 0.8em;
    }
}

/* Исправление для режима "текст" в мобильном меню */
.mobile-menu-mode-text a:not(.btn) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit !important;
    padding: 12px 0 !important;
    text-align: left !important;
    width: 100% !important;
    display: block !important;
    text-decoration: none !important;
}

.mobile-menu-mode-text a:not(.btn):hover {
    color: var(--accent-color, #e53935) !important;
    background: transparent !important;
    transform: none !important;
}

.mobile-menu-mode-text .btn,
.mobile-menu-mode-text button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit !important;
    padding: 12px 0 !important;
    text-align: left !important;
    width: 100% !important;
}

.mobile-menu-mode-text .btn:hover,
.mobile-menu-mode-text button:hover {
    color: var(--accent-color, #e53935) !important;
    background: transparent !important;
    transform: none !important;
}

/* ========================================================= */
/* === [ИСПРАВЛЕНО] СОВРЕМЕННОЕ МЕНЮ ПОДКАТЕГОРИЙ === */
/* ========================================================= */

/* Десктоп: улучшенное выпадающее меню */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    border-radius: 16px;
    padding: 25px;
    z-index: 1000;
    min-width: 400px;
    max-width: 90vw;
    border: 1px solid #eee;
    animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.submenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.submenu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 15px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.submenu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color, #e53935), #ff6b6b);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.submenu-card:hover {
    transform: translateY(-5px);
    color: var(--accent-color, #e53935);
    background: linear-gradient(135deg, #f9f9f9, #f0f0f0);
    border-color: var(--accent-color, #e53935);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.submenu-card:hover::before {
    transform: scaleX(1);
}

.submenu-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.submenu-card:hover .submenu-img {
    border-color: var(--accent-color, #e53935);
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.2);
}

.submenu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.submenu-card:hover .submenu-img img {
    transform: scale(1.1);
}

.no-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8, #d6d6d6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 32px;
    border-radius: 50%;
}

.submenu-title {
    font-size: 0.9em;
    text-align: center;
    line-height: 1.4;
    font-weight: 600;
    margin-top: 8px;
    padding: 0 5px;
    transition: color 0.3s ease;
}

.submenu-card:hover .submenu-title {
    color: var(--accent-color, #e53935);
}

/* ========================================================= */
/* === [ИСПРАВЛЕНО] МОБИЛЬНЫЙ АККОРДЕОН (УБРАТЬ КНОПКИ) === */
/* ========================================================= */

.mobile-modern-list {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.mobile-list-item {
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s;
}

.mobile-list-item:hover {
    background-color: #fafafa;
}

.mobile-list-item:last-child {
    border-bottom: none;
}

.mobile-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
}

/* Основная ссылка категории - всегда как ссылка */
.category-main-link {
    flex-grow: 1;
    padding: 16px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s, background-color 0.2s;
}

.category-main-link:hover {
    color: var(--accent-color, #e53935);
    background-color: #f9f9f9;
}

.mobile-arrow {
    font-size: 0.8em;
    color: #999;
    margin-left: 10px;
    transition: transform 0.3s ease, color 0.2s;
}

.has-children.active .mobile-arrow {
    transform: rotate(180deg);
    color: var(--accent-color, #e53935);
}

/* Кнопка-стрелка справа (маленькая, только для раскрытия) */
.mobile-list-toggle {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 15px !important;
    margin: 0 !important;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    opacity: 0.7;
}

.mobile-list-toggle:hover {
    color: var(--accent-color, #e53935);
    opacity: 1;
    transform: scale(1.1);
}

.mobile-list-item.active .mobile-list-toggle {
    transform: rotate(180deg) scale(1.1);
    color: var(--accent-color, #e53935);
    opacity: 1;
}

.mobile-list-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fafafa;
    padding-left: 0;
}

.mobile-list-item.active .mobile-list-submenu {
    max-height: 800px;
}

/* Ссылки в подменю с иконками */
.mobile-list-sublink {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 40px;
    text-decoration: none;
    color: #666;
    font-size: 0.95em;
    border-top: 1px solid #f0f0f0;
    transition: all 0.2s;
    position: relative;
}

.mobile-list-sublink:first-child {
    border-top: none;
}

.mobile-list-sublink:last-child {
    margin-bottom: 0;
}

.mobile-list-sublink:hover {
    color: var(--accent-color, #e53935);
    background-color: #f5f5f5;
    padding-left: 45px;
}

.mobile-subcategory-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid #eee;
    flex-shrink: 0;
}

/* ========================================================= */
/* === [ИСПРАВЛЕНО] РЕЖИМЫ МОБИЛЬНОГО МЕНЮ === */
/* ========================================================= */

/* Режим "текст" - обычные ссылки */
.mobile-menu-mode-text .mobile-menu-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
    background: transparent !important;
    border-radius: 0 !important;
    text-align: left !important;
    width: 100% !important;
    box-shadow: none !important;
}

.mobile-menu-mode-text .mobile-menu-link:last-child {
    border-bottom: none;
}

.mobile-menu-mode-text .mobile-menu-link:hover {
    color: var(--accent-color, #e53935) !important;
    background-color: #f9f9f9 !important;
    transform: none !important;
    padding-left: 25px;
}

/* Режим "кнопки" - стилизованные кнопки */
.mobile-menu-mode-buttons .mobile-menu-link {
    display: block;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--button-text-color, #fff);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--mobile-btn-radius, 8px);
    margin-bottom: 10px;
    text-align: center;
    background: var(--mobile-btn-bg-color) !important;
    transition: all 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.mobile-menu-mode-buttons .mobile-menu-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--button-text-color, #fff) !important;
}

/* Специфичные стили для второй кнопки в режиме "кнопки" */
.mobile-menu-mode-buttons .mobile-menu-link:last-child {
    margin-bottom: 0;
}

/* ========================================================= */
/* === АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ === */
/* ========================================================= */

@media (max-width: 992px) {
    .dropdown-menu {
        min-width: 300px;
        padding: 20px;
    }

    .submenu-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .submenu-img {
        width: 70px;
        height: 70px;
    }

    .submenu-title {
        font-size: 0.85em;
    }

    .mobile-list-sublink {
        padding: 10px 15px 10px 35px;
    }

    .mobile-list-sublink:hover {
        padding-left: 40px;
    }

    .mobile-subcategory-icon {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .dropdown-menu {
        min-width: 280px;
        padding: 15px;
    }

    .submenu-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    .submenu-img {
        width: 60px;
        height: 60px;
    }

    .submenu-card {
        padding: 12px 8px;
    }

    .mobile-modern-list {
        border-radius: 8px;
    }

    .category-main-link {
        padding: 14px 15px;
        font-size: 0.95rem;
    }

    .mobile-list-sublink {
        padding: 10px 15px 10px 30px;
        font-size: 0.9em;
    }

    .mobile-list-sublink:hover {
        padding-left: 35px;
    }
}

/* ========================================================= */
/* === ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ === */
/* ========================================================= */

/* Анимация появления выпадающего меню */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-15px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    }
}

/* Плавное раскрытие подменю */
.mobile-list-submenu {
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.mobile-list-item.active .mobile-list-submenu {
    opacity: 1;
}

/* Индикатор активной категории */
.menu-item:hover > .category-link-item {
    color: var(--accent-color, #e53935);
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.1), rgba(255, 107, 107, 0.05));
}

/* Улучшенные тени для карточек */
.submenu-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.submenu-card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

/* Градиентный фон для активных элементов */
.has-children.active .category-main-link {
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.05), rgba(255, 107, 107, 0.02));
    color: var(--accent-color, #e53935);
}


}

/* ========================================================= */
/* === ИСПРАВЛЕНИЕ ДЛЯ ЛОГОТИПА И ТЕКСТА === */
/* ========================================================= */

/* ========================================= */
/* ПРОСТЫЕ СТИЛИ ДЛЯ ЛОГОТИПА (не переопределяющие base.html) */
/* ========================================= */

/* Минимальные стили для совместимости */
.logo {
    flex-shrink: 1 !important;
    min-width: 0 !important;
    overflow: visible !important;
}

/* Гарантия что логотип не сломается */
.logo a {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
}

/* Базовые стили для иконки (если используется) */
.logo-icon {
    flex-shrink: 0 !important;
}

/* Обеспечиваем видимость */
.custom-logo-img {
    display: block !important;
    object-fit: contain !important;
}

      /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Правильные стили для кнопок категорий в мобильном меню */

    .mobile-menu-mode-buttons .mobile-list-link {
    /* Используем CSS переменные из base.html */
    padding: var(--button-padding, 8px 16px) !important;
    min-height: 40px !important;
    font-size: var(--button-font-size, 1rem) !important;
    line-height: normal !important;
}

    .mobile-menu-mode-buttons .mobile-list-link:hover {
    background-color: var(--button-hover-bg-color, #d32f2f) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--button-hover-box-shadow, 0 4px 8px rgba(0,0,0,0.15)) !important;
    color: var(--button-text-color, #fff) !important;
}

    .mobile-menu-mode-buttons .mobile-list-link:active {
    background-color: var(--button-active-bg-color, #c62828) !important;
    transform: translateY(0) !important;
    box-shadow: var(--button-active-box-shadow, 0 1px 3px rgba(0,0,0,0.2)) !important;
}



}