/*
    Theme Name: Engines Direct
    Theme URI: https://georgeberesford.co.uk/
    Author: GB Design
    Author URI: https://georgeberesford.co.uk/
    Version: 1.0.0.0 (28 September 2026)
    Description: A bespoke WordPress theme built for Engines Direct.
*/

@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial');
    font-weight: 100 900;
    size-adjust: 104.5%;
}

@font-face {
    font-family: 'Teko Fallback';
    src: local('Arial');
    font-weight: 300 700;
    size-adjust: 66%;
}

@layer root {
    :root {
        --white: #FFFFFF;
        --grey: #b7b7b9;
        --black: #19172b;
        
        --primary:  #1b5099;
        --success:  #1b996b;
        --error:    #bb4a25;


        --font-size: 16px;
        --font-family: 'Inter', 'Inter Fallback', sans-serif;
        --font-weight: 400;
        --font-style: normal;
        --line-height: 1.5;

        --heading-font-scale: 1.0618;
        --heading-font-family: 'Teko', 'Teko Fallback', sans-serif;
        --heading-font-weight: 500;
        --heading-font-style: normal;
        --heading-line-height: 1.1;

        --gap-xs: 0.5em;
        --gap-sm: 1em;
        --gap-md: calc(var(--gap-sm) * 2);
        --gap-lg: calc(var(--gap-sm) * 4);
        --gap-xl: calc(var(--gap-sm) * 6);

        --radius-sm: 0.25rem;
        --radius-md: 0.5rem;
        --radius-lg: 1rem;
        --radius-pill: 9rem;

        --shadow: 0 0 1rem color-mix(in srgb, var(--black) 10%, transparent);
        --shadow-dk: 0 0 2rem color-mix(in srgb, var(--black) 20%, transparent);

        /* --corner-shape: superellipse(3); */

        --logo-height: 2.5rem;
        /* --nav-height: calc(var(--logo-height) + (var(--gap-sm) * 2)); */

        --container-gutter: var(--gap-sm);
        --container-max:    100%;
        --text-max:         80ch;
        --sidebar-lane:     max(15%, 35ch);

        --transition:   color 0.25s ease,
                        background-color 0.25s ease,
                        border-color 0.25s ease,
                        border-width 0.25s ease,
                        box-shadow 0.25s ease,
                        height 0.25s ease allow-discrete,
                        text-decoration 0.25s ease,
                        text-decoration-thickness 0.25s linear,
                        text-underline-offset 0.25s linear,
                        translate 0.25s ease,
                        rotate 0.25s ease,
                        scale 0.25s ease,
                        opacity 0.25s ease,
                        stroke 0.25s ease,
                        d 0.25s ease;

        --dropdown-menu-transition:     height 0.15s ease,
                                        max-height 0.15s ease,
                                        opacity 0.15s ease,
                                        padding-block 0.15s ease,
                                        transform 0.15s ease;
    }


    @media (min-width: 576px) {
        :root { --container-max: 540px; }
        .visible-xs { display: block; }
        .hidden-xs { display: none; }
    }

    @media (min-width: 768px) {
        :root { --container-max: 720px; }
        .visible-sm { display: block; }
        .hidden-sm { display: none; }
    }

    @media (min-width: 992px) {
        :root { --container-max: 960px; }
        .visible-md { display: block; }
        .hidden-md { display: none; }
    }

    @media (min-width: 1200px) {
        :root { --container-max: 1140px; }
        .visible-lg { display: block; }
        .hidden-lg { display: none; }
    }

    @media (min-width: 1400px) {
        :root { --container-max: 1320px; }
        .visible-xl { display: block; }
        .hidden-xl { display: none; }
    }

    html, body {
        background: color-mix(in srgb, var(--white) 90%, var(--grey));
        padding: unset;
        margin: unset;
        overflow: unset !important;
        overflow-x: clip !important;
    }
    * {
        box-sizing: border-box;
        font-optical-sizing: auto;
        margin: unset;

        &:focus-visible {
            outline: 2px solid var(--foreground);
            outline-offset: 2px;
        }
    }

    html, body {
        background-color: var(--background);
        color: var(--foreground);

        font-size: var(--font-size);
        font-family: var(--font-family);
        font-weight: var(--font-weight);
        font-style: var(--font-style);
        font-variation-settings: var(--font-variation-settings);

        margin: unset;
        padding: unset;

        scrollbar-gutter: stable;
    }

    .visually-hidden, .sr-only {
        position: absolute !important;
        clip: rect(0, 0, 0, 0) !important;
    }
    .visually-hidden-focusable {
        position: absolute !important;
        clip: rect(0, 0, 0, 0) !important;
        &:focus {
            position: static !important;
            clip: unset;
        }
    }

    mark, .mark {
        display: inline-block;
        background-color: yellow;
        padding: 0.1em 0.2em;
        border-radius: 0.2em;
    }
}

@layer page-transitions {
    @view-transition {
        navigation: auto;
    }
}

@layer position {
    .relative {
        position: relative !important;
    }
}

@layer flex {
    .flex {
        display: flex;
        gap: var(--gap-md) !important;

        &.flex-row {
            flex-direction: row !important;
        }
        &.flex-column {
            flex-direction: column !important;
        }

        &.gap-xs {
            gap: var(--gap-xs) !important;
        }
        &.gap-sm {
            gap: var(--gap-sm) !important;
        }
        &.gap-md {
            gap: var(--gap-md) !important;
        }
        &.gap-lg {
            gap: var(--gap-lg) !important;
        }
        &.gap-xl {
            gap: var(--gap-xl) !important;
        }

        &.row-gap-xs {
            row-gap: var(--gap-xs) !important;
        }
        &.row-gap-sm {
            row-gap: var(--gap-sm) !important;
        }
        &.row-gap-md {
            row-gap: var(--gap-md) !important;
        }
        &.row-gap-lg {
            row-gap: var(--gap-lg) !important;
        }
        &.row-gap-xl {
            row-gap: var(--gap-xl) !important;
        }

        &.align-center {
            align-items: center !important;
        }
        &.align-start {
            align-items: flex-start !important;
        }
        &.align-end {
            align-items: flex-end !important;
        }

        &.justify-center {
            justify-content: center !important;
        }
        &.justify-between {
            justify-content: space-between !important;
        }
        &.justify-start {
            justify-content: flex-start !important;
        }
        &.justify-end {
            justify-content: flex-end !important;
        }

        &.flex-wrap {
            flex-wrap: wrap !important;
        }

        & > * {
            flex: 0 1 0;

            &.justify-self-start {
                justify-self: flex-start !important;
            }
            &.justify-self-end {
                justify-self: flex-end !important;
            }
            &.justify-self-center {
                justify-self: center !important;
            }
        }
    }
}

