
html {
    scroll-behavior: smooth;
}

/* Глобальное отключение подсветок */
*:focus {
    outline: none !important;
}

*:active {
    outline: none !important;
}

* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
}

button:focus,
button:active,
button:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Шапка сайта */
.site-header {
    background: white;
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100%;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.logo img {
    height: 60px;
    width: auto;
}
.nav-menu {
    display: flex;
    gap: 25px;
    margin: 0 20px;
}
.nav-link {
    color: #cb0000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}
.nav-link:hover {
    color: #da5525;
}
.header-contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}
.header-phone {
    font-weight: 600;
    color: #cb0000;
    text-decoration: none;
    font-size: 1.1em;
    white-space: nowrap;
}
.social-links {
    display: flex;
    gap: 15px;
}
.social-link {
    color: #cb0000;
    text-decoration: none;
    font-size: 2.4em;
    transition: color 0.3s;
}
.social-link:hover {
    color: #da5525;
}

/* Мобильные иконки */
.mobile-header-icons {
    display: none;
    align-items: center;
    gap: 15px;
}
.mobile-icon {
    position: relative;
    color: #cb0000;
    text-decoration: none;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.icon-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #da5525;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #cb0000;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}
.mobile-menu.active {
    right: 0;
}
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #cb0000;
}
.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}
.mobile-nav-link {
    color: #cb0000;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.mobile-header-contacts {
    margin-top: 20px;
}
.mobile-header-phone {
    display: block;
    font-weight: 600;
    color: #cb0000;
    text-decoration: none;
    font-size: 1.1em;
    margin-bottom: 15px;
}
.mobile-social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.overlay.active {
    display: block;
}

