/**
 * Header Cart Icon Styles
 */

.dmn-header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: currentColor;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.dmn-header-cart:hover {
    opacity: 0.7;
}

.dmn-header-cart svg {
    width: 20px;
    height: 20px;
}

.dmn-header-cart .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ff4444;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dmn-header-cart .cart-count[data-count="0"] {
    display: none;
}

/* Animation on count change */
@keyframes cartBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.dmn-header-cart .cart-count {
    animation: cartBounce 0.3s ease;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .dmn-header-cart {
        width: 36px;
        height: 36px;
        margin-left: 8px;
    }

    .dmn-header-cart svg {
        width: 20px;
        height: 20px;
    }

    .dmn-header-cart .cart-count {
        min-width: 16px;
        height: 16px;
        font-size: 10px;
        line-height: 16px;
    }
}

/* Hide on cart/checkout pages */
body.woocommerce-cart .dmn-header-cart,
body.woocommerce-checkout .dmn-header-cart {
    display: none;
}