/* ------------------------------------------------------------------ *
 * moon.css – overrides on top of the legacy Magento theme CSS
 * Agent SHELL · moon-shop.com Kirby rebuild
 * ------------------------------------------------------------------ */

/* ================================================================== *
 * 1. Remove every shop-only UI element
 * ================================================================== */
.minicart-wrapper,
.mini-cart-wrapper,
.mini-carts,
.block-minicart,
.header-mini-cart,
.header.links,
.top-account,
.top-info,
.switcher-currency,
.switcher.currency,
.authorization-link,
.link.wishlist,
.item.link.compare,
.action.tocart,
.action.towishlist,
.action.tocompare,
.product-extra-link,
.actions-secondary,
.product-info-cart,
.box-tocart,
.quickview-product,
[data-role="quickview-button"],
.product-reviews-summary,
.reviews-actions,
.product-rating,
.rating-summary,
.rating-result,
.review-date,
.fixed-bottom,
.section-brands,
.cookie-status-message,
.expand-category-link,
.load_more,
.price-including-tax .cart-tax-total,
.paypal,
.checkout-methods-items,
.field.website {
    display: none !important;
}

/* ================================================================== *
 * 2. Header
 * ================================================================== */
.top-header .top-bar-right { text-align: right; }
.top-header .switcher.language { float: right; margin: 0; position: relative; }

/* ---- language switcher (multi-language, since 11.09.) ---- */
.top-header .switcher.language .switcher-trigger { cursor: pointer; }
.top-header .switcher.language .switcher-trigger > strong::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    vertical-align: middle;
    position: relative;
    top: 2px;
}
.top-header .switcher.language .switcher-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    z-index: 300;
    min-width: 140px;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    text-align: left;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .15);
}
.top-header .switcher.language:hover .switcher-dropdown,
.top-header .switcher.language.is-open .switcher-dropdown { display: block; }
.top-header .switcher.language .switcher-dropdown li { margin: 0; padding: 0; }
/* the legacy theme styles .switcher .dropdown li/a with big padding-less red text – pin ours */
.top-header .switcher.language ul.switcher-dropdown {
    min-width: 160px;
    padding: 6px 0 !important;
    margin: 4px 0 0 !important;
    background: #fff;
    border: 1px solid #e6e6e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.top-header .switcher.language ul.switcher-dropdown li.switcher-option {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    height: auto !important;
    line-height: normal !important;
}
.top-header .switcher.language ul.switcher-dropdown li.switcher-option a {
    display: block;
    padding: 8px 18px !important;
    font: 400 13px/1.4 'Poppins', 'Rubik', sans-serif !important;
    white-space: nowrap;
    color: #222 !important;
    text-decoration: none;
    text-align: left;
}
.top-header .switcher.language ul.switcher-dropdown li.switcher-option:hover a { background: #f3f3f3; color: #B22222 !important; }
.top-header .switcher.language ul.switcher-dropdown li.switcher-option.current a { font-weight: 600 !important; color: #B22222 !important; }

/* ---- sticky header ---- */
.header-wrapper-sticky.enable-sticky {
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .12);
    animation: none !important;
    -webkit-animation: none !important;
}
.header-wrapper-sticky.enable-sticky .container-header-sticky {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 15px;
}
.header-wrapper-sticky.enable-sticky .logo-sticky {
    display: table-cell !important;
    vertical-align: middle;
    width: 20%;
    float: none;
    text-align: left;
}
.header-wrapper-sticky.enable-sticky .logo-sticky img {
    max-height: 46px;
    width: auto;
}
.header-wrapper-sticky.enable-sticky .top-menu-sticky {
    display: table-cell !important;
    vertical-align: middle;
    text-align: center;
}

/* ================================================================== *
 * 3. Vertical "KATEGORIEN" mega menu
 * ================================================================== */
/* mobile off-canvas – the legacy theme already ships the slide-in panel,
   we only make the absolutely positioned vertical menu behave inside it */
@media (max-width: 991px) {
    /* every wrapper in the mega-menu carries the .nav-sections class, so the theme's
       off-canvas rule turns the inner ones into fixed boxes as well – only the outer
       panel may be fixed. */
    .sections.nav-sections.category-dropdown .nav-sections {
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        box-shadow: none !important;
    }
    body.nav-open .sections.nav-sections.category-dropdown {
        left: 0 !important;
    }
    .nav-open .page-wrapper {
        left: 55% !important;
    }
    .nav-sections.category-dropdown .navigation.verticalmenu,
    .nav-sections.category-dropdown .category-dropdown-item-content {
        position: static !important;
        width: 100% !important;
    }
    .list-category-dropdown {
        position: static !important;
        width: 100% !important;
        border: 0;
        box-shadow: none;
        min-width: 0;
    }
    .title-category-dropdown {
        border-right: 0;
        border-bottom: 1px solid #e6e6e6;
    }
    #close-menu {
        text-align: right;
        padding: 12px 15px;
    }
    #close-menu a {
        font-size: 20px;
        color: #222;
    }
    .header-control .head-contact {
        display: none !important;
    }
}
@media (max-width: 414px) {
    .nav-open .page-wrapper {
        left: 70% !important;
    }
}
@media (min-width: 992px) {
    #close-menu {
        display: none !important;
    }
}

/* ================================================================== *
 * 4. Home – slider, banners, USP bar, grids
 * ================================================================== */
.content-top-home .banner-slider-top {
    margin-bottom: 30px;
}
.wrapper_slider .banner_item_bg img {
    width: 100%;
    height: auto;
}
.list-ads1 .item-ads4 {
    margin-bottom: 22px;
}
.list-ads1 .col-md-12:last-child .item-ads4 {
    margin-bottom: 0;
}
.banner_mid_1 {
    margin: 40px 0 0;
}
.banner_mid_1 img {
    width: 100%;
    height: auto;
}

/* Magento's .product-item-info hard-codes width:152px – the theme card is fluid */
.content-item-product.product-item-info {
    width: 100%;
}

/* product images fill their cell (the original set width via inline styles) */
.cat_home1 .product-image-container,
.productTabContent .product-image-container,
.the_blog .product-image-container {
    display: block;
    width: 100% !important;
}
.cat_home1 .product-image-photo,
.productTabContent .product-image-photo {
    width: 100%;
    height: auto;
}
.cat_home1 {
    overflow: hidden;
}