/* Корзина - фиксированная ширина как у main-container */
.cart-container {
    background: white;
    border-radius: 8px;
    margin: 0 auto 20px;
    max-width: 1400px;
    width: 100%;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    overflow: hidden;
    /*min-height: 260px;*/
}
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
    cursor: pointer;
}
.cart-header h3 {
    margin: 0;
    color: #2e3a59;
    font-size: 1.2em;
    display: flex;
    align-items: center;
}
.cart-header-count {
    color: #6c757d;
    font-size: 0.9em;
    margin-left: 5px;
    font-weight: normal;
}
.cart-toggle {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1em;
}
.toggle-label {
    color: #6c757d;
    cursor: pointer;
    margin-right: 8px;
    display: inline;
    user-select: none;
}
.cart-content {
    display: flex;
    flex-direction: column;
    max-height: 240px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.cart-container.expanded .cart-content {
    max-height: 1000px;
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}
.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}
.cart-item:last-child {
    border-bottom: none;
}
.cart-item-image {
    flex: 0 0 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fcfbf9;
    border-radius: 4px;
    overflow: hidden;
}
.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.cart-item-details {
    flex: 1;
    min-width: 0;
}
.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #2e3a59;
}
.cart-item-code {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 5px;
}
.cart-item-price {
    font-size: 0.9em;
    color: #da5525;
    font-weight: 500;
}
.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 180px;
}
.cart-item-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: flex-end;
}
.cart-item-favorite {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1em;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-favorite:hover {
    color: #ff6b6b;
}
.cart-item-favorite.active {
    color: #ff6b6b;
}
.cart-item-remove {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1em;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-remove:hover {
    color: #e74a3b;
}
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}
.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quantity-btn:hover {
    background: #f8f9fa;
}
.quantity-input {
    width: 50px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
}
.cart-item-total {
    font-weight: 600;
    color: #da5525;
    font-size: 1em;
    margin-top: 5px;
    text-align: right;
    width: 100%;
}
.cart-summary {
    flex-shrink: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e3e6f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.cart-total {
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.clear-cart-btn {
    background: none;
    border: none;
    color: #e74a3b;
    cursor: pointer;
    font-size: 1.4em;
    margin-right: 10px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}
.clear-cart-btn:hover::after {
    content: "Очистить";
    position: fixed;
    bottom: auto;
    transform: translateX(30%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 10000;
    margin-top: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.mobile-clear-text {
    font-size: 0.8em;
    color: #bbbbbb;
    margin-left: 5px;
    justify-content: center; align-items: center;
}

.clear-cart-text {
    font-size: 0.9em;
    color: #e74a3b;
    margin-left: 5px;
}
.cart-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.btn-copy, .btn-share {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}
.btn-copy {
    background: #6c757d;
    color: white;
}
.btn-copy:hover {
    background: #5a6268;
}
.btn-share {
    background: #cb0000;
    color: white;
}
.btn-share:hover {
    background: #da5525;
}
.cart-empty {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

/* Мобильная корзина */
.mobile-cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}
.mobile-cart-overlay.active {
    display: block;
}
.mobile-cart-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1002;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.mobile-cart-container.active {
    right: 0;
}
.mobile-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
}
.mobile-cart-header h3 {
    margin: 0;
    color: #2e3a59;
    font-size: 1.2em;
    display: flex;
    align-items: center;
}
.mobile-cart-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.5em;
}
.mobile-cart-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.mobile-cart-content .cart-items {
    flex: 1;
    max-height: none;
}
.mobile-cart-content .cart-summary {
    margin-top: auto;
}

.main-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    flex: 1;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}
.filter-section {
    display: flex;
    align-items: center;
    gap: 15px;
}
.view-toggle {
    display: flex;
    gap: 10px;
}
.view-btn {
    padding: 8px 15px;
    background: #eaeaea;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}
.view-btn.active {
    background: #da5525;
    color: white;
}
.view-btn:hover {
    background: #d5d5d5;
}
.desktop-only {
    display: block;
}
.search-section {
    display: flex;
    align-items: center;
    gap: 10px;
}
.search-all-btn-container {
    display: flex;
}
.search-all-btn {
    padding: 8px 15px;
    background: #f18e4a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    white-space: nowrap;
    display: none;
}
.search-all-btn:hover {
    background: #da5525;
}

/* Мобильный поиск - скрыт по умолчанию (на десктопе) */
.mobile-search-section {
    display: none;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 10px;
    color: #a3a3a3;
    z-index: 2;
}
.search-clear {
    position: absolute;
    right: 10px;
    color: #a3a3a3;
    cursor: pointer;
    z-index: 2;
    display: none;
}
.search-clear:hover {
    color: #a3a3a3;
}
#search-input {
    padding: 8px 35px 8px 35px;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    font-size: 0.9em;
    width: 250px;
}
.update-info {
    text-align: right;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 15px;
}
.message {
    padding: 10px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    margin-bottom: 15px;
}
.error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

/* Стили для категорий */
.categories-sidebar {
    flex: 0 0 250px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    height: fit-content;
    position: sticky;
    top: 10px;
}
.sidebar-scroll-up {
    display: none;
}
.categories-sidebar .sidebar-scroll-up {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}
.categories-sidebar .sidebar-scroll-up:hover {
    background: #e9ecef;
    color: #333;
}
.categories-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
    color: #000000;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
/* Стили для категорий - исправлено выравнивание стрелки */
.category-item {
    margin-bottom: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #fcfbf9;
    border-radius: 4px;
    color: #da5525;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    flex: 1 1 auto;
}
.category-link:hover, .category-link.active {
    background: #da5525;
    color: white;
}
.category-link.active {
    font-weight: 600;
}
.category-arrow {
    transition: transform 0.2s, scale 0.2s;
    font-size: 0.9em;
    cursor: pointer;
    padding: 5px;
    margin-left: 8px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-arrow:hover {
    color: #da5525;
    scale: 1.2;
}
.category-arrow.rotated {
    transform: rotate(180deg);
}
.subcategories {
    padding-left: 15px;
    margin-top: 4px;
    display: none;
    flex: 0 0 100%;
    width: 100%;
}
.subcategories.expanded {
    display: block;
}
.subcategory-item {
    margin-bottom: 4px;
}
.subcategory-link {
    display: block;
    padding: 5px 8px;
    background: #fff8f1;
    border-radius: 4px;
    color: #000000;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s;
}
.subcategory-link:hover, .subcategory-link.active {
    background: #b03e12;
    color: white;
}

/* Избранное и корзина в сайдбаре */
.sidebar-divider {
    height: 1px;
    background: #e3e6f0;
    margin: 15px 0;
}
.favorites-item, .cart-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    color: #da5525;
    margin-bottom: 4px;
}
.favorites-item:hover, .cart-item:hover {
    background: #fff8f1;
}
.favorites-item.active {
    background: #fff8f1;
    font-weight: 600;
}
.favorites-badge, .cart-badge {
    margin-left: auto;
    background: #da5525;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.8em;
    font-weight: 600;
}

.show-all-btn {
    display: block;
    width: 100%;
    padding: 8px;
    margin-top: 12px;
    background: #fcfbf9;
    border: 1px solid #e3e6f0;
    border-radius: 4px;
    color: #da5525;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}
.show-all-btn:hover {
    background: #da5525;
    color: white;
}

/* Стили для контента */
.content-main {
    flex: 1;
}

/* Заголовок категории */
.category-header {
    margin-bottom: 15px;
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.category-header-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}
.category-title {
    color: #000;
    font-weight: 600;
}
.subcategory-title {
    color: #000;
    font-weight: normal;
    margin: 0 auto;
}
.product-count {
    font-size: 0.9em;
    font-weight: normal;
    color: #6c757d;
    white-space: nowrap;
}

/* Сообщение о отсутствии результатов */
.no-results-message {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    grid-column: 1 / -1;
}
.no-results-message div:first-child {
    font-size: 2em;
    margin-bottom: 10px;
}

/* Стили для карточного отображения - исправлено позиционирование сердечка */
.cards-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}
.favorite-btn, .cart-btn {
    position: absolute;
    top: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 2;
    transition: all 0.3s;
    opacity: 0;
}
/* Сердечко слева для десктопной версии */
.favorite-btn {
    left: 10px;
    right: auto;
}
.cart-btn {
    right: 10px;
}
.product-card:hover .favorite-btn,
.product-card:hover .cart-btn,
.mobile .favorite-btn,
.mobile .cart-btn {
    opacity: 1;
}
.favorite-btn.active {
    color: #ff6b6b;
}
.cart-remove-btn {
    color: #dc3545 !important;
}
.cart-remove-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #dc3545 !important;
    transform: scale(1.1);
}
.favorite-btn:hover, .cart-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}
.card-image {
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fcfbf9;
    position: relative;
}
.card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