@layer grid {
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    header {
        padding-block: var(--gap-sm);
    }
    section, footer {
        margin: unset;
        padding-block: var(--gap-md);
    }
    header, section, footer, nav:has(> .content) {
        display: grid;
        grid-template-columns:
            minmax(var(--container-gutter), 1fr)

            /* left sidebar - split into two halves so article can start halfway */
            [content-left-start aside-left-start] minmax(0, calc(var(--sidebar-lane) / 2))
            [article-start] minmax(0, calc(var(--sidebar-lane) / 2))

            /* main content area (capped so article-start..article-end totals max 80ch) */
            [aside-left-end content-right-start] minmax(0, calc(min(var(--text-max), var(--container-max)) - var(--sidebar-lane)))

            /* right sidebar - split into two halves so article can end halfway */
            [content-left-end aside-right-start] minmax(0, calc(var(--sidebar-lane) / 2))
            [article-end] minmax(0, calc(var(--sidebar-lane) / 2))

            [content-right-end aside-right-end] minmax(var(--container-gutter), 1fr);
        grid-auto-rows: auto;
        gap: var(--gap-lg);

        & > * {
            grid-column: content-left-start / content-right-end;
        }

        &:has( > aside) {
            & > .content {
                grid-column: aside-left-end / content-right-end;
            }
            & > aside {
                grid-column: aside-left-start / aside-left-end;
            }
        }
    }
    main {
        display: subgrid;
        grid-column: content-left-start / content-right-end;
    }

    @media (max-width: 991px) {
        header, nav:has(> .content), section, footer {
            grid-template-columns:
                minmax(0, 1fr)
                [content-left-start content-right-start] minmax(0, var(--container-max))
                [content-left-end content-right-end] minmax(0, 1fr);
            grid-template-rows: auto;
            gap: var(--gap-md);

            &:has(> aside) {
                & > .content,
                & > aside {
                    grid-column: content-left-start / content-left-end;
                }
            }
        }
    }
}

/** Out of Layer; Prevent layout shift **/
.wp-block-columns {
    display: flex;
    flex-direction: row;
    row-gap: var(--gap-md);

    & > .wp-block-column {
        flex: 1;

        &.is-vertically-aligned-top {
            align-items: flex-start;
        }
        &.is-vertically-aligned-center {
            align-items: center;
        }
        &.is-vertically-aligned-bottom {
            align-items: flex-end;
        }
    }
}

@layer columns {
    .wp-block-columns {
        column-gap: var(--gap-md) !important;
        flex-wrap: wrap !important;

        &:where(:first-child) {
            margin-block-start: 0 !important;
        }
        &:where(:last-child) {
            margin-block-end: 0 !important;
        }

        & > .wp-block-column {
            min-width: 0 !important;
        }
    }

    @media(min-width: 1200px) {
        .wp-block-columns {
            & > .wp-block-column {

                &[style*="flex-basis"][style*="25%"] {
                    flex-basis: calc(25% - var(--gap-md) * 0.25) !important;
                }
                &[style*="flex-basis"][style*="40%"] {
                    flex-basis: calc(40% - var(--gap-md) * 0.4) !important;
                }
                &[style*="flex-basis"][style*="50%"] {
                    flex-basis: calc(50% - var(--gap-md) * 0.5) !important;
                }
                &[style*="flex-basis"][style*="60%"] {
                    flex-basis: calc(60% - var(--gap-md) * 0.6) !important;
                }
                &[style*="flex-basis"][style*="75%"] {
                    flex-basis: calc(75% - var(--gap-md) * 0.75) !important;
                }
                
            }
        }
    }

    @media(max-width: 1199px) {
        .wp-block-columns {
            & > .wp-block-column {
                &[style*="flex-basis"][style*="25%"] {
                    flex-basis: calc(33.33% - var(--gap-md) * 0.3333) !important;
                }
                &[style*="flex-basis"][style*="75%"] {
                    flex-basis: calc(66.66% - var(--gap-md) * 0.6666) !important;
                }
                
                &[style*="flex-basis"][style*="40%"],
                &[style*="flex-basis"][style*="60%"],
                &[style*="flex-basis"][style*="50%"] {
                    flex-basis: calc(50% - var(--gap-md) * 0.5) !important;
                }
            }
        }
    }

    @media(max-width: 991px) {
        .wp-block-columns {
            flex-wrap: wrap !important;
            flex-direction: row !important;
            width: 100% !important;

            & > .wp-block-column {

                &[style*="flex-basis"][style*="%"] {
                    flex-basis: 100% !important;
                }
            }
        }
    }
}

@layer links {
    a, button, input[type="submit"] {
        transition: var(--transition);
        appearance: none;
        background: none;
        border: none;

        padding: unset;
        margin: unset;

        font-size: inherit;
        color: var(--primary);
        text-decoration: none;

        &:hover, &:focus {
            text-decoration: underline;
            text-decoration-thickness: 2px;
            text-underline-offset: 3px;
        }
        &.active, &:active {
            text-decoration-thickness: 2px;
            text-underline-offset: 6px;
        }
    }

    li.current_page_item,
    li.current-menu-item,
    /* li.current-page-parent, */
    li.current-menu-parent {
        & > a, & > button {
            text-decoration: underline;
            text-decoration-thickness: 2px;
            text-underline-offset: 6px;
        }
    }
}

@layer buttons {
    a.btn, button.btn, input[type="submit"] {
        appearance: none;
        border: none;
        text-decoration: none;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 0.5ex 1.5ex !important;
    }
    .btn, .wp-element-button, .button, .search-submit {
        display: inline-flex !important;
        text-box: trim-both ex alphabetic !important;

        font-size: calc(var(--font-size) * 1.5) !important;
        font-family: var(--heading-font-family) !important;
        font-weight: var(--heading-font-weight) !important;
        font-style: var(--heading-font-style)   !important;
        line-height: var(--line-height) !important;

        background-color: var(--primary) !important;
        color: var(--white) !important;

        padding: 0.5ex 1.5ex !important;
        border-radius: var(--radius-sm) !important;

        & .btn-pill {
            border-radius: var(--radius-pill) !important;
        }

        &.btn-default {
            background-color: var(--white) !important;
            color: var(--primary) !important;
        }

        &.btn-success {
            background-color: var(--success) !important;
            color: var(--white) !important;
        }

        & > icon {
            display: inline-flex;
            margin-right: 0.5ex;

            width: 1em;
            height: 1em;
        }
    }
}