/* product grids on the home page */
.productTabContent {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1px;
}
.productTabContent > .product_row {
    flex: 0 0 20%;
    max-width: 20%;
    padding: 0;
}
@media (max-width: 1199px) {
    .productTabContent > .product_row { flex-basis: 25%; max-width: 25%; }
}
@media (max-width: 991px) {
    .productTabContent > .product_row { flex-basis: 33.3333%; max-width: 33.3333%; }
}
@media (max-width: 639px) {
    .productTabContent > .product_row { flex-basis: 50%; max-width: 50%; }
}
.categorytab-container .owl .product_row,
.productTabContent .product_row {
    border: 1px solid #f0f0f0;
    margin: -1px 0 0 -1px;
}
.categorytab-container,
.list-tab-product,
.the_blog {
    margin-bottom: 55px;
}
/* the Best Selling block sits in a floated bootstrap column – clear it */
.top-home-content > [class*="col-"] {
    float: none;
}
.the_blog {
    clear: both;
}
.list-tab-product .tabs li a,
.tabs-categorytab li a {
    cursor: pointer;
}

/* "New & Blog" teasers */
.the_blog .block-content.row {
    margin-left: 0;
    margin-right: 0;
}
.teaser-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}
.teaser-grid > .product-item {
    flex: 0 0 20%;
    max-width: 20%;
    padding: 0 10px;
}
@media (max-width: 991px) {
    .teaser-grid > .product-item { flex-basis: 50%; max-width: 50%; margin-bottom: 25px; }
}
@media (max-width: 639px) {
    .teaser-grid > .product-item { flex-basis: 100%; max-width: 100%; }
}
.teaser-grid .blog-image img {
    width: 100%;
    height: auto;
}
.teaser-grid .blog-title {
    font-size: 15px;
    font-weight: 500;
    margin: 16px 0 8px;
}
.teaser-grid .blog-title a {
    color: #b22222;
}
.teaser-grid .short-des {
    font-size: 13px;
    color: #888;
    line-height: 1.55;
}

/* ================================================================== *
 * 5. CMS pages (firma / rack / produktqualitaet / kontakt / faq …)
 * ================================================================== */
.cms-sections {
    display: flex;
    flex-wrap: wrap;
}
.cms-sections .rokan-product-heading {
    margin-top: 34px;
    margin-bottom: 22px;
}
.cms-sections .rokan-product-heading:first-child,
.column.main > .rokan-product-heading:first-child {
    margin-top: 0;
}
.rokan-product-heading .des-title {
    font-size: 13px;
    color: #888;
    padding-top: 6px;
}
.cms-section-text,
.cms-text,
.cms-intro {
    font-size: 14px;
    line-height: 1.6;
    color: #888;
}
.cms-section-text p,
.cms-text p,
.cms-intro p {
    line-height: 1.6;
    margin: 0 0 14px;
}
.cms-section-text strong,
.cms-text strong {
    color: #666;
    font-weight: 500;
}
.cms-section-text ul,
.cms-text ul {
    margin: 0 0 14px;
}
.cms-section-text ul li,
.cms-text ul li {
    line-height: 1.6;
}
.cms-text img {
    height: auto;
}
/* (the contact page has its own frame + form styling – section 14) */
.message.success,
.message.error {
    padding: 14px 18px;
    margin-bottom: 22px;
    border-radius: 3px;
}
.message.success { background: #f1f6ee; color: #2f6f2f; }
.message.error   { background: #fbecec; color: #b22222; }

/* ================================================================== *
 * 6. Cookie notice + back to top
 * ================================================================== */
#cookieinfo {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 600px;
    background-color: #fff;
    z-index: 1000;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(178, 34, 34, .4), 0 8px 16px rgba(178, 34, 34, .4);
    padding: 20px;
    display: none;
}
#cookieinfo.is-visible {
    display: block;
}
#cookieinfo h4 {
    font-size: 16px;
    color: #222;
    margin: 0 0 10px;
}
#cookieinfo p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 10px;
}
#cookieinfo hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 14px 0;
}
#cookieinfo .cookieinfo-actions {
    text-align: right;
}
#cookieinfo #cookiebutton {
    border: 0;
    border-radius: 22px;
    padding: 10px 34px;
    font-size: 14px;
    cursor: pointer;
}
#back-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}
#back-top.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ================================================================== *
 * 7. Misc / layout guards
 * ================================================================== */
.page-main > .columns {
    display: block;
}
.page-main > .columns.layout-2-col {
    display: flex;
    flex-wrap: wrap;
}
.footer-bottom {
    padding: 22px 0;
}
.footer-bottom .copyright {
    color: #888;
    font-size: 13px;
}

/* ================================================================== *
 * 8. CATALOG (Agent CATALOG) — appended block
 *    Fixes measured against the live site at 1440px:
 *    https://www.moon-shop.com/index.php/damen.html?color=23
 *    https://www.moon-shop.com/index.php/damen/lyon-n1755-c9885-taupe.html
 * ================================================================== */

/* -- visually hidden helper (toolbar labels, chip remove text) ------ */
.moon-vh {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------------------ *
 * 8.1 "Filter" / current filters — leather panel as on live
 * ------------------------------------------------------------------ */
.block.filter .filter-current {
    padding: 18px 16px 20px;
    text-align: center;
}
.block.filter .filter-current .block-subtitle,
.block.filter .filter-current .filter-current-subtitle {
    display: block;
    margin: 0 0 14px;
    padding: 0;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    border: 0;
}
.block.filter .filter-current .items {
    margin: 0;
    padding: 0;
    list-style: none;
}
.block.filter .filter-current .items .item {
    position: relative;
    margin: 0 0 12px;
    padding: 12px 40px 12px 14px;
    text-align: left;
    color: #fff;
}
.block.filter .filter-current .items .item .filter-label,
.block.filter .filter-current .items .item .filter-value {
    display: block;
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
}
/* round × remove button, top-right of the chip, like the original */
.block.filter .filter-current .items .item .action.remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    background: rgba(0, 0, 0, .18);
    text-align: center;
    text-decoration: none;
    line-height: 24px;
    color: #fff;
}
.block.filter .filter-current .items .item .action.remove::before {
    content: "\00d7";
    display: block;
    font-size: 15px;
    line-height: 24px;
    color: #fff;
}
.block.filter .filter-current .items .item .action.remove:hover {
    background: rgba(0, 0, 0, .38);
    border-color: #fff;
}
/* "Alles löschen" pill, inside the leather panel */
.block.filter .filter-current .block-actions.filter-actions {
    margin: 6px 0 0;
    padding: 0;
    text-align: center;
}
.block.filter .filter-current .filter-clear {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 3px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
}
.block.filter .filter-current .filter-clear:hover {
    background: rgba(0, 0, 0, .22);
    color: #fff;
}

