/* Cardamom Cart Counter */

.cdm-cart-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    width: 44px;
    height: 44px;
}

.cdm-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    transition: transform 0.2s ease;
}
.cdm-cart-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}
.cdm-cart-wrap:hover .cdm-cart-icon {
    transform: scale(1.08);
}

/* Contador */
.cdm-cart-count {
    position: absolute;
    top: 0px;
    right: 0px;
    min-width: 18px;
    height: 18px;
    background-color: #e07a2f;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    letter-spacing: 0;
}

.cdm-cart-count.cdm-has-items {
    opacity: 1;
    transform: scale(1);
}

/* Animacion al agregar */
.cdm-cart-count.cdm-bump {
    animation: cdmBump 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes cdmBump {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.5); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Animacion del icono al agregar */
.cdm-cart-icon.cdm-shake {
    animation: cdmShake 0.4s ease;
}
@keyframes cdmShake {
    0%   { transform: rotate(0deg) scale(1); }
    20%  { transform: rotate(-12deg) scale(1.1); }
    50%  { transform: rotate(10deg) scale(1.15); }
    75%  { transform: rotate(-6deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}