@layer typography {
    h1, h2, h3, h4, h5, h6,
    .h1, .h2, .h3, .h4, .h5, .h6 {
        font-family:    var(--heading-font-family);
        font-style:     var(--heading-font-style);
        font-weight:    var(--heading-font-weight);
        line-height:    var(--heading-line-height);
    }

    h1, .h1 {
        font-size: 3rem !important;
    }
    h2, .h2 {
        font-size: 2.5rem !important;
    }
    h3, .h3 {
        font-size: 2rem !important;
    }
    h4, .h4 {
        font-size: 1.75rem !important;
    }
    h5, .h5 {
        font-size: 1.5rem !important;
    }
    h6, .h6, p.lead {
        font-size: 1.3rem !important;
    }

    .wc-block-cart .wc-block-cart__totals-title,
    .editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header th, table.wc-block-cart-items .wc-block-cart-items__header th,
    .editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name, table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
        font-family: var(--heading-font-family) !important;
        font-style: var(--heading-font-style) !important;
        font-weight: var(--heading-font-weight) !important;
    }

    .editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header th, table.wc-block-cart-items .wc-block-cart-items__header th {
        font-size: 1.5rem !important;
    }

    .editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name, table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
        font-size: 1.75rem !important;
        line-height: 1 !important;
    }

    p, ul, ol, li, cite, blockquote, mark {
        font-size:      var(--font-size);
        font-style:     var(--font-style);
        font-family:    var(--font-family);
        font-weight:    var(--font-weight);
        line-height:    var(--line-height);
    }

    hr {
        padding: 0;
        margin: 1rem 0;
        border: none;
    }
}

@layer header {
    header {
        background: var(--white);
        position: sticky;
        top: 0;
        z-index: 1000;

        box-shadow: var(--shadow);
    

        .brand {
            width: auto !important;
            max-width: unset !important;
            height: var(--logo-height) !important;
            align-self: center;
        }

        .controls {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: var(--gap-md);

            & .bubble {
                font-size: 1rem;
                font-family: var(--heading-font-family);
                font-weight: var(--heading-font-weight);
                font-style: var(--heading-font-style);
                position: absolute;
                top: -50%;
                right: -50%;
                background: var(--error);
                color: var(--white);
                width: 3ex;
                height: 3ex;
                line-height: 1;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                z-index: 9;

                &.item_added {
                    animation: bubble-pop 300ms ease-out;
                }
            }
        }
    }

    @keyframes bubble-pop {
        25% {
            transform: scale(.75);
        }
        50% {
            transform: scale(1.25);
        }
        100% {
            transform: scale(1);
        }
    }

    @media(max-width: 767px) {
        header {
            .controls {
                gap: var(--gap-sm);
                justify-content: flex-end;
            }
        }
    }
    
    body.admin-bar header {
        top: 32px !important;
    }

    @media (max-width: 782px) {
        body.admin-bar header {
            top: 46px !important;
        }
    }
    @media (max-width: 600px) {
        body.admin-bar header {
            top: 0px !important;
        }
    }
}

@layer dropdown-caret {
    .dropdown button:has(icon.caret) {
        display: flex;
        align-items: center;
    }
    icon.caret {
        color: inherit;
        width: 1em !important;
        height: 1em !important;
        display: inline-block;
        vertical-align: middle;

        scale: 0.75;
        transition: var(--transition);
        transform-origin: center;
        transform-style: preserve-3d;
    }

    .dropdown:has(:popover-open) icon.caret {
        rotate: 1 0 0 180deg;
    }
}

@layer nav {
    nav {
        & ul, & ol {
            padding: unset;
            margin: unset;
            list-style: none;
            width: 100%;
            & li {
                padding: unset;
                margin: unset;
            }
        }
    }

    nav.breadcrumb {
        background: color-mix(in srgb, var(--white) 80%, var(--grey));
        padding-block: var(--gap-sm);

        li {
            white-space: nowrap;
        }
    }

    .flex > nav#primary-nav {
        flex: 1 !important;
        min-width: 0;
    }

    nav#primary-nav {
        min-width: 0;
        & > ul {
            flex-direction: row;
            gap: var(--gap-md);
            min-width: 0;
            & > li {
                flex: 0 1 auto;
                min-width: 0;
                white-space: nowrap;

                & a, & button {
                    display: flex;
                    align-items: center;
                    gap: var(--gap-xs);
                    min-width: 0;
                    max-width: 100%;
                }
                & .text-overflow {
                    display: block;
                    min-width: 0;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                }
            }

        }

        & button[popovertarget] {
            anchor-name: var(--anchor-name) !important;
        }

        & .dropdown-menu {
            position: fixed;
            position-anchor: var(--anchor-name) !important;

            inset: auto;
            margin: 0;
            top: calc(anchor(bottom) + 1rem);
            left: calc(anchor(left) - var(--gap-sm));

            width: fit-content;

            background: var(--white);
            border: unset;
            padding: var(--gap-sm);
            border-radius: var(--radius-md);
            transition: var(--transition);

            & li {
                &.menu-item-parent-link {
                    order: -1;
                    grid-column: span 3;
                }
                & a {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    gap: var(--gap-xs);

                    & figure.wp-block-image {
                        height: 2rem;
                        width: 2rem;

                        & img {
                            width: 100% !important;
                            height: 100% !important;
                            object-fit: contain;
                            object-position: center;
                        }
                    }
                }
            }

            &:popover-open {
                display: flex;
                flex-direction: column;
                gap: var(--gap-sm);
                box-shadow: var(--shadow-dk);

                height: auto;
                opacity: 1;
                pointer-events: auto;
                transform: translateY(0);
            }


            &.dropdown-mega-menu {
                &:popover-open {
                    display: grid;
                    grid-template-columns: repeat(3, 1fr);
                    gap: var(--gap-sm);
                }
            }
            @media (max-width: 1199px) {
                &.dropdown-mega-menu {
                    &:popover-open {
                        grid-template-columns: repeat(3, 1fr);
                    }
                }
            }
            @media (max-width: 991px) {
                &.dropdown-mega-menu {
                    &:popover-open {
                        grid-template-columns: repeat(2, 1fr);
                    }
                }
            }
        }
    }

    @media(max-width: 1199px) {
        header > .content {
            display: grid !important;
            gap: var(--gap-sm) !important;
            grid-template-areas: 
                "content-left-start content-right-end";
                grid-template-columns: auto auto;
        }
        nav#primary-nav {
            order: 9;
            grid-column: span 2;

            &[data-state="open"] {
                display: block !important;
                
                & > ul {
                    display: flex !important;
                    flex-wrap: wrap !important;
                    flex-direction: column !important;
                    width: 100% !important;
                    & > li {
                        flex: 1 0 100% !important;
                    }
                }
            }
            &[data-state="closed"] {
                display: none !important;
            }
        }
    }

    nav#social-nav {
        color: var(--white);
        background: var(--primary);
        padding-inline: unset;
        padding-block: var(--gap-xs);

        & label {
            font-size: 0.875rem;
            white-space: nowrap;
            width: max-content;
            color: color-mix(in srgb, var(--white) 85%, var(--primary)) !important;
        }
        & ul, & ol {
            width: auto;
            & li {
                width: auto;
                display: block;
            }
        }
        & a {
            color: color-mix(in srgb, var(--white) 70%, var(--primary)) !important;
            &:hover, &:focus {
                color: color-mix(in srgb, var(--white) 85%, var(--primary)) !important;
            }
            &:active, &.active {
                color: var(--white) !important;
            }
            & icon {
                fill: currentColor !important;
                width: 1.3rem !important;
                height: 1.3rem !important;
            }
        }
    }
}

