/* Site design layer (included from common/search.tpl, which is printed in the header of every page):
   headings in Lora Bold with a copper ornament under the page title; subcategory tiles with a passe-partout
   photo frame and a name plate in the style of the calculator tab. Text and tags stay the same, only the look changes. */

/* ---------- Headings ---------- */

/* copper ornament under the page title: line - dot - diamond - dot - line */
:root {
    --bgOrnament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='16'%3E%3Cpath d='M0 8H96M144 8H240' stroke='%23b0703a' stroke-width='1.4'/%3E%3Cpath d='M120 1l7 7-7 7-7-7z' fill='%23b0703a'/%3E%3Ccircle cx='103' cy='8' r='2.2' fill='%23b0703a'/%3E%3Ccircle cx='137' cy='8' r='2.2' fill='%23b0703a'/%3E%3C/svg%3E");
}

/* every heading looks like the gift certificate page: Lora Bold (@font-face bgLora is in product-page.css, which
   header.tpl includes on every page), #52362A; balanced lines, so no single word is left on the last line.
   :not(#bgH) raises the specificity over the old !important heading rules (site-ui-fixes.css, main.min.css,
   category-description.css, the blog and calculator styles), so those files need no edits. */
h1:not(#bgH),
h2:not(#bgH),
h3:not(#bgH),
h4:not(#bgH),
h5:not(#bgH),
h6:not(#bgH) {
    color: #52362A !important;
    font-family: 'bgLora', Georgia, 'Times New Roman', serif !important;
    font-weight: 700 !important;
    text-wrap: balance;
}

h1:after {
    content: "";
    display: block;
    width: 240px;
    max-width: 70%;
    height: 16px;
    margin: 10px auto 0;
    background: var(--bgOrnament) center / contain no-repeat;
}

/* category page: title above the subcategories */
.productsMainLongWrapper > div > h1 {
    font-size: 42px;
    line-height: 1.15;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* The "Sobrat svoy" banner (a.madOwn, 170 x 110 px) lies in the top right corner of this container from 980 px
   up (main.min.css; below that it is in the flow). The title keeps the same free strip (200 px) on both sides,
   so it stays centered, a long one wraps (balanced) and never reaches the banner; the ornament stays centered.
   Where there is no banner (search, wishlist, compare, viewed), the former padding is restored. Browsers
   without :has() ignore the second rule and keep the strips everywhere: the title only wraps earlier. */
@media only screen and (min-width: 980px) {
    .productsMainLongWrapper > div > h1 {
        box-sizing: border-box;
        padding-left: 200px;
        padding-right: 200px;
        font-size: clamp(34px, 3.4vw, 42px);
    }

    .productsMainLongWrapper > div:not(:has(> a.madOwn)) > h1 {
        padding-left: 20px;
        padding-right: 10px;
        font-size: 42px;
    }
}

/* category description and product page: the ornament replaces the orange bar (absolute :after there) */
.descCategory .categorySeoIntro--legacy > h1 {
    padding-bottom: 26px !important;
}

.descCategory .categorySeoIntro--legacy > h1:after {
    width: 240px;
    max-width: 70%;
    height: 16px;
    margin: 0;
    border-radius: 0;
    background: var(--bgOrnament) center / contain no-repeat;
}

.bgPP h1 {
    padding-bottom: 24px;
}

.bgPP h1:after {
    width: 200px;
    height: 14px;
    border-radius: 0;
    background: var(--bgOrnament) left center / contain no-repeat;
}

/* titles aligned to the left: information pages, home text */
.informationTextPanel h1:after,
.descriptionOnMain h1:after {
    margin-left: 0;
    background-position: left center;
}

@media only screen and (max-width: 767px) {
    .productsMainLongWrapper > div > h1 {
        font-size: 29px;
    }

    h1:after {
        width: 200px;
        height: 14px;
        margin-top: 8px;
    }
}

/* ---------- Subcategory tiles (category page, first .flexWrapper; see site-ui-fixes.css) ---------- */

/* the card lights up orange on hover, like the calculator tab */
.productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart > .productListCartIn {
    background: #FBF4E7;
    border-color: #F1D3AE;
    box-shadow: 0 3px 12px rgba(82, 54, 42, .12);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart:hover > .productListCartIn {
    border-color: #FE8D0B;
    box-shadow: 0 0 0 1px #FE8D0B, 0 8px 26px rgba(254, 141, 11, .38);
}

/* passe-partout: cream mat with a double thin brown line; white photo backgrounds melt into the mat */
.productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart > .productListCartIn > a:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    padding: 12px;
    background: #FBF6EC;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px #C9A47A, inset 0 0 0 5px #FBF6EC, inset 0 0 0 6px #8A5A33, 0 1px 3px rgba(80, 50, 20, .15);
}

.productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart > .productListCartIn > a:first-child img {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    padding: 8px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* name plate like the calculator tab and the catalog button: brown, a thin light-orange outline, the same serif
   face as the catalog button and the top menu (robotoregular has no Cyrillic, so the browser shows Times there) */
.productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart > .productListCartIn > a:nth-child(2) {
    flex: 1 0 auto;
    padding: 12px 36px 12px 18px;
    background: #52362A;
    border: 2px solid #FFC583;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 6px 18px rgba(82, 54, 42, .26);
    color: #FFC583;
    font-family: 'Times New Roman', Times, serif;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0;
    text-shadow: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart > .productListCartIn > a:nth-child(2):after {
    right: 18px;
    border-color: #FFC583;
}

.productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart:hover > .productListCartIn > a:nth-child(2) {
    background: #FE8D0B;
    border-color: #FE8D0B;
    color: #fff;
}

.productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart:hover > .productListCartIn > a:nth-child(2):after {
    right: 14px;
    border-color: #fff;
}

@media only screen and (max-width: 767px) {
    .productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart > .productListCartIn > a:first-child {
        padding: 6px;
    }

    .productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart > .productListCartIn > a:nth-child(2) {
        padding: 9px 26px 9px 12px;
        font-size: 16px;
    }

    .productsMainLongWrapper .flexWrapper:not(.flexWrapperProductsAjax):not(.fieldmSS) > .productListCart > .productListCartIn > a:nth-child(2):after {
        right: 11px;
    }
}

/* ---------- Product page heart and the bottom bar ---------- */

/* product page: the heart is orange once the product is in the wishlist (class bgOn: product.tpl, product-page.js) */
.bgPPActions a.bgPPWish.bgOn {
    color: #FE8D0B;
}

.bgPPActions a.bgPPWish.bgOn svg {
    fill: currentColor;
}

/* the fixed bottom bar touches the window edge: Chrome drops cursor images over 32x32 that cross the edge and falls
   back to the text cursor, so the bar gets a 32x32 copy of the spirit meter cursor of site-ui-fixes.css */
@media (hover: hover) and (pointer: fine) {
    .lastFooterWrapper,
    .lastFooterWrapper *,
    .lastFooterWrapper *::before,
    .lastFooterWrapper *::after {
        cursor: url('../image/cursor/spiritmeter-cursor-32.png') 2 2, default !important;
    }
}

/* ---------- Stock OpenCart pages (div.container > ul.breadcrumb + .row > #content): manufacturers, contact,
   sitemap, account, returns, affiliate. Bootstrap is not loaded on the site, so the basics are given here. ---------- */

#main-content > .container {
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 40px;
    color: #52362A;
    font-size: 15px;
    line-height: 1.55;
    text-align: left;
}

/* breadcrumbs like on category pages: Главная | Раздел */
#main-content > .container > .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    margin: 18px 0 8px;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

#main-content > .container > .breadcrumb > li + li:before {
    content: "|";
    margin: 0 8px;
    color: #B99A80;
}

#main-content > .container > .breadcrumb a {
    color: #52362A;
    text-decoration: none;
}

/* the first crumb is the Font Awesome home icon (text_home), the font is not loaded on the site */
#main-content > .container > .breadcrumb > li:first-child a .fa {
    display: none;
}

#main-content > .container > .breadcrumb > li:first-child a:before {
    content: "\0413\043B\0430\0432\043D\0430\044F";
}

#main-content > .container > .breadcrumb > li:last-child a {
    color: #FE8D0B;
    font-weight: 700;
}

#main-content > .container > .breadcrumb a:hover {
    color: #FE8D0B;
}

#main-content > .container h1 {
    margin: 10px 0 24px;
    font-size: 36px;
    line-height: 1.2;
    text-align: center;
}

