/*
Theme Name:     Minimari-AUD
Theme URI:      http://smokeandmirrors.jp
Description:    Customizations for the Emoza Woocommerce website.
Author:         Paul Riesch
Author URI:     http://aspirelab.io
Template:       emoza-woocommerce
Text Domain:    minimari
Version:        0.1.0
License:        GNU General Public License v2 or later
License URI:    http://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --var-color-gray: #f5f5f5;
    --var-color-dark-gray: #a1a1a1;
    --var-white-transparent: #ffffffdc;
}


/*
GENERAL
*/
body .content-wrapper .main-row {
    justify-content: center;
}

.ehfb-desktop {
    z-index: auto !important;
}

@media (max-width: 1024px) {
    .ehfb-row.ehfb-cols-layout-equal-tablet.ehfb-cols-3 {
        grid-template-columns: 0fr 1.1fr 3fr !important;
    }
}

@media (max-width: 575px) {
    .ehfb-header .ehfb-main_header_row .ehfb-column-3 .ehfb-builder-item + .ehfb-builder-item {
        margin-left: 0px !important;
    }

    .ehfb-column-2 {
        margin-right: 1rem;
    }

    .ehfb-column-2 .site-title{
        font-size: 1rem;
    }

    .ehfb-column-3 .ehfb-builder-item.ehfb-component-woo_icons {
        flex-wrap: wrap;
        gap: 1rem;
        margin-right: 0.5rem;
    } 

    .ehfb-column-3 .ehfb-builder-item.ehfb-component-woo_icons #condition-switcher {
        width: 100% !important;
        margin: 0px !important;
    }

    .ehfb-column-3 .ehfb-builder-item.ehfb-component-woo_icons > :not(:first-child) {
        margin: 0px !important;
    }
}

@media (min-width: 576px) {
    .ehfb-column.ehfb-column-1{
        min-width: 0 !important;
    }
}

@media (min-width: 576px) {
    .ehfb-column .ehfb-column-1 {
        min-width: 0 !important;
    }
}

/*
NOTIFICATION TOAST
*/

.toastContainer {
    position: fixed;
    display: flex;
    bottom: 15%;
    width: 100%;
    justify-content: center;
    transform: translateY(10svh);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

.toastBox {
    background: #FFF;
    border: 0.15rem solid var(--em-color-button-bg);
    margin: 0 1rem 0 1rem;
}

.toastError {
    background-color: #f3b7b7;
    border: 0.2rem solid #fd7171;
}

.toastContainer.visible {
    opacity: 1;
    transform: translate(0);
}

.toastText {
    padding: 1rem 1rem 1rem 1rem;
    margin: 0;
}

/*
START PAGE
*/
.page-template-start .site header {
    display: none;
}

.page-template-start #currency-toggle-container {
    display: none;
}

.page-template-start .main-row .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10svh;
    margin: 0 5svw 0 5svw;
}

.page-template-start .main-row {
    justify-content: center;
}

.page-template-start .main-row .content a.button {
    width: 50%;
    text-align: center;
}


/*
ACCESS DENIED PAGE
*/
.page-template-access-denied .site header {
    display: none;
}

.page-template-access-denied #currency-toggle-container {
    display: none;
}


/*
SINGLE PRODUCT PAGE
*/  

.product .summary .price {
    margin-bottom: 0;
}

.product .summary p {
    margin-bottom: 0;
}

.product .summary h5 {
    margin: 0;
}

.product .summary input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    width: 2rem;
    height: 2rem;
    border: 0.15rem solid var(--em-color-button-bg);
    display: grid;
    place-content: center;
}

.product .summary input[type="checkbox"]::before {
    content: "";
    width: 1rem;
    height: 1rem;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    background-color: #fff;
    display: none;
}

.product .summary input[type="checkbox"]:checked::before {
    display: block;
}

.product .summary input[type="checkbox"]:checked {
    background-color: var(--em-color-button-bg);
}


.product .summary .single-purchase {
    display: flex;
    justify-content: space-between;
    align-items: flex-start ;
    border: 0.2rem var(--var-color-gray);
    border-style: solid solid none solid;
    padding: 2svh;
}

.product .summary .subscription-purchase {
    display: flex;
    justify-content: space-between;
    align-items: flex-start ;
    border: 0.2rem  solid var(--var-color-gray);
    padding: 2svh;
}

.product .summary .cart-wrapper {
    border: 0.2rem var(--var-color-gray);
    border-style: none solid solid solid;
    padding: 2svh;
}

.product .summary .cart {
    margin-bottom: 0;
}

