/* ============ КАРТОЧКА ТОВАРА: ОКНО И ОТДЕЛЬНАЯ СТРАНИЦА ВЫГЛЯДЯТ ОДИНАКОВО ============
   Разделы 1-3, 4-7, 9, 10 ниже раньше лежали в HEAD сайта (номера разделов те же).
   Запись :is(...popup__container, ...snippet__container) значит «и в окне товара,
   и на отдельной странице товара по прямой ссылке dangina.shop/tproduct/...». */

/* 1. Карточка товара (окно товара и страница /tproduct) */
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container),:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) *{font-family:'Inter',Arial,sans-serif}
.t-catalog__prod-popup__close-txt-wr{left:40px!important;top:40px!important}
.t-catalog__prod-popup__close-txt{font-size:15px!important;line-height:1.2!important;color:#1a1a1a!important}
.t-catalog__prod-popup__name{margin-bottom:8px}
.t-catalog__prod-popup__sku{font-size:15px!important;color:#736e69!important;opacity:1!important}
.t-catalog__prod-popup__price-wrapper{margin-top:22px!important}
.t-catalog__prod-popup__price,.t-catalog__prod-popup__price .t-catalog__prod-popup__price-value,.t-catalog__prod-popup__price .t-catalog__prod-popup__price-currency{font-size:32px!important;font-weight:500!important;line-height:1.2!important;color:#1a1a1a!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .js-product-controls-wrapper{margin-top:32px!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-title.js-product-edition-option-name{font-size:15px!important;color:#736e69!important;opacity:1!important;margin-bottom:12px!important}
/* выбор варианта (например, цвет «Чёрный» у DB-R1) - таблетки */
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-variants_buttons{display:flex;flex-wrap:wrap;gap:8px}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-item_buttons{margin:0!important;height:44px;padding:0 22px!important;border:0!important;border-radius:22px!important;background:#ece8e3!important;display:inline-flex!important;align-items:center;cursor:pointer;transition:background-color .2s}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-item_buttons:hover{background:#dcd6cf!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-checkmark_buttons{display:none!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-title_buttons{height:auto!important;padding:0!important;font-size:16px!important;line-height:1.2!important;font-weight:500!important;color:#1a1a1a!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-item_buttons.t-product__option-item_active{background:#1a1a1a!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-item_active .t-product__option-title_buttons{color:#fff!important}
.t-catalog__prod-popup__btn-wrapper{margin-top:32px!important}
.t-catalog__prod-popup__btn{height:52px!important;padding:0 34px!important;font-size:20px!important;border-radius:26px!important}
.t-catalog__prod-popup__text{margin-top:40px!important;font-size:18px!important;line-height:1.3!important;color:#1a1a1a!important;opacity:1!important}
.t-catalog__prod-popup__text a[href*="wildberries"],.t-catalog__prod-popup__text a[href*="ozon"]{display:inline-flex;align-items:center;height:52px;padding:0 33px;margin:20px 8px 0 0;border:1px solid #1a1a1a;border-radius:26px;color:#1a1a1a!important;font-size:20px;font-weight:500;text-decoration:none!important;box-shadow:none!important;transition:background-color .2s,color .2s}
.t-catalog__prod-popup__text a[href*="wildberries"]:hover,.t-catalog__prod-popup__text a[href*="ozon"]:hover{background:#1a1a1a;color:#fff!important}
/* строка «Также можно купить на Wildberries · Ozon» под кнопкой «В корзину» (включается переключателем в разделе 2 скрипта в HEAD) */
.dg-mpline{margin-top:14px;font-family:'Inter',Arial,sans-serif;font-size:15px;line-height:1.3;color:#736e69}
.dg-mpline a{color:#1a1a1a!important;text-decoration:underline!important;text-decoration-color:#c9c3bc!important;text-underline-offset:3px;transition:text-decoration-color .2s}
.dg-mpline a:hover{text-decoration-color:#1a1a1a!important}
/* 2. Характеристики товара таблицей (название и значение по центру строки) */
.t-catalog__prod-popup__text .js-catalog-prod-all-charcs{margin-top:40px!important}
.dg-ch-title{font-size:20px;font-weight:500;line-height:1.2;color:#1a1a1a;margin:0 0 12px}
.t-catalog__prod-popup__text .js-catalog-prod-all-charcs p:empty{display:none}
.t-catalog__prod-popup__text p.dg-ch{display:flex;align-items:center;gap:16px;margin:0!important;padding:12px 0;border-bottom:1px solid #dcd6cf;font-size:16px!important;line-height:1.3!important;opacity:1!important}
.t-catalog__prod-popup__text p.dg-ch:first-of-type{border-top:1px solid #dcd6cf}
.dg-ch__k{flex:0 0 42%;color:#736e69}
.dg-ch__v{flex:1 1 auto;color:#1a1a1a}
.dg-mp{margin-top:40px}
/* 3. Галерея в карточке товара */
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-slds__thumbsbullet .t-slds__bgimg{border-radius:16px}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-slds__thumbsbullet-border{border-radius:16px;border:1.5px solid transparent!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-slds__bullet_active .t-slds__thumbsbullet-border{border-color:#1a1a1a!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-slds__arrow{width:48px!important;height:48px!important;border-radius:50%!important}
@media (min-width:960px){
.t-catalog__prod-popup__col-left{width:52%!important;max-width:none!important;margin-right:0!important}
.t-catalog__prod-popup__col-right{width:calc(48% - 120px)!important;max-width:560px!important;margin-left:80px!important;margin-right:0!important}
}
@media (max-width:639px){
.t-catalog__prod-popup__close-txt-wr{left:16px!important;top:16px!important}
.t-catalog__prod-popup__sku{font-size:13px!important}
.t-catalog__prod-popup__price-wrapper{margin-top:16px!important}
.t-catalog__prod-popup__price,.t-catalog__prod-popup__price .t-catalog__prod-popup__price-value,.t-catalog__prod-popup__price .t-catalog__prod-popup__price-currency{font-size:22px!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .js-product-controls-wrapper{margin-top:24px!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-item_buttons{height:40px;padding:0 18px!important;border-radius:20px!important}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-product__option-title_buttons{font-size:15px!important}
.t-catalog__prod-popup__btn-wrapper{margin-top:24px!important}
.t-catalog__prod-popup__btn{width:100%!important;height:48px!important;font-size:16px!important;border-radius:24px!important;justify-content:center}
.t-catalog__prod-popup__text{margin-top:32px!important;font-size:16px!important}
.t-catalog__prod-popup__text .js-catalog-prod-all-charcs,.dg-mp{margin-top:32px!important}
.dg-ch-title{font-size:18px}
.t-catalog__prod-popup__text p.dg-ch{font-size:15px!important;padding:10px 0;gap:12px}
.t-catalog__prod-popup__text a[href*="wildberries"],.t-catalog__prod-popup__text a[href*="ozon"]{height:48px;padding:0 27px;font-size:16px;margin-top:16px}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-slds__thumbsbullet .t-slds__bgimg,:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-slds__thumbsbullet-border{border-radius:8px}
:is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-slds__arrow{width:32px!important;height:32px!important}
}
/* 4. Шапка: счётчик корзины, мобильное меню, подложка при прокрутке */
.dg-cart-badge{position:absolute;left:18px;top:-6px;min-width:18px;height:18px;padding:0 4px;box-sizing:border-box;border-radius:9px;background:#141414;color:#fff;font:500 11px/18px var(--t-text-font,Inter),Arial,sans-serif;text-align:center;pointer-events:none;display:none}.dg-cart-badge.is-on{display:block}
.t3112{visibility:hidden;transition:transform .3s ease-in-out,visibility 0s linear .3s!important}.t3112.t3112__menu_show{visibility:visible;transition:transform .3s ease-in-out,visibility 0s linear 0s!important}
#rec5465036301 .t396__artboard{transition:background-color .25s ease}
body.dg-scrolled #rec5465036301 .t396__artboard{background-color:#f6f4f1!important}
/* 5. Формы: флажок страны в поле телефона без тени */
.t-input-phonemask__select-flag{box-shadow:none!important}
/* 6. Пробел перед знаком рубля в ценах */
.t-catalog__card__price-currency,.t-catalog__prod-popup__price-currency{margin-left:.25em}
/* 7. Окно просмотра видео (видеоинструкции). Кнопка закрытия - ровный бежевый круг с тонким крестиком */
.dg-vbox{position:fixed;inset:0;z-index:100000;background:rgba(26,26,26,.92);display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:opacity .25s,visibility 0s .25s}
.dg-vbox.is-open{opacity:1;visibility:visible;transition:opacity .25s}
.dg-vbox video{max-width:min(92vw,600px);max-height:88vh;border-radius:16px;background:#000;outline:none}
.dg-vbox__close{position:absolute;top:20px;right:20px;width:44px;height:44px;box-sizing:border-box;padding:0;margin:0;border:0;border-radius:50%;background:#f6f4f1;color:#1a1a1a;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-appearance:none;appearance:none;transition:background-color .2s,transform .2s}
.dg-vbox__close:hover{background:#fff;transform:rotate(90deg)}
.dg-vbox__close svg{width:16px;height:16px;display:block}
@media (max-width:639px){.dg-vbox__close{top:16px;right:16px;width:40px;height:40px}.dg-vbox__close svg{width:14px;height:14px}}
.dg-vbox__msg{color:#fff;font:400 18px/1.4 var(--t-text-font,Inter),Arial,sans-serif;text-align:center;padding:0 24px}
/* 9. Выбор цвета в карточке товара (кружки под ценой) и плавная смена карточки */
.dg-colors{margin:24px 0 0;font-family:'Inter',Arial,sans-serif}
.dg-colors__label{font-size:15px;line-height:1.2;color:#736e69;margin-bottom:12px}
.dg-colors__label b{font-weight:400;color:#1a1a1a}
.dg-colors__list{display:flex;gap:14px;flex-wrap:wrap;padding-left:4px}
.dg-colors__item{width:32px;height:32px;border-radius:50%;border:1px solid #dcd6cf;cursor:pointer;padding:0;position:relative;transition:transform .2s}
.dg-colors__item:hover{transform:scale(1.08)}
.dg-colors__item.is-active{box-shadow:0 0 0 3px #f6f4f1,0 0 0 4.5px #1a1a1a;cursor:default;transform:none}
.dg-colors__item::after{content:"";position:absolute;inset:-6px}
html.dg-swap .t-popup,html.dg-swap .t-popup *{transition:none!important;animation:none!important}
.dg-swap-cover{position:fixed;inset:0;background:#f6f4f1;z-index:10000010;opacity:0;transition:opacity .22s ease;pointer-events:none}
.dg-swap-cover.is-on{opacity:1}
/* 10. Кнопка «Смотреть видеоинструкцию» в карточке товара (список товаров - в разделе 10 скрипта в HEAD) */
.dg-vlink{display:inline-flex;align-items:center;gap:12px;margin-top:20px;font-family:'Inter',Arial,sans-serif;font-size:16px;line-height:1.2;font-weight:500;color:#1a1a1a!important;text-decoration:none!important}
.dg-vlink__i{flex:none;width:40px;height:40px;border-radius:50%;background:#ece8e3;display:flex;align-items:center;justify-content:center;transition:background-color .3s,transform .3s}
.dg-vlink__i svg{width:12px;height:14px;margin-left:3px;fill:#1a1a1a;transition:fill .3s}
.dg-vlink__t{text-decoration:none}
.dg-vlink:hover .dg-vlink__i{background:#1a1a1a;transform:scale(1.06)}
.dg-vlink:hover .dg-vlink__i svg{fill:#fff}
@media (max-width:639px){.dg-vlink{margin-top:16px;font-size:15px;gap:10px}.dg-vlink__i{width:36px;height:36px}}

/* КАРТОЧКА ТОВАРА НА КОМПЬЮТЕРЕ ПОДНЯТА ВЫШЕ (меньше пустая полоса сверху).
   Только компьютер и планшет (от 640 px). Телефон не меняется.
   Работает и в окне товара, и на отдельной странице товара по прямой ссылке.
   • 72px - от верха экрана до фото и названия товара (у Тильды было 105-120px). Больше число - карточка ниже.
   • 13px - от верха до «← Назад»: так «Назад» стоит на одной линии с крестиком справа.
   Вернуть как было: удалить этот раздел (до следующего комментария). */
@media (min-width:640px){
body .t-popup .t-popup__container-static:has(.t-catalog__prod-popup__container){margin-top:0!important}
body .t-catalog__prod-popup__container,body .t-catalog__prod-snippet__container{padding-top:72px!important}
body .t-catalog__prod-popup__close-txt-wr{top:13px!important}
}

/* ЛЕНТА МИНИАТЮР В ГАЛЕРЕЕ ТОВАРА.
   Работает и в окне товара, и на отдельной странице товара (/tproduct).
   Миниатюры под главным фото идут одной лентой, её можно листать вбок (пальцем, тачпадом, мышкой - см. раздел 11 в HEAD).
   На компьютере видно 5,5 миниатюры: половинка следующей показывает, что дальше есть ещё фото.
   Сколько видно - число 5.5 ниже (например, 6.5 - миниатюры станут мельче).
   Отключить: удалить этот раздел (до следующего комментария). */
body .t-catalog__prod-popup__container .t-slds__thumbsbullet-wrapper,
body .t-catalog__prod-snippet__container .t-slds__thumbsbullet-wrapper{display:flex!important;flex-wrap:nowrap!important;gap:15px;margin-top:16px!important;padding:0!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
body .t-catalog__prod-popup__container .t-slds__thumbsbullet-wrapper::-webkit-scrollbar,
body .t-catalog__prod-snippet__container .t-slds__thumbsbullet-wrapper::-webkit-scrollbar{display:none}
body .t-catalog__prod-popup__container .t-slds__thumbsbullet,
body .t-catalog__prod-snippet__container .t-slds__thumbsbullet{width:auto!important;height:auto!important;max-width:none!important;margin:0!important;border-radius:16px;overflow:hidden;opacity:1!important}
@media (min-width:640px){
body .t-catalog__prod-popup__container .t-slds__thumbsbullet,
body .t-catalog__prod-snippet__container .t-slds__thumbsbullet{flex:0 0 calc((100% - 75px)/5.5)!important}
}
@media (max-width:639px){
body .t-catalog__prod-popup__container .t-slds__thumbsbullet-wrapper,
body .t-catalog__prod-snippet__container .t-slds__thumbsbullet-wrapper{gap:8px;padding:0 16px!important;margin-top:12px!important}
body .t-catalog__prod-popup__container .t-slds__thumbsbullet,
body .t-catalog__prod-snippet__container .t-slds__thumbsbullet{flex:0 0 62px!important;border-radius:8px}
}

/* ОТСТУПЫ В ОКНЕ ТОВАРА НА ТЕЛЕФОНЕ - КАК СТАНДАРТНЫЕ У ТИЛЬДЫ.
   На телефоне между названием, артикулом, ценой, выбором цвета и кнопкой «В корзину» стоят
   обычные отступы Тильды (увеличенные отступы из раздела 1 выше здесь отменены).
   Кружочки цветов у DG-17 и плашка «Доставка Ozon» этим не затрагиваются.
   Компьютер не меняется. Вернуть прежние (увеличенные) отступы на телефоне: удалить этот раздел. */
@media (max-width:639px){
body :is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-catalog__prod-popup__name{margin-bottom:0!important}
body :is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-catalog__prod-popup__price-wrapper{margin-top:0!important}
body :is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .js-product-controls-wrapper{margin-top:0!important}
body :is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-catalog__prod-popup__btn-wrapper{margin-top:20px!important}
}

/* ПЛАШКА «ДОСТАВКА OZON» ПОД КНОПКОЙ «В КОРЗИНУ» - У ВСЕХ ТОВАРОВ, ВЕЗДЕ.
   Работает и в окне товара (на Главной, в Каталоге), и на отдельной странице товара,
   которая открывается по прямой ссылке dangina.shop/tproduct/...
   (раньше этот код стоял в двух блоках T123 на Главной и в Каталоге, теперь они скрыты).
   Плашка - это картинка, она не нажимается. На компьютере и планшете одна картинка,
   на телефоне другая (в карточках без слова «Ozon», чтобы текст поместился).
   Отступы: от «В корзину» до плашки и от плашки до «Смотреть видеоинструкцию» -
   24px на компьютере, 20px на телефоне (числа margin-top ниже).
   Исходники в Figma (файл Dangina): «Доставка Ozon · компьютер · 420» (компьютер)
   и «Доставка Ozon · телефон · 335» (телефон).
   КАК ЗАМЕНИТЬ КАРТИНКУ: выгрузить новую из Figma в PNG 2x, загрузить в Тильду, скопировать ссылку
   и вставить вместо старой в url("..."): первая ссылка - компьютер, вторая (в разделе «телефон») - телефон.
   Если у новой картинки другие пропорции - поменять рядом aspect-ratio (ширина / высота).
   max-width:420px - наибольшая ширина плашки на компьютере (как в макете).
   КАК УБРАТЬ: удалить этот раздел целиком (до конца) и опубликовать Главную и Каталог. */
body :is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-catalog__prod-popup__btn-wrapper{display:flex!important;flex-wrap:wrap!important;align-items:center;margin-bottom:0!important}
/* компьютер и планшет */
body :is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-catalog__prod-popup__btn-wrapper::after{
  content:"";display:block;flex:0 0 100%;width:100%;max-width:420px;
  aspect-ratio:840/298;margin-top:24px;
  background:url("https://static.tildacdn.com/tila3635-3063-4266-a161-396266363631/bf8c9543-d315-4771-a.png") left top/100% auto no-repeat;
}
body :is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .dg-vlink{margin-top:24px!important}
/* телефон */
@media (max-width:639px){
body :is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .t-catalog__prod-popup__btn-wrapper::after{
  margin-top:20px;aspect-ratio:670/254;
  background-image:url("https://static.tildacdn.com/tila3164-3365-4165-a530-393738323633/d0caad0b-517b-4824-b.png");
}
body :is(.t-catalog__prod-popup__container,.t-catalog__prod-snippet__container) .dg-vlink{margin-top:20px!important}
}