/* «Двері в дім» — additions on top of the legacy sj_time stylesheet (legacy.css).
   Only layout fixes for Joomla 6 markup and the new blocks: header search, sliders, request forms. */

:root {
	--dv-teal: #017b8a;
	--dv-teal-dark: #01606c;
	--dv-price: #a00;
	--dv-line: #dcdcdc;
}

/* The old template injected its page width (1200px) inline from its settings. */
@media (min-width: 1200px) { .container { width: 1200px; } }

/* ---------- Header ---------- */
#yt_header #top2 { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
#yt_spotlight1 .row { display: flex; flex-wrap: wrap; align-items: center; }
#yt_logo img { max-width: 100%; height: auto; }

/* Cart and favourites must stay reachable while scrolling the catalogue (client request). */
#yt_header { position: sticky; top: 0; z-index: 110; }

/* Header cart: the old blue "Моя корзина" arrow bar + dark cart tab (was mod_jshopping_cart_wl_ajax). */
/* One slim row: cart + favourites on the left, РУС/УКР on the right (the old bar was 68px tall). */
#yt_header .row { display: flex; align-items: center; }
#yt_header #top1, #yt_header #top2 { padding-top: 7px; padding-bottom: 7px; }
#yt_header #top2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.dv-cart { display: inline-flex; align-items: stretch; height: 30px; text-decoration: none !important; font-size: 12px; }
.dv-cart__text { display: flex; align-items: center; gap: 6px; padding: 0 30px 0 98px; background: #0f95f0; color: #fff;
	clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.dv-cart__count { display: none; }
.dv-cart.has-items .dv-cart__count { display: flex; align-items: center; margin-left: -26px; margin-right: 14px; padding: 0 7px; height: 18px; align-self: center;
	border-radius: 9px; background: #fff; color: #0f95f0; font-weight: bold; z-index: 1; }
.dv-cart__sum { display: none; }
.dv-cart__icon { display: flex; align-items: center; padding: 0 10px; margin-left: -10px; background: #555; }
.dv-cart:hover .dv-cart__text { background: #0b84d6; }

/* Header: cart + favourites side by side */
.dv-headbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dv-favlink { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid #444;
	border-radius: 15px; color: #fff !important; font-size: 12px; text-decoration: none !important; transition: border-color .2s, background .2s; }
.dv-favlink:hover { border-color: #e2445c; background: rgba(226, 68, 92, .15); }
.dv-favlink__heart { color: #e2445c; font-size: 15px; line-height: 1; }
.dv-favlink__count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e2445c; color: #fff; font-weight: bold; font-size: 11px; line-height: 18px; text-align: center; }
.dv-favlink__count[hidden] { display: none; }

/* Heart button on product cards / sliders / product page */
.dv-fav { position: absolute; top: 6px; right: 6px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	width: 34px; height: 34px; padding: 0; border: 1px solid #ddd; border-radius: 50%; background: rgba(255,255,255,.95);
	color: #bbb; font-size: 17px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.12); transition: color .15s, transform .15s, border-color .15s; }
.dv-fav:hover { color: #e2445c; border-color: #e2445c; }
.dv-fav.is-on { color: #e2445c; border-color: #e2445c; }
.dv-fav > span[aria-hidden] { color: #bbb !important; }
.dv-fav:hover > span[aria-hidden], .dv-fav.is-on > span[aria-hidden] { color: #e2445c !important; }
.dv-fav--pop { animation: dv-pop .35s ease; }
@keyframes dv-pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.block_product .image_block { position: relative; }
/* Heart in the button row (below the photo) on cards and sliders. */
.dv-fav.dv-fav--inline { position: static; flex: none; width: 34px; height: 34px; box-shadow: none; }
.dv-slider__actions { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 4px; }
h1.dv-has-fav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dv-fav.dv-fav--big { position: static; width: auto; height: 34px; padding: 0 14px; border-radius: 17px; font-size: 16px; box-shadow: none; }
.dv-fav__label { font-size: 13px; font-weight: normal; color: #444; }
.dv-fav.is-on .dv-fav__label { color: #e2445c; }

/* Favourites page */
.dv-fav-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 991px) { .dv-fav-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .dv-fav-grid { grid-template-columns: repeat(2, 1fr); } }
.dv-fav-card { flex: none; }
.dv-fav-remove, .dv-fav-clear { display: block; margin: 8px auto 0; border: 0; background: none; color: #999; font-size: 12px; }
.dv-fav-remove:hover, .dv-fav-clear:hover { color: #e2445c; }
.dv-fav-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.dv-fav-actions .dv-fav-clear { margin: 0 0 0 auto; }
.dv-fav-back { display: inline-flex; align-items: center; gap: 6px; }
.dv-fav-top { margin: 0 0 14px; }
.dv-fav-empty { padding: 30px 0; font-size: 15px; color: #666; }

/* Language switcher "РУС УКР" */
#top2 .mod-languages { position: static; flex-shrink: 0; }
.lang-inline { margin: 0; padding: 0; list-style: none; }
.lang-inline li { display: inline-block; margin-left: 12px; }
.lang-inline a { color: #1e9be8; font-size: 12px; text-transform: uppercase; }
.lang-inline .lang-active a { color: #fff; }

/* Header image links (Акции / Новинки / Супер цены) */
#top1 ul.menu { display: flex; align-items: center; gap: 20px; height: auto; margin: 0; padding: 0; list-style: none; }
#top1 ul.menu li a { line-height: 1; }
#top1 ul.menu li { list-style: none; }
#top1 .image-title { display: none; }

/* Breadcrumbs: Joomla 6 adds an icon item and Bootstrap 5 classes */
.mod-breadcrumbs__divider, .mod-breadcrumbs__here { display: none !important; }
#breadcrumb .breadcrumb { padding: 0; margin: 0; background: none; }
#breadcrumb .breadcrumb > li { display: inline-block; }
#breadcrumb .breadcrumb > li.mod-breadcrumbs__item + li.mod-breadcrumbs__item::before { content: "/" !important; display: inline-block !important; padding: 0 8px; color: #555; font-style: normal; }
#breadcrumb .breadcrumb li, #breadcrumb .breadcrumb a { font-style: italic; font-size: 12px; }

/* Header product search */
#yt_search form { display: flex; margin: 0; }
#yt_search input[type=text], #yt_search input[type=search] { flex: 1; height: 38px; padding: 6px 12px; border: 2px solid var(--dv-teal); border-right: 0; border-radius: 3px 0 0 3px; font-size: 14px; box-shadow: none; }
#yt_search .button, #yt_search button, #yt_search input[type=submit] { height: 38px; padding: 0 16px; border: 0; border-radius: 0 3px 3px 0; background: var(--dv-teal); color: #fff; font-size: 14px; }
#yt_search .button:hover, #yt_search button:hover, #yt_search input[type=submit]:hover { background: var(--dv-teal-dark); }
#yt_search a[href*="adv"] { display: none; } /* "advanced search" link is not used on this shop */

/* ---------- Main menu ---------- */
.dv-navtoggle { display: none; }
.dv-subtoggle { display: none; } /* phone-only «+/−» buttons (see Mobile below); on a desktop the menu opens on hover */
#moonavigator { position: relative; z-index: 50; }
#moonavigator ul.subnavi { display: none; position: absolute; z-index: 60; }
#moonavigator li { position: relative; }
#moonavigator li:hover > ul.subnavi, #moonavigator li:focus-within > ul.subnavi { display: block; }
#moonavigator ul.level2 { top: 100%; left: 0; }
#moonavigator ul.level3, #moonavigator ul.level4 { top: 0; left: 100%; }
@media (min-width: 768px) {
	/* Stays on screen while scrolling through long product lists (desktop and laptop): the black bar with the
	   cart and favourites sticks to the top, the main menu right under it (bar height 44px). */
	#yt_menuwrap { position: sticky; top: 44px; z-index: 100; }
	/* Long submenus (Входные двери has 20+ entries) did not fit a laptop screen: two columns instead. */
	#moonavigator li:hover > ul.subnavi.dv-wide, #moonavigator li:focus-within > ul.subnavi.dv-wide {
		display: grid; grid-template-columns: repeat(2, 230px); width: auto; }
	#moonavigator ul.subnavi.dv-wide > li { width: 230px; }
	#moonavigator li:hover > ul.subnavi.dv-wide3, #moonavigator li:focus-within > ul.subnavi.dv-wide3 { grid-template-columns: repeat(3, 230px); }
}
.dv-price-ask { font-size: 15px !important; color: #017b8a !important; }

/* ---------- Content ---------- */
#yt_component img { max-width: 100%; height: auto; }
#content_main .module { margin-bottom: 30px; }
.dv-error { padding: 60px 0; text-align: center; }
.dv-error h1 { margin: 30px 0 12px; }

/* "Useful information" articles (core mod_articles in a 2-column grid, as the old Gavick news module) */
.mod-articles-items { list-style: none; padding: 0; margin: 0; }
.mod-articles-items > li { list-style: none; margin-bottom: 26px; }
.mod-articles-item-content h2, .mod-articles-item-content h3 { font-size: 20px; line-height: 1.15; margin: 0 0 12px; }
.mod-articles-item-content h2 a, .mod-articles-item-content h3 a { color: var(--dv-teal); }
.mod-articles-item-content .mod-articles-introtext h2, .mod-articles-item-content .mod-articles-introtext h1 { display: none; } /* title repeated inside intro text */
.mod-articles-item-content img { max-width: 100%; height: auto; }
.mod-articles-item-content p { text-align: justify; }
.mod-articles-item-content .readmore { text-align: right; }

/* Pagination (Joomla 6 markup: li.page-item > .page-link > span.icon-*). The legacy stylesheet framed the
   inner icon span as a second box, which looked like misaligned boxes inside boxes. */
.pagination__wrapper { text-align: center; }
.pagination { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 20px !important; padding: 0; }
.pagination > li { display: block; float: none; margin: 0; }
.pagination > li > a, .pagination > li > span, .pagination .page-link {
	display: flex !important; align-items: center; justify-content: center; float: none !important; margin: 0 !important;
	min-width: 36px; height: 36px; padding: 0 10px !important; border: 1px solid #ddd !important; border-radius: 3px !important;
	background: #fff !important; color: var(--dv-teal) !important; font-size: 14px; line-height: 1 !important; box-shadow: none !important; }
.pagination > li > a:hover { background: #f1f7f8 !important; border-color: var(--dv-teal) !important; }
.pagination > .active > a, .pagination > .active > span { background: var(--dv-teal) !important; border-color: var(--dv-teal) !important; color: #fff !important; }
.pagination > .disabled > a, .pagination > .disabled > span { color: #bbb !important; cursor: default; }
.pagination .page-link span { display: inline !important; float: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
	background: none !important; box-shadow: none !important; width: auto !important; height: auto !important; }

/* Joomla 6 core icons (icon-*) drawn with the Font Awesome 4 the template already loads. */
[class^="icon-"]::before, [class*=" icon-"]::before { font-family: FontAwesome; font-style: normal; font-weight: normal; }
.icon-angle-double-left::before { content: "\f100"; }
.icon-angle-double-right::before { content: "\f101"; }
.icon-angle-left::before, .icon-chevron-left::before, .icon-arrow-left::before { content: "\f104"; }
.icon-angle-right::before, .icon-chevron-right::before, .icon-arrow-right::before { content: "\f105"; }
.icon-search::before { content: "\f002"; }
.icon-info-circle::before { content: "\f05a"; }
.icon-check::before { content: "\f00c"; }
.icon-times::before, .icon-cancel::before { content: "\f00d"; }
.icon-envelope::before, .icon-mail::before { content: "\f0e0"; }
.icon-print::before { content: "\f02f"; }
.counter.pagination__counter, p.counter { text-align: center; color: #888; }

/* Back to top */
#yt-totop { display: none; }
#yt-totop.dv-show { display: block; }
/* Phones: a small round arrow instead of the grey «^ Top» block (client 28.11: unclear what it is). */
@media (max-width: 767px) {
	#yt-totop.backtotop { top: auto; right: 12px; bottom: 16px; width: 40px; height: 40px; padding: 0; border-radius: 50%;
		background: var(--dv-teal); opacity: .85; font-size: 0; line-height: 40px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
	#yt-totop.backtotop i { display: inline; margin: 0; font-size: 24px; line-height: 38px; color: #fff; }
}

/* ---------- JoomShopping 5 lists, styled as the JoomShopping 4 lists of the old site ---------- */
.d-flex { display: flex; }
.mt-2 { margin-top: .5rem; }
.mb-2 { margin-bottom: .5rem; }
.jshop h1 { font-size: 16px; font-weight: bold; margin: 0 0 16px; }
.category_description { margin-top: 30px; }

/* Sorting / count / filters on one compact block, like JoomShopping 4 */
#sort_count .block_sorting_count_to_page { display: flex; flex-wrap: wrap; gap: 10px 40px; align-items: center; }
#sort_count .control-group { display: flex; align-items: center; gap: 4px; margin: 0; }
#sort_count .control-label { margin: 0 !important; font-size: 13px; }
#sort_count .controls { margin: 0 !important; }
#sort_count select { height: 28px; padding: 2px 4px; width: auto; min-width: 100px; font-size: 13px; }
#sort_count .input-group { display: flex; align-items: center; gap: 6px; }
#sort_count .icon-arrow { cursor: pointer; }
#sort_count .icon-arrow-up::before { content: "\21E7"; font-size: 18px; color: var(--dv-teal); }
#sort_count .icon-arrow-down::before { content: "\21E9"; font-size: 18px; color: var(--dv-teal); }
#sort_count .margin_filter { height: 14px; }
#sort_count .filter_mob_head { display: none; }
#sort_count .filters { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: center; }
#sort_count .filters .box_cat_man, #sort_count .filters .box_price { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
#sort_count .filters input[type=text] { width: 90px; height: 34px; padding: 4px 8px; }
#sort_count .filters .button, #sort_count .filters .btn { background: var(--dv-teal); border: 0; color: #fff; padding: 8px 20px; border-radius: 0; }
#sort_count .clear_filter { font-size: 11px; }

/* Product grid: 4 per row, centred cards */
.jshop_list_product .row-fluid { display: flex; flex-wrap: wrap; margin: 16px -10px 0; }
.jshop_list_product .sblock4, .jshop_list_product [class^="sblock"] { width: 25%; padding: 0 10px 34px; float: none; }
.jshop_list_product .sblock3 { width: 33.333%; }
@media (max-width: 991px) { .jshop_list_product [class^="sblock"] { width: 33.333%; } }
@media (max-width: 600px) { .jshop_list_product [class^="sblock"] { width: 50%; } }
.block_product .product { text-align: center; }
.block_product .name { min-height: 44px; margin-bottom: 4px; font-size: 12px; font-weight: bold; line-height: 22px; }
.block_product .name a { color: var(--dv-teal); font-size: 12px !important; font-weight: bold; line-height: 22px; }
.block_product .jshop_price span { font-size: 18px; }
.block_product .image_block { position: relative; display: inline-block; }
.block_product .image_block .jshop_img { max-height: 220px; width: auto; }
.block_product .product_label { position: absolute; top: 0; left: -6px; z-index: 2; }
.block_product .review_mark { display: flex; justify-content: center; margin-top: 6px; }
.block_product .count_commentar { font-size: 12px; margin: 2px 0 4px; color: #888; }
.block_product .not_available { color: #e00; font-size: 12px; margin: 0 0 2px; }
.block_product .available { display: none; }
.block_product .old_price { color: #888; font-size: 11px; text-decoration: line-through; }
.block_product .jshop_price { color: #9b0000; font-size: 18px; margin: 2px 0 8px; }
.block_product .description:empty, .block_product .price_extra_info:empty { display: none; }
/* One row even in narrow cards (laptop zoom, longer Ukrainian «Детальніше»): compact buy button + heart. */
.block_product .buttons { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 8px; }
.block_product .buttons .dv-fav { width: 30px; height: 30px; font-size: 15px; }
.block_product .button_buy { background: #5cb85c; border: 0; color: #fff; padding: 6px 10px; border-radius: 3px; font-size: 13px; white-space: nowrap; }
.block_product .button_detail, #right .button_detail { background: none !important; border: 0 !important; color: var(--dv-teal) !important; padding: 0 !important; font-size: 13px; white-space: nowrap; box-shadow: none !important; }
#right .button_detail { font-size: 12px; }
.block_product .button_detail:hover { text-decoration: underline; }

/* Sidebar product modules (best sellers, new arrivals): left aligned, small, as before */
#right .jshop_list_product, #right .top_hits_products, #right .latest_products { text-align: left; }
#right .block_item { margin-bottom: 10px; text-align: left; }
#right .block_item .image_block { position: relative; display: inline-block; }
#right .block_item .jshop_img { max-width: 140px; height: auto; }
#right .block_item .product_label { position: absolute; top: -6px; left: -6px; }
#right .block_item .name { font-size: 12px; line-height: 22px; text-align: left; }
#right .block_item .name a { color: var(--dv-teal); font-size: 12px; }
#right .block_item .jshop_price, #right .block_item .old_price { font-size: 12px; color: #9b0000; text-align: left; }
#right .block_item .old_price { color: #888; text-decoration: line-through; }
#right .block_item .buttons { text-align: left; margin: 0; }

/* ---------- Product sliders (popular / similar) ---------- */
/* The legacy clearfix makes .modcontent a shrink-to-fit table, which let the track widen the page. */
.modcontent:has(> .dv-slider) { display: block; width: 100%; }
.dv-slider { position: relative; width: 100%; max-width: 100%; }
.dv-slider__track { width: 100%; }
.dv-slider__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 12px; scrollbar-width: thin; }
.dv-slider__item { flex: 0 0 calc((100% - 48px) / 4); scroll-snap-align: start; text-align: center; border: 1px solid var(--dv-line); padding: 12px 10px; background: #fff; }
/* Items must be the containing block of the absolutely positioned labels, or the labels escape the
   scroll container and stretch the whole page sideways. */
.dv-slider__item { position: relative; }
.dv-slider__item .dv-slider__img { position: relative; display: block; height: 200px; margin-bottom: 8px; }
.dv-slider__item .product_label { position: absolute; top: 0; left: 0; z-index: 1; }
.dv-slider__item .dv-slider__img img { max-height: 200px; width: auto; max-width: 100%; object-fit: contain; }
.dv-slider__name { display: block; min-height: 40px; font-size: 13px; line-height: 20px; color: var(--dv-teal); }
.dv-slider__price { display: block; margin-top: 6px; font-size: 18px; color: var(--dv-price); }
.dv-slider__old { display: block; font-size: 12px; color: #888; text-decoration: line-through; }
.dv-slider__nav { position: absolute; top: -44px; right: 0; display: flex; gap: 6px; }
.dv-slider__nav button { width: 30px; height: 30px; border: 1px solid #bbb; border-radius: 50%; background: #fff; color: #555; line-height: 1; }
.dv-slider__nav button:disabled { opacity: .35; }
@media (max-width: 991px) { .dv-slider__item { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 600px) { .dv-slider__item { flex-basis: 70%; } }

/* ---------- Homepage slideshow (was Widgetkit) ---------- */
.dv-slideshow { position: relative; overflow: hidden; border: 1px solid #5f9ea0; background: #fff; }
.dv-slideshow__slide { display: none; }
.dv-slideshow__slide.is-active { display: block; animation: dv-fade .6s; }
.dv-slideshow__slide img { display: block; width: 100%; height: auto; }
.dv-slideshow__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 8px; }
.dv-slideshow__dots button { width: 11px; height: 11px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.6); }
.dv-slideshow__dots button.is-active { background: #fff; }
@keyframes dv-fade { from { opacity: .3; } to { opacity: 1; } }

/* ---------- Request forms (mod_dvform) — Bootstrap 5 class names on the Bootstrap 3 base ---------- */
.dvform { max-width: 720px; }
.dvform .row.g-3 { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.dvform .row.g-3 > * { padding: 0 8px 14px; }
.dvform .col-12 { width: 100%; }
.dvform .col-sm-6 { width: 50%; float: none; }
.dvform .form-label, .dvform legend { display: block; margin-bottom: 5px; font-weight: bold; font-size: 13px; border: 0; }
.dvform .form-control, .dvform .form-select { display: block; width: 100%; height: 38px; padding: 6px 10px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px; }
.dvform textarea.form-control { height: auto; }
.dvform .form-check-inline { display: inline-flex; align-items: center; gap: 5px; margin-right: 18px; }
.dvform .form-check-input { margin: 0; }
.dvform .btn-primary { background: var(--dv-teal); border-color: var(--dv-teal); padding: 9px 26px; font-size: 16px; }
.dvform .btn-primary:hover { background: var(--dv-teal-dark); }
.dvform .alert { padding: 10px 14px; border-radius: 3px; }
.dvform .text-danger { color: #c00; }
@media (max-width: 600px) { .dvform .col-sm-6 { width: 100%; } }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	#yt_header .row { display: flex; align-items: center; }
	#top1 ul.menu { gap: 6px; margin-top: 0; }
	#top1 img { height: 20px; width: auto; }
	#yt_header #top2 { flex-wrap: nowrap; justify-content: flex-end; gap: 8px; padding-left: 0; }
	#yt_header #top1 { padding-right: 0; }
	/* Phone: one slim row - cart icon with count, heart with count, РУС/УКР. */
	.dv-headbar { flex-wrap: nowrap; gap: 8px; }
	.dv-cart__text { display: none; }
	.dv-cart.has-items .dv-cart__count { display: flex; margin: 0 4px 0 0; order: 2; }
	.dv-cart__icon { margin-left: 0; border-radius: 3px; }
	.lang-inline li { margin-left: 6px; }
	.dv-cart { height: 28px; margin-top: 4px; }
	.dv-cart__text { padding: 0 18px 0 10px; font-size: 11px; white-space: nowrap; }
	#top2 .mod-languages { margin-top: 0; }
	.dv-headbar { justify-content: flex-end; gap: 8px; }
	.dv-favlink { height: 28px; margin-top: 4px; padding: 0 9px; }
	.dv-favlink__text { display: none; }
	#yt_spotlight1 #banner table { margin: 10px auto !important; }
	.dv-navtoggle { display: block; width: 100%; padding: 12px 15px; border: 0; background: transparent; color: #fff; font-size: 16px; text-align: left; }
	#moonavigator { display: none; }
	#moonavigator.dv-open { display: block; }
	#moonavigator > li { float: none; display: block; width: 100%; }
	#moonavigator ul.subnavi { position: static; display: none; width: 100%; }
	#moonavigator li.dv-sub-open > ul.subnavi { display: block; }
	/* Only the dv-sub-open class decides on a phone: hover and focus (the tapped «−» keeps focus inside the item)
	   must not keep a folded list open. */
	/* Phones keep :hover on the last tapped item, and legacy.css opens lists on hover with a strong selector
	   (#moonavigator li.level1:hover ul.level2), hence the extra #yt_mainmenu. */
	#yt_mainmenu #moonavigator li:hover ul.subnavi, #yt_mainmenu #moonavigator li:focus-within ul.subnavi { display: none; }
	#yt_mainmenu #moonavigator li.dv-sub-open > ul.subnavi { display: block; }
	/* Parents show a «+» (old site had the same toggle) so it is clear they unfold; «−» when open. Sub-levels indented. */
	#moonavigator li.havechild { display: flex; flex-wrap: wrap; align-items: stretch; }
	#moonavigator li.havechild > a { flex: 1 1 0; min-width: 0; }
	#moonavigator li.havechild > ul.subnavi { flex: 0 0 100%; }
	.dv-subtoggle { display: flex; flex: 0 0 48px; align-items: center; justify-content: center; padding: 0; border: 0;
		background: transparent; color: inherit; cursor: pointer; }
	#moonavigator > li > .dv-subtoggle { color: #fff; }
	#moonavigator ul.subnavi .dv-subtoggle { color: #333; }
	.dv-subtoggle::before { content: '+'; display: block; width: 24px; height: 24px; border: 1px solid currentColor; border-radius: 3px;
		font: 600 18px/22px Arial, sans-serif; text-align: center; opacity: .85; }
	#moonavigator li.dv-sub-open > .dv-subtoggle::before { content: '−'; }
	/* Menu bar stays under the black top bar while scrolling (client 28.11); an open menu scrolls inside. */
	#yt_menuwrap { position: sticky; top: var(--dv-headh, 44px); z-index: 100; }
	#moonavigator.dv-open { max-height: calc(100vh - var(--dv-headh, 44px) - 46px); max-height: calc(100dvh - var(--dv-headh, 44px) - 46px);
		overflow-y: auto; overscroll-behavior: contain; }
	#moonavigator ul.subnavi li > a { padding-left: 30px !important; text-transform: none !important; }
	#moonavigator ul.subnavi ul.subnavi li > a { padding-left: 46px !important; }
}

/* ---------- "Added to cart" notice (add to cart stays on the page) ---------- */
.dv-toast { position: fixed; top: 52px; left: 50%; z-index: 1000; width: 340px; max-width: calc(100vw - 32px); padding: 16px 40px 16px 18px;
	border-radius: 6px; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.22); border-left: 5px solid #5cb85c;
	opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.dv-toast.is-open { opacity: 1; transform: none; pointer-events: auto; }
.dv-toast.is-err { border-left-color: #d9534f; }
.dv-toast__text { margin: 0 0 10px; font-size: 14px; font-weight: bold; color: #333; }
.dv-toast.is-err .dv-toast__text { margin: 0; font-weight: normal; }
.dv-toast__actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.dv-toast__go { display: inline-block; padding: 8px 14px; border-radius: 3px; background: #5cb85c; color: #fff !important; font-size: 13px; text-decoration: none !important; }
.dv-toast__go:hover { background: #4cae4c; }
.dv-toast__stay { color: var(--dv-teal) !important; font-size: 13px; }
.dv-toast__x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 22px; line-height: 1; color: #aaa; }
.button_buy.is-busy, .btn-buy.is-busy { opacity: .6; pointer-events: none; }
/* Product photo viewer (template.js, client mock-up 28.11): the photo is never covered by the controls. */
.dv-gal { position: fixed; inset: 0; z-index: 2000; display: none; flex-direction: column; align-items: center; justify-content: center;
	gap: 10px; padding: 48px 12px 14px; background: rgba(12, 14, 16, .92); color: #fff; }
.dv-gal.is-open { display: flex; }
html.dv-gal-lock, html.dv-gal-lock body { overflow: hidden; }
.dv-gal__x { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(255,255,255,.12); color: #fff; font: 28px/40px Arial, sans-serif; cursor: pointer; }
.dv-gal__x:hover { background: rgba(255,255,255,.25); }
.dv-gal__stage { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 0; }
.dv-gal__frame { display: flex; align-items: center; justify-content: center; min-width: 0; }
.dv-gal__img { display: block; width: auto; height: auto; max-width: min(900px, calc(100vw - 140px));
	max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); border-radius: 3px; background: #fff; transition: opacity .15s; }
.dv-gal__img.is-loading { opacity: .35; }
.dv-gal__nav { flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
	background: rgba(255,255,255,.08); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: background .15s; }
.dv-gal__nav:hover { background: rgba(255,255,255,.22); }
.dv-gal.is-single .dv-gal__nav, .dv-gal.is-single .dv-gal__thumbs { display: none; }
.dv-gal__cap { max-width: 640px; text-align: center; }
.dv-gal__title { font-size: 14px; line-height: 1.35; color: #f1f1f1; }
.dv-gal__num { margin-top: 2px; font-size: 12px; color: #9aa3a8; }
.dv-gal__thumbs { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; }
.dv-gal__thumb { flex: 0 0 auto; width: 48px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 3px;
	background: #fff; opacity: .6; cursor: pointer; overflow: hidden; }
.dv-gal__thumb img { width: 100%; height: 100%; object-fit: contain; }
.dv-gal__thumb.is-active { border-color: var(--dv-teal); opacity: 1; }
@media (max-width: 600px) {
	.dv-gal { padding-top: 54px; }
	.dv-gal__stage { gap: 6px; }
	.dv-gal__nav { width: 32px; height: 32px; font-size: 20px; }
	.dv-gal__img { max-width: calc(100vw - 88px); max-height: calc(100vh - 240px); max-height: calc(100dvh - 240px); }
	.dv-gal__title { font-size: 13px; }
	.dv-gal__thumbs { scrollbar-width: none; }
	.dv-gal__thumbs::-webkit-scrollbar { display: none; }
}

@media (max-width: 600px) { .dv-toast { left: 16px !important; right: 16px; width: auto; } }

/* Empty JoomShopping blocks (no short description / tax info) only added height between price and buttons. */
.block_product .description.dv-empty, .block_product .price_extra_info.dv-empty { display: none; }
.block_product .jshop_price { display: flex; justify-content: center; align-items: center; gap: 10px; }
.block_product .jshop_price .dv-fav { width: 30px; height: 30px; font-size: 15px; }

/* ---------- Category filter: three tidy rows as on the old site ----------
   1) Сортировка [▾] ⇧   Количество [▾]
   2) Производитель [▾]
   3) Цена (грн) [от] – [до]  [Старт]  Сбросить фильтр
   Labels share one width so the controls line up under each other. */
#sort_count { margin: 6px 0 18px; padding: 14px 16px; background: #f6f8f8; border: 1px solid #e3e9ea; border-radius: 4px; }
#sort_count .block_sorting_count_to_page { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 36px; }
#sort_count .margin_filter { height: 10px; }
#sort_count .filters { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
#sort_count .filters .box_cat_man, #sort_count .filter_price { display: flex !important; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; }
#sort_count .control-group { display: flex; align-items: center; gap: 8px; margin: 0; }
#sort_count .control-label { min-width: 118px; margin: 0 !important; padding: 0; font-size: 13px; color: #333; text-align: left; float: none; width: auto; }
#sort_count .box_products_count_to_page .control-label { min-width: 0; }
#sort_count .controls { display: flex; align-items: center; gap: 6px; margin: 0 !important; }
#sort_count select { height: 32px; min-width: 150px; padding: 3px 8px; border: 1px solid #ccc; border-radius: 3px; background: #fff; font-size: 13px; }
#sort_count .box_products_count_to_page select { min-width: 70px; }
#sort_count .icon-arrow { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid #ccc; border-radius: 3px; background: #fff; }
#sort_count .box_price_from_to .controls { gap: 6px; }
#sort_count .box_price_from_to .input-append { margin: 0; } /* JoomShopping gives only the first one a bottom margin */
#sort_count .filters input[type=text] { width: 90px; height: 32px; padding: 4px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 13px; }
#sort_count .price_ftspace { margin: 0 !important; color: #888; }
#sort_count .box_button .controls { gap: 14px; }
#sort_count #submit_product_list_filter { height: 32px; padding: 0 22px; border: 0; border-radius: 3px; background: var(--dv-teal); color: #fff; font-size: 14px; }
#sort_count #submit_product_list_filter:hover { background: var(--dv-teal-dark); }
#sort_count .clear_filter a, #sort_count #clear_product_list_filter { padding: 0 !important; border: 0 !important; background: none !important; color: var(--dv-teal) !important;
	font-size: 12px; text-decoration: underline; box-shadow: none !important; }
@media (max-width: 600px) {
	#sort_count .control-label { min-width: 0; }
	#sort_count .block_sorting_count_to_page { gap: 10px 16px; }
}

/* Cards in one row line up: the name always takes three lines' worth of space (longer names are cut with …)
   and the photo sits in a box of the same height, so photos, prices and buttons are level across the row. */
.block_product .name { display: flex; align-items: flex-start; justify-content: center; height: 66px; min-height: 0; overflow: hidden; }
.block_product .name a { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.block_product .image { display: flex; flex-direction: column; align-items: center; }
.block_product .image_block { display: flex !important; align-items: flex-end; justify-content: center; height: 224px; }

/* Price and buttons pinned to the bottom of each card: whether a card has an old (crossed-out) price or the
   «Нет в наличии» line, prices and buttons stay level across the row. */
.jshop_list_product .row-fluid > [class^="sblock"] { display: flex; }
.jshop_list_product .block_product { display: flex; flex: 1; width: 100%; }
.jshop_list_product .block_product .product { display: flex; flex-direction: column; width: 100%; }
.jshop_list_product .block_product .oiproduct { display: flex; flex-direction: column; flex: 1; }
.jshop_list_product .block_product .old_price { margin-top: auto; }
.jshop_list_product .block_product .old_price + .jshop_price, .jshop_list_product .block_product .old_price ~ .jshop_price { margin-top: 2px; }
.jshop_list_product .block_product .oiproduct:not(:has(.old_price)) .jshop_price { margin-top: auto; }
.jshop_list_product .block_product .buttons { min-height: 34px; }

/* Embedded YouTube videos in descriptions are 560px wide in the old content: fit them to the screen. */
#content_main iframe { max-width: 100%; }
#content_main iframe[src*="youtube"] { width: 100%; max-width: 640px; height: auto; aspect-ratio: 16 / 9; }

@media (max-width: 600px) {
	#sort_count { padding: 12px; }
	#sort_count .filter_price, #sort_count .box_price_from_to, #sort_count .box_button .controls { flex-wrap: wrap; }
	#sort_count .filters input[type=text] { width: 80px; }
	#sort_count .filter_price, #sort_count .filters { max-width: 100%; }
	/* JoomShopping 5 folds the filters to height 0 under a "Фильтры" toggle on phones; that toggle is hidden
	   here (line ~189), which made the manufacturer and price filters vanish. Two fields — keep them open. */
	#sort_count .filters { flex-direction: column; align-items: flex-start; max-height: none; overflow: visible; }
	#sort_count .box_price_from_to { flex-basis: 100%; }
	#sort_count .box_price_from_to .control-label { flex-basis: 100%; }
	#sort_count select { min-width: 120px; }
}

/* Slideshow arrows (homepage banner and the milling gallery) */
.dv-slideshow__arrow { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(0, 0, 0, .35); color: #fff; font-size: 20px; line-height: 44px; text-align: center; cursor: pointer; opacity: .75; transition: opacity .2s, background .2s; }
.dv-slideshow__arrow:hover { opacity: 1; background: rgba(1, 123, 138, .85); }
.dv-slideshow__arrow--prev { left: 12px; }
.dv-slideshow__arrow--next { right: 12px; }
@media (max-width: 600px) { .dv-slideshow__arrow { width: 32px; height: 32px; margin-top: -16px; line-height: 32px; font-size: 15px; } .dv-slideshow__arrow--prev { left: 6px; } .dv-slideshow__arrow--next { right: 6px; } }

/* "Полезная информация о дверях" (homepage), Gavick-style: two columns, title, picture, text, «Подробнее». */
.dv-news { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 30px; }
@media (max-width: 600px) { .dv-news { grid-template-columns: 1fr; } }
.dv-news__title { margin: 0 0 12px; font-size: 20px; line-height: 1.15; font-weight: bold; }
.dv-news__title a { color: var(--dv-teal); }
.dv-news__img { display: block; margin-bottom: 10px; }
.dv-news__img img { display: block; max-width: 100%; height: 190px; width: auto; object-fit: cover; }
.dv-news__text { margin: 0; font-size: 12px; line-height: 22px; text-align: justify; }
.dv-news__more { margin: 6px 0 0; text-align: right; }
.dv-news__more a { color: var(--dv-teal); font-size: 12px; }

/* Header cart: teal button «Корзина» + white counter (client mock-up 28.11: the dark icon-only cart blended
   into the black top bar). Order: icon, word, count. */
.dv-cart { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 8px;
	border-radius: 6px; background: var(--dv-teal); color: #fff !important; text-decoration: none !important; transition: background .2s; }
.dv-cart:hover { background: var(--dv-teal-dark); }
.dv-cart__icon { order: 0; display: flex; align-items: center; width: auto; margin: 0; padding: 0; background: none !important; border: 0; }
.dv-cart__icon .fa { font-size: 19px; line-height: 1; color: #fff; }
.dv-cart__text { order: 1; position: static !important; display: inline !important; width: auto; height: auto; overflow: visible; clip: auto;
	padding: 0 !important; margin: 0; background: none !important; clip-path: none !important; color: #fff; font-size: 14px; font-weight: bold; line-height: 1; white-space: nowrap; }
.dv-cart__count, .dv-cart.has-items .dv-cart__count { order: 2; position: static; display: flex; align-items: center; justify-content: center;
	min-width: 20px; height: 20px; margin: 0; padding: 0 6px; border-radius: 10px; background: #fff; color: var(--dv-teal); font-size: 12px; font-weight: bold; }
.dv-cart:not(.has-items) .dv-cart__count { display: none; }
.dv-cart:hover .dv-cart__count { background: #fff; color: var(--dv-teal-dark); }
@media (max-width: 767px) {
	.dv-cart { height: 30px; margin-top: 0; padding: 0 7px 0 6px; gap: 5px; }
	/* Phone: no room for the word next to the promo banners — teal icon + white counter only. */
	.dv-cart__text { display: none !important; }
	.dv-cart__icon .fa { font-size: 17px; }
	.dv-cart.has-items .dv-cart__count { margin: 0; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
}

/* "Оставить отзыв" — compact like the old site: label above a narrow field, no grey panel. */
.review_header { margin: 30px 0 10px; padding-bottom: 8px; border-bottom: 1px solid #999; font-weight: bold; font-size: 14px; }
span.review { display: block; margin: 0 0 12px; font-weight: bold; font-size: 13px; }
#jshop_review_write { max-width: 300px; margin: 0; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
#jshop_review_write .row { display: block; margin: 0 0 10px; }
#jshop_review_write [class*="col-"] { float: none; width: auto; max-width: none; padding: 0; flex: none; }
#jshop_review_write label { display: block; margin: 0 0 4px; font-weight: normal; font-size: 12px; }
#jshop_review_write input.inputbox, #jshop_review_write textarea { display: block; width: 100%; max-width: 300px; padding: 5px 8px; border: 1px solid #ccc; border-radius: 0; font-size: 13px; }
#jshop_review_write input.inputbox { height: 32px; }
#jshop_review_write textarea { height: 70px; resize: vertical; }
#jshop_review_write .button, #jshop_review_write input[type=submit], #jshop_review_write button {
	padding: 8px 20px; border: 0; border-radius: 0; background: var(--dv-teal); color: #fff; font-size: 14px; }
#jshop_review_write .button:hover, #jshop_review_write input[type=submit]:hover, #jshop_review_write button:hover { background: var(--dv-teal-dark); }

/* Sliders (popular / similar): no frame around every card and no scrollbar strip — arrows do the scrolling. */
.dv-slider__item { border: 0 !important; background: none; padding: 6px 6px 10px; }
.dv-slider__track { scrollbar-width: none; padding-bottom: 4px; }
.dv-slider__track::-webkit-scrollbar { display: none; }

/* JoomShopping's own "related products" block on the product page: its products are shown first in the
   «Похожие товары» slider instead (client: the two blocks looked duplicated). */
.related_header, .jshop_list_product:has(> .list_related) { display: none !important; }

/* ---------- Cart: "select all" + remove the ticked products (template.js) ---------- */
.dv-cartsel { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #e3e3e3; border-radius: 4px; background: #fafafa; }
.dv-cartsel__all { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-weight: 600; user-select: none; }
.dv-cartsel input[type="checkbox"] { width: 20px; height: 20px; margin: 0; cursor: pointer; accent-color: #0f95f0; }
.dv-cartsel__del:disabled { opacity: .45; cursor: not-allowed; }
/* The box sits beside the photo, never on it (client: on wide doors it covered the picture). */
.jshop.cart td.jshop_img_description_center .data:has(> .dv-cartsel__item) { display: flex; align-items: flex-start; justify-content: center; gap: 8px; }
.dv-cartsel__item { flex: 0 0 22px; width: 22px; height: 22px; margin: 2px 0 0; cursor: pointer; accent-color: #0f95f0; }
.jshop.cart td.jshop_img_description_center .data > a { min-width: 0; }
@media (max-width: 767px) { .jshop.cart tr.jshop_prod_cart:has(.dv-cartsel__item) { grid-template-columns: 112px 1fr auto; } }
.jshop.cart tr.dv-cartsel--on, .jshop.cart tr.dv-cartsel--on > td { background: #eef7fe !important; }


/* Phone: compact teal cart (36px) with the white counter on its corner, so cart + favourites + РУС/УКР fit in
   their half of the top bar next to the promo banners (a wider button ran into «Супер ціни»). */
@media (max-width: 767px) {
	.dv-cart { width: 36px; padding: 0; justify-content: center; }
	.dv-cart.has-items .dv-cart__count { position: absolute; top: -6px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px;
		box-shadow: 0 0 0 2px #1b1b1b; }
	#yt_header #top2 { gap: 6px; }
}
@media (max-width: 380px) {
	#yt_header #top2 { gap: 3px; }
	.dv-favlink { padding: 0 5px; }
	.lang-inline li { margin-left: 3px; }
	.dv-cart { width: 32px; }
}
@media (max-width: 340px) { #top1 img { height: 16px; } #top1 ul.menu { gap: 3px; } }

/* Product page photo: 100px wide like the old site (JoomShopping 3 default.css `.productfull .image_middle{width:100px}`).
   JoomShopping 5 dropped that rule, so the door stretched to 200px on desktop and the full screen width on phones
   (client: "our doors are much bigger"). The full-size photo still opens on click. */
.productfull .image_middle { width: 100px; max-width: 100%; }
.productfull .image_middle img.image { width: 100%; height: auto; }