/* Контейнер для изображений с поддержкой галереи */
.card-image-container {
    background: #fcfbf9;
    position: relative;
}

/* Медиа-запросы для переключения мобильная/десктопная версия */
@media (max-width: 992px) {
    .mobile-image-wrapper { display: block !important; }
    .desktop-image-wrapper { display: none !important; }
}
@media (min-width: 993px) {
    .mobile-image-wrapper { display: none !important; }
    .desktop-image-wrapper { display: flex !important; }
}

/* Десктопная версия изображения */
.desktop-image-wrapper {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    background: #fcfbf9;
}
.desktop-image-wrapper img.card-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Иконка лупы - сверху по центру, на уровне лайка/корзины */
.zoom-icon {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(200, 200, 200, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 5;
}
.desktop-image-wrapper:hover .zoom-icon {
    opacity: 1;
}

/* Одиночное изображение на десктопе */
.desktop-image-wrapper-single {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fcfbf9;
}
.desktop-image-wrapper-single img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Мобильная версия - Swiper */
.mobile-image-wrapper {
    width: 100%;
    background: #fcfbf9;
}
.mobile-image-wrapper .product-swiper {
    width: 100%;
    height: 180px;
    cursor: pointer;
}
.mobile-image-wrapper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.mobile-image-wrapper .swiper-slide img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Пагинация (булиты) - как в Instagram */
.pagination-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    background: white;
}
.pagination-dots .dot {
    border-radius: 9999px;
    transition: all 0.2s ease;
}
.pagination-dots .dot.active {
    width: 18px;
    height: 6px;
    border-radius: 3px;
    background: #4b5563;
}
.pagination-dots .dot:not(.active) {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
}
.pagination-spacer {
    height: 32px;
    background: white;
}
.card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000000;
}
.card-description {
    color: #6c757d;
    font-size: 0.85em;
    margin-bottom: 12px;
}
.card-group, .card-category {
    color: #858796;
    font-size: 0.8em;
    margin-bottom: 4px;
}
.card-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #da5525;
    margin: 8px 0;
    white-space: nowrap;
}
.price-with-unit {
    white-space: nowrap;
}
.card-price-unit {
    font-size: 0.85em;
    color: #6c757d;
    font-weight: normal;
}
.card-stock {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    margin-top: auto;
}
.card-stock-info {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.85em;
    margin-top: 4px;
}
.in-stock {
    color: #1cc88a;
}
.in-stock-label {
    color: #16a34a;
}
.stock-amount {
    color: #000;
}
.out-of-stock {
    color: #e74a3b;
}
.card-stock-separator {
    color: #ddd;
}
.card-code {
    color: #6c757d;
}
.card-bottom {
    margin-top: auto;
}