/* ------------------------------------------------------------------ *
 * 8.2 Toolbar — one row: amount | grid modes | limit | sort
 * ------------------------------------------------------------------ */
/* the original template has no direction switcher (it is commented out) */
.toolbar.toolbar-products .sorter-action,
.toolbar.toolbar-products .toolbar-sorter .action.sorter-action {
    display: none !important;
}
.toolbar.toolbar-products .field.limiter .limiter-text {
    display: none;
}

/* ------------------------------------------------------------------ *
 * 8.3 Product page — media / info columns + specs table
 * ------------------------------------------------------------------ */
/* Magento's blank-theme floats (.product-info-main{float:right;width:22.6%})
   fight the bootstrap columns of this theme – neutralise them. */
.catalog-product-view .main-detail > .row > [class*="col-"] {
    float: left;
}
.catalog-product-view .product-info-main,
.catalog-product-view .detail-info-product-view {
    float: none;
    width: 100%;
    margin: 0;
}
.catalog-product-view .product.media {
    float: none;
    width: 100%;
    margin: 0;
}
.catalog-product-view .main-detail > .row::after {
    content: "";
    display: table;
    clear: both;
}

/* gallery: keep the image inside its column (it overflowed and covered
   the breadcrumb bar) */
.moon-gallery {
    display: block;
    width: 100%;
}
/* live: .product.media is a 574x574 box, image contained at 487x487 */
.moon-gallery__main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    text-align: center;
}
.moon-gallery__main img,
.gallery-placeholder .gallery-placeholder__image {
    display: block;
    position: static;
    width: auto;
    height: auto;
    max-width: 85%;
    max-height: 85%;
    margin: 0 auto;
}
.moon-gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.moon-gallery__thumb {
    display: block;
    width: 88px;
    border: 1px solid #e6e6e6;
    padding: 2px;
}
.moon-gallery__thumb img {
    display: block;
    width: 100%;
    height: auto;
}
.moon-gallery__thumb.is-active,
.moon-gallery__thumb:hover {
    border-color: #b22222;
}

/* "Mehr Informationen": the theme leaves <th> as display:inline, which
   breaks the table into loose boxes. Force real table layout + zebra. */
#product-attribute-specs-table {
    display: table;
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px;
    border-collapse: collapse;
    table-layout: fixed;
}
#product-attribute-specs-table > tbody {
    display: table-row-group;
}
#product-attribute-specs-table > tbody > tr {
    display: table-row;
}
#product-attribute-specs-table > tbody > tr > th,
#product-attribute-specs-table > tbody > tr > td {
    display: table-cell;
    padding: 9px 14px;
    border: 1px solid #eee;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    width: auto;
}
#product-attribute-specs-table > tbody > tr > th {
    width: 40%;
    color: #666;
    font-weight: 400;
    background: #fafafa;
}
#product-attribute-specs-table > tbody > tr > td {
    color: #222;
    font-weight: 700;
}
#product-attribute-specs-table > tbody > tr:nth-child(odd) > th {
    background: #f5f5f6;
}
#product-attribute-specs-table > tbody > tr:nth-child(odd) > td {
    background: #fcfcfc;
}
#product-attribute-specs-table .table-caption,
#product-attribute-specs-table caption {
    display: none;
}

/* breadcrumbs must stay visible on the product page */
.catalog-product-view .nav-breadcrumbs {
    display: block;
    position: relative;
    z-index: 2;
}

/* ================================================================== *
 * 9. HOME — CSS teaser banners in .banner_mid_1 (RFID left, B2B
 *    rack-system right). Both legacy source images carried baked-in
 *    shop copy ("RFID – Exclusive Angebote", "-50% Sales") so both
 *    slots are rebuilt as one shared component. Same footprint as the
 *    original image banners: same column width, same 10px radius /
 *    hover wipe from .bs-banner .banner-hover, same aspect ratio
 *    (860:240).
 * ================================================================== */
.teaser-banner {
    display: block;
    position: relative;
}
.teaser-banner-media {
    display: block;
    width: 100%;
    padding-bottom: 27.91%; /* 860:240 – matches the original image banners */
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}
.teaser-banner-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(10, 8, 6, .80) 0%, rgba(10, 8, 6, .48) 45%, rgba(10, 8, 6, .18) 100%);
}
.teaser-banner-copy {
    position: absolute;
    left: 26px;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    text-align: left;
    color: #fff;
}
.teaser-banner-title {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}
.teaser-banner-subtitle {
    display: block;
    margin-top: 10px;
    max-width: 230px;
    font-size: 13px;
    line-height: 18px;
    color: #f0f0f0;
}
@media (max-width: 480px) {
    .teaser-banner-title { font-size: 16px; }
    .teaser-banner-subtitle { font-size: 12px; line-height: 16px; max-width: 180px; margin-top: 6px; }
}

/* -rfid: real product photo (1500x1500 – produkte/070…/01.jpg, an RFID
 * wallet), plenty of resolution for a crisp 860x240 "cover" crop. */
.teaser-banner.-rfid .teaser-banner-media {
    background-color: #161310;
    background-size: cover;
    background-position: center 42%;
}

/* -rack: source photo (moon_rack_1.jpg) is a small portrait crop that
 * blurs badly if stretched to fill the whole 860x240 banner. Shown here
 * at native resolution (no upscaling, ever) windowed to the right side;
 * the rest of the banner is a solid dark leather-toned field that
 * carries the text — same trick a print designer uses for a low-res
 * source image. */
.teaser-banner.-rack .teaser-banner-media {
    background-color: #201712;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: auto; /* native pixels – downscale never needed, upscale never applied */
}

/* ================================================================== *
 * 10. FOOTER — 3-column layout after removing the newsletter column
 *     (logo/contact, Information, Firma spread evenly across the row).
 * ================================================================== */
.footer-columns-3.rowFlex {
    justify-content: center;
}
.footer-columns-3 > div {
    display: flex;
}
.footer-columns-3 .velaBlock {
    width: 100%;
}

