/* Warenkorb Icon Shortcode Styling */

.custom-warenkorb-wrapper {
    display: inline-block;
    position: relative;
}

.custom-warenkorb-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.custom-warenkorb-link:hover {
    opacity: 0.8;
}

.custom-warenkorb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* SVG Icon Styling */
.custom-warenkorb-svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: all 0.3s ease;
}

/* Counter Badge */
.custom-warenkorb-qty {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 20px;
    height: 20px;
    background: #e74c3c;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Wenn Counter 0 ist, ausblenden */
.custom-warenkorb-qty[data-counter="0"] {
    display: none;
}

/* Screen Reader Text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-warenkorb-svg {
        width: 22px;
        height: 22px;
    }

    .custom-warenkorb-qty {
        min-width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 10px;
        top: -6px;
        right: -8px;
    }
}

/* Animation bei Änderung */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.custom-warenkorb-qty.updated {
    animation: pulse 0.3s ease;
}