/* Стили для табличного отображения - исправлен перенос стрелки сортировки */
.list-view {
    display: none;
}
.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background-color: white;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    border-radius: 8px;
    overflow: hidden;
}
.products-table th {
    background-color: #da5525;
    color: white;
    font-weight: 600;
    padding: 12px 10px;
    text-align: left;
    cursor: pointer;
    white-space: nowrap; /* Запрещаем перенос текста */
}
.sortable:hover {
    background-color: #b03e12;
}
.products-table td {
    padding: 10px;
    border-bottom: 1px solid #e3e6f0;
}
.products-table tr:nth-child(even) {
    background-color: #fcfbf9;
}
.products-table tr:hover {
    background-color: #fff8f1;
}
.table-image {
    max-width: 70px;
    max-height: 50px;
    cursor: pointer;
}
.code-column {
    display: table-cell;
}
.stock-column {
    display: table-cell;
}
.category-column {
    display: table-cell;
}
.actions-column {
    display: table-cell;
    width: 100px;
}
.table-favorite-btn, .table-cart-btn {
    background: none !important;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    color: #6c757d;
    padding: 5px;
}
.table-favorite-btn {
    float: left;
}
.table-cart-btn {
    float: right;
}
.table-favorite-btn::after, .table-cart-btn::after {
    content: '';
    display: table;
    clear: both;
}
.table-cart-remove-btn {
    color: #dc3545 !important;
    background: none !important;
}
.table-cart-remove-btn:hover {
    color: #dc3545 !important;
    background: none !important;
}
.table-favorite-btn:hover, .table-cart-btn:hover {
    color: #da5525;
    background: none !important;
}
.table-favorite-btn.active {
    color: #ff6b6b;
}

/* Стили для сортировки в сайдбаре */
.sorting-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e3e6f0;
}
.sorting-title {
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000000;
}
.sorting-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sort-btn {
    padding: 8px 10px;
    background: #fcfbf9;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    color: #da5525;
    text-decoration: none;
    font-size: 0.85em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    width: 100%;
}
.sort-btn:hover {
    background: #eaeaea;
}
.sort-btn.active {
    background: #da5525;
    color: white;
    border-color: #da5525;
}
.sort-btn.active .sort-icon i {
    color: white;
}
.sort-icon {
    margin-left: 4px;
}

/* Кнопка фильтра по наличию в сайдбаре */
.stock-filter-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e3e6f0;
}
.stock-filter-btn {
    width: 100%;
    padding: 8px 12px;
    background: #eaeaea;
    color: inherit;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 0.9em;
    transition: all 0.3s;
}
.stock-filter-btn:hover {
    background: #d5d5d5;
}

/* Подвал сайта */
.site-footer {
    background: #000000;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
    width: 100%;
}
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-update-info {
    text-align: center;
    color: #c5cbe0;
    margin-bottom: 30px;
    font-size: 0.95em;
    position: relative;
}
.footer-scroll-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #c5cbe0;
    margin-left: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.footer-scroll-to-top:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}