@layer pagination {
    nav.pagination {
        width: 100%;
        & ul {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;

            & li {
                & a, & span {
                    display: block;
                    text-align: center;
                    width: 2rem;
                    height: 2rem;
                    line-height: 2rem;

                    border-radius: var(--radius-pill) !important;
                }

                & a {
                    &:hover, &:focus {
                        text-decoration: none;
                        background: color-mix(in srgb, var(--white) 50%, var(--primary)) !important;
                    }
                }
            }

            & .page-numbers {
                background: var(--white);
                color: var(--primary);

                &.current {
                    background: var(--primary);
                    color: var(--white);
                }
            }

            & .dots {
                background: none;
                color: color-mix(in srgb, var(--white) 50%, var(--primary)) !important;
            }
        }
    }
}

@layer icon {
    icon {
        width: 2rem;
        height: 2rem;
        display: block;
        position: relative;
        justify-self: center;
        stroke: currentColor !important;

        & svg {
            position: relative;
            width: 100%;
            height: 100%;
            vector-effect: non-scaling-stroke;
            stroke: currentColor !important;

            & path, & circle, & rect, & line, & polyline, & polygon {
                stroke: currentColor !important;
                stroke-width: 2;
                fill: unset;
            }
        }

        &.fill {
            stroke: none !important;
            fill: currentColor !important;

            & svg {
                stroke: none !important;
                fill: currentColor !important;

                & path, & circle, & rect, & line, & polyline, & polygon {
                    stroke: none !important;
                    fill: currentColor !important;
                }
            }
        }
    }
}

@layer hamburger {
    @media(min-width: 1200px) {
        [data-role="hamburger-menu"] {
            display: none !important;
            visibility: hidden !important;
        }
    }
    [data-role="hamburger-menu"] {
        display: block;
        float: right;
        font-size: 2rem;

        & icon {
            position: relative;

            & svg {
                position: absolute;
                fill: none;
                vector-effect: non-scaling-stroke;

                & path {
                    will-change: d;
                    transition: var(--transition);
                    stroke-width: 3.5;
                    stroke-linecap: round;
                    stroke-linejoin: round;
                }
            }
        }
    }
    [data-role="hamburger-menu"] icon {
        position: relative;
    }
    [data-role="hamburger-menu"] icon svg {
        position: absolute;
    }
    [data-role="hamburger-menu"] icon svg path {
        will-change: d;
        transition: var(--transition);
    }
    /* Hamburger icon animation fallback for iOS/Safari (no CSS d property support) */
    /* [data-action="open"] icon svg path,
    [data-action="close"] icon svg path {
        transform-origin: 50% 50%;
    }
    [data-action="open"] icon svg path:nth-child(1) { transform: rotate(0deg) translateY(0); opacity: 1; }
    [data-action="open"] icon svg path:nth-child(2) { opacity: 1; }
    [data-action="open"] icon svg path:nth-child(3) { transform: rotate(0deg) translateY(0); opacity: 1; }

    [data-action="open"]:hover icon svg path:nth-child(1) { transform: rotate(0deg) translateY(-5%) scaleX(0.8); }
    [data-action="open"]:hover icon svg path:nth-child(2) { opacity: 1; }
    [data-action="open"]:hover icon svg path:nth-child(3) { transform: rotate(0deg) translateY(5%) scaleX(0.8); }

    [data-action="close"] icon svg path:nth-child(1) { transform: rotate(45deg) translateY(28.5%) scaleX(1.2); }
    [data-action="close"] icon svg path:nth-child(2) { opacity: 0; }
    [data-action="close"] icon svg path:nth-child(3) { transform: rotate(-45deg) translateY(-28.5%) scaleX(1.2); }

    [data-action="close"]:hover icon svg path:nth-child(1) { transform: rotate(45deg) translateY(28.5%) scaleX(1); }
    [data-action="close"]:hover icon svg path:nth-child(2) { opacity: 0; }
    [data-action="close"]:hover icon svg path:nth-child(3) { transform: rotate(-45deg) translateY(-28.5%) scaleX(1); } */

    /* Original d property for browsers that support it */
    @supports (d: path('M0,0')) {
        [data-action="open"] icon svg path:nth-child(1) { d: path('M4,12 24,12 44,12'); transform: none; }
        [data-action="open"] icon svg path:nth-child(2) { d: path('M4,24 24,24 44,24'); opacity: 1; }
        [data-action="open"] icon svg path:nth-child(3) { d: path('M4,36 24,36 44,36'); transform: none; }

        [data-action="open"]:hover icon svg path:nth-child(1) { d: path('M4,10 24,10 44,10'); transform: none; }
        [data-action="open"]:hover icon svg path:nth-child(2) { d: path('M8,24 24,24 40,24'); opacity: 1; }
        [data-action="open"]:hover icon svg path:nth-child(3) { d: path('M4,38 24,38 44,38'); transform: none; }

        [data-action="close"] icon svg path:nth-child(1) { d: path('M4,4 24,24 44,4'); transform: none; }
        [data-action="close"] icon svg path:nth-child(2) { d: path('M24,24 24,24 24,24'); opacity: 0;}
        [data-action="close"] icon svg path:nth-child(3) { d: path('M4,44 24,24 44,44'); transform: none; }

        [data-action="close"]:hover icon svg path:nth-child(1) { d: path('M8,8 24,24 40,8'); transform: none; }
        [data-action="close"]:hover icon svg path:nth-child(2) { d: path('M24,24 24,24 24,24'); opacity: 0;}
        [data-action="close"]:hover icon svg path:nth-child(3) { d: path('M8,40 24,24 40,40'); transform: none; }
    }
}

