/* =========================================
   1. GLOBAL STYLES & SCROLLBAR
   ========================================= */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(197, 47, 47, 1) #1e1e1e;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(197, 47, 47, 1);
    border-radius: 6px;
    border: 3px solid #1e1e1e;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
li {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
}

.container {
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
}

.main {
    padding: 60px 0;
}

/* =========================================
   2. HEADER & MENU
   ========================================= */
header {
    background: linear-gradient(to bottom, rgba(10, 10, 16, 0.92), rgba(30, 30, 30, 1));
}

.header__top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 90px;
}

.logo__img {
    display: block;
    width: 95px;
    height: auto;
}

.menu__list {
    display: flex;
    align-items: center;
    gap: 50px;
}

.menu__item {
    display: block;
    position: relative;
}

.menu__link {
    display: inline-block;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 1px;
    padding-bottom: 5px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.menu__link:hover {
    border-bottom-color: rgba(197, 47, 47, 1);
}

/* =========================================
   3. SHOP LAYOUT & SIDEBAR (PC VERSION)
   ========================================= */
.shop-page {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.shop-sidebar {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 5px;
    align-self: start;
}

.shop-sidebar .footer__logo {
    display: block;
    text-align: center;
    margin-bottom: 30px;
}

.shop-sidebar .footer__logo img {
    width: 180px;
}

/* Заголовок меню */
.catalog-menu__header {
    background-color: rgba(197, 47, 47, 1);
    color: #fff;
    font-family: 'Roboto Slab', serif;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    padding: 15px;
    margin: -20px -20px 20px -20px;
}

/* Список ссылок (Вертикальный для ПК) */
.catalog-menu__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.catalog-menu__item {
    width: 100%;
}

.catalog-menu__item a {
    display: block;
    padding: 12px 15px;
    color: #ccc;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    border-bottom: 1px solid #333;
    white-space: normal;
    /* Разрешаем перенос текста на ПК */
    transition: all 0.3s;
}

.catalog-menu__item:last-child a {
    border-bottom: none;
}

/* Активный пункт на ПК */
.catalog-menu__item.active a {
    color: #fff;
    background-color: #252525;
    position: relative;
    border-left: 3px solid #c52f2f;
    /* Красная полоска */
    padding-left: 12px;
}

/* =========================================
   4. PRODUCT PAGE STRUCTURE
   ========================================= */
.breadcrumbs {
    font-size: 14px;
    color: #888;
    margin-bottom: 25px;
}

.breadcrumbs a {
    color: #aaa;
}

.breadcrumbs span {
    color: #fff;
}

.product-header {
    margin-bottom: 20px;
}

.product-header__title {
    font-size: 48px;
    font-family: 'Roboto Slab', serif;
    line-height: 1.1;
}

.product-header__subtitle {
    font-size: 24px;
    color: #ccc;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Main Grid */
.product-main-block {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    padding: 30px;
    background-color: #1a1a1a;
    border: 1px solid #c52f2f;
    border-radius: 15px;
    align-items: start;
}

/* =========================================
   5. PRODUCT GALLERY
   ========================================= */
.product-gallery {
    min-width: 0;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-gallery__main-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #333;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

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

/* Thumbnails */
.product-gallery__thumbnails {
    position: relative;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    visibility: visible;
}

.product-gallery__thumbnails.slick-initialized {
    display: block;
    margin: 0 35px;
}

.product-gallery__thumbnails .slick-track {
    margin: 0 auto;
}

.thumb-item {
    aspect-ratio: 1 / 1;
    height: 60px;
    background-color: #000;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    margin: 0 5px;
    display: block !important;
}

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

.thumb-item.active {
    border-color: rgba(197, 47, 47, 1);
}

/* Slider Arrows */
.product-gallery__thumbnails .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    font-size: 0;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #555;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.product-gallery__thumbnails .slick-arrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    display: block;
}

.product-gallery__thumbnails .slick-prev {
    left: -35px;
}

.product-gallery__thumbnails .slick-prev::before {
    transform: rotate(-135deg);
    margin-left: 2px;
}

.product-gallery__thumbnails .slick-next {
    right: -35px;
}

.product-gallery__thumbnails .slick-next::before {
    transform: rotate(45deg);
    margin-right: 2px;
}

/* Video Thumbnail Icon */
.thumb-item.video-thumb {
    position: relative;
}

.thumb-item.video-thumb::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(197, 47, 47, 0.85);
    color: #fff;
    border-radius: 50%;
    border: 1px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding-left: 2px;
    pointer-events: none;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.thumb-item.video-thumb:hover::after {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Video Player Styles */
.main-video-container {
    width: 100%;
    height: 100%;
    background-color: #000000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

#local-video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: #000;
}

/* Fancybox Customization */
.fancybox__content {
    background: transparent !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.fancybox-video-wrapper {
    width: 100%;
    height: 100%;
    background-color: #000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fancybox-video-wrapper video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    outline: none;
}

/* =========================================
   6. PRODUCT INFO (Right Column)
   ========================================= */
.product-info {
    border: 1px solid #c52f2f;
    padding: 20px;
    border-radius: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-info__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    border-bottom: 1px solid #c52f2f;
    padding-bottom: 15px;
}

.product-info__grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 30px;
    margin-bottom: auto;
}

.price-label {
    font-size: 16px;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.price-value {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.product-info__links {
    padding-top: 5px;
}

.product-info__links a {
    display: block;
    color: #ccc;
    padding: 8px 0;
    border-bottom: 1px solid #444;
    text-align: right;
}

.product-info__whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: rgba(197, 47, 47, 1);
    color: #fff;
    padding: 15px 25px;
    border-radius: 5px;
    margin-top: 40px;
    transition: background-color 0.3s;
    width: 100%;
    font-weight: 600;
}

.product-info__whatsapp-btn:hover {
    background-color: #a02020;
}

.product-info__whatsapp-btn img {
    width: 24px;
}

/* =========================================
   7. TABS (Description etc.)
   ========================================= */
.product-tabs {
    margin-top: 30px;
}

.tabs__nav {
    display: flex;
    background-color: #1a1a1a;
    border-bottom: 2px solid #c52f2f;
}

.tabs__nav-item {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    border-right: 1px solid #333;
    cursor: pointer;
    transition: all 0.3s;
}

.tabs__nav-item:hover {
    color: #ccc;
}

.tabs__nav-item.active {
    color: #fff;
    background-color: rgba(197, 47, 47, 1);
}

.tabs__content {
    background-color: #fff;
    color: #1a1a1a;
    padding: 30px;
    border-radius: 0 0 10px 10px;
}

.tab-pane {
    display: none;
}

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

.tab-pane img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 5px;
}

/* =========================================
   8. STICKY BOTTOM BAR
   ========================================= */
.sticky-product-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #141414;
    border-top: 2px solid #c52f2f;
    padding: 15px 0;
    z-index: 9000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.8);
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

.sticky-product-bar.visible {
    transform: translateY(0);
}

.sticky-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sticky-bar__info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sticky-bar__img img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #333;
}

.sticky-bar__text {
    display: flex;
    flex-direction: column;
}

.sticky-bar__title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.sticky-bar__price {
    font-size: 18px;
    color: #c52f2f;
    font-weight: 700;
}

.sticky-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #c52f2f;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    transition: background 0.3s;
    white-space: nowrap;
}

.sticky-btn-whatsapp:hover {
    background-color: #a02020;
}

.sticky-btn-whatsapp img {
    width: 20px;
    height: 20px;
}

/* =========================================
   9. FLOATING WIDGET
   ========================================= */
.floating-widget {
    position: fixed;
    right: 60px;
    bottom: 100px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: bottom 0.4s ease-in-out;
}

/* =========================================
   10. MEDIA QUERIES (FULL RESPONSIVE)
   ========================================= */

/* --- 1. ПЛАНШЕТЫ И НИЖЕ ( < 1050px ) - FIX HEADER --- */
@media (max-width: 1050px) {
    .header__top-inner {
        position: relative;
        flex-direction: column;
        align-items: center;
        min-height: auto;
        padding: 15px 0 20px 0;
    }

    .logo__img {
        width: 85px;
        margin: 0 auto 15px auto;
        display: block;
    }

    .lang-dropdown {
        position: absolute;
        top: 25px;
        right: 0;
        bottom: auto;
        z-index: 20;
    }

    .lang-dropdown details>summary {
        font-size: 12px;
        background: rgba(0, 0, 0, 0.3);
        padding: 5px 8px;
        border-radius: 4px;
    }

    .lang-dropdown .dropdown-menu {
        top: 100%;
        right: 0;
        left: auto;
    }

    .menu__list {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
        padding: 0;
    }

    .menu__item {
        display: block;
        position: relative;
    }

    .menu__link {
        font-size: 13px;
        padding-bottom: 3px;
        text-align: center;
        display: block;
    }
}

/* --- 2. СРЕДНИЕ ЭКРАНЫ И ПЛАНШЕТЫ ( < 991px ) - FIX CATALOG --- */
@media (max-width: 991px) {
    .header__top-inner {
        padding: 0 15px 15px 15px;
    }

    .shop-page {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* Сайдбар - Горизонтальный скролл */
    .shop-sidebar {
        order: -1;
        background: transparent;
        padding: 0;
        margin: 0 -15px;
        /* Растягиваем на всю ширину */
    }

    .shop-sidebar .footer__logo,
    .catalog-menu__header {
        display: none;
    }

    .catalog-menu__list {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding: 0 15px 5px 15px;
        /* Отступы для скролла */
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }

    .catalog-menu__list::-webkit-scrollbar {
        display: none;
    }

    .catalog-menu__item {
        flex-shrink: 0;
        border: none !important;
        width: auto;
    }

    .catalog-menu__item a {
        display: block;
        background: #1a1a1a;
        border: 1px solid #333;
        padding: 10px 20px;
        border-radius: 50px;
        color: #ccc;
        font-size: 13px;
        white-space: nowrap;
        font-weight: 600;
        border-bottom: 1px solid #333;
        /* Восстанавливаем border */
    }

    .catalog-menu__item.active a {
        background: #c52f2f;
        border-color: #c52f2f;
        color: #fff;
        padding-left: 20px;
        border-left: 1px solid #c52f2f;
        /* Убираем стили ПК */
    }

    .catalog-menu__item.active a::after {
        display: none;
    }

    /* Товар в колонку */
    .product-main-block {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .product-gallery,
    .product-info {
        width: 100%;
        border: none;
        padding: 0;
    }

    .product-header__title {
        font-size: 36px;
    }
}

/* --- 3. МОБИЛЬНЫЕ ТЕЛЕФОНЫ ( < 600px ) --- */
@media (max-width: 600px) {
    .product-header__title {
        font-size: 28px;
    }

    .product-header__subtitle {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .breadcrumbs {
        font-size: 12px;
        margin-bottom: 15px;
    }

    .product-gallery__main-image {
        aspect-ratio: auto;
        height: auto;
        min-height: 250px;
        margin-bottom: 10px;
    }

    .thumb-item {
        height: 50px;
    }

    .product-info__title {
        font-size: 20px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .product-info__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .price-value {
        font-size: 32px;
    }

    .product-info__links a {
        text-align: left;
    }

    .product-info__whatsapp-btn {
        margin-top: 20px;
        padding: 12px;
        font-size: 14px;
    }

    .tabs__nav-item {
        padding: 10px 15px;
        font-size: 13px;
        flex: 1;
        text-align: center;
    }

    .tabs__content {
        padding: 15px;
    }

    /* Sticky Bar Mobile */
    .sticky-bar__img {
        display: none;
    }

    .sticky-bar__inner {
        gap: 10px;
    }

    .sticky-bar__title {
        font-size: 12px;
        max-width: 150px;
        white-space: normal;
        line-height: 1.2;
    }

    .sticky-bar__price {
        font-size: 15px;
    }

    .sticky-btn-whatsapp {
        padding: 8px 10px;
        font-size: 11px;
    }

    .sticky-btn-whatsapp img {
        display: none;
    }

    /* Floating Widget */
    .floating-widget {
        right: 15px;
        bottom: 90px;
    }
}

.product-info__price-block {
    display: flex;
    flex-direction: column;
    /* Метка над ценами */
    gap: 8px;
    margin: 15px 0;
}

.price-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-group {
    display: flex;
    align-items: baseline;
    /* Выравнивание по нижней линии текста */
    gap: 12px;
}

.price-old {
    font-size: 0.9em;
    color: #a0a0a0;
    text-decoration: line-through;
}

.price-value {

    font-size: 1.5em;
    font-weight: 700;
    color: #d32f2f !important;
    /* Выделяем новую цену красным или акцентным цветом */
}

/* Фикс для видимости при наведении на родительский блок/карточку */
.product-info__price-block:hover .price-old {
    color: #888;
    /* Чуть темнее при наведении, чтобы не терялся */
}