.product .summary .info-wrapper {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: start;
    align-content: center;
    column-gap: 4svw;
    row-gap: 0.5svh;
    padding: 2svh;
    margin-top: 0;
    border: 0.2rem var(--var-color-gray);
    border-style: none solid solid solid;
}

.info-wrapper > * {
    align-self: center;
}

/*
CHECKOUT
*/
.checkout-wrapper .woocommerce-checkout-review-order {
    background-color: #fff;
}

#customer_details.minimari-checkout {
    flex: 0 0 60%;
    max-width: 60%;
}

.checkout .checkout-wrapper {
    position: sticky;
    flex: 0 0 calc(40% - 50px);
    max-width: calc(40% - 50px);
    margin-left: 50px;
}

.study-information {
    background-color: #f3e2b773;
    border: 0.2rem solid #fdd571;
    padding: 1rem;
    margin: 0 0 1rem 0;
}

.study-information p {
    margin: 0;
}

@media (max-width: 991px){

    #customer_details.minimari-checkout {
        max-width: 100%;
    }

    .checkout .checkout-wrapper {
        position: sticky;
        flex: 0 0 100%;
        max-width: 100%;
        margin-left: 0;
    }

    form.checkout.woocommerce-checkout {
        display: flex;
        flex-direction: column-reverse;
    }

}

/* Order Summary */
.woocommerce-checkout-review-order-table .product-overview {
    display: flex;
    flex-direction: row;
    column-gap: 2svh;
}

.product-overview .product-image {
    padding-top: 0.5rem;
    max-width: 48px;
}

.product-overview .product-info {
    text-align: left;
}

.product-overview .product-info p {
    margin: 0;
}

#order_review .product-total {
    vertical-align: top;
}

.product-info .buy-option {
    font-size: 0.75rem;
    margin-top: 0.75svh;
}

.product-info .single-price {
    margin-top: 0.75svh;
}

.order-total th {
    vertical-align: baseline;
}

.order-total .tax-info {
    margin: 0;
    font-size: 0.75rem;
}

/* Customer details */

#customer_details .col-1 input:not([type="checkbox"]) {
    pointer-events: none;
    color: var(--em-color-forms-placeholder);
    border: 1px solid var(--em-color-forms-dividers);
}

#customer_details .woocommerce-billing-fields label {
    pointer-events: none;
    color: var(--em-color-forms-placeholder)
}

#customer_details .wc_payment_methods {
    border: 0.15rem var(--em-color-forms-borders) solid;
}

#customer_details ul.wc_payment_methods {
    list-style: none;
    margin: 0;
    padding-left: 2svh;
}

#customer_details ul li label {
    padding: 1rem 0 1rem 0  ;
}

#order_comments_field {
    padding: 0;
    background-color: #fff;
}

.woocommerce-additional-fields {
    margin-top: 3svh;
}

.checkout-submit-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkout-submit-wrapper .wc-block-components-checkout-return-to-cart-button {
    display: flex;
    align-items: center;
}

.checkout-submit-wrapper #place_order {
    width: 50%;
}

h3#ship-to-different-address {
    display: none;
}

/* Order received */
.woocommerce-order-overview__order.order span {
    background: yellow;
}



/*
HOME
*/
.home .entry-header {
    display: none;
}

.home .page-header {
    display: none;
}

.home .product-category img {
    width: 100%;
}

.home .wp-block-spacer {
    height: 5svh;
}

.home .hero-section {
    position: relative;
}

.home #hero-banner {
    width: 100%;
    object-fit: cover;
    object-position: left center;
}

.home #hero-content-container {
    display: none;

    position: absolute;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    top: 0;
    right: 0;
    height: 100%;
    padding: 3svh;
    row-gap: 3svh;
}

#hero-content-container .hero-text {
    background-color: var(--var-white-transparent);
    padding: 5svh 2svh 5svh 2svh;
    text-align: right;
}

#hero-content-container .button {
    width: 75%;
    text-align: center;
}

/*
PRODUCT GRID
*/

.product-card input::-webkit-outer-spin-button,
.product-card input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-card input[type=number] {
  -moz-appearance: textfield;
}

.product-card .quantity {
    height: auto !important;
}

.product-card .buy-area-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
}

.buy-area-wrapper .add_to_cart_button {
    margin: 0 !important;
}

.product-card .buy-options {
    display: flex;
    flex-direction: column;
    row-gap: 0.25rem;
    margin: 0 1rem 0 1rem;
}

.product-card .buy-options .option {
    padding-right: 2rem;
}

.buy-options label{
    position: relative;
    display: flex;
    cursor: pointer;
    justify-content: space-between;
    width: 100%;
}

