
/* ============================================================
   1. ГЛАВНОЕ ФОТО (SWIPER 12 STYLE) - ИСПРАВЛЕНО 2026
============================================================ */
.myshop-gallery-main {
    position: relative !important;
    margin-bottom: 20px;
    z-index: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    width: 100%;
    aspect-ratio: 3 / 4; 
    display: block !important;
}

.myshop-gallery-main .swiper-wrapper {
    display: flex !important;
    height: 100% !important;
    flex-direction: row !important;
}

.myshop-gallery-main-item {
    position: relative !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    height: 100%;
}

.swiper-zoom-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.myshop-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    cursor: zoom-in;
    transition: border-radius 0.3s ease;
}

.myshop-gallery-main-item.is-video {
    background: #08090b;
}

.silsila-product-gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: -10px 10px 14px;
    padding: 4px 2px 8px;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.silsila-product-gallery-thumbnails::-webkit-scrollbar { display: none; }

.silsila-product-gallery-thumbnails[hidden] { display: none !important; }

.silsila-product-gallery-thumb {
    box-sizing: border-box;
    flex: 0 0 54px;
    width: 54px;
    height: 72px;
    padding: 2px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #f0f2f5;
    cursor: pointer;
}

.silsila-product-gallery-thumb.is-active {
    border-color: #087cf0;
    box-shadow: 0 2px 8px rgba(8, 124, 240, .18);
}

.silsila-product-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
}

.silsila-product-gallery-thumb-video {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border-radius: 5px;
    background: #161b22;
    color: #fff;
    font-size: 18px;
}

.myshop-video-frame {
    position: relative;
    overflow: hidden;
    background: #08090b;
}

.myshop-gallery-video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 12px;
    background: #08090b;
    object-fit: contain;
    cursor: pointer;
}

.js-main-slider.is-zoomed .myshop-gallery-img {
    border-radius: 0 !important;
}

/* ============================================================
   2. КНОПКИ УПРАВЛЕНИЯ (ЛУПА, SHARE, WISHLIST, CART)
============================================================ */

/* Общий стиль для всех плавающих кнопок */
.myshop-search-trigger, 
.myshop-share-trigger, 
.myshop-wishlist-trigger, 
.myshop-cart-icon-trigger 
 {
    position: absolute !important;
    z-index: 50 !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.3);
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
}

.myshop-search-trigger:active, 
.myshop-share-trigger:active, 
.myshop-wishlist-trigger:active, 
.myshop-cart-icon-trigger:active {
    transform: scale(0.9) !important;
}

/* Позиционирование - ПРАВЫЙ ВЕРХНИЙ УГОЛ */
.myshop-search-trigger {
    top: 12px !important;
    left: 64px !important;
}

.myshop-wishlist-trigger {
    top: 12px !important; /* Под лупой */
    right: 12px !important;
}

/* Позиционирование - ПРАВЫЙ НИЖНИЙ УГОЛ (Над пагинацией) */
.myshop-cart-icon-trigger {
    bottom: 64px !important;
    right: 12px !important;
}

.myshop-share-trigger {
    bottom: 12px !important; /* Над корзиной */
    right: 12px !important;
}

