/*!
Theme Name: Inspry Theme
Theme URI: https://www.inspry.com
Template: kadence
Author: Inspry
Author URI: https://www.inspry.com
Description: Inspry's very own child theme for the Kadence theme.
Version: 1.0.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: inspry-child
*/

/* Theme customization starts here
-------------------------------------------------------------- */
.cm_vehicle-widget_button{
	display: flex!important;
}

.cm_button__primary, .cm_button__secondary {
    padding: 5px!important;
}

/** Single products page **/

.fd-price {

}

.fd-price__row {
    margin-bottom: 20px;
}

.fd-price__number {
    font-size: 24px; font-weight: bold; color: var(--wp--preset--color--vivid-red);
}

.fd-price__qty {
    font-size: 14px;
    color: #666;
}

.fd-hr {
    margin-block: 1.5rem;
}


.fd-financing-btn {
    background: white;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: inherit;
    cursor: pointer;
}

.fd-financing-btn:hover {
    background: white;
    color: inherit;
}

/**
 * Pricing Display - Start
 *
 * Handles hiding our custom price range and showing build-in WooCommerce price when a variation is selected.
 */

.fd-price:has(
    ~ .single_variation_wrap .single_variation[style*='display: block']
) {
    display: none;
}

.single_variation_wrap .single_variation .woocommerce-Price-amount {
    font-size: 24px;
    font-weight: bold;
    color: var(--wp--preset--color--vivid-red);
}

.single_variation_wrap .single_variation .woocommerce-Price-amount::after {
    content: ' /each';
    font-size: 14px;
    font-weight: normal;
    color: #666;
}

/**
 * Pricing Display - End
 */

 /** Hide empty product descriptions. This requires `product-description` to be added as a class to the product description item in Kadence. */
.product-description:has(.kt-accordion-panel-inner:empty) {
    display: none;
}

/** Gallery submit button spinner **/

@keyframes wsform-spinner {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.wsf-form.wsf-form-post-lock-progress button.wsf-button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.wsf-form.wsf-form-post-lock-progress button.wsf-button[type="submit"]::after {
    content: '';
    display: inline-block;
    width: 2ch;
    height: 2ch;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="%23ffffff" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>');
    animation-name: wsform-spinner;
    animation-play-state: running;
    animation-duration: 1000ms;
    animation-iteration-count: infinite;
}

/** White background for single product image enlarge **/

body.single-product .glightbox-container .gslide-image img {
    background-color: #fff;
}

/** Mini cart view cart button **/

.woocommerce-mini-cart__buttons .button.wc-forward {
    background-color: var(--global-palette-btn-bg);
    color: #fff;
}

/** Single product gallery image constraints **/

body.single-product .kadence-product-gallery-main img.attachment-shop-single {
    max-height: 30rem;
    object-fit: contain;
}

/** Shipping methods on checkout **/

.woocommerce-shipping-methods li {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 0.5rem;
}

.woocommerce-shipping-methods label {
    min-width: 14ch;
}

.woocommerce-shipping-methods li input {
    margin-right: 0 !important;
}


/** Product attributes specs table **/

ul.product-attributes {
    margin-left: 0;
    border: 1px solid lightgray;
}

.specs-section-header {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1em;
    margin-bottom: 0.25em;
}

.variation-specs-notice {
    font-size: 0.85em;
    font-style: italic;
    opacity: 0.6;
    margin-top: 0;
}

/** Hide shipping row on cart page (did not work when hiding via blocks) **/
.wp-block-woocommerce-cart-order-summary-block .wp-block-woocommerce-cart-order-summary-shipping-block {
    display: none;
}

/** Hide variation rows on UVS pages before JS runs **/

body.has-uvs table.variations tr {
    display: none;
}

/** Single variation wrap - puts "In Stock" to right of price **/

.single_variation_wrap .single_variation[style*="display: block"] {
    display: flex !important;
    align-items: baseline;
    gap: 0.75rem;
    line-height: 1.2;
}

.single_variation_wrap .single_variation .stock {
    margin: 0;
}

.single_variation_wrap .single_variation .woocommerce-variation-description:empty {
    display: none;
}

.custom_options {
    margin-bottom: 0;
}

/** Add spacing above "Save My Setup" button on cart page **/
.gpls-wsvodr-save-cart-btn-wrapper.gpls-wsvodr-save-cart-btn-wrapper {
    margin-top: 0.75rem !important;
}

/** Make cart icon gray until non-empty **/
.header-cart-is-empty-true {
    background-color: var(--global-palette7) !important;
    color: inherit !important;
}

/** Add right margin to CM Garage in navigation **/
.site-header-item + [class*="cm_garage-container"] {
    margin-right: 20px;
}


/** Non-wheel/tire single product - stock status next to price **/
.wp-singular .kadence-woo-template-wrap.product:not(.product_cat-tire):not(.product_cat-wheel) .inspry-single-product-details-col > .kt-inside-inner-col {
    display: contents;
}

.wp-singular .kadence-woo-template-wrap.product:not(.product_cat-tire):not(.product_cat-wheel) .inspry-single-product-details-col {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-self: start;
    gap: 0.75rem;
}

.wp-singular .kadence-woo-template-wrap.product:not(.product_cat-tire):not(.product_cat-wheel) .inspry-single-product-details-col > .kt-inside-inner-col > *,
.wp-singular .kadence-woo-template-wrap.product:not(.product_cat-tire):not(.product_cat-wheel) .inspry-single-product-details-col > .kt-inside-inner-col .kwt-add-to-cart-wrap > * {
    width: 100%;
}

.wp-singular .kadence-woo-template-wrap.product:not(.product_cat-tire):not(.product_cat-wheel) .inspry-single-product-details-col .kwt-price-wrap {
    width: auto;
    margin: 0;
    align-self: baseline;
}

.wp-singular .kadence-woo-template-wrap.product:not(.product_cat-tire):not(.product_cat-wheel) .inspry-single-product-details-col .stock {
    width: auto !important;
    margin: 0;
    align-self: baseline;
}

.wp-singular .kadence-woo-template-wrap.product:not(.product_cat-tire):not(.product_cat-wheel) .inspry-single-product-details-col .kwt-add-to-cart-wrap {
    display: contents;
}

.wp-singular .kadence-woo-template-wrap.product:not(.product_cat-tire):not(.product_cat-wheel) .inspry-single-product-details-col .cart,
.wp-singular .kadence-woo-template-wrap.product:not(.product_cat-tire):not(.product_cat-wheel) .inspry-single-product-details-col .inspry-single-product-distributor {
    width: 100%;
}

/** Hover "bubble" count indicators for mobile headers **/
@media (width < 48rem) {
    .cm_garage-container__mobile .garage-button {
        display: block;
        min-height: 2rem;
        margin-right: 0.75rem;
        background-color: transparent;
    }

    .cm_garage-container__mobile .garage-icon-container .garage-size {
        position: absolute;
        top: -0.5rem;
        right: -0.5rem;
        width: 1.25rem;
        height: 1.25rem;
    }

    .site-mobile-header-wrap .header-cart-button {
        position: relative;
        min-height: 2rem;
        margin-right: 1rem;
    }

    .site-mobile-header-wrap .header-cart-button .header-cart-total {
        position: absolute;
        top: -0.5rem;
        right: -0.5rem;
        width: 1.25rem;
        height: 1.25rem;
    }
}