.footer-section {
    flex: 1;
    min-width: 200px;
}
.footer-section-left { text-align: left; }
.footer-section-center { text-align: center; }
.footer-section-right { text-align: right; }
.footer-section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1em;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 8px;
}
.footer-links a {
    color: #c5cbe0;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: white;
}
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.copyright {
    color: #c5cbe0;
    font-size: 0.9em;
}
.footer-social {
    display: flex;
    gap: 20px;
}
.footer-social-link {
    color: #c5cbe0;
    text-decoration: none;
    font-size: 2.6em;
    transition: color 0.3s;
}
.footer-social-link:hover {
    color: white;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 15px;
    }
}

@media (max-width: 992px) {
    /* Мобильное меню - закрепляем к верху экрана */
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    body {
        padding-top: 90px;
    }
    .main-container {
        padding-top: 10px;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    .categories-sidebar {
        flex: 0 0 auto;
        width: 100%;
        position: static !important;
    }
    .desktop-only {
        display: none;
    }
    .card-image {
        height: 150px;
        position: relative;
    }
    .card-image img { 
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    .quantity-controls-compact {
        bottom: 28px !important;
        z-index: 10 !important;
    }
    .mobile .favorite-btn, .mobile .cart-btn {
        opacity: 1;
    }
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    .footer-section {
        width: 100%;
        text-align: left !important;
    }
    .nav-menu {
        display: none;
    }
    .header-contacts {
        display: none;
    }
    .mobile-header-icons {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .cart-item-controls {
        flex-direction: row;
        align-items: center;
    }
    
    /* Скрываем десктопную корзину на мобильных */
    .cart-container.desktop-cart {
        display: none !important;
    }
    
    /* На мобильных устройствах оставляем сердечко слева (как на десктопе) */
    
    /* Убираем ограничение высоты в мобильной корзине */
    .mobile-cart-container .cart-items {
        max-height: none;
        height: auto;
    }
    
    /* Перерабатываем расположение элементов в мобильной корзине */
    .mobile-cart-container .cart-item {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .mobile-cart-container .cart-item-image {
        flex: 0 0 50px;
        margin-right: 10px;
    }
    
    .mobile-cart-container .cart-item-details {
        flex: 1;
        min-width: 0;
    }
    
    /* Изменяем стиль заголовка для переноса строк */
    .mobile-cart-container .cart-item-name {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        line-height: 1.3em;
        max-height: 2.6em;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .mobile-cart-container .cart-item-controls {
        flex: 0 0 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
    }
    
    .mobile-cart-container .cart-item-controls .quantity-controls {
        order: 1;
    }
    
    .mobile-cart-container .cart-item-controls .cart-item-total {
        order: 2;
        margin: 0 10px;
    }
    
    .mobile-cart-container .cart-item-controls .cart-item-remove {
        order: 3;
    }
    
    /* Стили для кнопок избранного и удаления в мобильной корзине */
    .mobile-cart-container .cart-item-favorite,
    .mobile-cart-container .cart-item-remove {
        width: 35px;
        height: 35px;
        font-size: 1.3em;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Стили для контролов количества в мобильной корзине */
    .mobile-cart-container .quantity-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2em;
    }
    
    .mobile-cart-container .quantity-input {
        height: 44px;
        width: 60px;
        font-size: 1em;
    }
    
    /* Цвет заливного сердечка в избранном */
    .cart-item-favorite.active i {
        color: #ff6b6b;
    }
    
    /* Выравниваем "Итого" по центру в мобильной корзине */
    .mobile-cart-container .cart-summary {
        flex-direction: column;
        align-items: center;
    }
    
    .mobile-cart-container .cart-total {
        text-align: center;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .mobile-cart-container .cart-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    /* 1. Вертикальный разделитель между Избранное и Корзина */
    .sidebar-actions .favorites-item {
        border-right: 1px solid #ccc;
        padding-right: 10px;
    }
    .sidebar-actions #cart-filter {
        padding-left: 10px;
    }
    
    /* Блок сортировки: горизонтальное расположение */
    .sorting-options {
        flex-direction: row !important;
        justify-content: space-between;
        gap: 8px;
    }
    /* Стили для кнопок сортировки в мобильной версии */
    .sorting-options .sort-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        text-align: center;
        border: 1px solid #eaeaea;
        flex: 1;
        white-space: nowrap;
        padding: 8px 5px;
    }
    /* 3. Кнопка "По названию" чуть шире */
    .sorting-options .sort-btn:first-child {
        padding-left: 12px;
        padding-right: 12px;
    }
    /* 4. Активная кнопка сортировки - оранжевый фон */
    .sorting-options .sort-btn.active {
        background-color: #da5525;
        color: #fff;
        border-color: #da5525;
    }
    /* Иконка внутри активной кнопки */
    .sorting-options .sort-btn.active .sort-icon i {
        color: #fff;
    }
    
    /* Контейнер для избранного и корзины */
    .sidebar-actions {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin: 10px 0;
    }
    .sidebar-actions .favorites-item,
    .sidebar-actions #cart-filter {
        flex: 1;
        margin-bottom: 0 !important;
        justify-content: flex-start;
    }
    .sidebar-actions .favorites-badge,
    .sidebar-actions .cart-badge {
        margin-left: auto;
    }
    
    /* Скрыть оригинальный поиск на мобильных */
    .controls .search-section {
        display: none;
    }
    
    /* 5. Мобильный поиск: строка поиска и кнопка в одной строке */
    .mobile-search-section {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 15px;
        margin-bottom: 10px;
    }
    .mobile-search-section .search-input-container {
        flex: 1;
        width: auto;
    }
    .mobile-search-section .search-all-btn-container {
        flex-shrink: 0;
    }
    .mobile-search-section .mobile-search-input {
        width: 100%;
        padding: 8px 35px 8px 35px;
        border: 1px solid #eaeaea;
        border-radius: 4px;
        font-size: 0.9em;
    }
    /* Стиль для мобильной кнопки "Во всех кат." */
    .mobile-search-all-btn {
        white-space: nowrap;
        padding: 8px 10px;
        font-size: 0.9em;
        background: #f18e4a;
        color: white;
        border-radius: 4px;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    .mobile-search-all-btn i {
        font-size: 0.9em;
    }
    
    /* 6. Убрать стрелку скролла вверх */
    .sidebar-scroll-up,
    .footer-scroll-to-top {
        display: none !important;
    }
    
}
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        gap: 15px;
    }
    .controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .search-section {
        width: 100%;
        justify-content: space-between;
    }
    #search-input {
        width: 100%;
    }
    .search-all-btn-container:empty + .search-input-container {
        width: 100%;
    }
    .search-input-container {
        width: 100%;
    }
    .cards-view {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    .products-table {
        display: block;
        overflow-x: auto;
    }
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .category-header-content {
        width: 100%;
        justify-content: space-between;
    }
    .subcategory-title {
        margin: 0;
    }
    .product-count {
        align-self: flex-end;
        margin-top: 8px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .cart-item {
        gap: 10px;
    }
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
    .mobile-clear-text {
        font-size: 0.6em; /* Еще меньше для очень маленьких экранов */
        margin-left: 1px;
    }
}
@media (max-width: 480px) {
    .category-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .subcategory-title {
        align-self: flex-start;
    }
    .cart-summary {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    .cart-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Стили для неактивных кнопок */
.copy-notification {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 10000;
    pointer-events: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
}

/* Убираем стрелки у поля ввода количества */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quantity-input {
    -moz-appearance: textfield;
}

/* Стили для блока управления количеством в карточке */
.quantity-controls-compact {
    display: flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 3;
}

.quantity-controls-compact .quantity-btn {
    width: 35px;
    height: 35px;
    font-size: 0.8em;
}

.quantity-controls-compact .quantity-input {
    width: 40px;
    height: 35px;
    font-size: 0.9em;
}

.item-total {
    background: #da5525;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-left: 5px;
}

/* Блок управления количеством в таблице */
.table-quantity-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-top: 3px;
}

.table-quantity-controls .quantity-row {
    display: flex;
    gap: 2px;
}

.table-quantity-controls .quantity-btn {
    width: 38px;
    height: 18px;
    font-size: 0.75em;
    padding: 0;
}

.table-quantity-controls .quantity-input {
    width: 78px;
    height: 18px;
    font-size: 0.75em;
    text-align: center;
}

.table-quantity-controls .item-total {
    width: 78px;
    text-align: center;
    font-size: 0.7em;
    padding: 1px 2px;
    margin: 0;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Стили для загрузки файлов в админке */
#loading-indicator {
    display: none;
    text-align: center;
    margin: 20px 0;
    padding: 10px;
    background-color: #fff3cd;
    border-radius: 5px;
    color: #856404;
}

.warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.file-upload-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
}

.file-upload-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.file-upload-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.file-upload-status.processing {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Анимация спиннера */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивные стили для админки */
@media (max-width: 768px) {
    .admin-container {
        padding: 15px;
        margin: 20px auto;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .status-section {
        padding: 15px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .settings-form {
        padding: 15px;
    }
}

/* Корректировка прокрутки для блока товаров */
#content-main {
    scroll-margin-top: 80px;
}

@media (max-width: 992px) {
    #content-main {
        scroll-margin-top: 60px;
    }
}

/* Информационный текст в корзине */
.cart-info-text {
    margin-top: 15px;
    padding: 0;
    font-size: 0.9em;
    color: #6c757d;
    text-align: left;
    width: 100%;
    line-height: 1.4;
}
.mobile-cart-container .cart-info-text {
    font-size: 0.85em;
    margin-top: 12px;
    padding: 0 0 5px 0;
}

/* Иконка помощи */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.4em;
    cursor: pointer;
    margin-right: 8px;
    transition: color 0.2s;
}
.help-icon:hover {
    color: #cb0000;
}
.mobile-cart-container .help-icon {
    font-size: 1.8em;
    margin-right: 10px;
}

/* Информационный блок */
.notice-block {
    max-width: 1400px;
    margin: 0 auto 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}
.notice-block h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
    color: #2e3a59;
}
.notice-block p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}
.desktop-notice-block {
    display: block;
}
.mobile-notice-block {
    display: none;
}

@media (max-width: 992px) {
    .notice-block {
        margin: 0 0 15px;
        padding: 15px 20px;
    }
    .desktop-notice-block {
        display: none;
    }
    .mobile-notice-block {
        display: block;
    }
}

/* Попап и оверлей */
.help-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
}
.help-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    z-index: 10001;
    display: none;
    overflow: hidden;
}
.help-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
}
.help-popup-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2e3a59;
}
.help-popup-close {
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    color: #6c757d;
}
.help-popup-close:hover {
    color: #cb0000;
}
.help-popup-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}
.help-popup-content p {
    margin: 0 0 10px;
    color: #333;
}
.help-popup-content img {
    max-width: 100%;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Кнопки в мобильной корзине - состояние inactive */
#mobile-cart .cart-actions button,
#mobile-cart .cart-actions .btn-share,
#mobile-cart .cart-actions .btn-copy {
    transition: opacity 0.2s, background-color 0.2s;
}