/* ================================================================== *
 * 11. PRODUCT PAGE — compact gallery + filled info column
 *     Added after the shop actions (rating, qty, add-to-cart,
 *     wishlist, compare) were removed: the gallery sat in a fixed
 *     574px square while the right column held only title, price and
 *     SKU, so the page was mostly whitespace.
 *
 *     11.1 gallery  – box hugs the photo (max-height 480, contain),
 *                     thumbnails 10px underneath, flush left.
 *     11.2 keyfacts – definition-list style summary of the main
 *                     attributes (full "Mehr Informationen" table
 *                     stays below, untouched).
 *     11.3 CTA      – "Verkaufsstelle anfragen" in the theme red,
 *                     same pill shape as the header "Suche" button,
 *                     where "In den Warenkorb" used to be.
 *     11.4 mobile   – single column, image first, CTA full width.
 *     Overrides section 8.3 above, hence the .catalog-product-view
 *     prefixes.
 * ================================================================== */

/* ---- 11.1 gallery ---- */
.catalog-product-view .moon-gallery {
    max-width: 480px;
}
.catalog-product-view .moon-gallery__main {
    display: block;
    width: 100%;
    aspect-ratio: auto;
    max-height: 480px;
    overflow: hidden;
    text-align: left;
    line-height: 0;
}
.catalog-product-view .moon-gallery__main img,
.catalog-product-view .gallery-placeholder .gallery-placeholder__image {
    display: block;
    position: static;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 480px;
    margin: 0;
    object-fit: contain;
}
.catalog-product-view .moon-gallery__thumbs {
    margin-top: 10px;
    gap: 10px;
    justify-content: flex-start;
}

/* the lightbox anchors only register the gallery with fancybox */
.moon-gallery__lightbox {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---- 11.2 key facts ---- */
.product-keyfacts {
    width: 100%;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #e6e6e6;
    font-family: "Poppins", "Rubik", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
.product-keyfacts > li {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin: 0;
    padding: 7px 0;
    border-bottom: 1px solid #e6e6e6;
    list-style: none;
}
.product-keyfacts > li:before {
    content: none;
}
.product-keyfacts__label {
    flex: 0 0 42%;
    max-width: 42%;
    color: #777;
    font-weight: 400;
}
.product-keyfacts__value {
    flex: 1 1 auto;
    color: #222;
    font-weight: 500;
}

/* ---- 11.3 CTA ---- */
.product-cta {
    margin: 20px 0 4px;
}
.catalog-product-view .product-cta .product-cta__button,
.product-cta__button {
    display: inline-block;
    min-width: 250px;
    height: 45px;
    padding: 0 40px;
    border: 1px solid #b22222;
    border-radius: 30px;
    background-color: #b22222;
    color: #fff !important;
    font-family: "Rubik", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 43px;
    text-align: center;
    text-decoration: none !important;
    text-transform: none;
    transition: background-color .2s ease, border-color .2s ease;
}
.catalog-product-view .product-cta .product-cta__button:hover,
.catalog-product-view .product-cta .product-cta__button:focus,
.product-cta__button:hover,
.product-cta__button:focus {
    background-color: #bd2121;
    border-color: #bd2121;
    color: #fff !important;
}
.product-cta__note {
    margin: 12px 0 0;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

/* ---- 11.4 mobile ---- */
@media (max-width: 767px) {
    .catalog-product-view .main-detail > .row > [class*="col-"] {
        float: none;
        width: 100%;
    }
    .catalog-product-view .product.media {
        margin-bottom: 22px;
    }
    .catalog-product-view .moon-gallery {
        max-width: 100%;
    }
    .catalog-product-view .moon-gallery__main,
    .catalog-product-view .moon-gallery__main img,
    .catalog-product-view .gallery-placeholder .gallery-placeholder__image {
        max-height: 340px;
    }
    .product-keyfacts {
        width: 100%;
    }
    .catalog-product-view .product-cta .product-cta__button,
    .product-cta__button {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 0 16px;
    }
}

/* ================================================================== *
 * 12. PRODUCT AVAILABILITY (Verfügbarkeit)
 *     Non-shop-wording stand-in for the live shop's "Auf Lager" –
 *     unavailable products stay visible and are marked instead of
 *     hidden. Card badge reuses the .product-label positioning that
 *     .new-label / .sale-label already share, stacked underneath the
 *     sale badge so the two never overlap.
 * ================================================================== */

/* ---- 12.1 product page – quiet note under the price box ---- */
.product-availability.-unavailable {
    margin: 6px 0 12px;
    font-size: 13px;
    color: #777;
}

/* ---- 12.2 card badge ---- */
.product-thumb.product-item-photo {
    position: relative;
}
.product-thumb.product-item-photo .product-label {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 2px;
    color: #fff;
    font-family: "Rubik", sans-serif;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.product-thumb.product-item-photo .sale-label {
    background: #b22222;
}
.product-thumb.product-item-photo .availability-label {
    background: #777;
}
/* stack below the sale badge instead of overlapping it */
.product-thumb.product-item-photo .sale-label ~ .availability-label {
    top: 42px;
}

/* ================================================================== *
 * 13. TEXT PAGES (faq / impressum / datenschutz / firma /
 *     produktqualitaet / rack)
 *     One shared frame for every CMS text page: a centred column with
 *     real left/right padding, one type scale, the theme's red accent
 *     (#b22222) and grey labels (#777) on #e6e6e6 separators.
 *     Markup: templates/text.php + snippets/text-header|body|faq|facts.
 * ================================================================== */

/* ---- 13.1 frame: measure + gutter ---- */
.text-page__inner {
    max-width: 948px;           /* 900px text + 2 × 24px gutter */
    margin: 0 auto;
    padding: 30px 24px 34px;
}
.text-page--wide .text-page__inner {
    max-width: 1248px;          /* two-column pages: firma, produktqualitaet, rack, kontakt */
}
/* the theme's grid columns carry 10px, not the bootstrap 15px – pin both sides
   so the first column starts exactly on the frame gutter (= breadcrumb / h1) */
.text-page .columns.cms-sections {
    margin-left: -15px;
    margin-right: -15px;
}
.text-page .columns.cms-sections > [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}
@media (max-width: 767px) {
    .text-page__inner {
        padding: 20px 16px 28px;
    }
}

/* breadcrumb rendered inside the frame (snippet `breadcrumbs`, $inFrame) so its
   left edge is the h1's left edge. Same inner markup as on catalog pages – only
   the .container/.row/.col gutter and the theme's stand-alone spacing go. */
.nav-breadcrumbs--in-frame {
    margin: 0 0 22px;
}
.nav-breadcrumbs--in-frame .breadcrumbs {
    max-width: none;
    margin: 0;
    padding: 0;
}
@media (max-width: 767px) {
    .nav-breadcrumbs--in-frame {
        margin-bottom: 16px;
    }
}

/* ---- 13.2 page header ---- */
.text-page__header {
    position: relative;
    margin: 0 0 26px;
    padding: 0 0 12px;
    border-bottom: 1px solid #e6e6e6;
}
.text-page__header:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 50px;
    height: 2px;
    background-color: #b22222;
}
.text-page__title {
    margin: 0;
    font-family: "Rubik", sans-serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.25;
    color: #222;
}
.text-page__subline {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #777;
}
/* the two-column pages keep their per-section headings – red accent instead
   of the legacy theme's green bar, so all text pages read the same */
.text-page .rokan-product-heading:before {
    background-color: #b22222;
}
@media (max-width: 767px) {
    .text-page__title { font-size: 23px; }
}

/* ---- 13.3 type scale ---- */
.text-page .cms-text,
.text-page .cms-section-text,
.text-page .cms-intro,
.text-page .faq-item__answer {
    font-size: 15px;
    line-height: 1.7;
    color: #777;
    overflow-wrap: anywhere;
}
.text-page .cms-text p,
.text-page .cms-section-text p,
.text-page .cms-intro p,
.text-page .faq-item__answer p {
    margin: 0 0 14px;
    line-height: 1.7;
}
.text-page .cms-text > :last-child,
.text-page .cms-section-text > :last-child,
.text-page .faq-item__answer > :last-child {
    margin-bottom: 0;
}
.text-page__intro {
    margin: 0 0 26px;
    font-size: 16px;
    line-height: 1.65;
    color: #555;
}
.text-page__intro p {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.65;
}
/* #maincontent is needed to beat the theme's `.cms-page-view #maincontent h2` */
#maincontent .text-page .cms-text h2,
#maincontent .text-page .cms-text h3,
#maincontent .text-page .faq-item__answer h3 {
    font-family: "Rubik", sans-serif;
    color: #222;
    font-weight: 500;
}
#maincontent .text-page .cms-text h2 {
    margin: 32px 0 12px;
    font-size: 19px;
    line-height: 1.35;
    scroll-margin-top: 110px;   /* sticky header clearance for the jump links */
}
#maincontent .text-page .cms-text h2:first-child {
    margin-top: 0;
}
#maincontent .text-page .cms-text h3 {
    margin: 24px 0 8px;
    font-size: 16px;
    line-height: 1.4;
}
#maincontent .faq-item__head {
    margin: 0;
    font-size: 100%;
    line-height: 1.5;
}
.text-page .cms-text a,
.text-page .faq-item__answer a {
    color: #b22222;
}
.text-page .cms-text ul,
.text-page .cms-section-text ul,
.text-page .faq-item__answer ul {
    margin: 0 0 14px;
    padding-left: 20px;
}
.text-page .cms-text ul > li,
.text-page .cms-section-text ul > li,
.text-page .faq-item__answer ul > li {
    margin: 0 0 6px;
    list-style: disc outside;
    line-height: 1.7;
}
.text-page .cms-text ol,
.text-page .faq-item__answer ol {
    margin: 0 0 14px;
    padding-left: 20px;
}
.text-page .cms-text ol > li,
.text-page .faq-item__answer ol > li {
    margin: 0 0 6px;
    list-style: decimal outside;
    line-height: 1.7;
}

