.woocommerce {
    .woocommerce-products-header {
        text-align: center;
        background-image: url("public/shop-leaf.avif");
        background-size: cover;
        background-position: center;
        padding-block: 64px;
        margin-bottom: 64px;

        h1 {
            margin: 0;
            padding: 0;
            font-size: 60px;
            color: #fff;
        }
    }

    .woocommerce-filters {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 equal columns */
        grid-template-rows: auto auto; /* 2 rows */
        gap: 8px;  
        margin-bottom: 8px;
        align-items: center;

        @media only screen and (max-width: 980px) {
            grid-template-columns: 1fr;
        }

        @media only screen and (min-width: 980px) {
            .woocommerce-ordering {
                margin-left: auto;
            }
        }

        .woocommerce-notices-wrapper {
            grid-column: 1 / -1; /* span full width */

            &:empty {
                display: none;
            }
        }            
    }

    .woocommerce-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 40px;
    }

    .products {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;

        @media only screen and (max-width: 980px) {
            grid-template-columns: 1fr;
        }

        .woocommerce-product {
            background: #fff;
            border-radius: 20px;
            overflow: hidden;
            transition: all 0.3s;
            border: 8px solid #fff;
            text-decoration: none;
            box-shadow: 0 0 30px 0 rgb(0 0 0 / 10%);

            img {
                aspect-ratio: 1/0.8;
                object-fit: cover;
                display: block;
                width: 100%;
            }

            .woocommerce-product-inner {
                padding: 20px 16px;
                display: grid;
                gap: 12px;

                .woocommerce-product-title {
                    font-size: 20px;
                    font-weight: 700;
                    line-height: 1;
                    color: var(--black);
                }

                .woocommerce-product-price {
                    color: #777;
                    line-height: 1;
                }

                .woocommerce-product-btn {
                    background: #697081;
                    padding: 12px 18px;
                    text-align: center;
                    border-radius: 12px;
                    color: #fff;
                    transition: all 0.24s;

                    &:hover {
                        background: #000;
                    }
                }
            }

            &:hover {
                transform: translateY(-4px);
                box-shadow: 0 0 30px 0 rgb(0 0 0 / 15%);
            }
        }
    }

    .woocommerce-pagination {
        padding-block: 32px 64px;
        display: grid;
        justify-content: center;

        .page-numbers {
            list-style-type: none;
            padding: 0;
            margin: 0;
            display: flex;
            gap: 8px;

            a, span {
                width: 44px;
                height: 44px;
                border-radius: 50%;
                background: #fff;
                display: flex;
                align-items: center;
                justify-content: center;
                color: var(--black);
                transition: all 0.24s;
                box-shadow: 0 0 30px 0 rgb(0 0 0 / 10%);      

                &:hover, &.current {
                    background: var(--primary);
                    color: #fff;
                    font-weight: 600;
                }          
            }
        }
    }

    .woocommerce-notices-wrapper {
        .woocommerce-message, 
        .woocommerce-error {
            background: #e7e7e7;
            padding: 12px 20px;
            border-radius: 8px;            
        }

        ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }

        &:not(:empty) {
            margin-top: 64px;
        }

        .woocommerce-error {
            background: #ffc8c8;
            color: #af1212;
        }
    }

    .woocommerce-notices-wrapper:not(:empty) + .woocommerce-breadcrumb {
        margin-top: 16px;
    }

    .woocommerce-notices-wrapper:not(:empty) + #woocommerce-cart-wrapper {
        margin-top: 16px;
    }

    .woocommerce-breadcrumb {
        margin-block: 64px 32px;
        padding: 0;
        font-size: 14px;
        color: #777;

        &::after,
        &::before {
            content: ' ';
            display: table
        }

        &::after {
            clear: both
        }

         a {
            color: #777
        }  
    }

    #woocommerce-product-single {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 64px;
        padding-bottom: 64px;

        @media only screen and (max-width: 980px) {
            grid-template-columns: 1fr;
        }

        .woocommerce-product-gallery {
            img {
                width: 100%;
                height: auto;
                object-fit: cover;
                object-position: center;
                border-radius: 28px;
                aspect-ratio: 1/0.7;

                @media only screen and (max-width: 980px) {
                    aspect-ratio: 1;
                }

            }
        }
		
		#choose-quantity {
			width: auto !important;
		}

        .woocommerce-single-product-title {
            font-size: 44px;
            font-weight: 600;
            line-height: 1;
        }

        .woocommerce-single-product-description {
            margin-block: 16px;
        }

        .price {
            font-size: 32px;
            color: var(--black);
            letter-spacing: -1px;
        }

        .woocommerce-single-product-price {
            font-weight: 600;
        }

        ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }

        .related {

            @media only screen and (min-width: 980px) {
                grid-column: 1 / 3;
            }

            .products {
                grid-template-columns: repeat(4, 1fr);

                @media only screen and (max-width: 980px) {
                    grid-template-columns: 1fr;
                }
            }           
        }

        .variations {
            width: 100%;
            border-block: 1px solid var(--border);
            padding-block: 16px;
            margin-block: 16px;

            .label {
                padding-right: 16px;
            }

            .reset_variations {
                padding-left: 16px;
            }
        }

        .woocommerce-variation-add-to-cart {
            display: grid;
            align-items: center;
            gap: 8px;
            background: #fff;
            box-shadow: 0 0 30px 0 rgb(0 0 0 / 10%);
            padding: 8px;
            border-radius: 8px;
            grid-template-columns: 1fr 3fr;

            input {
                width: 100%;
            }
        }
    }

    .star-rating span::before {
        content: '\53\53\53\53\53';
        top: 0;
        position: absolute;
        left: 0;
    }

}