@layer section {
    section {
        background: var(--white);
        padding-block: var(--gap-lg);

        &:nth-of-type(odd) {
            background: color-mix(in srgb, var(--white) 90%, var(--grey));
        }

        &.wp-block-gb-section.has-primary-bg {
            background: var(--primary);
            color: var(--white);
        }
        &.wp-block-gb-section.has-success-bg {
            background: var(--success);
            color: var(--white);
        }
        &.wp-block-gb-section.has-error-bg {
            background: var(--error);
            color: var(--white);
        }
        &.wp-block-gb-section.has-dark-bg {
            background: var(--black);
            color: var(--white);
        }
        &.wp-block-gb-section.has-light-bg {
            background: var(--white);
        }

        &.wp-block-gb-section {
            & ul.wp-block-list {
                list-style-type: disc;
                padding-inline-start: 1.5em;
            }
            & ol.wp-block-list {
                list-style-type: decimal;
                padding-inline-start: 1.5em;
            }
        }

        &.wp-block-gb-section.has-background-image,
        &.wp-block-gb-section.has-background-video {
            background-color: var(--black);
            position: relative;

            & > .background-video {
                grid-column: 1 / -1;
                position: absolute;
                inset: 0;
                width: 100%;
                height: 100%;
                object-fit: cover;
                z-index: 0;
            }

            &.has-overlay::before {
                content: "";
                position: absolute;
                inset: 0;
                background: color-mix(in srgb, var(--black) 55%, transparent);
                z-index: 1;
            }

            & > .content {
                position: relative;
                color: var(--white);
                z-index: 2;
            }
        }
    }
}

@layer content {
    .content {
        display: flex;
        flex-direction: column;
        gap: 1rem;

        &.has-text-align-left {
            text-align: left;
            align-items: flex-start;
        }
        &.has-text-align-center {
            text-align: center;
            align-items: center;
        }
        &.has-text-align-right {
            text-align: right;
            align-items: flex-end;
        }
    }
}

@layer card {
    section {
        &:nth-of-type(odd) {
            & .wp-block-gb-card {
                background: var(--white);
            }
        }
        &:nth-of-type(even) {
            & .wp-block-gb-card {
                background: color-mix(in srgb, var(--white) 90%, var(--grey));
            }
        }

        & .wp-block-gb-card.has-dark-bg {
            background: var(--black);
            color: var(--white);
        }
        & .wp-block-gb-card.has-primary-bg {
            background: var(--primary);
            color: var(--white);
        }
        & .wp-block-gb-card.has-success-bg {
            background: var(--success);
            color: var(--white);
        }
        & .wp-block-gb-card.has-error-bg {
            background: var(--error);
            color: var(--white);
        }
        & .wp-block-gb-card.has-transparent-bg {
            background: transparent;
            padding-inline: unset;
        }
    }

    .has-text-align-left {
        text-align: left;
        justify-items: start;

        & .wp-block-buttons {
            justify-content: start;
        }
    }
    .has-text-align-center {
        text-align: center;
        justify-items: center;

        & .wp-block-buttons {
            justify-content: center;
        }
    }
    .has-text-align-right {
        text-align: right;
        justify-items: end;

        & .wp-block-buttons {
            justify-content: end;
        }
    }

    .wp-block-gb-card {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 100%;
        padding: var(--gap-md);
        gap: var(--gap-sm);

        &.has-transparent-bg {
            padding: 0;
        }

        & > *:last-child {
            margin-block-start: auto;
        }

        & > a {
            display: flex;
            flex-direction: column;
            gap: var(--gap-xs);
        }

        border-radius: var(--radius-md);
        

        /* & .wp-block-buttons {
            margin-block-start: auto;
        } */

        /* &.has-text-align-left {
            text-align: left;
            justify-items: start;

            & .wp-block-buttons {
                justify-content: start;
            }
        }
        &.has-text-align-center {
            text-align: center;
            justify-items: center;

            & .wp-block-buttons {
                justify-content: center;
            }
        }
        &.has-text-align-right {
            text-align: right;
            justify-items: end;

            & .wp-block-buttons {
                justify-content: end;
            }
        } */

        & img, & figure {
            border-radius: var(--radius-sm);
            
        }
        & img {
            max-width: 100%;
            width: 100%;
            height: auto;
            display: block;
        }
        & .wp-block-gb-card-video {
            width: 100%;
            position: relative;
            
            & video {
                display: block;
                width: 100%;
                height: auto;
                border-radius: var(--radius-sm);
            }

            & .gb-card-video-logo {
                position: absolute;
                inset: 50%;
                max-width: calc(100% - var(--gap-lg) * 2);
                max-height: calc(100% - var(--gap-lg) * 2);
                translate: -50% -50%;
                z-index: 1;
            }

            &:has(.gb-card-video-logo) {
                &::after {
                    content: "";
                    display: block;
                    position: absolute;
                    inset: 0;
                    background: rgba(0, 0, 0, 0.5);
                    border-radius: var(--radius-sm);
                    z-index: 0;
                }
            }
        }
    }

    .wp-block-gb-team {
        & .wp-block-gb-card {
            padding: var(--gap-sm);
            gap: var(--gap-sm);
        }
    }

    .wp-block-gb-card.wc-block-product,
    .wp-block-gb-card.product {
        padding: var(--gap-xs);
        gap: var(--gap-xs);

        & > * {
            margin: unset !important;
            padding: unset !important;
        }

        & > *:last-child {
            margin-block-start: auto !important;
        }

        & .wc-block-components-product-button {
            flex-direction: row !important;
            align-items: center !important;
            & > * {
                flex: 1;
                flex: auto;
                align-self: center;
            }
            & > span, & > span > a {
                font-size: 1rem !important;
                margin: 0 !important;
                padding: 0 !important;
            }
        }
    }
}

@layer pull-quote {
    figure.wp-block-pullquote {
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: unset !important;
        padding-block: var(--gap-sm) !important;

        p {
            font-family: var(--heading-font-family);
            font-weight: var(--heading-font-weight);
            font-size: 1.5rem;
            line-height: var(--heading-line-height);
            color: var(--primary) !important;

            q {
                &::before, &::after {
                    opacity: 0.5;
                }
                &::before {
                    content: "\201C"; 
                }
                &::after {
                    content: "\201D"; 
                }
            }
        }
        cite {
            font-style: italic;
            display: block;
            padding-block-start: var(--gap-sm);
            opacity: 0.75;
            &::before {
                content: "\2014 ";
                margin-inline-end: 0.5ch;
            }
        }
    }
}