/* ---- 13.4 jump list (datenschutz) ---- */
.text-toc {
    margin: 0 0 30px;
    padding: 16px 20px;
    background: #fafafa;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
}
.text-toc__title {
    margin: 0 0 8px;
    font-family: "Rubik", sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #777;
}
.text-toc__list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 22px;
}
.text-toc__list > li {
    margin: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.6;
}
.text-toc__list a {
    color: #555;
    border-bottom: 1px solid transparent;
}
.text-toc__list a:hover,
.text-toc__list a:focus {
    color: #b22222;
    border-bottom-color: #b22222;
}

/* ---- 13.5 fact list (impressum) ---- */
.fact-grid {
    display: grid;
    grid-template-columns: minmax(150px, 250px) 1fr;
    margin: 0 0 34px;
    padding: 4px 24px 8px;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
    background: #fff;
    font-family: "Poppins", "Rubik", sans-serif;
    font-size: 14px;
    line-height: 1.55;
}
.fact-grid__label,
.fact-grid__value {
    margin: 0;
    padding: 12px 0;
    border-top: 1px solid #e6e6e6;
}
.fact-grid > .fact-grid__label:first-child,
.fact-grid > .fact-grid__label:first-child + .fact-grid__value {
    border-top: 0;
}
.fact-grid__label {
    padding-right: 20px;
    color: #777;
    font-weight: 400;
}
.fact-grid__value {
    color: #222;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.fact-grid__value a {
    color: #b22222;
}
@media (max-width: 767px) {
    .fact-grid {
        grid-template-columns: 1fr;
        padding: 4px 16px 12px;
    }
    .fact-grid__label {
        padding: 12px 0 0;
    }
    .fact-grid__value {
        padding: 2px 0 12px;
        border-top: 0;
    }
    .fact-grid > .fact-grid__label:first-child {
        padding-top: 8px;
    }
}

/* ---- 13.6 FAQ accordion ---- */
.faq-accordion {
    margin: 0 0 10px;
    border-top: 1px solid #e6e6e6;
}
.faq-item {
    border-bottom: 1px solid #e6e6e6;
}
.faq-item__head {
    margin: 0;
    font-size: 100%;
}
/* the legacy theme styles every bare <button> as a red pill
   (custom_default.css uses !important) – undo all of it here */
.faq-item__toggle,
.faq-item__toggle:hover,
.faq-item__toggle:focus,
.faq-item__toggle:active {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 16px 2px;
    border: 0 !important;
    border-radius: 0;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none;
    text-align: left;
    text-transform: none;
    white-space: normal;
    cursor: pointer;
    font-family: "Rubik", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: #222 !important;
    transition: color .2s ease;
}
.faq-item__toggle:hover,
.faq-item__toggle:focus,
.faq-item.is-open > .faq-item__head > .faq-item__toggle {
    color: #b22222 !important;
}
.faq-item__toggle:focus-visible {
    outline: 2px solid #b22222;
    outline-offset: 2px;
}
.faq-item__question {
    flex: 1 1 auto;
}
.faq-item__icon {
    flex: 0 0 auto;
    position: relative;
    width: 14px;
    height: 22px;
}
.faq-item__icon:before,
.faq-item__icon:after {
    content: "";
    position: absolute;
    top: 10px;
    width: 8px;
    height: 2px;
    background-color: #b22222;
    transition: transform .25s ease;
}
.faq-item__icon:before {
    left: 0;
    transform: rotate(45deg);
}
.faq-item__icon:after {
    right: 0;
    transform: rotate(-45deg);
}
.faq-item.is-open .faq-item__icon:before {
    transform: rotate(-45deg);
}
.faq-item.is-open .faq-item__icon:after {
    transform: rotate(45deg);
}
.faq-item__panel {
    padding: 0 2px;
}
.faq-item__answer {
    padding: 0 40px 18px 2px;
}
/* collapsed state only once moon.js took over (no-JS = everything open) */
.faq-accordion.is-enhanced .faq-item__panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
}
.faq-accordion.is-enhanced .faq-item.is-open > .faq-item__panel {
    max-height: 2000px;
}
@media (max-width: 767px) {
    .faq-item__toggle { font-size: 14px; }
    .faq-item__answer { padding-right: 0; }
}

