/* ===============================================
 * CART BADGE FIX - CENTER NUMBER & STYLING
 * ===============================================
 * Fixes the green cart count badge positioning
 * Centers the number properly
 * NUCLEAR SPECIFICITY - FORCES ALL STYLES
 * =============================================== */

@media (min-width: 992px) {
    /* Cart Count Badge - Centered Number & Proper Styling */
    body div.header-cart-count,
    body .header-cart-count,
    body #cart-count,
    body .cart-count,
    body div.header-cart-1 div.header-cart-count,
    body .header-cart-1 .header-cart-count,
    body div.cart-icon span.header-cart-count,
    body .cart-icon .header-cart-count,
    html body .col-icons .header-cart-1 .header-cart-count,
    html body .col-icons .cart-icon .header-cart-count {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background-color: #28a745 !important; /* Green background */
        background: #28a745 !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        font-size: 12px !important;
        line-height: 1 !important;
        min-width: 22px !important;
        width: 22px !important;
        height: 22px !important;
        border-radius: 50% !important; /* Perfect circle */
        border-radius: 11px !important; /* Fallback for older browsers */
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        position: absolute !important;
        top: -8px !important;
        right: -8px !important;
        z-index: 1201 !important;
        box-shadow: 0 2px 6px rgba(40, 167, 69, 0.4) !important;
        border: 2px solid #ffffff !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Ensure badge text is centered */
    body div.header-cart-count span,
    body .header-cart-count span,
    body #cart-count span,
    body .cart-count span {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        line-height: 1 !important;
        color: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Cart icon wrapper - ensure badge positions correctly */
    body div.cart-icon,
    body .cart-icon,
    body div.header-cart-1 div.cart-icon,
    body .header-cart-1 .cart-icon,
    body div.header-cart-1 a,
    body .header-cart-1 a {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Additional spacing between search and cart */
    body div.header-search-form,
    body .header-search-form,
    body form.search-form {
        margin-right: 25px !important;
        padding-right: 15px !important;
    }

    /* Spacing between icons */
    body div.col-icons,
    body .col-icons {
        display: flex !important;
        align-items: center !important;
        gap: 20px !important;
        padding-left: 15px !important;
    }

    body div.header-cart-1,
    body .header-cart-1,
    body div.header-icon-enhanced,
    body .header-icon-enhanced {
        margin-left: 10px !important;
        margin-right: 10px !important;
    }

    body div.col-icons > div:first-child,
    body .col-icons > div:first-child {
        margin-left: 0 !important;
    }

    body div.col-icons > div:last-child,
    body .col-icons > div:last-child {
        margin-right: 0 !important;
    }
}

/* Mobile badge styling */
@media (max-width: 991px) {
    body div.header-cart-count,
    body .header-cart-count,
    body #cart-count,
    body .cart-count {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background-color: #28a745 !important;
        background: #28a745 !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        font-size: 10px !important;
        line-height: 1 !important;
        min-width: 18px !important;
        width: 18px !important;
        height: 18px !important;
        border-radius: 50% !important;
        border-radius: 9px !important; /* Fallback */
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        position: absolute !important;
        top: -6px !important;
        right: -6px !important;
        z-index: 1201 !important;
        box-shadow: 0 2px 4px rgba(40, 167, 69, 0.4) !important;
        border: 2px solid #ffffff !important;
        box-sizing: border-box !important;
    }

    body div.header-cart-count span,
    body .header-cart-count span,
    body #cart-count span,
    body .cart-count span {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        line-height: 1 !important;
        color: #ffffff !important;
    }
}