/* Иконки внутри */
.myshop-search-trigger svg { width: 24px !important; height: 24px !important; fill: #000; }
.myshop-share-trigger svg { width: 22px !important; height: 22px !important; fill: #333; }
.myshop-cart-icon-trigger svg { width: 24px !important; height: 24px !important; fill: #333; }

/* Стили Wishlist (Silsila) */
.myshop-wishlist-trigger .silsila-toggle {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    color: #333;
}
.myshop-wishlist-trigger .silsila-toggle.is-active svg {
    fill: #ff4d00 !important;
    stroke: #ff4d00 !important;
}

/* Скрытие всех кнопок при активном зуме Swiper */
.js-main-slider.is-zoomed .myshop-search-trigger,
.js-main-slider.is-zoomed .myshop-share-trigger,
.js-main-slider.is-zoomed .myshop-wishlist-trigger,
.js-main-slider.is-zoomed .myshop-cart-icon-trigger { 
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Позиционирование - ЛЕВЫЙ ВЕРХНИЙ УГОЛ (Назад) */
.myshop-back-button {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important; /* Единственная кнопка слева */
    z-index: 50 !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.3);
    color: #000;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    font: inherit;
}

.myshop-back-button:active {
    transform: scale(0.9) !important;
}

/* Скрытие при зуме, как и у остальных */
.js-main-slider.is-zoomed .myshop-back-button { 
    opacity: 0 !important;
    pointer-events: none !important;
}



/* ============================================================
   3. НАВИГАЦИЯ (ПАГИНАЦИЯ) — PREMIUM STYLE
============================================================ */
.js-main-slider .swiper-pagination {
    bottom: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important; /* Идеальный центр по математике */
    width: auto !important; /* Контейнер подстраивается под количество точек */
    
    /* Стеклянная подложка (опционально, убери если не нравится) */
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    
    padding: 6px 10px !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important; /* Расстояние между точками */
    z-index: 10;
    pointer-events: none;
}

.js-main-slider .swiper-pagination-bullet {
    width: 6px !important;
    height: 6px !important;
    background: #000 !important;
    opacity: 0.3 !important;
    margin: 0 !important; /* Зазоры теперь через gap выше */
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: auto;
}

/* Активная точка — "Капсула" */
.js-main-slider .swiper-pagination-bullet-active {
    background: #ff4d00 !important;
    opacity: 1 !important;
    width: 20px !important; /* Удлиненная форма */
    border-radius: 4px !important;
}

/* Скрываем лишнее, если точек слишком много */
.swiper-pagination-lock { display: none !important; }





@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}






/* 1. Основной контейнер */
#js-variation-btns-root {
    margin: 16px 0;
    padding: 20px;
    background: #ffffff; 
    border-radius: 24px; /* Более мягкий радиус */
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

/* 2. Группа атрибута */
.myshop-var-group {
    margin-bottom: 24px;
    position: relative;
}

.myshop-var-group:last-child {
    margin-bottom: 0;
}

/* 3. Заголовок группы */
.myshop-var-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    color: #1a202c; /* Более глубокий черный для читаемости */
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Добавим индикатор выбранного значения рядом с меткой */
.myshop-var-label::after {
    content: attr(data-selected); /* Если будешь прокидывать JS-ом */
    text-transform: none;
    color: #718096;
    font-weight: 500;
}

/* 4. Контейнер скролла с "умной" маской */
.myshop-var-list {
    display: flex;
    flex-wrap: nowrap;      
    overflow-x: auto;       
    gap: 10px;              
    padding: 4px 4px 12px; /* Нижний паддинг для тени кнопок */
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity; /* Прилипание при скролле */
    scrollbar-width: none;
}

.myshop-var-list::-webkit-scrollbar { display: none; }

/* 5. Кнопка вариации */
.var-btn {
    appearance: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0; /* Тоньше граница — чище вид */
    padding: 12px 22px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
    border-radius: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto; 
    white-space: nowrap;
    scroll-snap-align: start;
    user-select: none;
}

/* Активное состояние нажатия (Haptic effect) */
.var-btn:active {
    transform: scale(0.96);
}

/* 6. Ховер (только для устройств с мышкой) */
@media (hover: hover) {
    .var-btn:hover:not(.selected):not(.disabled) {
        border-color: #cbd5e0;
        background-color: #edf2f7;
        color: #1a202c;
    }
}

/* 7. Активная кнопка (Premium Look) */
.var-btn.selected {
    background: #1a202c !important; /* Глубокий черный или твой #FF0080 */
    color: #ffffff !important;   
    border-color: #1a202c !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    pointer-events: none; 
}

/* Если хочешь оставить розовый, замени #1a202c на #FF0080 */
.var-btn.selected.pink {
    background: linear-gradient(135deg, #ff3300 0%, #007aff 100%) !important;
    border: none !important;
}

/* 8. Нет в наличии */
.var-btn.disabled {
    opacity: 0.5;
    background: #f1f5f9;
    color: #94a3b8;
    border-style: dashed; /* Пунктир для Out of Stock */
    cursor: not-allowed;
    pointer-events: none;
}

/* Доп: Индикатор, если кнопок много (градиент справа) */
.myshop-var-group::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 12px;
    width: 40px;
    height: 45px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.9));
    pointer-events: none;
}