@layer single-product {
    .product-summary {
        display: flex;
        flex-direction: column;
        gap: var(--gap-sm);
    }
    
    .product-specification {
        padding-block-start: var(--gap-md);
        display: flex;
        flex-direction: column;
        gap: var(--gap-sm);
        & ul.product-specification-chips {
            display: flex;
            flex-wrap: wrap;
            gap: var(--gap-xs);
            margin: 0;
            padding: 0;
            list-style: none;

            & li.product-specification-chip {

                & a,
                & span {
                    display: inline-block;
                    font-size: var(--font-size);
                    background-color: color-mix(in srgb, var(--white) 80%, var(--grey));
                    color: var(--primary);
                    padding: 0.5ex 1.5ex;
                    border-radius: var(--radius-pill);
                }
            }
        }
    }

    .product-gallery {
        position: relative;
        width: 100%;
        height: auto;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: var(--gap-md);
        border-radius: var(--radius-md);
        overflow: clip;

        & mark {
            position: absolute;
            inset: 1rem 1rem auto auto;
            z-index: 10;
        }

        & + .product-gallery {
            margin-top: var(--gap-md);
        }
    }


    input[type="range"] {
        box-sizing: border-box !important;
        position: relative !important;
        width: 100% !important;
        --segment-width: calc(100% / (var(--total-steps)));

        cursor: col-resize !important;

        --track-background: color-mix(in srgb, var(--primary) 50%, var(--black));
        --track-background-notch: color-mix(in srgb, var(--track-background) 85%, var(--white));
        --track-background-notch-dark: color-mix(in srgb, var(--track-background) 50%, var(--black));
        --track-border: color-mix(in srgb, var(--primary) 75%, transparent);

        -webkit-appearance: none;
        appearance: none;

        width: 100%;
        height: 0.5rem;
        background: transparent;
        outline: none !important;
        border: none !important;
        transition: var(--transition);

        padding: 1rem calc(var(--segment-width) * 0.5) !important;

        &:hover {
            &::-webkit-slider-thumb {
                scale: 1.1;
                border: 1px solid var(--white);
            }
            &::-moz-range-thumb {
                scale: 1.1;
                border: 1px solid var(--white);
            }
        }
        &:focus {
            &::-webkit-slider-thumb {
                scale: 1.2;
                border: 2px solid var(--white);
            }
            &::-moz-range-thumb {
                scale: 1.2;
                border: 2px solid var(--white);
            }
        }

        &::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: .75rem;
            height: 1.5rem;
            background: var(--primary);
            cursor: pointer;
            border-radius: var(--radius-pill);
            border: 1px solid var(--track-border);
            transition: var(--transition);

            cursor: col-resize !important;

            position: relative;
            translate: 0% -50%;
            top: 50%;
            /* left: calc((var(--current-step) + 0.5) * var(--segment-width)) !important; */
        }
        &::-webkit-slider-runnable-track {
            -webkit-appearance: none;
            appearance: none;
            height: 0.5rem;
            border: 1px solid var(--track-border);
            border-radius: var(--radius-sm);
            transition: var(--transition);

            background-color: var(--track-background);
            background-image:
                linear-gradient(
                    to right,
                    var(--track-background) 0 2px,
                    transparent 1px
                ),
                linear-gradient(
                    to right,
                    var(--track-background-notch) 0px,
                    var(--track-background-notch) 1px,
                    var(--track-background-notch-dark) 1px,
                    var(--track-background-notch-dark) 2px,
                    var(--track-background) 2px,
                    var(--track-background) 10px
                );

            background-size:
                100% 100%,
                calc(100% / (var(--total-steps) - 1)) 100%;

            background-position:
                0 0,
                0 0;

            background-repeat:
                no-repeat,
                repeat-x;
        }

        /* &::-moz-range-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 1.5rem;
            height: 1.5rem;
            background: var(--black);
            cursor: pointer;
            border-radius: var(--radius-pill);
            transition: var(--transition);

            translate: -50% -50%;
            left: calc((var(--current-step) + 0.5) * var(--segment-width));
        }
        &::-moz-range-track {
            -webkit-appearance: none;
            appearance: none;
            height: 0.5rem;
            background: color-mix(in srgb, var(--black) 75%, transparent);
            border-radius: var(--radius-sm);
            transition: var(--transition);
        } */
    }


    .slider-container {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: var(--gap-md);
        position: relative;

        & .slider-view {
            position: relative;
            aspect-ratio: 1 / 1;

            &::before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: var(--background-img);
                background-size: cover;
                background-position: center;
                filter: blur(3px);
                pointer-events: none;
            }

            & img {
                position: relative;
                min-width: 100%;
                height: auto;
                display: block;
                aspect-ratio: 1 / 1;
                z-index: 2;
            }
        }

        & .slider-controls {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;

            padding: 1rem;
            z-index: 3;

            & .slider-controls-thumbnails {
                max-width: 100%;
                display: flex;
                flex-direction: row;
                flex-wrap: nowrap !important;
                gap: 0;

                & > a {
                    border: 2px solid var(--primary);
                    border-radius: var(--radius-md);
                    flex: 1 1 auto;
                    display: block;
                    overflow: clip;
                    opacity: 0.5;

                    &:hover {
                        opacity: 1;
                    }
                    &:focus {
                        outline: none;
                        border: 2px solid var(--white);
                        opacity: 1;
                    }

                    & img {
                        display: block;
                        width: 100%;
                        height: auto;
                        margin: 0;
                    }
                }

                & > a {
                    filter: hue-rotate(calc(sibling-index() * 30deg));
                }
            }
        }
    }
}

