/* =====================================================
   SOO NUTTY! POPULAR PRODUCTS
   Complete Styling — Version 1.5.0
   ===================================================== */


/* =====================================================
   1. PRODUCT PURCHASE WRAPPER
   ===================================================== */

.sn-popular-purchase {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}


/* =====================================================
   2. RATING & REVIEWS
   ===================================================== */

.sn-popular-purchase .sn-popular-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0 8px;
    font-size: 12px;
    line-height: 1.4;
}

.sn-popular-purchase .sn-popular-stars {
    position: relative;
    display: inline-block;
    font-size: 15px;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
}

.sn-popular-purchase .sn-stars-background {
    color: #D8D8D8;
}

.sn-popular-purchase .sn-stars-filled {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    color: #E8A317;
}

.sn-popular-purchase .sn-popular-rating-number {
    font-size: 12px;
    font-weight: 600;
    color: #173F2A;
}

.sn-popular-purchase .sn-popular-review-count {
    font-size: 11px;
    font-weight: 400;
    color: #888888;
}

.sn-popular-purchase .sn-preview-label {
    font-size: 9px;
    color: #888888;
    border: 1px solid #DDDDDD;
    border-radius: 3px;
    padding: 1px 4px;
}


/* =====================================================
   3. VARIATION
   ===================================================== */

.sn-popular-purchase .sn-popular-variation {
    color: #444444;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    margin: 4px 0;
}


/* =====================================================
   4. PRICE
   ===================================================== */

.sn-popular-purchase .sn-popular-price {
    display: block;
    margin: 5px 0 8px;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}

/* Listed / Regular Price */

.sn-popular-purchase .sn-popular-price del,
.sn-popular-purchase .sn-popular-price del bdi,
.sn-popular-purchase .sn-popular-price del .amount {
    color: #A0A0A0 !important;
    font-size: 13px;
    font-weight: 400 !important;
    text-decoration: line-through !important;
    opacity: 1;
}

/* Selling / Sale Price */