.woocommerce-cart {
    .price {
        font-size: 16px;
        color: var(--black);
    }
}

/************* CART **************/

#woocommerce-cart-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;   

    @media only screen and (max-width: 980px) {
        grid-template-columns: 1fr;
    }

    .cart-collaterals {
        width: 100%;
        box-sizing: border-box;
        background: #fff;
        border-radius: 20px;
        box-shadow: 0 0 30px 0 rgb(0 0 0 / 10%);
        padding: 24px;
        height: fit-content;

        @media only screen and (max-width: 980px) {
    
        }       
    }

    .product-thumbnail {
        @media only screen and (max-width: 980px) {
            display: none;
        }

        a {
            display: block;
        }

        img {
            border-radius: 12px;
            aspect-ratio: 1;
            width: 150px;
            height: auto;

            @media only screen and (max-width: 980px) {
                width: 75px;
                border-radius: 12px;
            }

        }
    }   

    .woocommerce-cart-contents {
        display: grid;
        gap: 12px;
        border-collapse: collapse;

        .woocommerce-cart-item {
            box-sizing: border-box;
            background: #fff;
            border-radius: 20px;
            box-shadow: 0 0 30px 0 rgb(0 0 0 / 10%);
            padding: 24px;
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 28px;         

            @media only screen and (max-width: 980px) {
                 gap: 16px;
            }

            .product-name a {
                display: block;
                font-size: 20px;
                font-weight: 600;
                color: var(--black);
                line-height: 1;
            }

            .product-info {
                display: grid;
                gap: 8px;
            }

            .product-actions {
                display: flex;
                align-items: center;
                gap: 8px;      
                border-top: 1px solid var(--border);
                margin-top: 32px;
                padding-top: 16px; 

                .product-remove {
                    margin-left: auto;
                }        
            }
        }
    }

    .woocommerce-cart-coupon {
        border: 1px dashed var(--border);
        padding: 20px;
        box-sizing: border-box;
        border-radius: 12px;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px;

        button {
            background: #000;
            color: #fff;
        }
    }

    .woocommerce-cart-actions {
        
    }

    .cart_totals {
        table {
            background: #eee;
            text-align: left;
            width: 100%;
            padding: 16px;
            border-radius: 12px;
            margin-bottom: 12px;

            tr {
                vertical-align: baseline;
                border-bottom: 1px solid var(--border);
                display: flex;
                padding-block: 20px;
                gap: 16px;

                ul {
                    list-style-type: none;

                    li {
                        display: flex;
                        align-items: center;
                        gap: 4px;
                    }
                }

                &:first-child {
                    padding-top: 0px;
                }

                &:last-child {
                    padding-bottom: 0px;
                    border-bottom: none
                }

            }
        }
    }

}

.woocommerce-additional-fields,
.woocommerce-billing-fields,
.woocommerce-shipping-fields {
    margin-top: 32px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 0 30px 0 rgb(0 0 0 / 10%);
    padding: 32px;
    display: grid;
    gap: 12px;

    h3 {
        margin: 0;
        line-height: 1;

        label {
            display: flex;
            align-items: center;
            gap: 8px;            
        }
    }

    .woocommerce-billing-fields__field-wrapper {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 12px;            
    }

    .form-row {
        display: grid;
        gap: 4px;
    }
}


.woocommerce-shipping-fields {
    display: none !important; 
}

#order_review {
    margin-top: 32px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 0 30px 0 rgb(0 0 0 / 10%);
    padding: 32px;
    display: grid;
    gap: 20px;   

    table {
        text-align: left;
        border-collapse: collapse;
        display: grid;

        thead tr, tbody tr, tfoot tr {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        tfoot {
            background: #eee;
            text-align: left;
            width: 100%;
            padding: 16px;
            border-radius: 12px;
            margin-top: 20px;
        }
    }

    ul {
        list-style-type: none;

        li {
            display: flex;
            align-items: center;
            gap: 4px;
        }
    }
}

.woocommerce {
    .notes {
        margin: 0;
        padding: 0;
    }
}

.payment_method_paypal {
    display: grid;

    label {
        display: grid;
        line-height: 0;
        color: transparent;
    }

    p, a {
        display: none;
    }
}


.woocommerce-error {
    background: #ffc8c8;
    padding: 12px 20px;
    border-radius: 8px;      
    list-style-type: none;
    margin: 0;

    * {
        color: #af1212;
    }
}