/**
 * Theme Name: Shoptimizer Child
 * Template:   shoptimizer
 */

 :root{
    --archive-gap:          8px;
    --warranty-right:       0px;
    --gallery-height:       400px;
    --thumbnail-length:     150px;
    --light-green:          #5da20b;
    --dark-green:           #03672b;
    --archive-columns:      1fr;
    --grid-areas:           "image"
                            "addtocart"
                            "needtoknow";
    --archive-rows:         max-content max-content max-content;
    --thumbnail-padding:    8px;
    --thumbnail-position:   static;
    --product-grid-gap:     0.5rem;
    --product-card-padding: 1rem;
    --needtoknow-padding:   0rem;
}
.related.products{
    --archive-columns:      100%;
    --thumbnail-position:   static;
    --grid-areas:           "image"
                            "addtocart"
                            "needtoknow";
    --product-card-padding: 0rem;
    --needtoknow-padding:   1rem;
}
@media screen and (min-width: 771px) {
    :root{
        --archive-gap:      8px;
        --warranty-right:   32px;
        --gallery-height:   500px;
        --archive-columns:  1fr;
        --product-grid-gap: 1rem;
    }
}
@media screen and (min-width: 993px) {
    :root{
        --archive-gap:          16px;
        --warranty-right:       48px;
        --gallery-height:       600px;
        --archive-columns:      1fr 1fr 2fr;
        --grid-areas:           "image addtocart needtoknow";
        --thumbnail-padding:    10px;
        --thumbnail-position:   initial;
        --product-grid-gap:     2rem;
    }
    .related.products {
        --archive-columns:      1fr 1fr 3fr;
        --thumbnail-position:   revert;
        --grid-areas:           revert;
        --product-card-padding: revert;
        --needtoknow-padding:   revert;
    }
}

.woocommerce-breadcrumb{
    padding-bottom: 32px;
}
.woocommerce .woocommerce-message[role="alert"]{
    background-color: #1a1a1a;
    padding-bottom: unset;
}
.single-product .woocommerce{
    padding-bottom: 3rem;;
}
.single-product .woocommerce .woocommerce-message .message-inner{
    background-color: unset;
    margin-bottom: unset;
}
.archive .below-woocommerce-category{
    border: 2px solid #444;
}
body.single-product{
    padding-bottom: 0!important;
}
.sale-item.product-label{
    max-width: unset;
}

ul.products {
    display: grid;
    grid-template-columns: 100%;
    gap: var(--archive-gap);
}

.warranty {
    position: absolute;
    top: 0;
    right: var(--warranty-right);
}

.stock{
    display:none;
}

/* Single Product Page */
ul.swiper-wrapper li.woocommerce-product-gallery__image.swiper-slide img.wp-post-image {
    height: var(--gallery-height) !important;
    object-fit: contain;
}
.cart button.single_add_to_cart_button.button.alt{
    width: max-content;
    padding-inline: 2.5em
}

.woocommerce-tabs .tabs.wc-tabs > li[role="tab"] a{
    font-size: 24px;
}

/* Archive Products */
.archive ul.products{
    width: 100%;
    margin-left: revert;
}

ul.products li.product .woocommerce-loop-product__title{
    margin-bottom: 0.6rem;
}
.product-card__slide .site-main ul.products li.product .price{
    margin-bottom: 1.2rem;
}
.price bdi{
    font-size: 16px;
}
.price del bdi{
    font-size: 14px;
}
.single-product .price bdi{
    font-size: 24px;
}
.single-product .price del bdi{
    font-size: 18px;
}
.product-desc{
    margin-top: 20px;
}
.product-card__slide ul.products li.product a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart{
    width: max-content;
    padding-inline: 2rem;
}
.product_manual{
    font-weight: 700;
    font-size: 18px;
}

.archive ul.products li.product:not(.product-category),
.error404 ul.products li.product:not(.product-category),
.related ul.products li.product:not(.product-category){
    display: grid;
    grid-template-columns: var(--archive-columns);
    grid-template-areas:var(--grid-areas);
    grid-template-rows: var(--archive-rows);
    align-items: start;
    gap: var(--product-grid-gap);
    padding: var(--product-card-padding);
    padding-bottom: var(--product-card-padding)!important;
}

.archive ul.products li.product:not(.product-category) .woocommerce-image__wrapper,
.error404 ul.products li.product:not(.product-category) .woocommerce-image__wrapper,
.related ul.products li.product:not(.product-category) .woocommerce-image__wrapper{
    grid-area: image;
    position: var(--thumbnail-position);
}
.archive ul.products li.product:not(.product-category) .woocommerce-card__header,
.error404 ul.products li.product:not(.product-category) .woocommerce-card__header,
.related ul.products li.product:not(.product-category) .woocommerce-card__header{
    grid-area: addtocart;
}
.archive ul.products li.product:not(.product-category) .needtoknow,
.error404 ul.products li.product:not(.product-category) .needtoknow,
.related ul.products li.product:not(.product-category) .needtoknow{
    grid-area: needtoknow;
    padding: var(--needtoknow-padding);
    margin-left: 1rem;
}