/* ================================================================== *
 * 14. CONTACT PAGE (/kontakt)
 *     Same frame as the text pages (section 13: wide 1200px variant,
 *     24px/16px gutter, breadcrumb inside the frame, red-underlined
 *     h1, 15px body) plus three page-specific blocks: the two location
 *     cards with their map, the section header (h2 + red accent, same
 *     type as a text-page h2) and the form grid.
 *     Markup: templates/contact.php.
 *     The legacy Magento contact CSS is all scoped to the body class
 *     `.contact-index-index` (min-width:600px on the form, green
 *     button, extra 15px paddings) – this page deliberately no longer
 *     carries that class, so nothing below has to fight !important.
 * ================================================================== */

/* ---- 14.1 location cards ---- */
.contact-locations {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 0 0 44px;
}
.contact-card {
    display: flex;
    flex-direction: column;
    padding: 22px 24px 24px;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
    background: #fff;
}
.contact-card__header,
.contact-section__header {
    position: relative;
    margin: 0 0 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid #e6e6e6;
}
.contact-card__header:after,
.contact-section__header:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 50px;
    height: 2px;
    background-color: #b22222;
}
/* #maincontent beats the theme's `.cms-page-view #maincontent h2 {font-size:24px}` –
   same 19px token as a text-page h2 (13.3) */
#maincontent h2.contact-card__title,
#maincontent h2.contact-section__title {
    margin: 0;
    font-family: "Rubik", sans-serif;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.35;
    color: #222;
}
.contact-card__subtitle,
.contact-section__subline {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #777;
}
.contact-card__address {
    margin: 0 0 16px;
    font-size: 15px;
    font-style: normal;
    line-height: 1.7;
    color: #777;
}
.contact-card__lines {
    display: grid;
    grid-template-columns: minmax(58px, auto) minmax(0, 1fr);
    gap: 2px 14px;
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.7;
}
.contact-card__lines dt {
    margin: 0;
    font-weight: 400;
    color: #777;
}
.contact-card__lines dd {
    margin: 0;
    color: #222;
    overflow-wrap: anywhere;
}
.contact-card__lines a:hover {
    text-decoration: underline;
}
.contact-card__map {
    margin-top: auto;           /* both maps sit flush at the card bottom */
    border-radius: 3px;
    overflow: hidden;
    background: #f4f4f4;
}
.contact-card__map iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 320px;
    border: 0;
}

/* ---- 14.2 form section ---- */
.contact-section__header {
    margin-bottom: 20px;
}
.contact-form__intro {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.7;
    color: #777;
}
.contact-form__intro p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.7;
}
.contact-form__intro > :last-child {
    margin-bottom: 0;
}

/* ---- 14.3 form grid + fields ---- */
.text-page--contact .form.contact {
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0;
}
.text-page--contact .form.contact .fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    letter-spacing: normal;
}
.contact-form__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 20px;
}
.contact-form__grid > .field {
    min-width: 0;
    margin: 0;
}
.contact-form__wide {
    grid-column: 1 / -1;
}
.text-page--contact .form.contact .label {
    display: block;
    float: none;
    width: auto;
    margin: 0 0 6px;
    padding: 0;
    font-family: "Rubik", sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    color: #222;
}
.text-page--contact .form.contact .field.required > .label > span:after {
    content: "*";
    margin-left: 3px;
    color: #b22222;
}
.text-page--contact .form.contact .control {
    width: 100%;
}
.text-page--contact .form.contact .input-text {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
    background: #fff;
    box-shadow: none;
    font-family: "Poppins", "Rubik", sans-serif;
    font-size: 14px;
    line-height: 42px;
    color: #222;
    transition: border-color .2s ease;
}
.text-page--contact .form.contact textarea.input-text {
    height: auto;
    min-height: 160px;
    padding: 12px 14px;
    line-height: 1.7;
    resize: vertical;
}
.text-page--contact .form.contact .input-text:focus {
    border-color: #b22222;
    outline: 0;
    box-shadow: none;
}
.text-page--contact .form.contact .input-text::placeholder {
    color: #aaa;
}
.contact-form__actions {
    margin: 24px 0 0;
    text-align: right;
}
/* the theme floats `.actions-toolbar .primary` left – undo, so text-align wins */
.contact-form__actions .primary {
    float: none;
    display: inline-block;
}
/* beats themes.css `.contact-index-index .columns .form.contact .action.primary`
   for any page that still carries the legacy body class */
.text-page--contact .contact-form__actions button.action.submit.primary {
    height: 46px;
    min-width: 220px;
    margin: 0;
    padding: 0 34px;
    border: 0;
    border-radius: 30px;
    font-family: "Rubik", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 46px;
    letter-spacing: .02em;
    text-transform: uppercase;
    cursor: pointer;
}

/* ---- 14.4 mobile ---- */
@media (max-width: 991px) {
    .contact-locations {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        margin-bottom: 34px;
    }
}
@media (max-width: 767px) {
    .contact-card {
        padding: 18px 16px 18px;
    }
    .contact-form__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .contact-form__actions {
        margin-top: 20px;
        text-align: left;
    }
    .contact-form__actions .primary {
        float: none;
        display: block;
    }
    .text-page--contact .contact-form__actions button.action.submit.primary {
        width: 100%;
        min-width: 0;
        padding: 0 20px;
    }
}