/* ============================================================
   4. БЛОК ОПИСАНИЯ (COLLAPSIBLE CONTENT) - OZON STYLE
============================================================ */
.description-content-wrapper {
    position: relative;
    overflow: hidden;
    line-height: 1.6;
    font-size: 15px;
    color: #333;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Состояние "Свернуто" */
.description-content-wrapper.is-collapsed {
    max-height: 120px; /* Высота порогового значения из JS */
}

/* Эффект затухания текста снизу */
.description-content-wrapper.is-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Убираем затухание при раскрытии */
.description-content-wrapper:not(.is-collapsed)::after {
    opacity: 0;
}

/* Стили динамической кнопки */
.js-toggle-description.myshop-btn-more {
    display: block;
    width: auto;
    margin: 12px 0;
    padding: 0;
    background: none;
    border: none;
    color: #ff4d00; /* Ваш акцентный цвет */
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px dashed rgba(255, 77, 0, 0.3);
    transition: all 0.2s ease;
}

.js-toggle-description.myshop-btn-more:hover {
    color: #e64500;
    border-bottom-color: #e64500;
}

/* Иконка стрелочки (опционально через псевдоэлемент) */
.js-toggle-description.myshop-btn-more::after {
    content: '↓';
    margin-left: 6px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.js-toggle-description.myshop-btn-more.is-open::after {
    transform: rotate(180deg);
    content: '↑';
}

/* Адаптация под темную тему (если есть) */
@media (prefers-color-scheme: dark) {
    .description-content-wrapper.is-collapsed::after {
        background: linear-gradient(to bottom, transparent, #1a1a1a);
    }
}


/* ПЛАВАЮЩАЯ ЦЕНА НА ФОТО */
.myshop-price-trigger {
    /* Позиционирование */
    position: absolute !important;
    bottom: 2px !important;
    left: 12px !important;
    z-index: 50 !important;
    
    /* Размеры и форма */
    height: 44px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    
    /* Стеклянный эффект (как у кнопок) */
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    
    /* Центрирование текста внутри */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    pointer-events: none; /* Чтобы не мешать свайпу фото */
}

/* Новая цена */
.myshop-price-trigger .price-new {
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #ff3300 !important;
    line-height: 1 !important;
}

/* Старая цена */
.myshop-price-trigger .price-old {
    font-size: 13px !important;
    color: #555 !important;
    text-decoration: line-through !important;
    opacity: 0.6;
    line-height: 1 !important;
}

/* Скрытие при зуме */
.js-main-slider.is-zoomed .myshop-price-trigger { 
    opacity: 0 !important;
    visibility: hidden;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    .myshop-price-trigger {
        height: 38px !important;
        left: 10px !important;
        bottom: 10px !important;
        padding: 0 10px !important;
    }
    .myshop-price-trigger .price-new {
        font-size: 17px !important;
    }
}



/* 2. БЛОК ПОД ФОТО (ЗАГОЛОВОК И НАЛИЧИЕ) */
.myshop-product-details-unique {
    padding: 16px 12px var(--silsila-product-content-bottom, calc(145px + env(safe-area-inset-bottom))) !important;
    background: #fff !important;
}

.myshop-product-title-single {
    margin: 0 0 10px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    line-height: 1.4 !important;
}

.myshop-info-row {
    display: flex !important;
    justify-content: flex-end !important; /* Наличие прижато вправо */
}

.myshop-quantity {
    color: #007aff !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    background: #edf5ff !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(0, 122, 255, 0.1) !important;
}





/* БЛОК ДОСТАВКИ (Компактный стиль) */
.myshop-delivery-badge {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 8px 0 16px 0 !important;
    padding: 8px 12px !important;
    background: #f4f8ff !important; /* Легкий зеленый */
    border-radius: 10px !important;
    border: 1px solid #cfe2ff !important;
    width: fit-content !important; /* Ширина по тексту, а не на весь экран */
}

/* ИКОНКА (Тот самый "автобус") */
.myshop-delivery-badge svg {
    width: 18px !important;  /* Жесткий размер ширины */
    height: 18px !important; /* Жесткий размер высоты */
    flex-shrink: 0 !important; /* Чтобы не сжималась */
    color: #007aff !important;
}

/* ТЕКСТ ДОСТАВКИ */
.myshop-delivery-badge .delivery-text {
    color: #007aff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

/* На мобилках делаем еще аккуратнее */
@media (max-width: 480px) {
    .myshop-delivery-badge {
        padding: 6px 10px !important;
        margin-bottom: 12px !important;
    }
}






     






/* НИЖНЯЯ ПАНЕЛЬ (ОБЕРТКА) */
.myshop-fixed-bottom-actions {
    position: fixed;
    /* Совмещаем высоту отступа с фактической высотой нижнего меню. */
    bottom: var(--silsila-product-actions-bottom, calc(64px + env(safe-area-inset-bottom)));
    left: 0;
    width: 100%;
    z-index: 998;
    padding: 8px 16px 0;
    
    /* УБИРАЕМ ФОН, ГРАНИЦЫ И ТЕНИ */
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: translate3d(0, 0, 0);
    opacity: 1;
    transition: transform .24s ease, opacity .2s ease;
    will-change: transform, opacity;
    
    /* Чтобы сквозь прозрачную панель можно было кликать по ссылкам под ней */
    pointer-events: none; 
}

.myshop-fixed-bottom-actions.is-hidden {
    transform: translate3d(0, calc(100% + 20px), 0);
    opacity: 0;
}

.bottom-actions-container {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
    /* Возвращаем кликабельность кнопкам */
    pointer-events: auto; 
}

.action-btn {
    flex: 1;
    height: 45px; /* Чуть увеличил для удобства */
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    /* Тень только у самих кнопок, чтобы они выделялись */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Эффект нажатия */
.action-btn:active { 
    transform: scale(0.96); 
}

.action-btn:disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
}

/* Цвета кнопок */
.buy-now { 
    background: #ff8800; 
    color: #fff; 
}

.add-to-cart { 
    background: #ff3300; 
    color: #fff; 
}

@media (prefers-reduced-motion: reduce) {
    .myshop-fixed-bottom-actions { transition: none; }
}

/* Отступ контента снизу, чтобы кнопки ничего не перекрывали */
#myshop-single-app { 
    padding-bottom: 50px; 
}
