body.store-template {
	background-color: #f5f5f5;
    color: #17171a;
    background-image: none;
    
    & a {
        color:#3a4053;
    }
    & h1 {
        font-size: 1.5rem;
        text-align: center;
    }
    & h4 {
        color: #981B1F;
        text-decoration: none;
    }
}
body.store-template header a {
    color: var(--jk-textcolor);
}
.maincontent-store {
    margin: 20px;
}
/* for main store page */
.maincontent-store .container {
   padding: 0;
}
.maincontent-store .container .woocommerce.columns-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;


    & .woocommerce-notices-wrapper {
        grid-column: span 4;
    }
    & .woocommerce-result-count {
        grid-column: span 2;
        font-size: .8rem;
        text-transform: lowercase;
        color: #3A4053;
        align-self: center;
    }
    & .woocommerce-ordering {
        grid-column: span 2;
        margin: 0 auto 1em;
        width: min(22ch, 100%);
    
        & select {
            width: 100%;
        }
    }   
    & .products.columns-4 {
        grid-column: span 4;
        display: grid;
        grid-template-columns: subgrid;

        &::before {
            grid-column: span 4;
        }
        & li {
            grid-column: span 2;
            margin: 0 auto;
            text-align: center;
            width: fit-content;
        }
        & img {
            margin: 0;
            width: revert-layer;
        }
        & h2 {
            grid-column: span 2;
            height: 4rem;
            margin-top: .6rem;
        }
        & .price {
            grid-column: span 2;
            height: 2rem;
        }
    }
}

/* Maintain true aspect ratio while keeping grid clean */
.woocommerce ul.products li.product {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
        
        & img {
            grid-column: span 2;
            width: auto;
            max-width: 100%;
            height: auto;
            object-fit: contain;
            display: block;
            margin: 0 auto;
    }
}
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    align-content: space-between;
    height: -webkit-fill-available;
}

