/* ============================================
   PRODUCT PAGE - CLEAN & PROFESSIONAL
   ============================================ */

/* Prevent overriding global styles */
.productPage,
.productPage * {
    box-sizing: border-box;
}

/* ============================================
   PAGE CONTAINER
   ============================================ */
.productPage {
    padding: 32px 20px 80px;
    font-family: 'Mulish', sans-serif;
    background-color: transparent;
    flex: 1;
}

.productPage_container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
    margin-bottom: 32px;
}

.breadcrumbs_link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #555555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs_link:hover {
    color: #FF2469;
}

.breadcrumbs_link img {
    width: 14px;
    height: 14px;
    transform: rotate(180deg);
}

/* ============================================
   PRODUCT CONTENT
   ============================================ */
.productContent {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 60px;
    align-items: start;
}

/* ============================================
   GALLERY (LEFT SIDE - STICKY)
   ============================================ */
.productGallery {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Main Image Container */
.gallery_main {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-color: #FFFFFF;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

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

.gallery_main:hover .gallery_mainImg {
    transform: scale(1.02);
}

/* Badge */
.gallery_badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 14px;
    background-color: #FFAE00;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
    color: #FFFFFF;
    z-index: 2;
}

/* Navigation Arrows */
.gallery_arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    z-index: 3;
    color: #181818;
}

.gallery_main:hover .gallery_arrow {
    opacity: 1;
}

.gallery_arrow:hover {
    background-color: #FFFFFF;
    transform: translateY(-50%) scale(1.1);
}

.gallery_arrow_prev {
    left: 16px;
}

.gallery_arrow_next {
    right: 16px;
}

/* Dots Indicator */
.gallery_dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.gallery_dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery_dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.gallery_dot.active {
    width: 24px;
    border-radius: 4px;
    background-color: #FFFFFF;
}

/* Thumbnails Wrapper */
.gallery_thumbs_wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery_thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 0;
    
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #DDDDDD #F8F8F8;
}

.gallery_thumbs::-webkit-scrollbar {
    height: 4px;
}

.gallery_thumbs::-webkit-scrollbar-track {
    background: #F8F8F8;
    border-radius: 2px;
}

.gallery_thumbs::-webkit-scrollbar-thumb {
    background: #DDDDDD;
    border-radius: 2px;
}

.gallery_thumbs::-webkit-scrollbar-thumb:hover {
    background: #CCCCCC;
}

.gallery_thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background-color: #FFFFFF;
    border: 2px solid #F5F5F5;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery_thumb:hover {
    border-color: #FFADC7;
    transform: translateY(-2px);
}

.gallery_thumb.active {
    border-color: #FF2469;
}

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

/* ============================================
   DETAILS (RIGHT SIDE)
   ============================================ */
.productDetails {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    overflow: hidden;
}

.productDetails > * + * {
    margin-top: 32px;
}

/* Title */
.productTitle {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    color: #181818;
}

/* Price */
.productPrice {
    margin-top: 16px !important;
    display: flex; align-items: center; gap: 12px;
}

.productPrice_main {
    font-family: 'Unbounded', sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: #181818;
}

.productPrice_old {
    font-size: 18px;
    font-weight: 600;
    color: #AAAAAA;
    text-decoration: line-through;
}

.productPrice_badge {
    padding: 6px 10px;
    background-color: #FFAE00;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    color: #FFFFFF;
}

/* Sections */
.productSection {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.sectionTitle {
    font-size: 20px;
    font-weight: 700;
    color: #181818;
}

/* Composition Toggle Button */
.compositionToggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    color: #181818;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease;
}

.compositionToggle:hover {
    color: #FF2469;
}

.compositionArrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
    color: #181818;
}

.compositionToggle.is-open .compositionArrow {
    transform: rotate(180deg);
}

/* Composition */
.composition {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.compositionCollapse {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    padding: 0;
    margin: 0;
    background-color: transparent;
    transition: opacity 0.15s ease, visibility 0.15s, max-height 0.25s ease, padding 0.15s ease, margin 0.15s ease;
}

.compositionCollapse.is-open {
    opacity: 1;
    visibility: visible;
    max-height: 500px;
    padding: 4px 0;
    margin-top: 16px;
    background-color: #FFFFFF;
    border-radius: 12px;
}

.composition_item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #F5F5F5;
}

.composition_item:last-child {
    border-bottom: none;
}

.composition_name {
    font-size: 16px;
    font-weight: 600;
    color: #181818;
}

.composition_count {
    font-size: 16px;
    font-weight: 600;
    color: #555555;
}

/* ============================================
   PRODUCT ACTIONS (QUANTITY + CART)
   ============================================ */
.productActions {
    display: flex;
    gap: 12px;
}

.quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 140px;
    height: 56px;
    padding: 0 12px;
    background-color: #FFFFFF;
    border-radius: 12px;
}

.quantity_btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.quantity_btn img {
    width: 20px;
    height: 20px;
}

.quantity_btn:hover {
    opacity: 0.7;
}

.quantity_input {
    width: 40px;
    text-align: center;
    font-family: 'Mulish', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: #181818;
    border: none;
    background-color: transparent;
    outline: none;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity_input::-webkit-outer-spin-button,
.quantity_input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.addToCart {
    flex: 1;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #FF2469;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: background-color 0.25s ease, border-radius 0.25s ease;
}

.addToCart:hover {
    background-color: #FF0050;
    border-radius: 28px;
}

.addToCart_success {
    background-color: #68D540 !important;
    color: #FFFFFF !important;
}

.addToCart_success img {
    filter: brightness(0) invert(1);
}

.addToCart img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* ============================================
   ADDON TABS
   ============================================ */
.addonTabs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    overflow-x: auto;
    overflow-y: visible;
    
    /* Prevent wrapping */
    flex-wrap: nowrap;
    
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #DDDDDD #F8F8F8;
}