#mobile-cart .cart-actions .inactive {
    opacity: 0.5;
    pointer-events: none;
}

/* Новые стили для кнопок корзины */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cart-actions-left,
.cart-actions-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cart-actions-right {
    margin-left: auto;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.8em;
    color: #6c757d;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
    line-height: 1;
}

.btn-icon:hover {
    color: #cb0000;
}

.share-vk-icon {
    color: #4C75A3;
}
.share-vk-icon:hover {
    color: #6b8cb3;
}

.share-telegram-icon {
    color: #27A7E7;
}
.share-telegram-icon:hover {
    color: #5bc0f7;
}
.btn-share-telegram {
    background: #27A7E7;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}
.btn-share-telegram:hover {
    background: #5bc0f7;
    color: white;
}

@media (max-width: 992px) {
    .cart-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .cart-actions-left,
    .cart-actions-right {
        flex: 1 1 auto;
        justify-content: center;
    }
    
    .btn-icon {
        font-size: 2.2em;
        padding: 0 8px;
    }
    
    #mobile-cart .cart-actions .inactive {
        opacity: 0.5;
        pointer-events: none;
    }
}

/* ========================================
   ГАЛЕРЕЯ - Модальное окно просмотра изображений
   ======================================== */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    outline: none !important;
}

.gallery-content {
    position: relative;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 0 60px;
}