//Store page product grid
@media (width >= 980px) {

    .maincontent-store .container .woocommerce.columns-4 {
        & .woocommerce-result-count {
            grid-column: 3 / 4;
            text-align: right;
            font-size: 1.1rem;
        }
        & .woocommerce-ordering {
            grid-column: 4 / 5;
        }
        & .products.columns-4 li {
            grid-column: span 1;

            & .woocommerce-loop-product__link {
                display: block;
                align-items: center;
                & img {
                    border: min(1vw, 15px) solid #f5f5f5;
                    filter: drop-shadow(5px 5px 6px #3A4053);
                }
                & h2 {
                    height: 6rem;
                    margin-top: 1rem;
                    font-size: 1.3rem;
                }
                & .price {
                    text-align: center;
                }
            }
        }
    }
    
}

.product-wrapper {
    display: flex;
    flex-direction: column;
}
nav.woocommerce-breadcrumb {
    font-size: .7rem;
}

.woocommerce-product-gallery__wrapper {
    width: 80vw;
    margin: 10px auto;
}

img.wp-post-image {
    object-fit: cover;
    width: 80vw;
    height: 100%;
}
a.woocommerce-product-gallery__trigger {
    display: none;
}
.summary.entry-summary {
    /* background-color: #000; */
    padding: 1rem;
}
.price {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    color: #365396
}
.woocommerce-variation-price .price {
    font-size: 2rem;
}

.wcpay-express-checkout-wrapper, .wc-block-components-express-payment__event-buttons {
    display: none;
}

.variations {
    margin: 0 auto;
}
.store-template tbody {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem;
}
.store-template th.label{
    flex-basis: 20ch;
    font-size: 0.9rem;
    text-align: right;
    padding-right: 5px;
}
.store-template tr {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-evenly;
    max-width: 70vw;
}
.store-template select {
    width: 22ch;
    text-align: center;
    word-wrap: normal;
    appearance: base-select;

    &::picker-icon {
        color: #999;
        transition: 0.4s rotate;
      }
    &:open::picker-icon {
        transform: rotate(180deg);
      }
}
.reset_variations {
    color: #981b1f !important;
}

.woocommerce-variation-add-to-cart {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 1rem;
    justify-content: space-evenly;
}

.quantity {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: .5rem;

    &::before {
        content: "Qty:";
        font-size: 1.2rem;
        font-weight: 700;
    }
    & input {
        width: 3rem;
    }
}

.single_variation_wrap {
    text-align: center;
}

.product_meta {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
}
span.sku_wrapper {
    font-size: .7rem;
    color: #3A3F53;
    /* width: 100%; */
}
span.posted_in a {
    color: #365396 !important;
}

ul.tabs.wc-tabs {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 2px;
    margin-bottom: 0;

    & li {
        padding: 1rem 1rem 0.25rem;
        background-color: #3A3F53;
    }
    & li:hover, & li:focus {
        background-color: #365396;
    }
    & li a {
        color: #f5f5f5;
    }
}
.woocommerce-Tabs-panel {
    background-color: #989BA433;
    padding: 25px 2rem;
    border: 3px solid var(--jk-bgcolor);
}

.product-sidebar ul {
    list-style-type: none;
    padding-left: 1rem;

    & li a {
        color: #171A1A;
    }
    & li a:hover {
        color: #365396;
    }
}

/* select options - hidden */
.woocommerce ul.products li.product .button {
    display: none;
}

/* cart */
.wp-block-woocommerce-cart table {
    margin: 0 !important;
    display: grid; 
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;

    & thead {
        display: none;
        /* grid-template-columns: subgrid;
        grid-column: span 6; */
    }

    & tbody {
        display: grid;
        grid-template-columns: subgrid;
        grid-column: span 6;
        margin: 0;

        & tr.wc-block-cart-items__row {
            display: grid;
            grid-template-columns: subgrid !important;
            grid-column: span 6;
            gap: .5rem;
            border-bottom: 2px solid #3A3F53;
                &:last-child {
                    border-bottom: none;
                }

            & td {
                margin: 0 !important;
            }
            & td.wc-block-cart-item__image {
                grid-column-start: 1 !important;
                grid-column-end: 7 !important;
                grid-row-start: 1 !important;
                grid-row-end: 2 !important;
                padding-right: 0 !important;
                
                & img {
                    width: 100%;
                    height: auto;
                    object-fit: cover;
                    aspect-ratio: 3 / 2;
                    border: 10px solid #f5f5f5;
                    filter: drop-shadow(5px 5px 4px #3A3F53);
                }
            }
            & td.wc-block-cart-item__product {
                grid-column-start: 1 !important;
                grid-column-end: 5 !important;
                grid-row-start: 2 !important;
                grid-row-end: 3 !important;
                align-self: self-start;

                & a.wc-block-components-product-name {
                    text-overflow: ellipsis;
                    overflow: hidden;
                    white-space: nowrap;
                }
                & .wc-block-components-product-price {
                    text-align: left;
                }
            }
            & td.wc-block-cart-item__total {
                grid-column-start: 5 !important;
                grid-column-end: 7 !important;
                grid-row-start: 2 !important;
                grid-row-end: 3 !important;
                display: block;
                align-self: center;
                height: 95%;
                &::before {
                    content: "Total";
                    font-weight: 700;
                    font-size: 1.4rem;
                    line-height: .5rem;
                    font-variant: all-small-caps;
                }
            }
        }
    
    }
}
//Sticky cart submit button 
.wc-block-cart__submit.wp-block-woocommerce-proceed-to-checkout-block {
    border-radius: 5px;
}
.wc-block-components-button__text {
    padding: 0.5rem 1rem;
    background-color: #365396;
    color: #f5f5f5;
    font-size: 1.5rem;
    border-radius: 10px;
}


/* Checkout */
.wc-block-components-order-summary-item__description h3 {
    /* line-height: 5rem; */
    width: clamp(18ch, 39vw, 40ch);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.wc-block-components-order-summary-item__total-price {
    padding-top: 1rem;

    &::before {
        content: "Total";
        font-weight: 700;
        font-size: 1.4rem;
        line-height: .5rem;
        font-variant: all-small-caps;
    }
}

/* My Account */
.woo-account {
    margin: 25px 20px;
}
.woo-account nav ul {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    list-style-type: none;
    gap: .5rem;
    margin: 0 auto;
    align-items: center;
    width: max(50ch, 80vw);


    & li {
        text-align: center;
        & a {
            color: #f5f5f5 !important;
        }
    }
    & li:first-child, li:nth-child(3), li:nth-child(7) {
        display: none;
    }
}

.woocommerce-MyAccount-content table tr {
    width: 100%;
    margin: 0 auto;
}
.u-column1, .u-column2 {
    display: grid;
    margin: 0 auto;
    padding: 0;
    min-width: 85vw;
    float: none !important;
    & address {
        font-size: 1.2rem;
    }
}
header.woocommerce-Address-title.title {
    display: unset;
    & a {
        color: #365396;
    }
}

@media (width >= 768px) {
    .wc-block-components-order-summary .wc-block-components-order-summary-item {
        margin: 0 auto 10px;
        flex-direction: column;
    }
    .wc-block-components-order-summary .wc-block-components-order-summary-item__image {
        margin: 0 auto !important;
        width: 100px !important;
        & img {
            max-width: 100px !important;
            width: 100px !important;
            height: auto !important;
        }
    }
    .wc-block-components-order-summary .wc-block-components-order-summary-item__description {
        text-align: center;
    }
    .wc-block-components-order-summary-item {
        & .price {
            margin-left: 0; 
        }
        &:nth-child(2) .price {
            font-weight: 400;
        }
    }
    .wc-block-components-order-summary .wc-block-components-order-summary-item__individual-prices {
        text-align: center;
    }
    .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-formatted-money-amount {
        font-weight: 400;
    }
    .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price {
        margin: 0 auto;
        text-align: center;
        padding-top: 0;
        padding-bottom: 3rem;
    }
}

@media (width >= 900px) {
    .woo-account nav ul {
        position: unset;
        bottom: unset;
        left: unset;
        transform: unset;
        z-index: unset;
        grid-template-columns: repeat(4, auto);
        gap: 1rem;
        width: fit-content;
        margin: 0 0 25px 0;

        & li a {
            color: #365396 !important;
        }
    }
}

@media (width >= 1024px) {
    .maincontent-store {
        min-height: calc(100vh - 1600px);
        margin: 0;
    }
    .maincontent-store .woocommerce-order {
        margin: 25px 50px;
    }
        
    .store-template .woocommerce-table.woocommerce-table--order-details.shop_table.order_details tr {
            flex-direction: row;
    }
    
    body.store-template h1, .price {
        text-align: left;
    }
    body.store-template h4 {
        font-size: min(2vw, 1.7rem);
    }
    .woocommerce-variation.single_variation {
        text-align: left;
    }
    
    .product-wrapper {
        flex-direction: row;
        gap: 2rem;
    }
    .main-product-content {
        flex-grow: 1;
        min-width: 66vw;
        margin: 25px 0 25px 50px;
    }


    .main-product-content > .product {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
    }
    .woocommerce-product-gallery {
        grid-column: span 8;
    }
    .woocommerce-product-gallery__wrapper {
        width: auto;
        margin: 0 0 50px 0;
    }
    img.wp-post-image {
        width: 100%;
    }
    .summary.entry-summary {
        grid-column: span 4;
        padding: unset;
        margin-left: 1rem;
    }
    .price {
        font-size: 1.3rem;
        font-weight: 700;
        text-align: left;
        padding: unset;
        margin-left: 1rem;
    }

    .variations {
        margin: 0;    
    }

    .store-template tbody {
        gap: 1.5rem;
    }
    .store-template .variations tr {
        flex-direction: column;
    }
    .store-template th.label {
        flex-basis: 4ch;
    }

    .woocommerce-variation-add-to-cart {
        flex-direction: column;
        gap: .5rem;
        margin: 1rem 0 0 1rem;
    }
    .product_meta {
        text-align: left;
    }
    .posted_in {
        display: none;
    }

    .woocommerce-tabs.wc-tabs-wrapper {
        grid-column: span 12;
    }
    .woocommerce-Tabs-panel {
        padding: 25px 5rem;
    }
    .related.products {
        display: grid;
        grid-template-columns: subgrid;
        grid-column: span 12;

        & h2 {
            margin: 1rem 0;
            grid-column: span 12;        }
        
        & .products.columns-4 {
            display: grid;
            grid-template-columns: subgrid;
            grid-row: 2;
            grid-column: span 12;
            gap: 1rem;

            & li {
                grid-column: span 3;
                margin: 0 auto;
                text-align: center;
                &::marker {
                    display: none;
                }
            }   
            & img {
                width: 100%;
                height: auto;
            }
        }
        
    }
    a.button.product_type_variable.add_to_cart_button {
        display: none;
    }

    .product-sidebar {
        background-color: #989BA433;
        padding: 25px 30px;
        min-width: 25vw;
        min-height: calc(100vh - 160px);
    }
    .product-sidebar .woocommerce ul.products li.product a img {
        border: 5px solid #f5f5f5;
        filter: drop-shadow(5px 5px 4px black);
    }
    .woocommerce-page.columns-2 ul.products li.product, .woocommerce.columns-2 ul.products li.product {
        width: min-content;
        margin 0;
        & h2 {
            text-align: center;
            width: 12ch;
        }
    }
    .woocommerce ul.products li.product .price {
        font-size: 1.2rem;
        font-weight: 700;
        text-align: center;
    }
    .woocommerce ul.products li.product a img {
        grid-column: span 3;
        border: 10px solid #f5f5f5;
        filter: drop-shadow(5px 5px 4px black);
    }
    .woocommerce ul.products li.product .woocommerce-loop-category__title, .woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product h3 {
        padding: .5em 0;
        margin: 0;
        font-size: 1em;
        text-align: center;
    }
    /* .woocommerce ul.products li.product a.woocommerce-loop-product__link {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: .2rem;
        align-items: center;
    } */

    .maincontent-store .container .woocommerce.columns-4 .products.columns-4 li {
        grid-column: span 1;
        margin-bottom: 4rem;
    }

    .is-large.wc-block-cart {
        margin-bottom: 0 !important;
    }
    .woo-cart .product-wrapper {
        gap: 0;
    }
    .woo-cart .main-product-content {
        margin: 0;
    }
    .wc-block-components-sidebar-layout .wc-block-components-main {
        padding: 25px 25px 25px 50px !important;
    }
    .wc-block-components-sidebar.wc-block-cart__sidebar.wp-block-woocommerce-cart-totals-block {
        background-color: beige;
        padding-right: 20px;
    }
    table.woocommerce-table.woocommerce-table--order-details.shop_table.order_details {
        width: min(85vw, 100%);
    }
}