/* PERFORMANCE OPTIMIZATION FIXES */
/* Will-change memory management to avoid browser warnings */

/* Only apply will-change during actual transitions */
.transitioning {
    will-change: transform, opacity;
}

/* Reset will-change after animations */
.transition-complete {
    will-change: auto;
}

/* ==========================================================================
   GRUNDPREIS STYLING
   ========================================================================== */

/* Grundpreis display in price section */
[id$="-grundpreis"] {
    font-size: 11px !important;
    color: #888 !important;
    font-style: italic;
    margin-bottom: 5px;
    padding: 2px 0;
    border-top: 1px solid #eee;
    margin-top: 3px;
    padding-top: 5px;
}

/* Grundpreis in size selector options */
.product-size-option small {
    display: block;
    color: #888;
    font-size: 10px;
    font-style: italic;
    margin-top: 2px;
    line-height: 1.2;
}

/* Mobile responsive adjustments for Grundpreis */
@media (max-width: 768px) {
    [id$="-grundpreis"] {
        font-size: 10px !important;
    }
    
    .product-size-option small {
        font-size: 9px;
    }
}

/* Hover-based will-change for interactive elements */
.interactive-hover:hover {
    will-change: transform;
}

/* Animation event-based will-change management */
.animating {
    will-change: transform, opacity;
}

.animating.animation-complete {
    will-change: auto;
}

/* Memory-efficient gallery optimizations */
.gallery-optimized .gallery-main-image {
    will-change: auto;
}

.gallery-optimized .gallery-main-image.active-transition {
    will-change: opacity, transform;
}

.gallery-optimized .gallery-thumbnail:hover,
.gallery-optimized .gallery-nav:hover {
    will-change: transform;
}

/* Remove will-change from static elements */
.static-element {
    will-change: auto !important;
}