#main-content > .container h2 {
    margin: 24px 0 12px;
    font-size: 26px;
    line-height: 1.25;
}

#main-content > .container h3,
#main-content > .container legend {
    margin: 24px 0 12px;
    color: #52362A;
    font-family: 'bgLora', Georgia, 'Times New Roman', serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
}

#main-content > .container a {
    color: #8A4B1C;
    text-decoration: none;
}

#main-content > .container a:hover,
#main-content > .container a:focus {
    color: #FE8D0B;
    text-decoration: underline;
}

/* grid */
#main-content > .container .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

#main-content > .container [class*="col-sm-"] {
    box-sizing: border-box;
    width: 100%;
    padding: 0 10px;
}

@media only screen and (min-width: 768px) {
    #main-content > .container .col-sm-2 { width: 16.666%; }
    #main-content > .container .col-sm-3 { width: 25%; }
    #main-content > .container .col-sm-4 { width: 33.333%; }
    #main-content > .container .col-sm-6 { width: 50%; }
    #main-content > .container .col-sm-8 { width: 66.666%; }
    #main-content > .container .col-sm-9 { width: 75%; }
    #main-content > .container .col-sm-10 { width: 83.333%; }
    #main-content > .container .col-sm-12 { width: 100%; }
}

/* cards, tables, lists */
#main-content > .container .panel,
#main-content > .container .well {
    margin: 0 0 20px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid #F3E3CF;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(82, 54, 42, .07);
}