@layer product-grid {
    .wc-block-product-template.is-flex-container {
        display: grid !important;
        gap: var(--gap-sm) !important;

        &.columns-2 {
            grid-template-columns: repeat(2, 1fr);
        }
        &.columns-3 {
            grid-template-columns: repeat(3, 1fr);
        }
        &.columns-4 {
            grid-template-columns: repeat(4, 1fr);
        }
        &.columns-5 {
            grid-template-columns: repeat(5, 1fr);
        }
        &.columns-6 {
            grid-template-columns: repeat(6, 1fr);
        }

        & > li {
            width: unset !important;
            width: 100% !important;
        }
    }

    @media(max-width: 1199px) {
        .wc-block-product-template.is-flex-container {
            display: grid !important;
            gap: var(--gap-sm) !important;

            &.columns-2 {
                grid-template-columns: repeat(2, 1fr);
            }
            &.columns-3 {
                grid-template-columns: repeat(3, 1fr);
            }
            &.columns-4 {
                grid-template-columns: repeat(3, 1fr);
            }
            &.columns-5 {
                grid-template-columns: repeat(3, 1fr);
            }
            &.columns-6 {
                grid-template-columns: repeat(3, 1fr);
            }

            & > li {
                width: unset !important;
                width: 100% !important;
            }
        }
    }

    @media(max-width: 991px) {
        .wc-block-product-template.is-flex-container {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }
    @media(max-width: 767px) {
        .wc-block-product-template.is-flex-container {
            grid-template-columns: repeat(1, 1fr) !important;
        }
    }

    .wp-block-button.wc-block-components-product-button {
        display: flex !important;
        flex-direction: row !important;
        gap: var(--gap-sm) !important;
        align-items: center !important;
        & > * {
            flex: 1 1 auto !important;
        }
    }
}

@layer multimedia {
    .wp-block-embed {
        width: 100%;
        height: auto;
        border-radius: var(--radius-md);
        overflow: hidden;
        overflow: clip;

        &.wp-embed-aspect-16-9 {
            aspect-ratio: 16 / 9;
            width: 100%;
            height: 100%;
        }

        & .wp-block-embed__wrapper, & iframe {
            width: 100%;
            height: inherit !important;
            aspect-ratio: inherit !important;
        }
    }
}

@layer footer {
    footer {
        background: var(--black);
        color: var(--white);
        padding-block: var(--gap-xl);

        a {
            color: color-mix(in srgb, var(--primary) 90%, var(--white));

            &:hover,
            &:focus {
                color: var(--primary);
            }
        }

        & .grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            column-gap: var(--gap-xl);
            row-gap: var(--gap-xl);

            & .flex {
                min-width: 0;
            }
        }

        ul {
            display: flex;
            flex-direction: column;
            gap: var(--gap-xs);
        }
    }

    @media(min-width: 992px) {
        footer icon {
            width: 1.3rem;
            height: 1.3rem;
        }
    }
    @media(max-width: 1199px) {
        footer .grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    @media(max-width: 767px) {
        footer .grid {
            column-gap: var(--gap-md);
            row-gap: var(--gap-md);
            grid-template-columns: repeat(1, 1fr);

            & .flex.flex-column {
                gap: var(--gap-sm) !important;
            }
        }
    }
}

@layer forms {
    form.form,
    form.cart,
    form.edit-account,
    form[role="search"] {
        display: grid;
        grid-template-columns: auto;
        grid-template-rows: auto;
        gap: var(--gap-md);

        & fieldset {
            display: grid;
            grid-template-columns: auto;
            grid-template-rows: auto;
            gap: var(--gap-md);
        }

        label {
            display: grid;
            grid-template-columns: auto;
            grid-template-rows: auto;
            gap: var(--gap-sm);
        }

        button, input[type="submit"], a.btn,
        input, select, textarea, fieldset {
            appearance: none;
            border: 1px solid var(--black);
            width: 100% !important;

            font-size: calc(var(--font-size) * 1.3) !important;
            font-family: var(--font-family) !important;
            font-weight: var(--heading-font-weight) !important;
            font-style: var(--heading-font-style) !important;
            line-height: var(--line-height) !important;
            background-color: var(--white) !important;
            color: var(--black) !important;
            padding: 0.5ex 1.5ex !important;
            border-radius: var(--radius-sm) !important;

            &:focus-visible {
                outline: 2px solid var(--black) !important;
                outline-offset: 2px !important;
            }
        }

        input[type="checkbox"],
        input[type="radio"] {
            width: auto !important;
        }

        input[type="search"] {
            appearance: base-search;
            &::search-icon {
                color: var(--black);
            }
        }

        ::picker(select) {
            inset: var(--gap-xs) 0;
            appearance: base-select;
            border-radius: var(--radius-sm) !important;
        }
        select {
            appearance: base-select;
            background-image: none !important;
            padding-right: 1em;
            
            &::picker-icon {
                content: url("data:image/svg+xml,%3Csvg width='16' height='10' viewBox='0 0 16 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L8 8L15 1' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
                color: var(--black);
            }

            & option {
                position: relative;
                padding: 0.5ex 3rem 0.5ex 1rem;
                display: block;
                color: var(--black);
            }
            & option::checkmark {
                content: url("data:image/svg+xml,%3Csvg width='100%' height='100%' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='7' stroke='currentColor' stroke-width='1.5' fill='none'/%3E%3Cpath d='M5 8.5L7 10.5L11 6.5' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
                line-height: 0;
                position: absolute;
                top: 50%;
                right: 1rem;
                transform: translateY(-50%);

                width: 1.3rem;
                height: 1.3rem;
            }
        }
        select selectedcontent,
        select option {

            display: flex;
            align-items: center;
            gap: var(--gap-xs);

            & img.svg {
                display: inline-block;
                width: 1.3em;
                height: 1.3em;
                vertical-align: middle;
            }

            & span.count {
                display: inline-block;
                aspect-ratio: 1 / 1;
                width: 1.3rem;
                height: 1.3rem;
                position: relative;
                border-radius: var(--radius-pill);
                background: color-mix(in srgb, var(--primary) 15%, transparent);
                    
                &::after {
                    font-size: .75rem;
                    content: attr(data-count);
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                }
            }

            &:hover, &:focus {
                background: color-mix(in srgb, var(--primary) 15%, transparent);
                color: var(--black) !important;
            }
            &:is([selected]) {
                background: color-mix(in srgb, var(--primary) 90%, transparent);
                color: var(--white) !important;

                & span.count {
                    background: color-mix(in srgb, var(--white) 15%, transparent);
                }
            }
            &[disabled] {
                opacity: 0.5;
                font-style: italic;
                cursor: not-allowed;
                background: color-mix(in srgb, var(--black) 15%, transparent);
            }
        }

        /* Keep embedded SVG <style>/<title> text and the count chip out of the select button and option text */
        /* select selectedcontent span.count,
        select selectedcontent svg :is(style, title, desc, script),
        select option svg :is(style, title, desc, script) {
            display: none !important;
        } */

        [data-price-range] {
            display: grid;
            gap: var(--gap-sm);

            & label {
                &:has( > output) {
                    display: grid;
                    grid-template-columns: repeat(2, auto);
                    gap: var(--gap-md);

                    & * > {
                        flex: 1 1 50%;
                    }

                    & > output {
                        place-self: end;
                        text-align: right;
                    }
                }
            }
        }
    }


    form.cart {
        display: flex;
        flex-direction: row;
        gap: var(--gap-xs);

        &, * {
            width: fit-content;
        }


        & > input[type="hidden"],
        & > div.quantity:has(input[type="hidden"]) {
            display: none !important;
        }
    }

    form[role="search"] {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: var(--gap-sm);
        align-items: stretch;
    }

    /* form, fieldset,
    .woocommerce-address-fields__field-wrapper {
        display: grid;
        grid-template-columns: auto;
        grid-template-rows: auto;
        gap: var(--gap-md);

        & fieldset {
            padding: unset !important;
            margin: unset !important;

            &:has(> legend) {
                padding: var(--gap-md) !important;
            }
        }
    }

    .form-row,
    .form-row-first,
    .form-row-last {
        width: 100% !important;
        margin: unset !important;
        padding: unset !important;
    } */
    

    
}

@layer woocommerce-overrides {
    .woocommerce-account .woocommerce-MyAccount-navigation {
        float: unset !important;
        width: unset !important;
    }

    .woocommerce-Price-currencySymbol {
        font-size: 0.75em !important;
        margin-inline-end: 0.25em !important;
    }

    .wc-block-components-product-sale-badge,
    .woocommerce span.onsale {
        top: 1rem !important;
        left: auto !important;
        right: 1rem !important;
        min-width: unset !important;
        min-height: unset !important;
        line-height: var(--line-height) !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;

        font-size: 1rem !important;
        font-family: var(--heading-font-family) !important;
        font-style: var(--heading-font-style) !important;
        font-weight: var(--heading-font-weight) !important;
        line-height: var(--heading-line-height) !important;
        color: var(--red) !important;

        background: var(--white) !important;
        color: var(--error) !important;
        border: none !important;
        border-radius: var(--radius-sm) !important;
        padding: .5ex 1ex !important;

        text-box-trim: trim-both ex alphabetic !important;

        & > span {
            background: inherit !important;
            color: inherit !important;
            line-height: 0 !important;
        }
    }

    .wc-block-components-product-price.has-text-align-center {
        text-align: left !important;
        align-items: start !important;
        justify-items: start !important;
    }
    .wc-block-grid__product-price,
    .price {
        font-size: 1.3rem !important;
        /* font-family: var(--heading-font-family);
        font-style: var(--heading-font-style); */
        font-weight: var(--heading-font-weight);
        /* line-height: var(--heading-line-height); */
        & > del {
            font-size: var(--font-size) !important;
            font-weight: var(--font-weight) !important;
            color: var(--error) !important;
            & > bdi {
                color: currentColor;
            }
        }
        & > ins {
            font-size: 1.3rem !important;
            color: var(--primary);
            text-decoration: none;
            & > bdi {
                color: currentColor;
            }
        }

        &:not(:has(> del)) {
            & bdi {
                font-size: 1.3rem;
                color: var(--primary);
            }
        }
    }


    .wc-block-components-sidebar.wc-block-checkout__sidebar.wp-block-woocommerce-checkout-totals-block {

        .wp-block-woocommerce-checkout-order-summary-block {

            .wc-block-components-checkout-order-summary__title {
                .wc-block-components-checkout-order-summary__title-text {
                    font-family: var(--heading-font-family) !important;
                    font-weight: var(--heading-font-weight) !important;
                    font-size: 2.5rem !important;
                }
            }
            .wc-block-components-order-summary__content {
                        font-size: 1rem !important;
                .wc-block-components-order-summary-item {
                        font-size: 1rem !important;
                    .wc-block-components-order-summary-item__description {
                        font-size: 1rem !important;
                        .wc-block-components-product-name {
                            font-family: var(--heading-font-family) !important;
                            font-weight: var(--heading-font-weight) !important;
                            line-height: var(--heading-line-height) !important;
                            font-size: 1.3rem !important;
                        }

                        .wc-block-cart-item__prices {
                            &, & > del, & > ins, &:not(:has(> del)) bdi {
                                font-size: var(--wp--preset--font-size--small, 14px);
                                color: currentColor !important;
                            }
                        }
                    }

                    .wc-block-components-order-summary-item__total-price {

                        &, & > del, & > ins, &:not(:has(> del)) bdi {
                            font-size: var(--wp--preset--font-size--small, 14px);
                            color: currentColor !important;
                        }
                    }
                }
            }
        }
    }
}

@layer woocommerce-notices-wrapper {
    .woocommerce-notices-wrapper {
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: var(--gap-sm) !important;

        align-items: stretch !important;

        ul {
            display: flex;
            flex-direction: column;
            gap: var(--gap-sm) !important;

            li {
                display: flex;
                flex-direction: row;
                gap: var(--gap-sm) !important;
                align-items: center !important;
            }
        }
        .button {
            min-width: fit-content !important;
            align-self: center !important;
            place-self: end !important;
        }
    }

    .woocommerce-info,
    .woocommerce-message,
    .woocommerce-error,
    .wc-block-components-notice-banner.is-dismissible.is-error,
    .wc-block-components-notice-banner.is-dismissible.is-info,
    .wc-block-components-notice-banner.is-dismissible.is-message {
        display: flex !important;
        align-items: center !important;
        flex-direction: row !important;
        gap: var(--gap-sm) !important;
        font-size: 1rem !important;

        & > * {
            order: 1;
            font-size: 1rem !important;

            &:is(svg, img) {
                flex: 0 0 auto !important;
            }
        }
        & > .button {
            text-decoration: none !important;
            order: 9;
        }

        border: unset !important;
        border-radius: var(--radius-sm) !important;
        padding: var(--gap-sm) !important;

        &::before, & > svg {
            line-height: 1 !important;
            width: 2rem !important;
            height: 2rem !important;
            position: static !important;
            display: inline-block !important;
            inset: unset !important;
        }

        &::after {
            content: unset !important;
        }
    }
    .woocommerce-info,
    .woocommerce-message,
    .wc-block-components-notice-banner.is-dismissible.is-message,
    .wc-block-components-notice-banner.is-dismissible.is-success {
        background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
        color: var(--primary) !important;
        &::before {
            font-size: 2rem !important;
            color: currentColor !important;
        }
        & > svg {
            background-color: var(--primary) !important;
        }
    }
    .woocommerce-error,
    .wc-block-components-notice-banner.is-dismissible.is-error {
        background: color-mix(in srgb, var(--error) 10%, transparent) !important;
        color: var(--error) !important;
        &::before {
            font-size: 2rem !important;
            color: currentColor !important;
        }

        & > svg {
            background-color: var(--error) !important;
        }
    }

    .wc-block-components-notice-banner.is-dismissible {
        padding: var(--gap-sm) !important;
        margin: unset !important;
        margin-block-end: var(--gap-md) !important;
        color: inherit !important;

        & > .wc-block-components-button.wp-element-button.wc-block-components-notice-banner__dismiss.contained {
            width: 2rem !important;
            height: 2rem !important;
            padding: 0 !important;
            display: inline-flex !important;

            background-color: var(--white) !important;
            border: unset !important;
            box-shadow: unset !important;
            outline: unset !important;
            color: var(--error) !important;

            & svg {
                width: 2rem !important;
                height: 2rem !important;
                stroke: none !important;
                fill: currentColor !important;
            }
        }
    }
}