/* Common WooCommerce */

.wp-block-group__inner-container {
    width: 100%;
    margin: 0;
}

.price del {
    font-size: .625em;
    font-weight: var(--regular);
    margin-block: -1em .375em;
    display: block;
}

.price ins {
    text-decoration: none;
}


/* Notices */

.out-of-stock {
    background: var(--invalid);
    color: var(--white);
    font-weight: var(--bold);
    font-size: var(--h5);
    display: inline-block;
    padding: .625em .75em .5em;
    border-radius: .25em;
    rotate: var(--tilt-min-3);
}

.woocommerce-notices-wrapper, ul.woocommerce-error {
    font-size: var(--h6);
    margin: 0;
    margin-bottom: var(--space-2);
}

.woocommerce-notices-wrapper:empty, ul.woocommerce-error:empty {
    margin: 0;
}

.notice, .woocommerce-notices-wrapper .woocommerce-message, .woocommerce-error, .woocommerce-info {
    display: inline-block;
    padding: 1em 1em .875em;
    border-radius: .25em;
    color: var(--green-dark);
    background: var(--dim);
    border: 1px solid var(--gray);
    font-weight: var(--bold);
    line-height: 1.325;
}

.woocommerce-notices-wrapper .woocommerce-message>:last-child, .woocommerce-error>:last-child, .woocommerce-info>:last-child {
    margin-bottom: 0;
}

.woocommerce-error {
    color: var(--invalid);
    border-color: var(--invalid);
}

ul.woocommerce-error {
    list-style: none;
}

ul.woocommerce-error li:not(:last-child) {
    border-bottom: 1px dotted var(--invalid);
    padding-bottom: 1em;
    margin-bottom: 1em;
}

.woocommerce-message .button, .woocommerce-message a.button, .woocommerce-message .btn, .woocommerce-message a.btn {
    font-size: .875rem;
    padding: .5em 1em .375em;
}


/* Loading overlay */

.blockOverlay {
    background-color: var(--white) !important;
}

.bg-green-dark .blockOverlay {
    background-color: var(--green-dark) !important;
}

.bg-dim .blockOverlay {
    background-color: var(--dim) !important;
}


/* Product grid product */

.products {
    list-style: none;
    padding: 0;
    row-gap: var(--space-4);
    grid-auto-flow: dense;
}

.products .product {
    display: flex;
    flex-direction: column;
}

.products .product>a {
    display: block;
    position: relative;
    text-decoration: none;
    color: var(--green-dark);
}

.products .product>a:active {
    transform: translateY(1px);
    opacity: .95;
}

.products .product figure {
    border-radius: var(--rounded-2);
    overflow: hidden;
    aspect-ratio: 1.35 / 1;
}

.products .product>a:hover figure {
    transform: rotate(-2deg);
}

.products .product figure img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.products .product .info {
    position: relative;
    padding-top: 1rem;
}

.products .product .title {
    font-size: var(--h4);
    margin: 1rem 0 1rem 1rem;
}

.products .product>a:hover .title {
    color: var(--green);
}

.products .product .description {
    font-size: var(--h5);
    line-height: 1.35;
    margin: 0 0 1rem 1rem;
}

@media (min-width: 768px) and (max-width: 1200px) {
    .products .product .title, .products .product .description {
        margin-left: 0;
    }
}

.products .product .price {
    font-size: max(18px, calc(var(--h4) * .75));
    width: 5em;
    transform: rotate(-8deg);
    bottom: auto;
    top: calc(-2.5em - .5rem);
    right: .75em;
}

.products .product>a:hover .price {
    transform: rotate(4deg);
}

.products .sale-sticker, .products .extra-sticker {
    z-index: 2;
    top: -1.125rem;
    left: -.75rem;
    right: auto;
    bottom: auto;
    transform: rotate(-18deg);
    font-size: .8125rem;
    width: 6.25em;
}

.products .sale-sticker {
    font-size: 1.25rem;
    width: 3.75em;
}

.products .product>a .sale-sticker, .products .product>a:hover .extra-sticker {
    transform: rotate(-6deg);
}

.product .btns {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5em;
}

.product .btns .added_to_cart {
    font-size: var(--h6);
}


/* Cross sell exception */

@media (min-width: 768px) {
    .cross-sell .products.columns-3 {
        --frames: 6;
    }

    .cross-sell .products.columns-3 .product {
        grid-column: span 2;
    }

    /* Dealing with 2 orphan items */

    .cross-sell .products.columns-3 .product:last-child:nth-child(3n - 1) {
        grid-column-end: -2;
    }

    .cross-sell .products.columns-3 .product:nth-last-child(2):nth-child(3n + 1) {
        grid-column-end: 4;
    }

    /* Dealing with single orphan */

    .cross-sell .products.columns-3 .product:last-child:nth-child(3n - 2) {
        grid-column-end: 5;
    }
}


/* Image gallery */

.image-gallery {
    position: relative;
    flex-grow: 1.35;
    flex-basis: 400px;
    align-self: flex-start;
}

.image-gallery figure {
    position: relative;
    aspect-ratio: 1.15 / 1;
    width: 100%;
    transition: 200ms cubic-bezier(0, .6, .3, 1.3);
    overflow: hidden;
    border-radius: var(--rounded-2);
}

.image-gallery figure:first-child {
    position: relative;
}

.image-gallery figure:not(:first-child) {
    position: absolute;
    top: 0;
    left: 0;
}

.image-gallery figure:nth-child(4n-3) {
    rotate: 2deg;
}

.image-gallery figure:nth-child(4n-2) {
    rotate: -4deg;
}

.image-gallery figure:nth-child(4n-1) {
    rotate: 5deg;
}

.image-gallery figure:nth-child(4n) {
    rotate: -1deg;
}

.js [data-image-gallery] {
    cursor: pointer;
}

.js [data-image-gallery]:hover .active {
    scale: 1.02;
}

.js [data-image-gallery]:active .active {
    transition: none;
    translate: 0 2px;
}

.js [data-image-gallery] figure:after {
    content: '';
    display: block;
    z-index: 1;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
}

.js [data-image-gallery] figure:not(.active):after {
    opacity: 1;
    transition: 160ms;
}