.sn-popular-purchase .sn-popular-price ins,
.sn-popular-purchase .sn-popular-price ins bdi,
.sn-popular-purchase .sn-popular-price ins .amount {
    color: #173F2A !important;
    font-size: 14px;
    font-weight: 700 !important;
    text-decoration: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Regular-priced products without a sale */

.sn-popular-purchase .sn-popular-price > .amount,
.sn-popular-purchase .sn-popular-price > .woocommerce-Price-amount {
    color: #173F2A;
    font-weight: 700;
    text-decoration: none;
}


/* =====================================================
   5. BUY ROW — ALL DEVICES
   SPACE BETWEEN
   ===================================================== */

.sn-popular-cart-form {
    width: 100%;
    margin: 0;
}

.sn-popular-cart-form .sn-popular-buy-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;

    /* Quantity left, Add button right */
    justify-content: space-between !important;

    flex-wrap: nowrap !important;
    width: 100%;
    gap: 8px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =====================================================
   6. DESKTOP & TABLET QUANTITY
   ===================================================== */

.sn-popular-cart-form .sn-popular-qty-wrap {
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    flex: 0 0 64px;
    box-sizing: border-box;
}

.sn-popular-cart-form .sn-popular-qty {
    display: block;
    width: 100%;
    height: 38px;
    padding: 4px 2px 4px 8px;
    margin: 0;
    box-sizing: border-box;
    border: 1px solid #999999;
    border-radius: 3px;
    background: #FFFFFF;
    color: #333333;
    text-align: left;
    font-size: 14px;
    font-weight: 400;

    /* Desktop native arrows */
    appearance: auto;
    -webkit-appearance: auto;
}


/* Hide custom arrows on desktop/tablet */

.sn-popular-cart-form .sn-mobile-qty-arrows {
    display: none;
}


/* =====================================================
   7. ADD TO CART BUTTON
   ===================================================== */

.sn-popular-cart-form .sn-popular-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 85px;
    height: 38px;

    padding: 0 10px;
    margin: 0;

    flex: 0 0 auto;

    border: 1px solid #173F2A;
    border-radius: 3px;

    background: #FFFFFF;
    color: #173F2A;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    white-space: nowrap;
    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

/* Hover */

.sn-popular-cart-form .sn-popular-add:hover {
    background: #173F2A;
    color: #FFFFFF;
    border-color: #173F2A;
}

/* Keyboard focus */

.sn-popular-cart-form .sn-popular-add:focus-visible {
    outline: 2px solid #DD6705;
    outline-offset: 2px;
}

/* Disabled / AJAX loading */

.sn-popular-cart-form .sn-popular-add:disabled {
    opacity: 0.75;
    cursor: wait;
}


/* =====================================================
   8. TABLET
   ===================================================== */

@media (min-width: 768px) and (max-width: 1024px) {

    .sn-popular-cart-form .sn-popular-buy-row {
        justify-content: space-between !important;
        gap: 8px;
    }

    .sn-popular-cart-form .sn-popular-add {
        min-width: 75px;
        padding: 0 8px;
        font-size: 12px;
    }

}


/* =====================================================
   9. MOBILE
   ===================================================== */

@media (max-width: 767px) {

    /* -----------------------------------------------
       BUY ROW — SPACE BETWEEN
       ----------------------------------------------- */

    .sn-popular-cart-form .sn-popular-buy-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 5px;
        width: 100%;
    }


    /* -----------------------------------------------
       COMBINED QUANTITY BOX
       ----------------------------------------------- */

    .sn-popular-cart-form .sn-popular-qty-wrap {
        display: flex;
        align-items: center;

        width: 96px;
        min-width: 96px;
        max-width: 96px;
        height: 40px;

        flex: 0 0 96px;

        border: 1px solid #999999;
        border-radius: 3px;
        overflow: hidden;

        background: #FFFFFF;
        box-sizing: border-box;
    }


    /* -----------------------------------------------
       QUANTITY NUMBER
       ----------------------------------------------- */

    .sn-popular-cart-form .sn-popular-qty {
        display: block;

        width: 38px;
        min-width: 0;
        height: 38px;

        flex: 1 1 auto;

        padding: 0 2px;
        margin: 0;

        border: 0;
        border-radius: 0;
        box-shadow: none;
        outline: none;

        background: transparent;
        color: #333333;

        text-align: center;
        font-size: 13px;

        /* Hide browser arrows on mobile */
        appearance: textfield;
        -moz-appearance: textfield;
        -webkit-appearance: none;
    }

    .sn-popular-cart-form .sn-popular-qty::-webkit-inner-spin-button,
    .sn-popular-cart-form .sn-popular-qty::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }


    /* -----------------------------------------------
       MOBILE ▼ ▲ ARROWS
       ----------------------------------------------- */

    .sn-popular-cart-form .sn-mobile-qty-arrows {
        display: flex;
        flex-direction: row;
        align-items: stretch;

        width: 56px;
        height: 100%;
        flex: 0 0 56px;
    }

    .sn-popular-cart-form .sn-mobile-qty-arrows button {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 28px;
        min-width: 28px;
        height: 100%;

        padding: 0;
        margin: 0;

        border: 0;
        border-left: 1px solid #DDDDDD;
        border-radius: 0;

        background: #F8F8F8;
        color: #173F2A;

        font-size: 11px;
        font-weight: 600;
        line-height: 1;

        cursor: pointer;
        touch-action: manipulation;

        -webkit-tap-highlight-color: transparent;
    }

    .sn-popular-cart-form .sn-mobile-qty-arrows button:hover,
    .sn-popular-cart-form .sn-mobile-qty-arrows button:active {
        background: #E6EFE8;
    }


    /* -----------------------------------------------
       MOBILE ADD TO CART
       ----------------------------------------------- */

    .sn-popular-cart-form .sn-popular-add {
        width: auto;
        min-width: 70px;
        height: 40px;

        padding: 0 6px;
        margin: 0;

        flex: 0 0 auto;

        font-size: 12px;
        white-space: nowrap;
    }


    /* -----------------------------------------------
       MOBILE RATING
       ----------------------------------------------- */

    .sn-popular-purchase .sn-popular-rating {
        gap: 3px;
        margin: 4px 0 6px;
        font-size: 10px;
    }

    .sn-popular-purchase .sn-popular-stars {
        font-size: 13px;
    }

    .sn-popular-purchase .sn-popular-rating-number {
        font-size: 10px;
    }

    .sn-popular-purchase .sn-popular-review-count {
        font-size: 9px;
    }

    .sn-popular-purchase .sn-preview-label {
        font-size: 9px;
    }


    /* -----------------------------------------------
       MOBILE VARIATION
       ----------------------------------------------- */

    .sn-popular-purchase .sn-popular-variation {
        font-size: 11px;
        line-height: 1.35;
        margin: 3px 0;
    }


    /* -----------------------------------------------
       MOBILE PRICE
       ----------------------------------------------- */

    .sn-popular-purchase .sn-popular-price {
        font-size: 12px;
        margin: 4px 0 7px;
    }

    .sn-popular-purchase .sn-popular-price del,
    .sn-popular-purchase .sn-popular-price del bdi {
        font-size: 11px;
    }

    .sn-popular-purchase .sn-popular-price ins,
    .sn-popular-purchase .sn-popular-price ins bdi {
        font-size: 12px;
    }

}