.buy-options .hide {
    display: none;
}

.buy-options label input{
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.buy-options label:hover input ~ .checkmark {
    background-color: var(--var-color-gray);
  }

.buy-options .checkmark {
    position: absolute;
    top: calc(50% - 0.75rem);
    right: 0;
    height: 1.5rem;
    width: 1.5rem;
    border-radius: 50%;
    outline: 0.1rem solid #000
  }

.buy-options .checkmark:after {
    content: "";
    position: absolute;
    display: none;
  }

.buy-options label input:checked ~ .checkmark:after {
    display: block;
  }

.buy-options label .checkmark:after {
    top: 0.25rem;
    left: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: black;
}

.product-card .price {
    margin: 0;
}

.product-grid li {
    padding-left: 0;
    padding-right: 0;
}

.product-grid .woocommerce-loop-product__title:hover {
    cursor: default;
}

.loop-image-wrap img:hover{
    opacity: 1 !important;
}

.product-grid img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail {
    width: 100%;
}

#page .ehfb-mobile_offcanvas .ehfb-builder-item.ehfb-component-search, 
#page .ehfb.ehfb-header .ehfb-builder-item.ehfb-component-search {
    display: none;
}

/*
Control condition switcher
*/

#condition-switcher {
    width: 27%;
    margin-right: 0.5rem;
}

#condition-switcher select {
    background-position: calc(100% - 10%) 50%;
    padding: 0;
    min-height: 0;
}

/*
CURRENCY TOGGLE
Thanks to https://stackoverflow.com/a/79274945
*/
#currency-toggle-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-right: 0.5rem;
}

#currency-toggle-container .toggle {
    position: relative;
    display: inline-block;
    width: 2rem;
    height: 1.05rem;
    margin: 0 0.75rem 0 0.75rem;
  }
  
#currency-toggle-container .toggle input {
    display: none;
}

#currency-toggle-container .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    border-radius: 1rem;
}

#currency-toggle-container .slider:before {
    position: absolute;
    content: "";
    height: 0.85rem;
    width: 0.85rem;
    left: 0.1rem;
    bottom: 0.1rem;
    background-color: #FFF;
    transition: 0.4s;
    border-radius: 50%;
}

#currency-toggle-container .slider.no-transition:before  {
    transition: none;
    display: none;
}

#currency-toggle-container input:checked + .slider:before {
    transform: translateX(0.95rem);
    bottom: 0.1rem;
}

#currency-toggle-container .currency-label {
    font-size: 0.9rem;
    margin: 0;
}
#currency-toggle-container .currency-label#jpy-label {
    margin-right: 0.65rem;
}

#currency-toggle-container .currency-label.disabled {
    color: var(--var-color-dark-gray);
}

/*
CART
*/
.wp-block-woocommerce-cart .wc-block-components-sale-badge {
    display: none;
}

.wp-block-woocommerce-cart .wc-block-components-product-price__regular {
    display: none;
}
.wp-block-woocommerce-cart .wc-block-components-product-price__value.is-discounted {
    margin: 0;
}

.wp-block-woocommerce-cart .wc-block-components-totals-shipping__change-address__link {
    display: none;
}

.wc-block-cart-items .wc-block-components-product-name:hover {
    color: var(--em-color-link-default);
    cursor: default;
}

#page .ehfb-component-woo_icons .site-header-cart .count-number, 
#page .ehfb-component-woo_icons .header-wishlist-icon .count-number {
    background-color: #000;
    border-color: #000;
}

/*
DPs PRODUCT CARD
*/
.related.products .products {
    overflow: visible;
}

/* .product.outline {
    outline: 0.25rem solid var(--em-color-forms-borders);
} */

/* KS: New version on Thu Feb 13, 2025 */
.product {
    transform: scale(.9);
}
.product.outline {
    transform: scale(1);
    outline: 0.15rem solid var(--em-color-forms-borders);

    box-shadow: rgba(0, 0, 0, 0.25) 0 0.5rem 2rem;
    padding-bottom: 1.25rem;
}
.product.outline:before {
    content: " ";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 0.6rem solid #F5C242;
}
.product.outline .product-card {
    position: relative;
    z-index: 2;
    padding: 0 0.6rem;
}

.buy-options label.discreet {
    /* opacity: 50%; */
    /* KS: New version on Thu Feb 13, 2025 */
    opacity: 25%;
}

/*
DPs PRODUCT VIEW
*/
.product .summary.false-hierarchy .subscription-purchase{
    border: 0.2rem solid var(--em-color-forms-borders);
}

.product .summary.false-hierarchy .single-purchase{
    opacity: 50%;
}