.gallery-content > * {
    cursor: default;
}

.gallery-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 60;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.gallery-close:hover {
    color: #d1d5db;
}

.gallery-close i {
    font-size: 44px;
    width: auto;
    height: auto;
    line-height: 1;
}

.gallery-main {
    flex: 1;
    min-height: 0;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    width: 100%;
}

.gallery-main.swiper {
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
}

.gallery-main .swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
    background: transparent !important;
}

.gallery-main .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent !important;
    outline: none !important;
    overflow: hidden;
}

.gallery-main .swiper-slide .panzoom-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: move;
}

.gallery-main .swiper-slide .panzoom-wrap img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: transparent !important;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 300px;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    outline: none !important;
    box-shadow: none !important;
}

.gallery-arrow:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.gallery-arrow-prev {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.gallery-arrow-next {
    right: 0;
    border-radius: 8px 0 0 8px;
}

/* Скрываем стрелки на узких экранах */
@media (max-width: 992px) {
    .gallery-arrow {
        display: none;
    }
    .gallery-content {
        padding: 0 4px;
        width: 99%;
        max-width: none;
    }
    .gallery-main .swiper-slide {
        width: 99%;
    }
    .gallery-close {
        background: rgba(0, 0, 0, 22%);
        border-radius: 50%;
    }
}

.gallery-mobile-arrows {
    display: none;
    justify-content: center;
    gap: 40px;
    padding: 12px 0;
}

@media (max-width: 992px) {
    .gallery-mobile-arrows {
        display: flex;
    }
}

.gallery-mobile-arrows button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.gallery-mobile-arrows button i {
    font-size: 36px;
    width: auto;
    height: auto;
    line-height: 1;
}

.gallery-mobile-arrows button:hover {
    color: white;
}

.gallery-thumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 0 16px;
    flex-wrap: wrap;
    cursor: pointer;
}

