/* ===========================================
   HISTORICUM GLOBAL LAYOUT GUARD
   Loaded last. No page or component may create horizontal document overflow.
   Decorative full-bleed sections must clip on the X axis inside their own frame.
   =========================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    position: relative;
}

#page,
.site,
.site-content,
#content,
.content-area,
.entry-content,
#main,
.site-main,
.content-wrapper,
.page-wrap,
.historicum-homepage,
.h-page-wrapper,
.h-static-page,
.h-ref-page,
.h-shop-page,
.h-product-page,
.woocommerce,
.woocommerce-page {
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

.h-hero-diagonal-bands,
.diagonal-bands,
.diagonal-band-wrap {
    max-width: 100%;
    overflow: hidden !important;
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    html,
    body {
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        touch-action: auto !important;
    }

    #page,
    .site,
    .site-content,
    #content,
    .content-area,
    .entry-content,
    #main,
    .site-main,
    .content-wrapper,
    .page-wrap,
    .historicum-homepage,
    .h-page-wrapper,
    .h-static-page,
    .h-ref-page,
    .h-shop-page,
    .h-product-page,
    .woocommerce,
    .woocommerce-page,
    #historicum-home {
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    .h-bs-carousel,
    .historicum-product-review-viewport,
    .h-testimonials-viewport,
    .carousel-container {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-ws-viewport,
    .h-ss-viewport {
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-testimonials-track,
    .h-sponsors-track {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-blog-track {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-shop-fighter-carousel {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-bs-carousel.is-dragging,
    .h-shop-fighter-carousel.is-dragging,
    .h-ws-viewport.is-dragging,
    .h-ss-viewport.is-dragging,
    .h-blog-track.is-dragging,
    .historicum-product-review-viewport.is-dragging,
    .h-testimonials-carousel.is-dragging .h-testimonials-viewport,
    .h-testimonials-track.is-dragging,
    .h-sponsors-track.is-dragging,
    .carousel-track.is-dragging,
    .carousel-container.is-dragging {
        cursor: grabbing;
    }
}

/* Shop mobile guard baseline; final overrides live at the end of this file. */
@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page,
    body.historicum-shop-page #page,
    body.historicum-shop-page .site,
    body.historicum-shop-page .site-content,
    body.historicum-shop-page #content,
    body.historicum-shop-page .content-area,
    body.historicum-shop-page #main,
    body.historicum-shop-page .site-main,
    body.historicum-shop-page .woocommerce,
    body.historicum-shop-page .woocommerce-page,
    body.historicum-shop-page .h-shop-page,
    body.historicum-shop-page .h-shop-paper-stack,
    body.historicum-shop-page .h-shop-paper-layout,
    body.historicum-shop-page .h-shop-sections-column,
    body.historicum-shop-page .h-paper-section,
    body.historicum-shop-page .h-paper-content,
    body.historicum-shop-page .h-shop-section-main,
    body.historicum-shop-page .h-shop-section-body,
    body.historicum-shop-page .h-shop-grid-col,
    body.historicum-shop-page .h-shop-section-carousel {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    @supports (overflow: clip) {
        body.historicum-shop-page,
        body.historicum-shop-page #page,
        body.historicum-shop-page .site,
        body.historicum-shop-page .site-content,
        body.historicum-shop-page #content,
        body.historicum-shop-page .content-area,
        body.historicum-shop-page #main,
        body.historicum-shop-page .site-main,
        body.historicum-shop-page .woocommerce,
        body.historicum-shop-page .woocommerce-page,
        body.historicum-shop-page .h-shop-page,
        body.historicum-shop-page .h-shop-paper-stack,
        body.historicum-shop-page .h-shop-paper-layout,
        body.historicum-shop-page .h-shop-sections-column,
        body.historicum-shop-page .h-paper-section,
        body.historicum-shop-page .h-paper-content,
        body.historicum-shop-page .h-shop-section-main,
        body.historicum-shop-page .h-shop-section-body,
        body.historicum-shop-page .h-shop-grid-col,
        body.historicum-shop-page .h-shop-section-carousel {
            overflow-x: clip !important;
        }
    }

    body.historicum-shop-page .h-shop-mobile-widgets {
        --h-shop-mobile-widget-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-mobile-widget-paper,
    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after {
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel,
    body.historicum-shop-page .h-shop-section-carousel,
    body.historicum-shop-page .h-ss-viewport {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-section-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-ss-viewport::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

/* Shop mobile final guard: no sideways scrollbar, widget/rip use the same flat paper. */
@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page,
    body.historicum-shop-page #page,
    body.historicum-shop-page .site,
    body.historicum-shop-page .site-content,
    body.historicum-shop-page #content,
    body.historicum-shop-page .content-area,
    body.historicum-shop-page #main,
    body.historicum-shop-page .site-main,
    body.historicum-shop-page .woocommerce,
    body.historicum-shop-page .woocommerce-page,
    body.historicum-shop-page .h-shop-page,
    body.historicum-shop-page .h-shop-paper-stack,
    body.historicum-shop-page .h-shop-paper-layout,
    body.historicum-shop-page .h-shop-sections-column,
    body.historicum-shop-page .h-paper-section,
    body.historicum-shop-page .h-paper-content,
    body.historicum-shop-page .h-shop-section-main,
    body.historicum-shop-page .h-shop-section-body,
    body.historicum-shop-page .h-shop-grid-col,
    body.historicum-shop-page .h-shop-section-carousel {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    @supports (overflow: clip) {
        body.historicum-shop-page,
        body.historicum-shop-page #page,
        body.historicum-shop-page .site,
        body.historicum-shop-page .site-content,
        body.historicum-shop-page #content,
        body.historicum-shop-page .content-area,
        body.historicum-shop-page #main,
        body.historicum-shop-page .site-main,
        body.historicum-shop-page .woocommerce,
        body.historicum-shop-page .woocommerce-page,
        body.historicum-shop-page .h-shop-page,
        body.historicum-shop-page .h-shop-paper-stack,
        body.historicum-shop-page .h-shop-paper-layout,
        body.historicum-shop-page .h-shop-sections-column,
        body.historicum-shop-page .h-paper-section,
        body.historicum-shop-page .h-paper-content,
        body.historicum-shop-page .h-shop-section-main,
        body.historicum-shop-page .h-shop-section-body,
        body.historicum-shop-page .h-shop-grid-col,
        body.historicum-shop-page .h-shop-section-carousel {
            overflow-x: clip !important;
        }
    }

    body.historicum-shop-page .h-shop-mobile-widgets {
        --h-shop-mobile-widget-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-mobile-widget-paper,
    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after {
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel {
        scrollbar-width: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    .h-sponsors-track {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    /* Mobile torn-paper contract: wider rip artwork prevents the paper edge from looking squeezed on narrow screens. */
    .h-torn-edge-top,
    .h-torn-edge-bottom {
        background-size: 273% 100% !important;
        background-position: center center !important;
        -webkit-mask-size: 230% 100% !important;
        mask-size: 230% 100% !important;
    }

    .h-torn-top::after,
    .h-torn-bottom::after,
    body.historicum-shop-page .h-torn-top::after,
    body.historicum-shop-page .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-mobile-widgets .h-torn-bottom::after,
    .h-commerce-paper-section > .h-torn-top::after,
    .h-commerce-paper-section > .h-torn-bottom::after,
    .h-ref-page .h-torn-top::after,
    .h-ref-page .h-torn-bottom::after,
    body.historicum-training-page .h-ref-page .h-ref-paper-section .h-torn-top::after,
    body.historicum-training-page .h-ref-page .h-ref-paper-section .h-torn-bottom::after,
    body.historicum-community-page .h-ref-page .h-ref-paper-section .h-torn-top::after,
    body.historicum-community-page .h-ref-page .h-ref-paper-section .h-torn-bottom::after,
    body.single-product .historicum-product-shell::before,
    body.single-product .historicum-product-shell::after {
        -webkit-mask-size: 323% 100% !important;
        mask-size: 323% 100% !important;
    }
}

@media (min-width: 1400px) and (hover: hover) and (pointer: fine) {
    @supports (overflow: clip) {
        html,
        body,
        #page,
        .site,
        .site-content,
        #content,
        .content-area,
        .entry-content,
        #main,
        .site-main,
        .content-wrapper,
        .page-wrap,
        .historicum-homepage,
        .h-page-wrapper,
        .h-static-page,
        .h-ref-page,
        .h-shop-page,
        .h-product-page,
        .woocommerce,
        .woocommerce-page {
            overflow-x: clip !important;
        }
    }
}

/* Global light-paper edge shading.
   Keep the cream center intact, darken only the outer edges, and paint rip masks with the same surface. */
:root {
    --h-paper-edge-shade: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(0, 0, 0, 0.065) 9%,
        rgba(0, 0, 0, 0.025) 20%,
        rgba(0, 0, 0, 0) 35%,
        rgba(0, 0, 0, 0) 65%,
        rgba(0, 0, 0, 0.025) 80%,
        rgba(0, 0, 0, 0.065) 91%,
        rgba(0, 0, 0, 0.10) 100%
    );
    --h-paper-side-gradient: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.22) 0%,
        rgba(0, 0, 0, 0.15) 8%,
        rgba(0, 0, 0, 0.07) 20%,
        rgba(0, 0, 0, 0) 34%,
        rgba(0, 0, 0, 0) 66%,
        rgba(0, 0, 0, 0.07) 80%,
        rgba(0, 0, 0, 0.15) 92%,
        rgba(0, 0, 0, 0.22) 100%
    );
    --h-unified-paper-surface:
        var(--h-paper-side-gradient),
        var(--h-paper, #f5f0e6);
}

#historicum-home .h-section-paper,
.h-paper-content,
.h-paper-content.h-commerce-paper,
.h-ref-page .h-rip-paper-inner,
.h-ref-page .paper-section,
.h-ref-page .policy-paper,
.h-ref-page .account-paper,
body.historicum-checkout-page .h-checkout-policy-paper,
body.historicum-checkout-page .h-checkout-flow-paper,
body.historicum-contact-page .h-contact-modern-paper,
body.historicum-contact-page .h-contact-modern-section .h-paper-content,
body.historicum-collaborations-page .h-contact-modern-paper,
body.historicum-collaborations-page .h-contact-modern-section .h-paper-content,
body.single-product .historicum-product-shell,
body.single-product .historicum-product-paper {
    background-color: var(--h-paper, var(--hp-paper, #f5f0e6)) !important;
    background-image: var(--h-paper-edge-shade) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

#historicum-home .h-torn-edge-top,
#historicum-home .h-torn-edge-bottom {
    background-color: var(--h-paper, #f5f0e6) !important;
    background-image: var(--h-paper-edge-shade) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

.h-torn-top::before,
.h-torn-top::after,
.h-torn-bottom::before,
.h-torn-bottom::after,
.h-ref-page .h-torn-top::before,
.h-ref-page .h-torn-top::after,
.h-ref-page .h-torn-bottom::before,
.h-ref-page .h-torn-bottom::after,
.h-commerce-paper-section > .h-torn-top::before,
.h-commerce-paper-section > .h-torn-top::after,
.h-commerce-paper-section > .h-torn-bottom::before,
.h-commerce-paper-section > .h-torn-bottom::after,
.h-paper-content.h-commerce-paper > .h-torn-top::before,
.h-paper-content.h-commerce-paper > .h-torn-top::after,
.h-paper-content.h-commerce-paper > .h-torn-bottom::before,
.h-paper-content.h-commerce-paper > .h-torn-bottom::after,
body.historicum-contact-page .h-contact-modern-section .h-torn-top::before,
body.historicum-contact-page .h-contact-modern-section .h-torn-top::after,
body.historicum-contact-page .h-contact-modern-section .h-torn-bottom::before,
body.historicum-contact-page .h-contact-modern-section .h-torn-bottom::after {
    background-color: var(--h-paper, #f5f0e6) !important;
    background-image: var(--h-paper-edge-shade) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

body.single-product .historicum-product-shell::before,
body.single-product .historicum-product-shell::after {
    background-color: var(--hp-paper, #f5f0e6) !important;
    background-image: var(--h-paper-edge-shade) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

/* Contact paper seam fix: overlap the bottom torn strip with the paper body by 2px.
   Without this, the masked rip's transparent pixels can reveal the black page background. */
body.historicum-contact-page .h-contact-modern-section .h-torn-bottom {
    margin-top: -2px !important;
}

/* Final popup form color: Fluent Forms ships blue button defaults, so lock the
   mailing-list popup back to the original Historicum accent button. */
.h-newsletter-popup .fluentform .ff-btn,
.h-newsletter-popup .fluentform .ff-btn-submit,
.h-newsletter-popup .fluentform .ff-btn-primary,
.h-newsletter-popup .fluentform button[type="submit"],
.h-newsletter-popup .fluentform input[type="submit"],
.h-newsletter-popup .frm-fluent-form .ff-btn,
.h-newsletter-popup .frm-fluent-form .ff-btn-submit,
.h-newsletter-popup .frm-fluent-form .ff-btn-primary,
.h-newsletter-popup .frm-fluent-form button[type="submit"],
.h-newsletter-popup .frm-fluent-form input[type="submit"] {
    border-color: var(--h-accent, #ebbc00) !important;
    background: var(--h-accent, #ebbc00) !important;
    background-color: var(--h-accent, #ebbc00) !important;
    color: #070705 !important;
    box-shadow: none !important;
}

.h-newsletter-popup .fluentform .ff-btn:hover,
.h-newsletter-popup .fluentform .ff-btn-submit:hover,
.h-newsletter-popup .fluentform .ff-btn-primary:hover,
.h-newsletter-popup .fluentform button[type="submit"]:hover,
.h-newsletter-popup .fluentform input[type="submit"]:hover,
.h-newsletter-popup .frm-fluent-form .ff-btn:hover,
.h-newsletter-popup .frm-fluent-form .ff-btn-submit:hover,
.h-newsletter-popup .frm-fluent-form .ff-btn-primary:hover,
.h-newsletter-popup .frm-fluent-form button[type="submit"]:hover,
.h-newsletter-popup .frm-fluent-form input[type="submit"]:hover {
    border-color: #111111 !important;
    background: #111111 !important;
    background-color: #111111 !important;
    color: #ffffff !important;
}

/* Social and Collaborations use one paper surface across the body and both rips.
   This opts them out of older page-specific rip gradients that split top/body/bottom. */
body.historicum-social-page {
    --h-social-paper-surface: var(--h-unified-paper-surface);
}

body.historicum-social-page .h-ref-page .h-rip-paper-inner,
body.historicum-social-page .h-ref-page .platforms-section {
    background: var(--h-social-paper-surface) !important;
    background-blend-mode: normal !important;
}

body.historicum-social-page .h-ref-page .h-torn-top,
body.historicum-social-page .h-ref-page .h-torn-bottom {
    background: var(--h-social-paper-surface) !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-blend-mode: normal !important;
    clip-path: polygon(0 68%, 6% 62%, 12% 70%, 18% 64%, 24% 72%, 30% 66%, 36% 74%, 42% 68%, 48% 76%, 54% 70%, 60% 78%, 66% 71%, 72% 77%, 78% 69%, 84% 75%, 90% 67%, 96% 73%, 100% 70%, 100% 100%, 0 100%) !important;
    -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    -webkit-mask-repeat: no-repeat !important;
    -webkit-mask-size: 118% 100% !important;
    mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    mask-repeat: no-repeat !important;
    mask-size: 118% 100% !important;
}

body.historicum-social-page .h-ref-page .h-torn-top {
    transform: none !important;
    -webkit-mask-position: 48% bottom !important;
    mask-position: 48% bottom !important;
}

body.historicum-social-page .h-ref-page .h-torn-bottom {
    transform: scaleY(-1) !important;
    transform-origin: center !important;
    -webkit-mask-position: 52% top !important;
    mask-position: 52% top !important;
}

body.historicum-social-page .h-ref-page .h-torn-top::before,
body.historicum-social-page .h-ref-page .h-torn-top::after,
body.historicum-social-page .h-ref-page .h-torn-bottom::before,
body.historicum-social-page .h-ref-page .h-torn-bottom::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

body.historicum-collaborations-page {
    --h-collaboration-paper-surface: var(--h-unified-paper-surface);
}

body.historicum-collaborations-page .h-contact-modern-paper,
body.historicum-collaborations-page .h-contact-modern-section .h-paper-content {
    background: var(--h-collaboration-paper-surface) !important;
    background-blend-mode: normal !important;
}

body.historicum-collaborations-page .h-contact-modern-section .h-torn-top,
body.historicum-collaborations-page .h-contact-modern-section .h-torn-bottom {
    background: var(--h-collaboration-paper-surface) !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-blend-mode: normal !important;
    clip-path: polygon(0 68%, 6% 62%, 12% 70%, 18% 64%, 24% 72%, 30% 66%, 36% 74%, 42% 68%, 48% 76%, 54% 70%, 60% 78%, 66% 71%, 72% 77%, 78% 69%, 84% 75%, 90% 67%, 96% 73%, 100% 70%, 100% 100%, 0 100%) !important;
    -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    -webkit-mask-repeat: no-repeat !important;
    -webkit-mask-size: 118% 100% !important;
    mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    mask-repeat: no-repeat !important;
    mask-size: 118% 100% !important;
}

body.historicum-collaborations-page .h-contact-modern-section .h-torn-top {
    transform: none !important;
    -webkit-mask-position: 48% bottom !important;
    mask-position: 48% bottom !important;
}

body.historicum-collaborations-page .h-contact-modern-section .h-torn-bottom {
    transform: scaleY(-1) !important;
    transform-origin: center !important;
    -webkit-mask-position: 52% top !important;
    mask-position: 52% top !important;
}

body.historicum-collaborations-page .h-contact-modern-section .h-torn-top::before,
body.historicum-collaborations-page .h-contact-modern-section .h-torn-top::after,
body.historicum-collaborations-page .h-contact-modern-section .h-torn-bottom::before,
body.historicum-collaborations-page .h-contact-modern-section .h-torn-bottom::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* Optional second paper-rip variety: direct masked strip.
   This is the strong graphic edge accidentally created during the Social rip pass.
   Add h-rip-variety-cut-strip to a paper section when that sharper style is wanted. */
.h-rip-variety-cut-strip {
    --h-rip-variety-surface:
        var(
            --h-paper-edge-shade,
            linear-gradient(90deg, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.10))
        ),
        var(--h-paper, #f5f0e6);
}

body.historicum-shop-page .h-rip-variety-cut-strip {
    --h-rip-variety-surface: var(--h-shop-paper-surface);
}

.h-rip-variety-cut-strip > .h-torn-top,
.h-rip-variety-cut-strip > .h-torn-bottom,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-top,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-bottom,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
    background:
        var(
            --h-rip-variety-surface,
            var(--h-social-paper-surface, var(--h-collaboration-paper-surface, var(--h-paper, #f5f0e6)))
        ) !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-blend-mode: normal !important;
    clip-path: polygon(0 68%, 6% 62%, 12% 70%, 18% 64%, 24% 72%, 30% 66%, 36% 74%, 42% 68%, 48% 76%, 54% 70%, 60% 78%, 66% 71%, 72% 77%, 78% 69%, 84% 75%, 90% 67%, 96% 73%, 100% 70%, 100% 100%, 0 100%) !important;
    -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    -webkit-mask-repeat: no-repeat !important;
    -webkit-mask-size: 118% 100% !important;
    mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    mask-repeat: no-repeat !important;
    mask-size: 118% 100% !important;
}

.h-rip-variety-cut-strip > .h-torn-top,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-top,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top {
    transform: none !important;
    -webkit-mask-position: var(--h-rip-top-offset, var(--h-rip-offset, 48%)) bottom !important;
    mask-position: var(--h-rip-top-offset, var(--h-rip-offset, 48%)) bottom !important;
}

.h-rip-variety-cut-strip > .h-torn-bottom,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-bottom,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
    transform: scaleY(-1) !important;
    transform-origin: center !important;
    -webkit-mask-position: var(--h-rip-bottom-offset, var(--h-rip-offset, 52%)) top !important;
    mask-position: var(--h-rip-bottom-offset, var(--h-rip-offset, 52%)) top !important;
}

.h-rip-variety-cut-strip > .h-torn-top::before,
.h-rip-variety-cut-strip > .h-torn-top::after,
.h-rip-variety-cut-strip > .h-torn-bottom::before,
.h-rip-variety-cut-strip > .h-torn-bottom::after,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-top::before,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-top::after,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-bottom::before,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-bottom::after,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top::before,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top::after,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom::before,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom::after,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom::before,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom::after {
    content: none !important;
    display: none !important;
}

body.historicum-cart-page,
body.historicum-checkout-page,
body.woocommerce-cart,
body.woocommerce-checkout {
    --h-commerce-paper-surface: var(--h-unified-paper-surface);
    --h-commerce-rip-height: 62px;
    --h-commerce-rip-overlap: 2px;
}

body.historicum-shop-page {
    --h-shop-paper-surface:
        var(--h-paper-edge-shade),
        var(--h-paper-flat, var(--h-paper, #f5f0e6));
}

body.historicum-shop-page .h-paper-content,
body.historicum-shop-page .h-shop-section-main,
body.historicum-shop-page .h-shop-widget,
body.historicum-shop-page .h-shop-mobile-widget-content {
    background: var(--h-shop-paper-surface) !important;
    background-color: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

body.historicum-cart-page .h-paper-content.h-commerce-paper,
body.historicum-checkout-page .h-paper-content.h-commerce-paper,
body.historicum-checkout-page .h-checkout-policy-paper,
body.historicum-checkout-page .h-checkout-flow-paper,
body.woocommerce-cart .h-paper-content.h-commerce-paper,
body.woocommerce-checkout .h-paper-content.h-commerce-paper {
    background: var(--h-commerce-paper-surface) !important;
    background-color: var(--h-paper, #f5f0e6) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: normal !important;
}

body.historicum-cart-page .h-paper-section > .h-torn-top,
body.historicum-cart-page .h-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom,
body.woocommerce-cart .h-paper-section > .h-torn-top,
body.woocommerce-cart .h-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom {
    background: var(--h-commerce-paper-surface) !important;
    background-color: var(--h-paper, #f5f0e6) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: normal !important;
    clip-path: polygon(0 68%, 6% 62%, 12% 70%, 18% 64%, 24% 72%, 30% 66%, 36% 74%, 42% 68%, 48% 76%, 54% 70%, 60% 78%, 66% 71%, 72% 77%, 78% 69%, 84% 75%, 90% 67%, 96% 73%, 100% 70%, 100% 100%, 0 100%) !important;
    -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    -webkit-mask-repeat: no-repeat !important;
    -webkit-mask-size: 118% 100% !important;
    mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    mask-repeat: no-repeat !important;
    mask-size: 118% 100% !important;
}

body.historicum-cart-page .h-paper-section > .h-torn-top,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top,
body.woocommerce-cart .h-paper-section > .h-torn-top,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top {
    transform: none !important;
    -webkit-mask-position: 48% bottom !important;
    mask-position: 48% bottom !important;
}

body.historicum-cart-page .h-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom,
body.woocommerce-cart .h-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom {
    transform: scaleY(-1) !important;
    transform-origin: center !important;
    -webkit-mask-position: 52% top !important;
    mask-position: 52% top !important;
}

body.historicum-cart-page .h-paper-section > .h-torn-top::before,
body.historicum-cart-page .h-paper-section > .h-torn-top::after,
body.historicum-cart-page .h-paper-section > .h-torn-bottom::before,
body.historicum-cart-page .h-paper-section > .h-torn-bottom::after,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top::before,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top::after,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom::before,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom::after,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top::before,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top::after,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom::before,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom::after,
body.woocommerce-cart .h-paper-section > .h-torn-top::before,
body.woocommerce-cart .h-paper-section > .h-torn-top::after,
body.woocommerce-cart .h-paper-section > .h-torn-bottom::before,
body.woocommerce-cart .h-paper-section > .h-torn-bottom::after,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top::before,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top::after,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom::before,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom::after,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top::before,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top::after,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom::before,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

body.historicum-cart-page .h-commerce-paper-section > .h-torn-top,
body.historicum-cart-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-cart .h-commerce-paper-section > .h-torn-top,
body.woocommerce-cart .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom {
    height: var(--h-commerce-rip-height) !important;
}

body.historicum-cart-page .h-commerce-paper-section > .h-torn-top,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top,
body.woocommerce-cart .h-commerce-paper-section > .h-torn-top,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top {
    top: calc((var(--h-commerce-rip-height) - var(--h-commerce-rip-overlap)) * -1) !important;
}

body.historicum-cart-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-cart .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom {
    bottom: calc((var(--h-commerce-rip-height) - var(--h-commerce-rip-overlap)) * -1) !important;
}

body.historicum-cart-page .h-commerce-recommendations > .h-torn-bottom,
body.woocommerce-cart .h-commerce-recommendations > .h-torn-bottom {
    margin-top: calc(var(--h-commerce-rip-overlap) * -1) !important;
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-cart-page,
    body.historicum-checkout-page,
    body.woocommerce-cart,
    body.woocommerce-checkout {
        --h-commerce-rip-height: 48px;
    }
}

/* Shop rip alignment: vertical overlap seals the join without shifting the strip sideways. */
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top {
    margin-bottom: -1px !important;
}

body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
    margin-top: -1px !important;
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
        display: block !important;
        position: relative !important;
        height: var(--h-shop-shared-rip-height, 60px) !important;
        margin: 0 !important;
        overflow: hidden !important;
        background: transparent !important;
        background-image: none !important;
        clip-path: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        transform: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom::before {
        content: none !important;
        display: none !important;
        opacity: 0 !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        opacity: 1 !important;
        background: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-color: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-image: none !important;
        -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        -webkit-mask-size: 112% 100% !important;
        -webkit-mask-repeat: no-repeat !important;
        -webkit-mask-position: var(--h-rip-offset, 62%) top !important;
        mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        mask-size: 112% 100% !important;
        mask-repeat: no-repeat !important;
        mask-position: var(--h-rip-offset, 62%) top !important;
        transform: scaleY(-1) !important;
        transform-origin: center !important;
    }
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom {
        display: block !important;
        position: relative !important;
        height: var(--h-shop-shared-rip-height, 60px) !important;
        margin: 0 !important;
        overflow: hidden !important;
        background: transparent !important;
        background-image: none !important;
        clip-path: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        transform: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::before {
        content: none !important;
        display: none !important;
        opacity: 0 !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        opacity: 1 !important;
        background: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-color: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-image: none !important;
        -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        -webkit-mask-size: 112% 100% !important;
        -webkit-mask-repeat: no-repeat !important;
        -webkit-mask-position: var(--h-rip-offset, 62%) top !important;
        mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        mask-size: 112% 100% !important;
        mask-repeat: no-repeat !important;
        mask-position: var(--h-rip-offset, 62%) top !important;
        transform: scaleY(-1) !important;
        transform-origin: center !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel,
    body.historicum-shop-page .h-shop-section-carousel,
    body.historicum-shop-page .h-ss-viewport {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-section-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-ss-viewport::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page,
    body.historicum-shop-page #page,
    body.historicum-shop-page .site,
    body.historicum-shop-page .site-content,
    body.historicum-shop-page #content,
    body.historicum-shop-page .content-area,
    body.historicum-shop-page #main,
    body.historicum-shop-page .site-main,
    body.historicum-shop-page .woocommerce,
    body.historicum-shop-page .woocommerce-page,
    body.historicum-shop-page .h-shop-page,
    body.historicum-shop-page .h-shop-paper-stack,
    body.historicum-shop-page .h-shop-paper-layout,
    body.historicum-shop-page .h-shop-sections-column,
    body.historicum-shop-page .h-paper-section,
    body.historicum-shop-page .h-paper-content,
    body.historicum-shop-page .h-shop-section-main,
    body.historicum-shop-page .h-shop-section-body,
    body.historicum-shop-page .h-shop-grid-col,
    body.historicum-shop-page .h-shop-section-carousel {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    @supports (overflow: clip) {
        body.historicum-shop-page,
        body.historicum-shop-page #page,
        body.historicum-shop-page .site,
        body.historicum-shop-page .site-content,
        body.historicum-shop-page #content,
        body.historicum-shop-page .content-area,
        body.historicum-shop-page #main,
        body.historicum-shop-page .site-main,
        body.historicum-shop-page .woocommerce,
        body.historicum-shop-page .woocommerce-page,
        body.historicum-shop-page .h-shop-page,
        body.historicum-shop-page .h-shop-paper-stack,
        body.historicum-shop-page .h-shop-paper-layout,
        body.historicum-shop-page .h-shop-sections-column,
        body.historicum-shop-page .h-paper-section,
        body.historicum-shop-page .h-paper-content,
        body.historicum-shop-page .h-shop-section-main,
        body.historicum-shop-page .h-shop-section-body,
        body.historicum-shop-page .h-shop-grid-col,
        body.historicum-shop-page .h-shop-section-carousel {
            overflow-x: clip !important;
        }
    }

    body.historicum-shop-page .h-shop-mobile-widgets {
        --h-shop-mobile-widget-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        display: block !important;
        position: relative !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 var(--h-shop-shared-rip-height, 60px) !important;
        padding: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-mobile-widget-paper {
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom {
        display: block !important;
        position: absolute !important;
        right: 0 !important;
        bottom: calc(var(--h-shop-shared-rip-height, 60px) * -1 + 1px) !important;
        left: 0 !important;
        z-index: 10 !important;
        width: 100% !important;
        height: var(--h-shop-shared-rip-height, 60px) !important;
        margin: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        background: transparent !important;
        background-image: none !important;
        clip-path: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        transform: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::before {
        content: none !important;
        display: none !important;
        opacity: 0 !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        opacity: 1 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
        -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        -webkit-mask-size: 112% 100% !important;
        -webkit-mask-repeat: no-repeat !important;
        -webkit-mask-position: var(--h-rip-offset, 62%) top !important;
        mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        mask-size: 112% 100% !important;
        mask-repeat: no-repeat !important;
        mask-position: var(--h-rip-offset, 62%) top !important;
        transform: scaleY(-1) !important;
        transform-origin: center !important;
    }
}

/* Final mobile shop paper contract: top shade only, flat cream through the widget. */
@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page {
        --h-shop-mobile-paper-surface:
            linear-gradient(
                180deg,
                rgba(255, 252, 240, 0.96) 0%,
                rgba(245, 240, 230, 0.96) 130px,
                var(--h-paper-flat, var(--h-paper, #f5f0e6)) 280px,
                var(--h-paper-flat, var(--h-paper, #f5f0e6)) 100%
            );
        --h-shop-paper-surface: var(--h-shop-mobile-paper-surface);
    }

    body.historicum-shop-page .h-paper-content,
    body.historicum-shop-page .h-shop-section-main,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-paper-content,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-section-main,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-paper-content,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-section-main {
        background: var(--h-shop-mobile-paper-surface) !important;
        background-color: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-repeat: no-repeat !important;
        background-size: 100% 100% !important;
        background-position: center top !important;
        background-blend-mode: normal !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets {
        --h-shop-mobile-widget-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        display: block !important;
        position: relative !important;
        z-index: 2 !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 var(--h-shop-shared-rip-height, 60px) !important;
        padding: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
        background-blend-mode: normal !important;
    }

    body.historicum-shop-page .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-mobile-widget-paper,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widget-paper,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widget-paper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
        background-blend-mode: normal !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom,
    body.historicum-shop-page .h-shop-mobile-widgets .h-torn-bottom,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets > .h-torn-bottom,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets .h-torn-bottom,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets > .h-torn-bottom,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets .h-torn-bottom {
        display: block !important;
        position: absolute !important;
        right: 0 !important;
        bottom: calc(var(--h-shop-shared-rip-height, 60px) * -1 + 1px) !important;
        left: 0 !important;
        z-index: 10 !important;
        width: 100% !important;
        height: var(--h-shop-shared-rip-height, 60px) !important;
        margin: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        background: transparent !important;
        background-image: none !important;
        clip-path: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        transform: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-mobile-widgets .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets > .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets > .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets .h-torn-bottom::before {
        content: none !important;
        display: none !important;
        opacity: 0 !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-mobile-widgets .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets > .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets > .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets .h-torn-bottom::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        opacity: 1 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
        -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        -webkit-mask-size: 112% 100% !important;
        -webkit-mask-repeat: no-repeat !important;
        -webkit-mask-position: var(--h-rip-offset, 62%) top !important;
        mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        mask-size: 112% 100% !important;
        mask-repeat: no-repeat !important;
        mask-position: var(--h-rip-offset, 62%) top !important;
        transform: scaleY(-1) !important;
        transform-origin: center !important;
    }
}