/* ================================================================== *
 * 15. Skip link (SEO/a11y pass) — visually hidden until focused, then
 *     pinned top-left above the header so keyboard users can jump
 *     straight to #maincontent.
 * ================================================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    z-index: 10000;
    padding: 10px 18px;
    background: #fff;
    color: #222;
    font-family: "Rubik", sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e6e6e6;
    border-radius: 0 0 4px 0;
    transition: top 0.15s ease;
}
.skip-link:focus {
    top: 0;
    outline: 2px solid #b22222;
    outline-offset: -2px;
}

/* ================================================================== *
 * 16. MOBILE FILTER PANEL (Kategorie / "Alle" / Suche, < 768px)
 *
 *     Ursache (Legacy): themes.css (minifiziert, Zeile 7 / Offset 84616)
 *     im Block `@media (max-width:767px)`
 *         .page-products .columns { display:flex;
 *                                   flex-direction:column-reverse }
 *     kippt die zweispaltige Liste in einen umgekehrten Stapel: die
 *     Sidebar-Spalte steht im DOM zuerst und wird darum ZULETZT gemalt.
 *     Gemessen auf /damen bei 390px (Chrome, mobile emulation):
 *     Produktliste bei y=596 (6988px hoch), Filterblock erst bei
 *     y=7584 eines 9547px hohen Dokuments – also unter dem gesamten
 *     Raster inkl. Pagination. §7 oben setzt auf
 *     `.page-main > .columns.layout-2-col` nur `display` und
 *     `flex-wrap`, nie `flex-direction` – die Legacy-Regel blieb also
 *     unwidersprochen.
 *
 *     Fix: unter 768px verlässt der Block den Fluss und wird zum
 *     Off-Canvas-Panel, geöffnet über den Button, den category.php /
 *     products.php / search.php über der Toolbar rendern (moon.js §11).
 *     Ohne JS fehlt `body.moon-filter-ready`, dann bleibt alles im
 *     normalen Fluss und nichts ist versteckt.
 *
 *     Spezifität (Legacy gewinnt in diesem Projekt oft):
 *       #layered-ajax-filter-block             = (1,0,0)  schlägt
 *         `.sidebar .block.filter` (0,3,0) und `.block.filter` (0,2,0)
 *       body.moon-filter-ready #layered-…      = (1,1,1)
 *       #maincontent .moon-filter-toggle       = (1,1,0)  schlägt die
 *         Bare-Button-Pillen des Themes (vgl. §13.6)
 *     `!important` nur dort, wo custom_default.css:21 selbst `!important`
 *     auf einem nackten `button`-Selektor setzt (Farbe/Rahmen, s. 16.1);
 *     alles andere gewinnt regulär über die Spezifität.
 * ================================================================== */

/* Desktop: Button und Panel-Kopf existieren im Markup, sind aber aus. */
#maincontent .moon-filter-toggle {
    display: none;
}
#layered-ajax-filter-block .moon-filter-panel__head {
    display: none;
}

@media (max-width: 767px) {

    /* ---- 16.1 Button über der Toolbar ----
       custom_default.css:21 (die im Magento-Backend gepflegte Custom-CSS-
       Datei) setzt `button{background-color:#B22222!important;
       border-color:#B22222!important;color:#FFFFFF!important}` – ein
       nacktes Element-Selektor-!important, das jede Klassenregel ohne
       !important schlägt. Farbe/Rahmen darum ebenfalls mit !important;
       der Rest (Layout, Grösse, Typo) gewinnt regulär über (1,2,0)
       gegen `button` (0,0,1) und `body button` (0,0,2). */
    body.moon-filter-ready #maincontent .moon-filter-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 46px;
        margin: 0 0 16px;
        padding: 0 18px;
        border: 1px solid #b22222 !important;
        border-radius: 30px;
        background-color: #b22222 !important;
        color: #fff !important;
        font-family: "Rubik", sans-serif;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.2;
        text-align: left;
        text-transform: none;
        cursor: pointer;
    }
    body.moon-filter-ready #maincontent .moon-filter-toggle::before {
        content: "";
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1.5 3.5h13M4 8h8M6.5 12.5h3'/%3E%3C/svg%3E") no-repeat center / 18px 18px;
    }
    body.moon-filter-ready #maincontent .moon-filter-toggle .moon-filter-toggle__label {
        flex: 1 1 auto;
    }
    body.moon-filter-ready #maincontent .moon-filter-toggle .moon-filter-toggle__count {
        flex: 0 0 auto;
        min-width: 22px;
        padding: 2px 8px;
        border-radius: 11px;
        background: #fff;
        color: #b22222;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.5;
        text-align: center;
    }
    body.moon-filter-ready #maincontent .moon-filter-toggle:focus-visible {
        outline: 2px solid #222;
        outline-offset: 2px;
    }

    /* ---- 16.2 Filterblock als Off-Canvas-Panel ---- */
    body.moon-filter-ready #layered-ajax-filter-block {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        /* themes.css gibt `header#header` z-index:9998 – darüber, sonst
           liegt der Kopf des Panels (inkl. Schliessen-Button) unter der
           Kopfzeile und ist nicht antippbar. */
        z-index: 10002;
        width: 86%;
        max-width: 340px;
        margin: 0;
        padding: 0 16px 28px;
        background: #fff;
        box-shadow: 0 0 28px rgba(0, 0, 0, .3);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform .25s ease, visibility .25s ease;
    }
    body.moon-filter-ready.moon-filter-open #layered-ajax-filter-block {
        visibility: visible;
        transform: none;
    }

    /* Panel-Kopf (Titel + Schliessen), klebt beim Scrollen oben */
    body.moon-filter-ready #layered-ajax-filter-block .moon-filter-panel__head {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 1;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0 -16px 10px;
        padding: 14px 16px;
        background: #fff;
        border-bottom: 1px solid #e6e6e6;
    }
    body.moon-filter-ready #layered-ajax-filter-block .moon-filter-panel__title {
        font-family: "Rubik", sans-serif;
        font-size: 17px;
        font-weight: 500;
        color: #222;
    }
    body.moon-filter-ready #layered-ajax-filter-block .moon-filter-panel__close {
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        padding: 0;
        /* s. 16.1: custom_default.css:21 färbt jeden <button> rot – hier
           wollen wir einen neutralen Schliessen-Kreis. */
        border: 1px solid #e6e6e6 !important;
        border-radius: 50%;
        background-color: #fff !important;
        color: #222 !important;
        font-size: 22px;
        line-height: 38px;
        text-align: center;
        cursor: pointer;
    }
    body.moon-filter-ready #layered-ajax-filter-block .moon-filter-panel__close:focus-visible {
        outline: 2px solid #b22222;
        outline-offset: 2px;
    }

    /* die (nun leere) Sidebar-Spalte darf keinen Platz mehr fressen */
    body.moon-filter-ready.page-products .sidebar.sidebar-main-1 {
        padding: 0;
    }

    /* ---- 16.3 Abdunkelung + Scroll-Lock ----
       styles-m.css setzt `.page-products .columns{position:relative;z-index:1}`
       (0,2,0) – das ist ein eigener Stacking Context, in dem das Panel mit
       z-index:10002 gefangen wäre und unter der Abdunkelung (10001) läge.
       `z-index:auto` hebt den Context auf, `position:relative` bleibt.
       Achtung: `.page-products` sitzt auf <body> selbst – darum ohne
       Leerzeichen verkettet. Selektor (0,3,0) + spätere Datei schlägt
       die Legacy-Regel (0,2,0). */
    body.moon-filter-ready.page-products .columns {
        z-index: auto;
    }
    body.moon-filter-open::before {
        content: "";
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 10001;
        background: rgba(0, 0, 0, .45);
    }
    body.moon-filter-open {
        overflow: hidden;
    }
}