.thumb-btn {
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    padding: 0;
    outline: none !important;
    box-shadow: none !important;
}

.thumb-btn.active {
    border-color: white;
    opacity: 1;
}

.thumb-btn:not(.active) {
    opacity: 0.6;
}

.thumb-btn:not(.active):hover {
    opacity: 0.8;
}

.thumb-btn img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .thumb-btn img {
        width: 64px;
        height: 64px;
    }
}

/* Кнопка скролла вверх */
.scroll-to-top {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 100% 0  0 0;
    background: #eaeaea;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: -2px -2px 10px rgba(0,0,0,0.08);
    z-index: 9999 !important;
    transition: background 0.3s;
    pointer-events: auto;
}

.scroll-to-top:hover {
    background: #dddddd;
}

.scroll-to-top i {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Solid', 'Font Awesome 5 Free', 'Font Awesome 5 Solid', sans-serif !important;
    font-weight: 900 !important;
    font-size: 33px !important;
    margin-left: 15px;   /* -- сдвиг вправо */
    margin-bottom: -15px; /* -- сдвиг вниз */
    color: #686767 !important;
    display: block;
}

/* Стили для разделения изображений */
.image-split-indicator {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    transform: translateX(-50%);
}

.split-number-badge {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    z-index: 11;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    pointer-events: none;
}

.table-image-container {
    position: relative;
    display: inline-block;
}

/* Мобильная версия - стрелка под меню и корзиной */
@media (max-width: 992px) {
    .scroll-to-top {
        z-index: 500 !important;
    }
}