/* Deweri theme: compatibility layer between the production (Bootstrap 3) stylesheet and OpenCart 4 (Bootstrap 5). */

/* one header per breakpoint (production rendered one server-side) */
@media (max-width: 767.98px) { .desktop-header, #top { display: none !important; } }
@media (min-width: 768px) { .header-m { display: none !important; } }

/* Bootstrap 3 helpers used by the production markup */
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.img-responsive { display: block; max-width: 100%; height: auto; }
.input-group-btn { display: flex; }
.btn-block { display: block; width: 100%; }
.btn-xs { padding: 1px 5px; font-size: 12px; line-height: 1.5; }
@media (max-width: 767.98px) { .hidden-xs { display: none !important; } }
@media (min-width: 768px) { .visible-xs { display: none !important; } }
/* Bootstrap 3 hidden-sm / hidden-md (the related card hides "Купить" below 1200px, as production) */
@media (min-width: 768px) and (max-width: 991.98px) { .hidden-sm { display: none !important; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .hidden-md { display: none !important; } }

/* production made every placeholder white (for the dark header search); keep that only in the header */
#content input::placeholder, #content textarea::placeholder, .modal input::placeholder,
#content input::-webkit-input-placeholder, #content textarea::-webkit-input-placeholder { color: #8a8f99 !important; }

/* catalog dropdown: Bootstrap 5 .dropdown-menu is hidden via display:none and shown by JS slideDown */
#catalog-toggle { position: relative; }
#catalog-toggle > .dropdown-menu { position: absolute; top: 100%; left: 0; margin: 0; padding: 0; border-radius: 0; z-index: 1001; }
#catalog-toggle .overlay_0 { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .35); }
#catalog-toggle > .dropdown-menu > .nav { flex-direction: column; }
#catalog-toggle li.hoverdown:hover > .hoverdown-menu, #catalog-toggle li.hoverdown:focus-within > .hoverdown-menu { display: block; }

/* mobile catalog: sub menus collapsed until +/- is used */
#mobile-catalog .hoverdown-menu { display: none; }
#mobile-catalog .fa-minus { display: none; }
#mobile-catalog > .nav { flex-direction: column; }

/* OpenCart 4 main wrapper keeps the production page background */
main { display: block; }

/* Bootstrap 3 inline lists (production top bar, account links) */
.list-inline { padding-left: 0; margin-left: -5px; list-style: none; }
.list-inline > li { display: inline-block; padding-right: 5px; padding-left: 5px; }

/* header buy block: cart, wishlist, specials in one line on the right */
.header-bottom__buy-block .row-right { display: block; text-align: right; height: 100%; }
.header-bottom__buy-block--item { display: inline-block; vertical-align: top; }
#cart.btn-group { position: relative; }
#cart > .dropdown-toggle::after { display: none; }

/* production container 1170px and 30px gutters (Bootstrap 3) instead of Bootstrap 5 1140px / 24px */
@media (min-width: 576px) { .deweri .container { max-width: none; } }
@media (min-width: 768px) { .deweri .container { max-width: 750px; } }
@media (min-width: 992px) { .deweri .container { max-width: 970px; } }
@media (min-width: 1200px) { .deweri .container { max-width: 1170px; } }
.deweri .container { padding-left: 15px; padding-right: 15px; }
.deweri-grid-row { --bs-gutter-x: 30px; }
/* page rows: Bootstrap 3 -15px margins and 15px column padding (production #content lines up with the breadcrumb) */
.deweri main > .container > .row, .deweri #content > .row { --bs-gutter-x: 30px; }
/* production media_Xsmall "#body > .container > .row { margin: 0 }": OpenCart 4 wraps the page in <main> */
@media (max-width: 767px) {
  #body > main > .container > .row { margin-left: 0; margin-right: 0; }
  #body > main > .container > .row.for_content { margin-bottom: 45px; }
  /* information.tpl, category.tpl, special.tpl and the Simple register page nested a second .row (kept its -15px): one flattened row here */
  #body > main > .container:is(.information-page, .product-category, .product-special-page, #account-register) > .row { margin-left: -15px; margin-right: -15px; }
  /* home tabs: production mobile carousel (div[id$=Carousel] margin 0 2px, padding 0 15px) put the cards at 17px, 360px wide */
  .product-tabs .box-product { padding: 0 13px 0 17px !important; }  /* the grid rule above it has an id in :is() */
}

/* header search (production #search / #searchm rules, applied to the shared search template) */
.search.input-group { position: relative; flex-wrap: nowrap; background: #fff; }
.header-bottom__search { display: flex; align-items: center; }
.header-bottom__search .search.input-group { width: 100%; }
.search input.form-control.input-lg { padding: 0 15px; height: 32px; border-radius: 0; box-shadow: none; border: 1px solid #e0bda9; font-size: 14px; line-height: 1.5; background: #fff; }
.search input.form-control.input-lg { font-weight: 300; color: #555; }
.search input.form-control.input-lg::placeholder { color: #555 !important; font: 300 14px 'Roboto', sans-serif; }
/* Bootstrap 5 pulls input-group addons 1px left over the input border: production shows the input's right border as a divider
   (!important: Bootstrap sets the margin with a (0,7,0) selector) */
.search.input-group > .input-group-btn { margin-left: 0 !important; }
.search button.btn-lg { padding: 3px 10px; height: 32px; border-radius: 0; border: 1px solid #e0bda9; border-left: none; background: #fff; }
.search button .fa-magnifying-glass { color: #d49372; font-size: 14px; }

/* wishlist heart shows only the number, as on production */
.wishlist-link a span { display: inline-block; }

/* slideshow: production shows no pagination dots */
#slideshow0 .carousel-indicators { display: none; }

/* OpenCart 4 base layout puts #container/footer in absolute positioning with a dark footer; production footer is in flow */
.deweri #container { position: static; margin-bottom: 0; min-height: 0; }
.deweri footer { position: static; border: 0; padding-top: 0; background: none; color: inherit; }
.deweri footer a { color: inherit; }
.deweri footer hr { border-bottom-color: #d8d1cb; }

.select-item::after, .subscribe-form::after, .advantages::after, .difficult-to-choose__icons-block__wrapper::after, .news-block::after, .about_n_reviews::after { content: ""; display: table; clear: both; }
@media (max-width: 767.98px) { .hidden-xs { display: none !important; } }

/* OpenCart 4 reserves 730px (phones) / 400px (576px+) under #content for its absolute footer; the production footer is in flow */
.deweri #content, .deweri #column-left, .deweri #column-right { padding-bottom: 0; }

/* Bootstrap 3 .nav base (production catalog menu relies on it) */
#catalog-toggle .nav, #mobile-catalog .nav { display: block; padding-left: 0; margin-bottom: 0; list-style: none; }
#catalog-toggle .nav > li, #mobile-catalog .nav > li { position: relative; display: block; }
#catalog-toggle .nav > li > a, #mobile-catalog .nav > li > a { position: relative; display: block; padding: 10px 15px; }
#catalog-toggle .mob_toggle-menu_button { display: none !important; }
#catalog-toggle .hoverdown-menu { position: absolute; top: 0; left: 100%; display: none; z-index: 1002; }
/* catalog sub menu panel (production: white 600px panel to the right, two columns) */
#catalog-toggle li.hoverdown:hover > .hoverdown-menu, #catalog-toggle li.hoverdown:focus-within > .hoverdown-menu { display: block; left: 100%; top: 0; width: 600px; background: #fff; padding: 0 0 16px 17px; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
#catalog-toggle .hoverdown-inner::after { content: ""; display: table; clear: both; }
#catalog-toggle .hoverdown-inner > .col-md-12 { float: left; width: 50%; padding: 0 15px; }
#catalog-toggle .hoverdown-inner a { color: #464f5c; }

/* production Bootstrap 3 build was customised: primary colour #404e5c (left category menu, pagination) */
.deweri .list-group { border-radius: 0; margin-bottom: 20px; }
.deweri .list-group-item { padding: 10px 15px; color: #555; font-size: 13px; }
.deweri .list-group-item.active, .deweri .list-group-item.active:hover, .deweri .list-group-item.active:focus { color: #fff; background-color: #404e5c; border-color: #404e5c; }

/* production breadcrumb: small line with "|" separators (OpenCart 4 draws a boxed arrow bar) */
.deweri .breadcrumb { border: 0; border-radius: 0; flex-wrap: wrap; }
.deweri .breadcrumb > li { display: inline-block; }
.deweri .breadcrumb i { font-size: 11px; }
.deweri .breadcrumb > li + li::before { padding: 0 5px; color: #d59472; content: "|"; }

/* category page */
.product-category h1 { font-size: 25px; font-weight: 500; color: #464f5c; margin: 0 0 25px; }
.b-filter-tools-line { align-items: center; margin-left: 0; margin-right: 0; }
.b-filter-tools-line > * { height: 100%; display: flex; align-items: center; }
.b-filter-tools-line .input-group { flex-wrap: nowrap; align-items: center; }
.b-filter-tools-line .input-group-addon { display: flex; align-items: center; white-space: nowrap; font-size: 12px; color: #555; }
.b-filter-tools-line .form-select-sm { height: 30px; padding: 5px 30px 5px 10px; font-size: 12px; border-radius: 0; border-color: #e2e2e2; color: #555; }
.b-filter-tools-line__count-products .row-right { display: flex; align-items: center; justify-content: flex-start; }
.b-filter-tools-line__count-products .vam { width: auto; max-width: none; white-space: nowrap; line-height: 36px; }
/* production cards: no frame, natural height (OpenCart 4 .product-thumb has a 1px border and height:100%) */
.deweri .product-thumb { border: 0; height: auto; }
/* home tabs: production rows of 4 were plain floats inside the 1170px container (no -15px row margins) */
.product-tabs .product-category__row.row { margin-left: 0; margin-right: 0; }
.product-category__seo-text::after { content: ""; display: table; clear: both; }
.b_pagination { align-items: center; }
.b_pagination .pagination { margin: 0; }
.product-thumb .rating .fa-stack { color: #c49373; width: 15px; height: 15px; line-height: 15px; }
.product-thumb .rating .fa-stack-2x { font-size: 15px; }

/* production top bar is 46px with no gap under it (OpenCart 4 #top adds padding, border and a 20px margin) */
.deweri #top { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
/* header rows (production markup: .row with .pull-left/.pull-right floats; Bootstrap 5 rows are flex with 100% wide children) */
#top .row > .top-links, #top .row > .top_account { flex: 0 0 auto; width: auto; }
#top .row > .top_account { margin-left: auto; }
.header-top .row > .contact-block { flex: 0 0 auto; width: auto; margin-left: auto; padding-top: 21px; } /* 21px: production city selector line above the button (removed plugin) */
.header-top .callback { white-space: nowrap; }
@media (max-width: 1199.98px) { .header-top .row > .fh_90 { flex: 1 1 0; width: auto; } }
/* product card title: production h4 was 18px with two 13px lines in 34px (Bootstrap 5 h4 is larger with line-height 1.2) */
:is(.product-category__product-grid-content, .search-result__common) .product-thumb .caption h4 { font-size: 18px; line-height: 17px; margin: 10px 0; }
/* card buy block is a form with .row for the two halves; it must not take the 30px row gutter */
.deweri .product-thumb .buy-block.row { --bs-gutter-x: 0; margin-left: 0; margin-right: 0; }
.product-thumb .price__nomination, .product-thumb .price__nomination-old { color: #464f5c; }
/* production category.tpl wrapped the columns in a second .row inside .row (Bootstrap 3), so the page is 30px wider than the container */
@media (min-width: 768px) {
  .product-category > .row, .information-page > .row { margin-left: -30px; margin-right: -30px; }
  .product-category > .breadcrumb, .information-page > .breadcrumb { margin-left: -15px; margin-right: -15px; }
}
/* banner module: production owl slideshow had no frame; the OC 2.3 .carousel frame rules (border, shadow, 50px margin) must not apply to the OC4 carousel */
.deweri-banner .carousel { border: 0; border-radius: 0; box-shadow: none; margin: 0; background: #fff; }
/* Bootstrap 3 style block row (negative margins, no flex) for production markup that nested content in .row */
.deweri-row { margin-left: -15px; margin-right: -15px; }
/* home tabs header: production had no gap under the tabs and the tab title took the link colour (white on the active tab) */
.product-tabs .nav-tabs { margin-bottom: 0; }
.product-tabs .nav-tabs h2 { color: inherit; line-height: 1.1; }

/* Bootstrap 3 base typography: the production stylesheet was written on top of it (Bootstrap 5 reboot uses other margins/line-heights).
   Element selectors only, so every production class rule still wins; h1 keeps the production h1 rule. */
h1, h2, h3, h4, h5, h6 { line-height: 1.1; }
/* Bootstrap 3 sizes (Bootstrap 5 scales h2-h4 with the viewport); h1 comes from the production stylesheet */
h2 { font-size: 30px; } h3 { font-size: 24px; } h4 { font-size: 18px; } h5 { font-size: 14px; } h6 { font-size: 12px; }
h2, h3 { margin-top: 20px; margin-bottom: 10px; }
h4, h5, h6 { margin-top: 10px; margin-bottom: 10px; }
p { margin: 0 0 10px; }
ul, ol { margin-top: 0; margin-bottom: 10px; }
/* Bootstrap 5 pads every child of .row; Bootstrap 3 padded only columns (production HTML puts article/h2/etc. straight into .row) */
.deweri .row > :not([class*="col"]) { padding-left: 0; padding-right: 0; }
/* footer payment line: headline and card icons in one row as on production */
@media (min-width: 768px) { #footer .accept-block { display: flex; align-items: center; } }

/* product card */
.thumbnail > img, .thumbnail a > img { display: block; max-width: 100%; height: auto; margin-left: auto; margin-right: auto; }
.product-card__quick-order--button { width: 100%; background: none; cursor: pointer; }
.product-card__add-to-wishlist button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.product-card__add-to-wishlist--text-link button { color: #c49373; font-size: 13px; }
.product-card__reviews-link { color: inherit; text-decoration: none; }
.product-card .rating__stars .fa-stack { color: #c49373; }
.product-card__tabs-row .tab-content > .tab-pane { display: none; }
.product-card__tabs-row .tab-content > .tab-pane.active { display: block; }
/* rating stars: production colour for filled and empty stars (OpenCart 4 paints them yellow/orange, 20px wide) */
.deweri .rating .fa-stack { width: 15px; height: 15px; line-height: 15px; }
.deweri .rating .fa-star, .deweri .rating .fa-star + .fa-star { color: #c49373; font-size: 13px; }
/* product tabs: Bootstrap 3 .nav-tabs geometry (production colours come from its stylesheet); tab icons only on phones */
.product-card__tabs-row .nav-tabs { display: flex; flex-wrap: wrap; padding-left: 0; margin: 0; list-style: none; border-bottom: 1px solid #666; }
.product-card__tabs-row .nav-tabs > li { margin-bottom: -1px; }
.product-card__tabs-row .nav-tabs > li > a { display: block; padding: 10px 15px; margin-right: 2px; line-height: 1.42857143; border-radius: 0; text-decoration: none; }
.product-card__tabs-row .tab-headername { display: inline-block; }
.nav i.visible-xxs { display: none; }
@media (max-width: 560px) { .nav i.visible-xxs { display: inline-block; } .product-card__tabs-row .tab-headername { display: block; font-size: 9px; } }
/* production product.tpl nested .row: breadcrumb and title start at the container edge (the title at every width; on phones
   the page row has no margins, so the title and the card blocks keep production's 15px inset from the screen edge) */
@media (min-width: 768px) {
  .product-page > .breadcrumb, .product-search-page > .breadcrumb { margin-left: -15px; margin-right: -15px; }
}
.product-card > .product-card__heading-title { margin-left: -15px; margin-right: -15px; }
/* Bootstrap 3 .thumbnail (additional images); the main image overrides it in the production stylesheet */
.thumbnail { display: block; padding: 4px; margin-bottom: 20px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; }
.product-card__add-img-slider a.thumbnail:hover,
.product-card__add-img-slider a.thumbnail:focus,
.product-card__add-img-slider a.thumbnail.active { border: 1px solid transparent; }
/* Override the legacy global focus reset only for keyboard-operated thumbnails. */
.product-card__add-img-slider a.thumbnail:focus-visible { outline: 2px solid #464f5c !important; outline-offset: 2px; }
.product-card__base-img .thumbnail { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
/* production span.product-card__quick-order--button, here a submit button */
button.product-card__quick-order--button { display: block; width: 100%; text-align: center; padding: 5px 16px; margin-top: 25px; border: 2px solid #464f5c; background: none; color: #464f5c; font-weight: 400; font-size: 14px; }
button.product-card__quick-order--button:active, button.product-card__quick-order--button:focus { background: #464f5c; color: #fff; }
.product-card #button-cart { height: 36px; padding: 0 16px; font-size: 18px; line-height: 34px; border-radius: 0; }
/* Bootstrap 3 .row nested directly in a .row (production category/search markup) spans parent + gutters; in a Bootstrap 5 flex row a
   100% wide flex item does not grow with its negative margins */
.deweri .row > .row:not(.g-0) { width: calc(100% + 30px); max-width: none; }
/* pagination: production ul.pagination is inline-block inside a centred block (Bootstrap 5 makes it flex) */
.b_pagination .pagination { display: inline-flex; }
/* production search cards had no rating line */
.search-result__common .caption_rating { display: none; }
/* listing rhythm: production category.tpl grouped the cards by three for desktop browsers in .product-category__row with a
   min-height (media_large 410px, media_medium 336px) and no margins; phones and tablets got the flat grid (18px grid gap on phones) */
.product-category__product-grid-content > .product-layout { margin-bottom: 0; }
@media (min-width: 1200px) { .product-category__product-grid-content > .product-layout { min-height: 410px; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .product-category__product-grid-content > .product-layout { min-height: 336px; } }
/* "Показать еще" as on the live production site */
.b_pagination .pagination { margin: 20px 0; }
a.load_more { display: inline-block; margin: 0 auto 20px auto; padding: .5em 2em; border: 1px solid #069; border-radius: 5px; text-decoration: none; text-transform: uppercase; }
a.load_more.loading { opacity: .5; pointer-events: none; }
/* search page: Bootstrap 3 .checkbox-inline (production custom checkboxes draw on label:before) and the plain "Расширенный поиск" button */
.checkbox-inline { position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; font-weight: 400; vertical-align: middle; cursor: pointer; }
.adv_search { background-color: #efefef; border: 1px solid #767676; border-radius: 2px; padding: 1px 6px; color: #000; }
.product-category .product-category__headerline h1 { margin-top: 5px; }
/* catalog button icon: production orange 20px bars (the dark default made it invisible on the dark button) */
#catalog-toggle .dropdownToggle .fa-bars { color: #d49372; font-size: 20px; margin-right: 8px; }
/* production Bootstrap 3 build: links #404e5c, underlined only on hover (Bootstrap 5 underlines all links in blue) */
a { color: #404e5c; text-decoration: none; }
a:hover, a:focus { color: #23527c; text-decoration: underline; }
/* OpenCart 4 core templates (pages without a Deweri template) use li.breadcrumb-item with arrow boxes: production "|" line */
.deweri .breadcrumb > li.breadcrumb-item { padding: 0; text-shadow: none; }
.deweri .breadcrumb > li.breadcrumb-item::after { display: none; }
.deweri .breadcrumb-item + .breadcrumb-item { padding-left: 0; }
/* footer bottom line: production p.pull-left / p.pull-right in a row */
#cellar .row > p { flex: 0 0 auto; width: auto; }
#cellar .row > .pull-right { margin-left: auto; }
/* checkout summary: keep "4 990р." on one line in the narrow total column */
#checkout-confirm td.text-end:last-child, #checkout-cart td.text-end, #shopping-cart td.text-end { white-space: nowrap; }

/* mobile header: Bootstrap 3 navbar toggle and icon bars (production markup), bottom bar layout as on production */
.header-m__top { padding: 0 15px; }
.header-m .navbar-toggle { position: relative; float: right; padding: 9px 10px; margin: 0; background-color: transparent; background-image: none; border: 1px solid transparent; border-radius: 4px; width: 44px; }
.header-m .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px; }
.header-m .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; }
.header-m .mobile-cart-link { display: inline-block; padding: 7px; font-size: 18px; color: #464f5c; }
.header-m_bottom .flex-content { justify-content: flex-start; padding: 0 8px; }
.header-m_bottom .flex-content > .contect-phone { margin-left: 16px; }
.header-m_bottom .flex-content > .wishlist { margin-left: auto; }

/* Home product tabs follow the source viewport breakpoint, independent of device user agent. */
.product-tabs__section-title, .product-tabs__seeall { display: none; }
@media (max-width: 767px) {
  .product-tabs .htabs { display: none; }
  .product-tabs .deweri-tab-pane { display: block !important; }
  .product-tabs__section-title { display: block; text-align: center; text-transform: uppercase; margin: 40px 0; font-size: 24px; }
  .product-tabs .product-category__row > [class*="col"] { flex: 0 0 50%; width: 50%; max-width: 50%; padding-left: 7px; padding-right: 7px; margin-bottom: 20px; }
  .product-tabs__seeall { display: block; margin: 0 15px 20px; padding: 6px 12px; text-align: center; border: 2px solid #d49372; color: #d49372; }
  .product-tabs__seeall:hover { text-decoration: none; background: #d49372; color: #fff; }
}
/* phones: the sort block takes the whole tools line (production), the select fills it */
@media (max-width: 767.98px) {
  .b-filter-tools-line__sort-products { flex: 0 0 100%; width: 100%; max-width: 100%; padding: 0 15px; }
  .b-filter-tools-line .input-group > .form-select { flex: 1 1 auto; width: 1%; }
}
/* phones: production block columns were not floated, the articul margin collapsed out of the white block */
@media (max-width: 767.98px) { .product-card__thumbs > .product-card__articul { margin-top: 0; } }
@media (max-width: 767.98px) { .product-category .b-filter-tools-line { margin-left: -15px; margin-right: -15px; } }

/* header bottom line: production floats absorbed a 1px rounding overflow (33.33% + 216px + 38% of 750px) */
.header-bottom .row { flex-wrap: nowrap; }
.header-bottom .row > * { flex-shrink: 1; min-width: 0; }
/* product card: production wrapped images and buy column in a space-between flex line (buy column flush right on tablets) */
.product-card__main-row { justify-content: space-between; }

/* Footer: the production grid (stylesheet.css #footer .col-md-2 20% from 768px, media_small flex line 768-991,
   the four link columns hidden on phones) on the 30px-gutter row */

/* Source components with columns outside a Bootstrap row own their layout. */
.product-card__advantages > div,
.product-search-page .row-flx > [class*="col-"],
.product-category__seo-text > .col-md-12 { padding-left: 15px; padding-right: 15px; min-width: 0; }
@media (min-width: 768px) {
  .product-card__advantages, .product-search-page .row-flx { display: flex; flex-wrap: wrap; }
  .product-search-page .row-flx { align-items: center; }
}
@media (max-width: 767.98px) {
  .product-search-page .row-flx > div { width: 100%; }
}

/* Product cards use their available width; preserve source proportions without clipping. */
html body.deweri :is(#content, .product-tabs) .product-thumb:not(.deweri-door-card) .image {
  width: 100%; height: auto; min-height: 0; max-height: none; aspect-ratio: auto;
  position: relative; overflow: hidden;
}
html body.deweri :is(#content, .product-tabs) .product-thumb:not(.deweri-door-card) .image > a:not(.deweri-quickview-open) {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
}
html body.deweri :is(#content, .product-tabs) .product-thumb:not(.deweri-door-card) .image > a:not(.deweri-quickview-open) > img {
  display: block; width: 100%; height: auto; max-width: 100%; max-height: none;
  aspect-ratio: 1 / 1; object-fit: contain; margin: 0;
}

/* Keep door photos in a compact portrait frame without cropping. */
 html body.deweri :is(#content, .product-tabs) .product-thumb.deweri-door-card .image {
   position: relative; width: 100%; height: auto; max-height: none; aspect-ratio: auto; background: #f4efed;
 }
 html body.deweri .product-thumb.deweri-door-card .image > a:not(.deweri-quickview-open) {
   display: flex; align-items: center; justify-content: center;
   width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 5; margin: 0 auto;
 }
 html body.deweri .product-thumb.deweri-door-card .image > a:not(.deweri-quickview-open) > img {
   display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%;
   object-fit: contain; margin: 0;
 }
 @media (max-width: 767.98px) {
   html body.deweri:not([class*="newsblog"]) #content .product-thumb.deweri-door-card .image { height: auto; aspect-ratio: auto; }
 }
 /* Product rows keep equal cards and stable buy controls on hover. */
html body.deweri :is(.row.module-featured__row, .row.module-viewed__row, .row.product-category__product-grid-content, .row.product-category__row) > :has(> .product-thumb) { display: flex; }
html body.deweri :is(.row.module-featured__row, .row.module-viewed__row, .row.product-category__product-grid-content, .row.product-category__row) > * > .product-thumb { display: flex; flex-direction: column; flex: 1; min-width: 0; }
html body.deweri :is(.row.module-featured__row, .row.module-viewed__row, .row.product-category__product-grid-content, .row.product-category__row) > * > .product-thumb > .caption { flex: 1 0 auto; }
/* Single-leaf photos fill the same optical door height as the existing scene/pair photos.
   Keep the shared frame and quick-view position unchanged; never crop or stretch a leaf. */
html body.deweri :is(#content, .product-tabs) .product-thumb.deweri-door-card .image > a:not(.deweri-quickview-open) > img[src*="/deweri-catalog-r1187/"] {
  width: 89%; height: 89%; object-fit: contain;
}
.deweri-door-product .product-card__base-img .thumbnail { display: flex; justify-content: center; overflow: visible; }
.deweri-door-product .product-card__base-img .thumbnail img { width: auto; height: auto; max-width: 100%; max-height: 660px; }
.deweri-door-product .product-card__add-img-slider .thumbnail img { width: auto; height: auto; max-width: 100%; }

/* registration: production served the Simple register page (breadcrumb and a second .row inside the row, like category.tpl) */
@media (min-width: 768px) {
  #account-register > .breadcrumb { margin-left: -15px; margin-right: -15px; }
  #account-register > .row { margin-left: -30px; margin-right: -30px; }
}

/* Bootstrap 3 tables (production): transparent, text colour inherited, cells 1.42857 line height, #ddd borders, 20px below;
   striped rows come from the production stylesheet (.table-striped>tbody>tr:nth-of-type(odd) #ECE7E5 on the tr) */
.deweri .table { margin-bottom: 20px; --bs-table-bg: transparent; --bs-table-striped-bg: transparent; --bs-table-border-color: #ddd; }
.deweri .table > :not(caption) > * > * { color: inherit; line-height: 1.42857; }
/* store reviews (/otzyvy, production testimonial.tpl under body.testimonial-testimonial): Bootstrap 3 block rows collapsed the
   20px bar margin with the 15px #review margin; Font Awesome 6 stars carry no .fa class for the production #review .fa.fa-star
   colour */
.testimonial-testimonial #review { margin-top: 0; }
#review .fa-stack .fa-star { color: #c49373; }
/* the review modal: Bootstrap 3 .close, h2, .form-group, .form-horizontal, .form-control, .btn-default metrics */
#openModal .close { float: right; font-size: 21px; font-weight: 700; line-height: 1; color: #000; text-shadow: 0 1px 0 #fff; opacity: .2; text-decoration: none; }
#openModal .close:hover, #openModal .close:focus { opacity: .5; }
#openModal h2 { font-size: 30px; line-height: 1.1; margin: 20px 0 10px; color: #464f5c; }
#openModal .form-group { margin-bottom: 15px; }
#openModal .form-horizontal .form-group { margin-left: -15px; margin-right: -15px; }
#openModal .form-group > .col-sm-12 { padding-left: 15px; padding-right: 15px; }
#openModal label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-size: 13px; font-weight: 500; }
@media (min-width: 768px) { #openModal .form-horizontal .control-label { padding-top: 7px; margin-bottom: 0; } }
#openModal .form-control { height: 34px; padding: 6px 12px; font-size: 14px; font-weight: 300; line-height: 1.42857; color: #555; border: 1px solid #ccc; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); }
#openModal textarea.form-control { height: auto; }
#openModal .btn { font-size: 14px; line-height: 1.42857; }
#openModal .btn-default { color: #333; background-color: #fff; border: 1px solid #ccc; padding: 6px 12px; border-radius: 4px; }
#openModal .btn-primary { padding: 5px; }
/* related products card (product/thumb_related.twig): production left these buttons to the browser; Bootstrap 3 inherited
   colour and weight, Bootstrap 5 reboot sets border-radius 0, which turns off the native button look */
.product-card__related .button-group button { color: inherit; font-weight: inherit; border-radius: revert; }
/* product page modules (similar, viewed, featured): the heading is the first item of the row as in production; a Bootstrap 5
   row gives its children the column padding and margin-top 0, the Bootstrap 3 row gave an h3 neither */
.row.module-featured__row > .product-module-headerline, .row.module-viewed__row > .product-module-headerline { padding-left: 0; padding-right: 0; margin-top: 20px; }
.row.module-featured__row, .row.module-viewed__row, .row.product-card__related { --bs-gutter-x: 30px; }
/* search results: production .row.search-result__common holding groups of four cards (search.twig), Bootstrap 3 row margins */
.search-result__common { margin-left: -15px; margin-right: -15px; }
/* as a flex item of a Bootstrap 5 row it has width 100%: the Bootstrap 3 block grew by its negative margins */
.row > .search-result__common { width: calc(100% + 30px); max-width: none; }
/* phone menu toggle: Bootstrap 3 buttons inherited colour and weight (the production thin grey cross) */
.header-m .navbar-toggle { color: inherit; font-weight: inherit; }
/* Bootstrap 3 .well, .form-group and .control-label of the production account pages (account/login.twig) */
.deweri .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); }
.deweri .well .form-group { margin-bottom: 15px; }
.deweri .control-label { display: inline-block; margin-bottom: 5px; font-weight: 500; }
.deweri .well p strong { font-weight: 500; }
.deweri .well .form-control { height: 34px; padding: 6px 12px; border: 1px solid #e2e2e2; border-radius: 0; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); font-size: 14px; }
/* phones: category.tpl had the pagination in a Bootstrap 3 .row (full width); the specials page did not */
@media (max-width: 767.98px) { .product-category:not(.product-special-page) .b_pagination { margin-left: -15px; margin-right: -15px; } }

/* Full product titles are visible without changing card height on hover. */
html body.deweri :is(#content, .product-tabs) .product-thumb:has(> .buy-block) .caption h4,
html body.deweri :is(#content, .product-tabs) .product-thumb:has(> .buy-block):hover .caption h4 {
  height: auto; min-height: 38px; max-height: none; transition: none; text-align: left;
}


/* Only the owned configurator example; native/textile product galleries retain their rules. */
html body.deweri .deweri-demo-enabled .product-card__base-img { margin-bottom: 16px; }
html body.deweri .deweri-demo-enabled .door-demo-stage {
  display: block; position: relative; width: min(100%, 200px); height: 478px;
  margin: 0 auto; padding: 0; overflow: hidden; background: #eeece9; cursor: zoom-in;
}
html body.deweri .deweri-demo-enabled .door-demo-stage > img { display: none; }
html body.deweri .door-demo-render { display: block; width: 100%; height: 100%; }
html body.deweri .door-demo-view-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 12px; }
html body.deweri .door-demo-view-tools button,
html body.deweri .door-demo-dialog-tools button { padding: 9px 14px; border: 1px solid #c5b7ac; border-radius: 4px; background: #fff; color: #464f5c; min-height: 44px; }
html body.deweri .door-demo-view-tools button[aria-pressed="true"] { background: #464f5c; color: #fff; border-color: #464f5c; }
html body.deweri .door-demo-view-tools button:focus-visible { outline: 2px solid #464f5c; outline-offset: 3px; }
html body.deweri .door-demo-caption { min-height: 44px; text-align: center; font-weight: 500; margin: 0 0 8px; line-height: 22px; }
html body.deweri .door-demo-visual-note { max-width: 640px; margin: 0 auto 20px; padding: 0 12px; text-align: center; font-size: 13px; line-height: 20px; color: #666; }
html body.deweri .door-demo-finishes label img { display: none; }
html body.deweri .door-demo-finishes .form-check { padding: 7px; }
html body.deweri .door-demo-swatch { display: inline-block; width: 38px; height: 38px; border: 1px solid #3d342c; border-radius: 4px; vertical-align: middle; margin-right: 9px; }
html body.deweri .door-demo-swatch.cocoa { background: repeating-linear-gradient(90deg, #765338, #987453 8px, #765338 12px); }
html body.deweri .door-demo-swatch.mocha { background: repeating-linear-gradient(90deg, #342b24, #5b4638 8px, #342b24 12px); }
html body.deweri .door-demo-dialog { max-width: min(94vw, 720px); max-height: 94vh; padding: 18px; border: 0; border-radius: 6px; background: #f8f7f5; color: #464f5c; }
html body.deweri .door-demo-dialog::backdrop { background: rgba(0,0,0,.72); }
html body.deweri .door-demo-dialog-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
html body.deweri .door-demo-large { width: 240px; height: 574px; max-width: 100%; margin: auto; }
html body.deweri .door-demo-dialog-caption { text-align: center; margin: 12px 0 0; }
@media (max-width: 767px) {
  html body.deweri .deweri-demo-enabled .door-demo-stage { height: 478px; width: 200px; }
  html body.deweri .door-demo-dialog { padding: 12px; }
  html body.deweri .door-demo-large { height: min(574px, 66vh); width: calc(min(574px, 66vh) * 240 / 574); }
}

html body.deweri .deweri-demo-enabled .product-card__advantages { display: none; }

html body.deweri .door-demo-swatch.sand { background: #c3b294; }
html body.deweri .door-demo-swatch.anthracite { background: #393d3e; }
html body.deweri .door-demo-swatch.ivory { background: #eee8dd; }
html body.deweri .door-demo-swatch.walnut { background: repeating-linear-gradient(90deg,#5c4230,#87613f 8px,#5c4230 12px); }
html body.deweri .door-demo-examples { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
html body.deweri .door-demo-examples a { display: inline-block; padding: 10px 16px; min-height:44px; border: 1px solid #c5b7ac; border-radius:4px; background:white; }
@media (min-width:768px) {
 html body.deweri .deweri-demo-enabled .product-card__main-row { max-width:960px; margin-left:auto; margin-right:auto; }
 html body.deweri .deweri-demo-enabled .product-card__thumbs { flex: 0 0 58%; max-width:58%; width:58%; }
 html body.deweri .deweri-demo-enabled .product-card__control { flex: 0 0 40%; max-width:40%; width:40%; }
}
html body.deweri .deweri-demo-enabled #form-product .form-select { min-height:44px; }
html body.deweri .deweri-demo-enabled .door-demo-finishes .form-check { display:inline-flex; align-items:center; max-width:100%; margin-right:8px; }

/* Keep slideshow controls in bounds and expose keyboard focus. */
#slideshow0 .carousel-control-prev { left: 0; }
#slideshow0 .carousel-control-next { right: 0; }
#slideshow0 :is(.carousel-control-prev, .carousel-control-next):focus-visible { opacity: 1; outline: 2px solid currentColor !important; outline-offset: -2px; }

/* Mobile cart rows keep every option, control and amount in the viewport. */
@media (max-width:767px){
 #output-cart .cart-product-table,#output-cart .cart-product-table tbody{display:block;width:100%}
 #output-cart .cart-product-table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #output-cart .cart-product-table tbody tr{display:grid;grid-template-columns:64px minmax(0,1fr);gap:0 12px;padding:12px;border:1px solid #ddd;margin-bottom:12px}
 #output-cart .cart-product-table tbody td{border:0;padding:8px 0;min-width:0}
 #output-cart .cart-product-image{grid-column:1;grid-row:1;align-self:start}
 #output-cart .cart-product-name{grid-column:2;grid-row:1;overflow-wrap:anywhere}
 #output-cart .cart-product-quantity,#output-cart .cart-product-price,#output-cart .cart-product-total{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px}
 #output-cart .cart-product-quantity:before,#output-cart .cart-product-price:before,#output-cart .cart-product-total:before{content:attr(data-label);text-align:left;white-space:normal}
 #output-cart .cart-product-quantity form{flex:1;min-width:0;max-width:180px}
 #output-cart .cart-product-quantity .input-group{flex-wrap:nowrap}
 #output-cart .cart-product-quantity input{min-width:0}
}

/* Keep keyboard focus visible without changing pointer layout. */
#catalog-toggle .dropdownToggle:focus-visible, #catalog-toggle a:focus-visible { outline: 2px solid #d49372; outline-offset: -3px; }

/* Checkout panels inherit the Deweri palette while the native forms own their controls. */
#checkout-checkout .deweri-checkout-layout {
    margin-inline: 5px;
}
#checkout-checkout .deweri-checkout-columns {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}
#checkout-checkout .deweri-checkout-columns > * {
    min-width: 0;
}
#checkout-checkout #form-register > fieldset,
#checkout-checkout #checkout-payment-address fieldset,
#checkout-checkout #checkout-shipping-address fieldset {
    margin: 0 0 20px;
    padding: 0 10px 10px;
    min-width: 0;
    background: #eae6e2;
}
#checkout-checkout #checkout-shipping-method > fieldset,
#checkout-checkout #checkout-payment-method > fieldset {
    margin: 0;
    padding: 0 10px 10px;
    min-width: 0;
    border: 1px solid #d49372;
}
#checkout-checkout #form-register > fieldset > legend,
#checkout-checkout #checkout-payment-address fieldset > legend,
#checkout-checkout #checkout-shipping-address fieldset > legend,
#checkout-checkout #checkout-shipping-method > fieldset > legend,
#checkout-checkout #checkout-payment-method > fieldset > legend {
    float: left;
    width: calc(100% + 20px);
    margin: 0 -10px 10px;
    padding: 10px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    color: inherit;
    font-size: 13px;
}
#checkout-checkout #checkout-confirm > .table-responsive {
    background: #eae6e2;
}
#checkout-checkout #checkout-confirm .table {
    margin-bottom: 0;
    color: inherit;
}
#checkout-checkout #checkout-confirm .table thead {
    background: #f5f5f5;
}
#checkout-checkout #checkout-confirm .table tfoot {
    background: #f9f3f1;
}
#checkout-checkout #checkout-confirm .table tbody td:first-child {
    overflow-wrap: anywhere;
}
#checkout-checkout #checkout-confirm .table tfoot tr:last-child td:last-child {
    color: #d49372;
    font-size: 18px;
    font-weight: 500;
}
#checkout-checkout #checkout-payment {
    margin-top: 20px;
    padding: 6px;
    background: #fff;
}

@media (min-width: 992px) {
    #checkout-checkout .deweri-checkout-columns:not(.deweri-checkout-columns--single) {
        grid-template-columns: minmax(0, 52fr) minmax(0, 46fr);
        gap: 22px;
    }
}


/* Photo navigation stays on the card without moving its content. */
.deweri-card-photo-swipe { touch-action: pan-y pinch-zoom; }
.product-thumb .deweri-card-photo-controls:not([hidden]) {
    position: absolute; inset: 42% 4px auto; display: flex; justify-content: space-between;
    pointer-events: none; z-index: 2;
}
.product-thumb .deweri-card-photo-controls > button {
    width: 36px; height: 36px; padding: 0; border: 1px solid #ddd; border-radius: 50%;
    background: rgba(255, 255, 255, .94); color: #464f5c; font-size: 26px; line-height: 1;
    pointer-events: auto;
}
.product-thumb .deweri-card-photo-controls > button:focus-visible {
    outline: 2px solid #464f5c; outline-offset: 2px;
}
