/*
Apply bento box layout and transitions to product tabs
 */

.woocommerce div.product.ast-product-tabs-layout-vertical .woocommerce-tabs {
    .panel {
        border: none;
    }

    ul.tabs {
        &::before {
            all: unset;
        }

        li {
            border: none;
            background-color: rgba(222, 202, 184, 0.3);
            color: #515151 !important;
            margin-bottom: 6px;
            border-radius: 6px;
            transition: all 0.3s;
            overflow: hidden;
            opacity: 0.8;

            &:hover {
                padding-top: 4px;
                padding-bottom: 4px;
                opacity: 1.0;
                background-color: rgba(222, 202, 184, 0.6);
            }

            &.active {
                opacity: 1.0;
                background-color: #decab8;
            }

            &::before {
                all: unset;

                content: ' ';
                position: absolute;
                width: 5px;
                height: 100px;
                background-color: #8E153C;
                margin-top: -10px;
                transition: left 0.3s;
                left: -10px;
                opacity: 1 !important;
            }

            &.active::before {
                left: 0;
            }
        }
    }
}

/* Bento box for related products */

section.related.products ul > li {
    border: var(--ast-global-color-7) thin solid !important;
    border-radius: 20px;
    overflow: hidden !important;
}

section.related.products ul > li > .astra-shop-summary-wrap {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

section.related.products ul > li > .astra-shop-summary-wrap .ast-loop-product__link {
    flex-grow: 1;
}

.product-links .ast-product-icon-previous {
    padding-top: 2px;
    padding-right: 1px;
}

.product-links .ast-product-icon-next {
    padding-top: 2px;
    padding-left: 1px;
}

.product p.out-of-stock {
    margin-top: 16px;
    color: #998a8e !important;
    font-weight: bold;
    border: #998a8e thin solid;
    border-radius: 16px;
    max-width: 160px;
    text-align: center;
    padding: 8px 16px;
    transition: .3s;
    cursor: not-allowed;
}

/* Cart section on product page */
.ast-woocommerce-container .ast-article-single .summary.entry-summary {
    .cart {
        margin-top: 32px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        .added_to_cart.wc-forward {
            padding: 4px 8px;
            background-color: rgba(255,255,255,0.25);
            border-radius: 8px;
            margin-bottom: 1em;
            &:hover {
                background-color: rgba(255,255,255,0.5);
            }
        }
    }
}

/* Sticky add to cart */
.ast-sticky-add-to-cart-content {
    @media (max-width: 912px) {
        flex-direction: column;
    }

    .ast-sticky-add-to-cart-title-wrap {
        @media (max-width: 912px) {
            background-color: #999194;
            padding: 5px;
            border-radius: 12px;
            min-width: 100%;
            color: white;
            margin-bottom: 10px;
        }
        @media (max-width: 544px) {
            display: flex !important;
        }

        img {
            box-shadow: rgba(26, 23, 22, 0.25) 0 2px 5px -1px;
            border-radius: 8px;
            margin-right: 10px;
            transition: .3s;
            width: 50px;
            height: 50px;
            @media (max-width: 912px) {
                display: block !important;
                width: 30px;
                height: 30px;
            }
            @media (max-width: 544px) {
                border-radius: 6px;
                width: 20px;
                height: 20px;
            }
        }

        .ast-sticky-add-to-cart-title {
            transition: font-weight 0.3s;
            @media (max-width: 912px) {
                font-size: 14px !important;
                line-height: 14px !important;
            }
            @media (max-width: 544px) {
                font-size: 10px !important;
                line-height: 10px !important;
            }
        }
    }

    .ast-sticky-add-to-cart-action-wrap {
        @media (max-width: 912px) {
            min-width: 100%;
            justify-content: flex-start;
        }

        .ast-sticky-add-to-cart-action-price {
            @media (max-width: 912px) {
                flex-grow: 1;
            }
        }

        #sticky-add-to-cart {
            div.quantity.buttons_added, button.single_add_to_cart_button {
                margin-left: 10px;
            }
        }
    }
}

form.cart.e-loop-add-to-cart-form {
    gap: 8px;
    flex-direction: column;
    align-items: center;
}

.quantity.buttons_added {
    min-width: 115px;
    border-radius: 10px;
    background-color: rgba(77, 73, 74, 0.3);
    overflow: hidden;
    justify-content: center;
    max-width: 160px;

    input.input-text.qty.text {
        border-radius: 10px;
        border-width: 2px;
        margin: 0;
        z-index: 4;
    }

    a.minus, a.plus {
        color: white;
        background-color: transparent;
        border: none;
        margin: 0;
        flex-grow: 1;

        &:hover {
            background-color: #8E153C;
        }
    }

    a.minus {
        margin-right: -10px;
        padding-right: 28px;
        padding-left: 20px;
    }

    a.plus {
        margin-left: -10px;
        padding-left: 28px;
        padding-right: 20px;
    }

    /*a.minus {*/
    /*    background-color: var(--ast-global-color-0);*/
    /*    color: white;*/
    /*    border-top-left-radius: 20px;*/
    /*    border-bottom-left-radius: 20px;*/
    /*}*/
    /*a.plus {*/
    /*    background-color: var(--ast-global-color-0);*/
    /*    color: white;*/
    /*    border-top-right-radius: 20px;*/
    /*    border-bottom-right-radius: 20px;*/
    /*}*/
}
