/* ==========================================
   MOBILE PANEL SYSTEM - COMPLETE STYLES
   ========================================== */

/* Mobile Overlay */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Panel Container */
.mobile-sidebar-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 400px;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-sidebar-panel.active {
    transform: translateX(0);
}

/* ✅ CRITICAL: Product Modal muss ÜBER der Sidebar sein */
#product-modal-overlay,
#product-modal {
    z-index: 10000 !important;
}

#product-modal-overlay {
    z-index: 10000 !important;
}

#product-modal {
    z-index: 10001 !important;
}

/* Panel Header */
.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.mobile-sidebar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.mobile-sidebar-title .icon {
    width: 24px;
    height: 24px;
}

.mobile-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-sidebar-close:hover,
.mobile-sidebar-close:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.mobile-sidebar-close .icon {
    width: 20px;
    height: 20px;
}

/* Panel Content */
.mobile-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}

/* Mobile Products Grid */
.mobile-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-bottom: 20px;
}

.mobile-product-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-product-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.mobile-product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f8fafc;
}

.mobile-product-info {
    padding: 12px;
}

.mobile-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mobile-product-price {
    font-size: 16px;
    font-weight: 800;
    color: #8b5cf6;
}

/* Cart Quantity Badge on Product Card */
.cart-quantity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

/* Cart Item Styles (for mobile cart) */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-image:active {
    transform: scale(0.95);
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    cursor: pointer;
}

.cart-item-name:active {
    color: #8b5cf6;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 800;
    color: #8b5cf6;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cart-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-qty-btn:active {
    transform: scale(0.9);
    background: #f8fafc;
    border-color: #8b5cf6;
}

.cart-qty-btn svg {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.cart-qty {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    min-width: 24px;
    text-align: center;
}

/* Checkout Button in Mobile Cart */
.checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.checkout-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.4);
}

.checkout-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

/* Mobile Event Info */
.mobile-event-info {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-event-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-event-widget-header .icon {
    width: 20px;
    height: 20px;
    color: #8b5cf6;
}

.mobile-event-widget-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.mobile-event-content-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
}

.mobile-event-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.mobile-event-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.mobile-event-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.mobile-event-meta-item .icon {
    width: 14px;
    height: 14px;
}

.mobile-event-status-active,
.mobile-event-status-upcoming,
.mobile-event-status-none {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.mobile-event-status-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.mobile-event-status-upcoming {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.mobile-event-status-none {
    background: #e2e8f0;
    color: #64748b;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Mobile Countdown */
.mobile-countdown {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mobile-countdown-title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-countdown-display {
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .mobile-sidebar-panel {
        width: 90%;
    }
    
    .mobile-products-grid {
        gap: 12px;
    }
    
    .mobile-product-info {
        padding: 10px;
    }
    
    .mobile-product-name {
        font-size: 12px;
    }
    
    .mobile-product-price {
        font-size: 14px;
    }
}

/* Hide on Desktop */
@media (min-width: 768px) {
    .mobile-sidebar-overlay,
    .mobile-sidebar-panel {
        display: none !important;
    }
}