/* Flash Sale Page Styles */
.flash-sale-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.page-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-title i {
    color: #ffd700;
    margin-right: 10px;
}

.fire-icon {
    font-size: 2.5rem;
    margin-left: 10px;
    animation: fire-flicker 2s infinite alternate;
}

@keyframes fire-flicker {
    0% { transform: scale(1) rotate(-2deg); }
    100% { transform: scale(1.1) rotate(2deg); }
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

/* Filter Tabs */
.flash-sale-filters {
    margin-bottom: 30px;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tab {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-tab:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: #ff6b6b;
    border-color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
}

.filter-tab i {
    margin-right: 5px;
}

/* Flash Sales Grid */
.flash-sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Flash Sale Card */
.flash-sale-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.flash-sale-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.flash-sale-card.expired {
    opacity: 0.7;
    filter: grayscale(50%);
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
    animation: pulse 2s infinite;
}

.status-badge.live {
    background: #4CAF50;
    color: white;
}

.status-badge.expired {
    background: #f44336;
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff6b6b;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
}

/* Card Image */
.card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.flash-sale-card:hover .card-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flash-sale-card:hover .image-overlay {
    opacity: 1;
}

.quick-buy-btn, .view-detail-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-buy-btn:hover, .view-detail-btn:hover {
    background: #ff5252;
    transform: scale(1.05);
}

/* Card Content */
.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.4;
}

/* Price Section */
.price-section {
    margin-bottom: 20px;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    margin-right: 10px;
    font-size: 1rem;
}

.sale-price {
    color: #ff6b6b;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 10px;
}

.save-amount {
    background: #e8f5e8;
    color: #4CAF50;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Quantity Progress */
.quantity-progress {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #666;
}

.remaining {
    color: #ff6b6b;
    font-weight: bold;
}

.progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8a80);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Countdown Timer */
.countdown-timer {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.timer-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.timer-part {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-number {
    background: #ff6b6b;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 40px;
}

.timer-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.timer-separator {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b6b;
    margin: 0 5px;
}

/* End Time Info */
.end-time-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    color: #666;
}

.end-time-info i {
    margin-right: 8px;
    color: #ff6b6b;
}

/* Action Buttons */
.card-actions {
    display: flex;
    gap: 10px;
}

.btn-primary, .btn-secondary, .btn-disabled {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #ff6b6b;
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Empty State */
.no-flash-sales {
    text-align: center;
    padding: 80px 20px;
}

.empty-state {
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 15px;
}

.empty-state p {
    color: #666;
    margin-bottom: 30px;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
}

.countdown-timer {
    border: 2px solid red !important;
    min-height: 100px !important;
    background: yellow !important;
}

.modal-header {
    background: #ff6b6b;
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .flash-sales-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .filter-tab {
        flex-shrink: 0;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .timer-display {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .sale-price {
        font-size: 1.3rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Modal Fixes */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex !important;
}

.modal-dialog {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.modal-header .close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
}

/* Loading Spinner */
.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Timer Fixes */
.countdown-timer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.timer-number {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.4rem;
    min-width: 50px;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
    transition: all 0.3s ease;
}

.urgent .timer-number {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    animation: pulse 1s infinite;
    box-shadow: 0 4px 20px rgba(255,68,68,0.5);
}

/* Notification Fixes */
.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    width: 20px;
    height: 20px;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-dialog {
        max-width: 100%;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .timer-display {
        gap: 5px;
    }
    
    .timer-number {
        padding: 8px 12px;
        font-size: 1.2rem;
        min-width: 40px;
    }
}