#main-content > .container .panel-body {
    padding: 0;
}

#main-content > .container .table {
    width: 100%;
    margin: 0 0 20px;
    border-collapse: collapse;
    background: #fff;
}

#main-content > .container .table td {
    padding: 10px 12px;
    border: 1px solid #F0DFC8;
    vertical-align: top;
}

#main-content > .container .table th {
    padding: 10px 12px;
    border: 1px solid #F0DFC8;
    background: #FFF4E6;
    font-weight: 700;
    vertical-align: top;
}

#main-content > .container .table thead td {
    background: #FFF4E6;
    font-weight: 700;
}

#main-content > .container .list-unstyled {
    padding: 0;
    list-style: none;
}

#main-content > .container #content ul:not(.list-unstyled) li {
    margin: 4px 0;
}

/* buttons and forms */
#main-content > .container .btn {
    display: inline-block;
    padding: 10px 22px;
    border: 1px solid #52362A;
    border-radius: 8px;
    background: #fff;
    color: #52362A;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

#main-content > .container .btn-primary,
#main-content > .container .btn-info {
    background: #52362A;
    color: #fff;
}

#main-content > .container .btn:hover,
#main-content > .container .btn:focus {
    border-color: #FE8D0B;
    background: #FE8D0B;
    color: #fff;
    text-decoration: none;
}

#main-content > .container .buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0;
}

#main-content > .container .form-group {
    margin: 0 0 16px;
}

#main-content > .container label,
#main-content > .container .control-label {
    display: inline-block;
    margin: 0 0 6px;
    font-weight: 700;
}

#main-content > .container .form-control {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E2C9A3;
    border-radius: 8px;
    background: #fff;
    color: #3B2213;
    font-size: 15px;
}

#main-content > .container .form-control:focus {
    border-color: #FE8D0B;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(254, 141, 11, .18);
}

#main-content > .container .alert {
    margin: 0 0 16px;
    padding: 12px 16px;
    border: 1px solid #F3E3CF;
    border-radius: 10px;
    background: #FFF4E6;
}