.addonTabs::-webkit-scrollbar {
    height: 4px;
}

.addonTabs::-webkit-scrollbar-track {
    background: #F8F8F8;
    border-radius: 2px;
}

.addonTabs::-webkit-scrollbar-thumb {
    background: #DDDDDD;
    border-radius: 2px;
}

.addonTabs::-webkit-scrollbar-thumb:hover {
    background: #CCCCCC;
}

.addonTab {
    flex-shrink: 0;
    padding: 10px 16px;
    background-color: #FFFFFF;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #555555;
    cursor: pointer;
    white-space: nowrap;
    transition: box-shadow 0.2s ease;
}

.addonTab:hover {color:#181818; box-shadow: inset 0 0 0 1px #FFADC7;}

.addonTab.active {
    background-color: #FF2469;
    color: #FFFFFF !important;
}

/* ============================================
   ADDON SLIDER (HORIZONTAL SCROLL)
   ============================================ */
.addonSlider {
    position: relative;
    width: 100%;
    margin-top: 16px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.addonSlider_track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    width: 100%;
    
    /* Скрываем скроллбар */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.addonSlider_track::-webkit-scrollbar {
    display: none;
}

/* Навигация снизу (как пагинация) */
.addonSlider_nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.addonSlider_btn {
    min-width: 48px;
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFFFFF;
    border: none;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px #EFEFEF;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease;
}

.addonSlider_btn:hover {
    box-shadow: inset 0 0 0 1px #FFADC7;
}

.addonSlider_btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.addonSlider_btn img {
    width: 16px;
    height: 16px;
}

/* Addon Card */
.addonCard {
    flex-shrink: 0;
    width: 180px;
    min-height: 280px; /* Фиксированная минимальная высота */
    background-color: #FFFFFF;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.addonCard.hidden {
    display: none;
}

.addonCard_image {
    width: 100%;
    aspect-ratio: 1;
    background-color: #F8F8F8;
    border-radius: 8px;
    overflow: hidden;
}

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

.addonCard_info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1; /* Занимает всё свободное пространство */
    justify-content: space-between; /* Название вверху, цена внизу */
}

.addonCard_name {
    font-size: 14px;
    font-weight: 600;
    color: #181818;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.addonCard_price {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #181818;
}

.addonCard_add {
    width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #FF2469;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: auto; /* Прижимает кнопку к низу карточки */
}

.addonCard_add img {
    width: 20px;
    height: 20px;
}

.addonCard_add:hover {
    background-color: #FF0050;
}

.addonCard_add.added {
    background-color: #68D540 !important;
    color: #FFFFFF !important;
    pointer-events: none !important;
}

.addonCard_add.added img,
.addonCard_add.added svg {
    filter: brightness(0) invert(1) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 991px) {
    .productContent {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .productGallery {
        position: static;
    }

    .productTitle {
        font-size: 28px;
    }

    .productPrice_main {
        font-size: 28px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .productPage {
        padding: 24px 12px 60px;
    }

    .breadcrumbs {
        margin-bottom: 24px;
    }

    .productContent {
        gap: 32px;
    }

    /* Gallery Mobile */
    .gallery_main {
        border-radius: 16px;
    }
    
    .gallery_arrow {
        opacity: 1;
        width: 36px;
        height: 36px;
        background-color: rgba(255, 255, 255, 0.9);
    }
    
    .gallery_arrow_prev {
        left: 12px;
    }
    
    .gallery_arrow_next {
        right: 12px;
    }
    
    .gallery_badge {
        top: 12px;
        right: 12px;
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .gallery_dots {
        bottom: 12px;
    }
    
    .gallery_thumb {
        width: 70px;
        height: 70px;
    }

    .productDetails > * + * {
        margin-top: 20px;
    }

    .productTitle {
        font-size: 24px;
    }

    .productPrice {
        flex-wrap: wrap;
        gap: 8px;
    }

    .productPrice_main {
        font-size: 24px;
    }

    .productPrice_old {
        font-size: 16px;
    }

    .sectionTitle {
        font-size: 18px;
    }

    .composition_item {
        padding: 10px 12px;
    }

    .composition_name,
    .composition_count {
        font-size: 14px;
    }

    .productActions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .quantity {
        width: 100%;
        height: 48px;
        flex-shrink: 0;
    }

    .addonSlider_track {
        gap: 8px;
    }

    .addToCart {
        flex: none;
        width: 100%;
        height: 48px;
        font-size: 16px;
        flex-shrink: 0;
    }
    
    .addToCart img {
        width: 20px;
        height: 20px;
    }

    .addonCard {
        width: 160px;
        min-height: 260px;
    }
    
    .productDetails {
        overflow: visible;
    }
    
    .productSection {
        overflow: visible;
    }
    
    .compositionCollapse.is-open {
        margin-top: 12px;
    }
    
    .addonTabs {
        margin-top: 12px;
    }
    
    .addonSlider {
        margin-top: 12px;
    }
    
    .addonSlider_btn {
        min-width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .addonSlider_btn {
        min-width: 40px;
        height: 40px;
    }
    
    .addonSlider_btn img {
        width: 14px;
        height: 14px;
    }
    
    .addonCard {
        width: 140px;
        min-height: 240px;
    }

    .addonCard_name {
        font-size: 13px;
    }

    .addonCard_price {
        font-size: 14px;
    }
    
    .addonTab {
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* ==========================================
   MOBILE NAVIGATION
   ========================================== */
/* Стили мобильной навигации вынесены в mobile-fixes.css для централизованного управления */
