/* Flash Sale Pro - Frontend Styles */

/* Flash Sale Section */
.fsp-flash-sale-section {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.fsp-flash-sale-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="flash" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><polygon points="10,0 15,10 10,20 5,10" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23flash)"/></svg>');
    opacity: 0.1;
    animation: flashPattern 10s linear infinite;
}

@keyframes flashPattern {
    0% { transform: translateX(-20px); }
    100% { transform: translateX(20px); }
}

.fsp-flash-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.fsp-flash-icon {
    font-size: 18px;
    animation: flashGlow 1.5s ease-in-out infinite alternate;
}

@keyframes flashGlow {
    0% { text-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
    100% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.8); }
}

/* Countdown Timer */
.fsp-countdown-container {
    text-align: center;
}

.fsp-countdown-title {
    color: white;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.fsp-countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.fsp-time-unit {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px 8px;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.fsp-time-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
    line-height: 1;
}

.fsp-time-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    text-transform: uppercase;
}

.fsp-time-separator {
    color: white;
    font-size: 24px;
    font-weight: bold;
    animation: blink 1s infinite;
}

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

/* Stock Progress */
.fsp-stock-progress {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    position: relative;
}

.fsp-stock-text {
    color: #ff6b6b;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.fsp-progress-bar {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.fsp-progress-fill {
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.fsp-stock-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

/* Price Display */
.fsp-price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fsp-flash-price {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
}

.fsp-original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.fsp-savings {
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Products Grid */
.fsp-products-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.fsp-products-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.fsp-products-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.fsp-products-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .fsp-products-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 480px) {
    .fsp-products-grid { grid-template-columns: 1fr !important; }
}

/* Product Card */
.fsp-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.fsp-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.fsp-product-image {
    position: relative;
    overflow: hidden;
}

.fsp-product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fsp-product-card:hover .fsp-product-image img {
    transform: scale(1.05);
}

.fsp-flash-badge-mini {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.fsp-product-info {
    padding: 15px;
}

.fsp-product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.fsp-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fsp-product-title a:hover {
    color: #ff6b6b;
}

.fsp-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.fsp-discount-badge {
    background: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

/* Mini Countdown */
.fsp-mini-countdown {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 10px;
    border: 1px solid #ff6b6b;
}

.fsp-countdown-text {
    font-size: 12px;
    color: #666;
    display: block;
    margin-bottom: 4px;
}

.fsp-countdown-time {
    font-weight: bold;
    color: #ff6b6b;
    font-size: 14px;
}

/* Mini Stock */
.fsp-mini-stock {
    margin-bottom: 15px;
}

.fsp-mini-progress {
    background: #f0f0f0;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.fsp-mini-progress-fill {
    background: #ff6b6b;
    height: 100%;
    transition: width 0.3s ease;
}

/* Buy Now Button */
.fsp-buy-now-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.fsp-buy-now-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff7575);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Countdown Widget */
.fsp-countdown-widget {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: white;
    margin: 20px 0;
}

.fsp-campaign-title h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: white;
}

/* Slider Styles */
.fsp-slider {
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
}

.fsp-slider .fsp-product-card {
    min-width: 250px;
    flex: 0 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fsp-countdown-timer {
        gap: 10px;
    }
    
    .fsp-time-unit {
        min-width: 50px;
        padding: 10px 6px;
    }
    
    .fsp-time-value {
        font-size: 20px;
    }
    
    .fsp-flash-sale-section {
        padding: 15px;
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .fsp-countdown-timer {
        gap: 5px;
    }
    
    .fsp-time-unit {
        min-width: 45px;
        padding: 8px 4px;
    }
    
    .fsp-time-value {
        font-size: 18px;
    }
    
    .fsp-time-label {
        font-size: 10px;
    }
    
    .fsp-flash-sale-section {
        padding: 12px;
        margin: 10px 0;
    }
}

/* Loading Animation */
.fsp-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification Styles */
.fsp-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b6b;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Pulse Animation for Flash Elements */
.fsp-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}