#main-content > .container .alert-danger,
#main-content > .container .text-danger {
    color: #B3261E;
}

/* manufacturers: letter index as buttons, brands as small plates */
#main-content > .container #content > p:first-of-type strong {
    margin-right: 6px;
}

#main-content > .container #content > p a[href*="product/manufacturer#"] {
    display: inline-block;
    min-width: 32px;
    margin: 3px 2px;
    padding: 5px 8px;
    border: 1px solid #E2C9A3;
    border-radius: 6px;
    background: #FFFAF2;
    color: #52362A;
    font-weight: 700;
    text-align: center;
}

#main-content > .container #content > p a[href*="product/manufacturer#"]:hover {
    border-color: #FE8D0B;
    background: #FE8D0B;
    color: #fff;
    text-decoration: none;
}

#main-content > .container #content > h2[id] {
    padding-bottom: 6px;
    border-bottom: 1px solid #E2C9A3;
    scroll-margin-top: 100px;
}

#main-content > .container #content > h2[id] ~ .row [class*="col-sm-"] {
    margin-bottom: 12px;
}

#main-content > .container #content > h2[id] ~ .row a {
    display: block;
    padding: 12px 16px;
    border: 2px solid #FFC583;
    border-radius: 10px;
    background: #52362A;
    color: #FFC583;
    font-family: 'Times New Roman', Times, serif;
    font-size: 17px;
    text-align: center;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

#main-content > .container #content > h2[id] ~ .row a:hover {
    border-color: #FE8D0B;
    background: #FE8D0B;
    box-shadow: 0 6px 18px rgba(254, 141, 11, .35);
    color: #fff;
    text-decoration: none;
}

@media only screen and (max-width: 767px) {
    #main-content > .container h1 {
        font-size: 28px;
    }

    #main-content > .container #content > h2[id] ~ .row [class*="col-sm-"] {
        width: 50%;
    }
}

/* ---------- "Вы просматривали" carousel (.lastSeen): hover lift on every page ---------- */

/* Same reaction as the carousels under the product card (product-page.css, ".bgPP ~ .lastSeen"; the declarations are
   identical there, so on the product page nothing is doubled). The carousel clips whatever leaves it (overflow:hidden is
   needed by jcarousel), so the vertical padding leaves room for the lift and the shadow; only li > div is the card
   (main.css also matches the nested divs with "li div"). Hover effects only where a real pointer exists: no sticky
   hover on touch screens. */
.lastSeen .jcarousel_products {
    padding-top: 10px;
    padding-bottom: 18px;
}

.lastSeen .jcarousel_products li > div {
    padding-bottom: 10px;
    position: relative;
    border-radius: 16px;
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.lastSeen .jcarousel_products li > div img {
    transition: transform .35s ease;
}

.lastSeen .jcarousel_products li > div > a:nth-child(2) {
    transition: color .2s ease;
}

@media (hover: hover) {
    .lastSeen .jcarousel_products li > div:hover {
        z-index: 1;
        background: #fff;
        box-shadow: 0 10px 26px rgba(82, 54, 42, .16), 0 0 0 1px #F1E0CB;
        transform: translateY(-4px);
    }

    .lastSeen .jcarousel_products li > div:hover img {
        transform: scale(1.05);
    }

    .lastSeen .jcarousel_products li > div:hover > a:nth-child(2) {
        color: #FE8D0B;
    }
}

/* badges (.flagSpan) in this carousel sit on the lower left corner of the photo (200 px tall, main.css), not over the
   product name; several badges are stacked upwards, 30 px apart (the former "bottom" offsets are cancelled) */
.lastSeen .jcarousel_products li > div > .flagSpan {
    bottom: auto !important;
    top: 168px;
}

.lastSeen .jcarousel_products li > div > .flagSpan + .flagSpan {
    top: 138px;
}

.lastSeen .jcarousel_products li > div > .flagSpan + .flagSpan + .flagSpan {
    top: 108px;
}

.lastSeen .jcarousel_products li > div > .flagSpan + .flagSpan + .flagSpan + .flagSpan {
    top: 78px;
}