/* ================================================================== *
 * 17. MOBILE COOKIE-HINWEIS (< 768px) — er begrub die Galerie
 *
 *     Ursache des gemeldeten "2. und 3. Galerie-Thumbnail rendern leer":
 *     nicht die Bilder. Gemessen auf
 *     /produkte/lyon-n1755-c9885-taupe bei 390x844 (Erstbesuch, leerer
 *     localStorage): `#cookieinfo` ist position:fixed, z-index:1000 und
 *     175px hoch, 20px über dem unteren Rand → Rechteck
 *     (20, 650, 370, 175). Der Thumbnail-Streifen liegt bei
 *     (10, 621, 370, 88); `document.elementFromPoint()` lieferte in der
 *     Mitte JEDES Thumbnails den Cookie-Kasten statt des Thumbnails –
 *     die Bilder waren also weder sichtbar noch antippbar. Das erste
 *     Thumbnail wirkte trotzdem "richtig", weil in seinem sichtbaren
 *     29px-Streifen das Portemonnaie liegt; Foto 2 und 3 sind oben weiss
 *     und sahen darum wie leere Rahmen aus.
 *     (Geprüft und ausgeschlossen: kein Legacy-Selektor trifft
 *     `.moon-gallery__thumb(s)` in einer Media Query, alle Thumbnails
 *     liefern HTTP 200, und `img.complete === true` /
 *     `naturalWidth === 110` für jedes Thumbnail bei 390px – auch mit
 *     loading="lazy".)
 *
 *     Fix: auf Telefonen ein flaches Bottom-Sheet bündig am unteren
 *     Rand (rund halbe Höhe) statt der schwebenden Karte. Desktop
 *     unverändert – alles steht in der Media Query.
 * ================================================================== */
@media (max-width: 767px) {
    #cookieinfo {
        left: 0;
        right: 0;
        bottom: 0;
        max-width: none;
        padding: 12px 14px;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -2px 18px rgba(178, 34, 34, .30);
    }
    #cookieinfo.is-visible {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 12px;
    }
    #cookieinfo h4 {
        flex: 1 1 100%;
        margin: 0;
        font-size: 14px;
    }
    #cookieinfo p {
        flex: 1 1 55%;
        margin: 0;
        font-size: 12px;
        line-height: 1.4;
    }
    #cookieinfo .cookieinfo-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }
    #cookieinfo #cookiebutton {
        padding: 9px 26px;
        font-size: 13px;
    }

    /* Thumbnail-Streifen: auf sehr schmalen Geräten (<350px) passten
       3x88px + 2x10px Gap nicht mehr in die Spalte – deckeln statt
       umbrechen lassen, damit immer drei nebeneinander stehen. */
    .catalog-product-view .moon-gallery__thumb {
        max-width: calc((100% - 20px) / 3);
    }
}

/* ================================================================== *
 * 18. Shared pill button `.moon-btn` – same look as the contact submit
 *     (red #b22222, 46px, uppercase Rubik 12/500). Used on the 404 page and
 *     for the cookie notice OK. Selectors carry `a`/`button` + `#maincontent`
 *     or `#cookieinfo` so they beat the legacy element rules
 *     (`button{height:40px;…}`, `.button,button{border-radius:30px;…}`).
 * ================================================================== */
#maincontent a.moon-btn,
#maincontent button.moon-btn,
#cookieinfo button#cookiebutton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 46px;
    min-width: 0;
    margin: 0;
    padding: 0 30px;
    border: 0;
    border-radius: 30px;
    background: #b22222;
    color: #fff;
    font-family: "Rubik", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .2s ease;
}
/* the legacy theme colours links inside `.column.main` red via a longer
   selector chain – the label would vanish on the red pill */
#maincontent a.moon-btn,
#maincontent a.moon-btn:visited,
#maincontent a.moon-btn:hover,
#maincontent a.moon-btn:focus {
    color: #fff !important;
}
#maincontent a.moon-btn:hover,
#maincontent a.moon-btn:focus,
#maincontent button.moon-btn:hover,
#maincontent button.moon-btn:focus,
#cookieinfo button#cookiebutton:hover,
#cookieinfo button#cookiebutton:focus {
    background: #8e1b1b;
    color: #fff;
    text-decoration: none;
}
#maincontent button.moon-btn--outline {
    background: #fff;
    color: #b22222;
    box-shadow: inset 0 0 0 1px #b22222;
}
#maincontent button.moon-btn--outline:hover,
#maincontent button.moon-btn--outline:focus {
    background: #b22222;
    color: #fff;
}
/* cookie OK: smaller than the page buttons */
#cookieinfo button#cookiebutton {
    height: 38px;
    padding: 0 26px;
}

/* ================================================================== *
 * 19. 404 page (templates/error.php) – text-page frame + actions row
 * ================================================================== */
.text-page--error .error-page__text {
    max-width: 640px;
}
.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    margin-top: 28px;
}
.error-page__search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 320px;
    max-width: 480px;
}
#maincontent .error-page__search input.input-text {
    flex: 1 1 auto;
    height: 46px;
    min-width: 0;
    padding: 0 18px;
    border: 1px solid #e6e6e6;
    border-radius: 30px;
    font-size: 13px;
    box-shadow: none;
}
#maincontent .error-page__search input.input-text:focus {
    border-color: #b22222;
    outline: none;
}
@media (max-width: 767px) {
    .error-page__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .error-page__search {
        flex: 0 0 auto;      /* column direction: the 320px basis would become height */
        width: 100%;
        max-width: none;
    }
    .error-page__search input.input-text {
        min-width: 0;
    }
    #maincontent a.moon-btn {
        justify-content: center;
    }
}
