/* Align storefront content, including text inside full-width banners. */
:root {
    --solva-content-width: 1350px;
    --solva-gutter: max(16px, 2%, calc((100% - var(--solva-content-width)) / 2));
    --solva-inner-width: calc(100% - var(--solva-gutter) - var(--solva-gutter));
}

@media (max-width: 600px) {
    :root {
        --solva-gutter: max(16px, 3%);
    }
}

.header .header-upper,
.header .header-lower,
.footer .footer-middle,
.footer .footer-lower,
.footer .newsletter-subscribe {
    padding-inline: 0;
}

.storefront-inner,
.header .header-lower-inner {
    width: var(--solva-inner-width);
    max-width: var(--solva-content-width);
    margin-inline: auto;
}

.header-upper > .storefront-inner,
.footer-middle > .storefront-inner {
    display: flow-root;
}

.footer .footer-lower {
    display: block;
}

.header .header-menu {
    font-family: "Nunito Sans", sans-serif;
    line-height: normal;
}

@media (min-width: 1201px) {
    .header .header-menu > ul {
        padding-inline: 0;
    }

    .header .header-menu.table-cell {
        justify-content: flex-start;
        padding-inline-start: 0;
    }

    .header .header-menu > ul > li:first-child {
        margin-inline-start: 0;
    }

    .header .responsive-nav-wrapper.table-cell {
        justify-content: flex-end;
        padding-inline-end: 0;
    }

    .header .nav-button.cart-button {
        margin-inline-end: 0;
    }

    .footer-lower > .storefront-inner {
        display: table;
    }
}

@media (max-width: 1200px) {
    .header .header-menu > ul {
        padding-inline: 10px;
    }

    .header .header-lower-inner {
        position: relative;
    }

    .footer .footer-text,
    .footer .footer-block-wrapper {
        padding-inline: 0;
    }
}

#main.master-wrapper-content {
    padding-inline: 0 !important;
}

#main > .master-column-wrapper,
.breadcrumb > ul {
    width: var(--solva-inner-width);
    max-width: var(--solva-content-width);
    margin-inline: auto !important;
}

/* Single-column templates keep their banners in normal flow. */
#main > .master-column-wrapper:has(> .center-1) {
    width: 100%;
    max-width: none;
}

#main .center-1 > .page {
    width: 100%;
    max-width: none;
    padding-inline: 0;
}

#main .center-1 > .page > :not(.page-title, .page-header, .page-content, .topic-block, script, style),
#main .center-1 > :not(.page, .page-title, .topic-top-img, script, style),
#main .page.about-us .container,
#main .page.visit-us .container,
.home-hero-banner .logo-img,
.home-child-banner .content {
    width: var(--solva-inner-width);
    max-width: var(--solva-content-width);
    margin-inline: auto !important;
}

#main .page.home-page > .page-body {
    width: 100%;
    max-width: none;
}

#main .home-page .page-body > :not(.slider-wrapper, script, style) {
    width: var(--solva-inner-width);
    max-width: var(--solva-content-width);
    margin-inline: auto;
}

.news-body img[width][height] {
    max-width: 100%;
    height: auto;
}

.home-page .nop-jcarousel .category-title,
.home-page .nop-jcarousel .category-title a {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.home-child-banner .content {
    inset-inline: 0;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

.home-child-banner .content :is(h1, p, a) {
    margin-block: 0;
    padding-inline: 0;
    text-align: center;
}

.home-child-banner .content a {
    padding-inline: 40px;
}

.home-hero-banner .copyright-banner,
.home-child-banner .copyright-banner {
    right: var(--solva-gutter);
}

#main .page.about-us .container,
#main .page.visit-us .container,
#main .page.product-details-page > .page-body,
#main .category-page > .page-body {
    padding-inline: 0;
}

.page.about-us .container .row,
.page.visit-us .container .row {
    margin-inline: 0;
}

/* The contact artwork spans the section while the form sits between the illustrations. */
#main .center-1 > .contact-page > .contact-section {
    width: 100%;
    max-width: none;
}

.contact-page .contact-section form {
    width: min(100%, max(650px, 66.6667%));
    max-width: 100%;
    margin-inline: auto;
}

.contact-section :is(.contact-bg-left, .contact-bg-right) {
    pointer-events: none;
}

.product-details-page .product-essential {
    padding-inline: 0;
}

#main .page-title.product-banner {
    padding-inline: 0;
}

.product-banner > .storefront-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 100%;
}

#main .product-banner .storefront-inner > h1 {
    min-width: 0;
}

#main .product-banner .storefront-inner > img {
    position: static;
    flex: none;
    transform: none;
}

/* Two-column layouts share a banner above both the content and the sidebar. */
#main > .master-column-wrapper:has(> .side-2) {
    --solva-banner-height: 190px;
}

#main > .master-column-wrapper:has(> .side-2):has(> .page-title, > .center-2 > .page > .page-title) {
    position: static;
    padding-top: calc(var(--solva-banner-height) + 30px);
}

#main .center-2:has(> .page > .page-title),
#main .center-2 > .page:has(> .page-title) {
    position: static;
}

#main .master-column-wrapper:has(> .side-2) > .page-title,
#main .center-2 > .page > .page-title {
    position: absolute;
    inset: 0 0 auto;
    width: 100%;
    height: var(--solva-banner-height);
    margin: 0;
}

/* The title's padding defines the same inner edges as the body below it. */
#main .page-title {
    box-sizing: border-box;
    align-content: center;
    padding-inline: var(--solva-gutter);
    text-align: start;
}

#main .page-title h1 {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding-inline: 0;
    overflow-wrap: anywhere;
    text-align: start;
}

#main .page-title:has(h1) > img {
    inset-inline: auto var(--solva-gutter);
}

#main .page-title:has(h1):has(> img) h1 {
    max-width: calc(100% - 155px);
}

#main .page-title:not(:has(h1)) > img,
#main .topic-top-img > .logo-img,
#main .page.visit-us .page-header > img:not(.background) {
    left: var(--solva-gutter);
    right: auto;
    transform: translateY(-50%);
}

#main .page-title:has(> .link-rss) h1 {
    max-width: calc(100% - 44px);
}

#main .page-title > .link-rss {
    position: absolute;
    right: var(--solva-gutter);
}

.html-shop-page .sub-category-list {
    justify-content: center;
    padding-inline: 0;
}

.html-shop-page .sub-category-item {
    min-width: min(336px, 100%);
}

@media (max-width: 1200px) {
    .html-shop-page .sub-category-item {
        min-width: min(370px, 100%);
    }

    .customer-pages-body #main > .master-column-wrapper:has(> .side-2) {
        padding-top: 0;
    }
}

@media (max-width: 600px) {
    #main .page-title:has(h1) > img {
        width: 72px;
        height: 72px;
    }

    #main .page-title:has(h1):has(> img) h1 {
        max-width: calc(100% - 84px);
    }

    .html-product-details-page #main .page-title:has(> img) h1 {
        max-width: 100%;
    }
}

/* Align each article summary on the news listing. */
.news-list-page .news-item .news-head,
.news-list-page .news-item .news-body,
.news-list-page .news-item .buttons {
    text-align: left !important;
}

.news-list-page .news-item .news-title {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.news-list-page .news-item .news-title:after {
    right: auto;
    margin-left: 0;
}