.archive ul.products li.product:not(.product-category) img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail,
.error404 ul.products li.product:not(.product-category) img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail,
.related ul.products li.product:not(.product-category) img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail{
    padding: var(--thumbnail-padding);
    max-height: 200px;
    object-fit: contain;
}
.archive ul.products li.product:not(.product-category):before,
.archive ul.products li.product:not(.product-category):hover:before,
.error404 ul.products li.product:not(.product-category):before,
.error404 ul.products li.product:not(.product-category):hover:before,
.related ul.products li.product:not(.product-category):before,
.related ul.products li.product:not(.product-category):hover:before{
    opacity: 0;
}
/* .archive ul.products li.product ul,
.error404 ul.products li.product ul,
.related ul.products li.product ul{
    list-style-type: none;
} */
.archive ul.products li.product .needtoknow ul,
.archive ul.products li.product .needtoknow ul li,
.error404 ul.products li.product .needtoknow ul,
.error404 ul.products li.product .needtoknow ul li,
.related ul.products li.product .needtoknow ul,
.related ul.products li.product .needtoknow ul li{
    font-size: 14px;
    line-height: 1.5em;
    margin: unset;
}
.archive ul.products li.product .needtoknow p,
.error404 ul.products li.product .needtoknow p,
.related ul.products li.product .needtoknow p{
    margin: unset;
}
body ul.products li.product .button{
    opacity: 1;
}
.product-card__slide ul.products li.product:not(.product-category):hover .woocommerce-card__header{
    transform: unset;
    transition: unset;
}

.related-wrapper{
    background-color: #f4f4f4;
}

.related>h2{
    text-transform: capitalize;   
}
.related-wrapper .related .woocommerce-image__wrapper img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail{
    width: 60%;
}

.shoptimizer-archive ul.products li.product .button.more-details{
    /* display: none!important; */
    margin-bottom: 1rem;
    width: max-content;
    padding-inline: 2rem;
    background-color: transparent;
    border: 2px solid var(--light-green);
    color: var(--light-green);
    display: flex;
    align-items: center;
}
.shoptimizer-archive ul.products li.product .button.more-details:hover{
    background-color: var(--dark-green);
    border: 2px solid var(--dark-green);
    color: #fff;
}

/* Thumbnails */
.swiper-wrapper.flex-control-nav .swiper-slide{
    aspect-ratio: 1 / 1 ;
    padding: 0.5rem;
}
.swiper-wrapper.flex-control-nav .swiper-slide img{
    object-fit:contain;
    background-color: #fff;
    width: var(--thumbnail-length)!important;
    height: var(--thumbnail-length)!important;
}

/* Filters */
.facet-wrap .facetwp-slider-wrap {
    padding-bottom: 0.5rem;
}
input.facetwp-slider-reset{
    all:unset;
    margin-top: 0.75rem;
    background-color: var(--light-green);
    color: #fff;
    padding: 0.5rem 3rem;
    font-size: 14px;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    border-radius: 4px;
    transition: background-color 0.3s;
}
input.facetwp-slider-reset:hover{
    background-color: var(--dark-green);
}

/* Pagination */
body .shoptimizer-sorting {
    display: grid;
    width: 100%;
    gap: 2rem;
    grid-template-columns: 1fr;
}
@media screen and (min-width: 771px){
    body .shoptimizer-sorting {
        grid-template-columns: 1fr 1fr;
    }
}
.shoptimizer-sorting>*{
    margin: unset;
}
.shoptimizer-sorting .woocommerce-notices-wrapper{
    grid-column: 1 / 3;
}
.shoptimizer-sorting .woocommerce-notices-wrapper:empty{
    display:none;
}
.shoptimizer-sorting .woocommerce-result-count{
    display:none;
}

.shoptimizer-sorting > *:last-child{
    text-align: right;
}
.shoptimizer-sorting > *:nth-last-child(2){
    text-align: center;
}
.shoptimizer-sorting .woocommerce-ordering select{
    width: auto;
}

.shoptimizer-sorting .facetwp-facet-pagination {
    order: 3;
    margin-bottom:unset;
}

/* Facet Pagination */
.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager {
    margin-bottom: unset;
}

.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-pager {
    justify-content: center;
    display: flex;
    gap: 15px;
}
@media screen and (min-width: 771px){
    .facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-pager {
        justify-content: flex-end;
    }
}

.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-page {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: unset;
    border: 1px solid #222;
    min-width: 45px;
    min-height: 45px;
    border-radius: 50px;
    color: #222;
    transition: all 0.3s ease;
}

.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-page.active,
.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-page:hover {
    background-color: #222;
    color: #fff;
}

.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-page.next:before,
.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-page.prev:before {
    content:'';
    background-color: #222;
    mask: url('./assets/arrowsolid.svg');
    mask-position: center;
    mask-repeat: no-repeat;
    width: 20px;
    aspect-ratio: 1 / 1;
    transition: background-color 0.3s;
}
.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-page.prev:before{
    transform: rotate(180deg);
}
.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-page.next:hover:before,
.facetwp-facet.facetwp-facet-pagination.facetwp-type-pager .facetwp-page.prev:hover:before {
    background-color: #fff;
}

/* Cart */
.woocommerce-cart .shoptimizer-archive h1.entry-title{
    display:block;
    margin-top: 2rem;
}