/**
 * ==================================================================================
 * SKELETON LOADER STYLES
 * ==================================================================================
 * Moderne Loading States für bessere UX
 * ==================================================================================
 */

/* ==================== SKELETON BASE ==================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== SKELETON PRODUCT CARD ==================== */
.skeleton-product-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 0;
}

.skeleton-product-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-product-info {
    padding: 20px;
}

.skeleton-title {
    height: 20px;
    width: 80%;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 14px;
    width: 60%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* ==================== SKELETON GRID ==================== */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* ==================== LOADING OVERLAY ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--primary-color, #2A9F87);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 16px;
    font-size: 16px;
    color: var(--text-secondary, #64748b);
    text-align: center;
}

/* ==================== INLINE LOADING STATE ==================== */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary, #64748b);
}

.loading-state i {
    font-size: 32px;
    color: var(--primary-color, #2A9F87);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-state p {
    margin-top: 12px;
    font-size: 14px;
}

/* ==================== SHIMMER EFFECT (Alternative) ==================== */
.shimmer {
    position: relative;
    overflow: hidden;
    background: #f6f7f8;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: shimmer-slide 1.5s infinite;
}

@keyframes shimmer-slide {
    to {
        left: 100%;
    }
}

/* ==================== PROGRESS BAR ==================== */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color, #2A9F87);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar-indeterminate {
    position: absolute;
    width: 30%;
    height: 100%;
    background: var(--primary-color, #2A9F87);
    animation: progress-indeterminate 1.5s infinite;
}

@keyframes progress-indeterminate {
    0% {
        left: -30%;
    }
    100% {
        left: 100%;
    }
}

/* ==================== SKELETON VARIATIONS ==================== */
.skeleton-circle {
    border-radius: 50%;
}

.skeleton-line {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-line:last-child {
    width: 75%;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .skeleton-product-image {
        height: 180px;
    }
}

/* ==================================================================================
 * NEUE FEATURES CSS - Babylugg 7.0
 * ==================================================================================
 * Styles für Verfügbarkeits-Anzeige, Cross-Selling, Dynamisches Pricing
 * ==================================================================================
 */

/* ==================== VERFÜGBARKEITS-ANZEIGE ==================== */
.availability-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin: 10px 0;
    text-align: center;
}

.availability-available {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.availability-limited {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.availability-unavailable {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.availability-loading {
    background-color: #e9ecef;
    color: #6c757d;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ==================== CROSS-SELLING EMPFEHLUNGEN ==================== */
.recommendations-widget {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.recommendations-widget h3 {
    margin-bottom: 24px;
    font-size: 24px;
    color: var(--secondary-color, #591670);
    text-align: left;
    border-bottom: none;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.recommendation-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.recommendation-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 12px;
}

.recommendation-card h4 {
    margin: 10px 0 8px;
    font-size: 15px;
    color: var(--text-color, #333);
    min-height: 40px;
    line-height: 1.3;
}

.recommendation-card .price {
    color: var(--primary-color, #2A9F87);
    font-weight: bold;
    font-size: 16px;
    margin: 8px 0 12px;
}

.btn-add-recommendation {
    background-color: var(--primary-color, #2A9F87);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-add-recommendation:hover {
    background-color: #008080;
    transform: scale(1.02);
}

.btn-add-recommendation:active {
    transform: scale(0.98);
}

/* ==================== DYNAMISCHES PRICING ==================== */
.discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 17px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: discount-pulse 2s infinite;
    margin: 16px 0;
    text-align: center;
}

@keyframes discount-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
}

.price-breakdown {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.price-breakdown h4 {
    margin: 0 0 16px 0;
    color: var(--primary-color, #2A9F87);
    font-size: 18px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 15px;
}

.price-line:last-child {
    border-bottom: none;
}

.price-line.discount {
    color: #28a745;
    font-weight: 600;
}

.price-line.total {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color, #2A9F87);
    margin-top: 12px;
    padding-top: 16px;
    border-top: 2px solid var(--primary-color, #2A9F87);
}

.price-line .price {
    font-weight: 600;
}

.price-line .price.discount {
    color: #28a745;
}

.savings-highlight {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 14px;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    border: 1px solid #c3e6cb;
    box-shadow: 0 2px 8px rgba(21, 87, 36, 0.1);
}

/* ==================== RESPONSIVE MOBILE ==================== */
@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .recommendation-card {
        padding: 12px;
    }

    .recommendation-card img {
        height: 120px;
    }

    .recommendation-card h4 {
        font-size: 14px;
        min-height: 35px;
    }

    .recommendations-widget {
        padding: 20px;
        margin: 30px 0;
    }

    .discount-badge {
        font-size: 15px;
        padding: 12px 20px;
    }

    .price-breakdown {
        padding: 16px;
    }

    .price-line {
        font-size: 14px;
    }

    .price-line.total {
        font-size: 20px;
    }

    .savings-highlight {
        font-size: 16px;
        padding: 12px;
    }
}
