/* 🎯 Time Panel Beautiful - ตามภาพที่ 2 - Full Width Layout */
/* Panel เดียวสวยงาม เต็มความยาว */

.flash-sale-header-unified {
    position: relative;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f97316 100%);
    border-radius: 20px;
    padding: 20px 30px;
    margin: 0; /* ไม่มี margin เพื่อให้เต็มความยาว */
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    overflow: hidden;
    width: 100%; /* เต็มความกว้าง */
    max-width: none; /* ไม่จำกัดความกว้าง */
}

.flash-sale-header-unified::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

/* Font Controls - Corner Integration */
.font-controls-corner {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 10;
}

.font-controls-corner .time-panel-controls {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.font-controls-corner .font-size-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.font-controls-corner .font-size-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.font-controls-corner .font-size-btn.active {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
    transform: scale(1.15);
}

/* Main Panel Layout - Full Width */
.time-panel-main {
    display: grid;
    grid-template-columns: 15% 50% 35%;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 5;
    padding-top: 10px; /* Space for font controls */
    width: 100%;
}

/* Section Container - Full Width */
.flash-sale-section {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Carousel Container - No Margins */
.flash-sale-carousel-container {
    width: 100% !important;
    margin: 0 !important;
    padding: 20px 0 0 0 !important;
}

/* Product Cards Full Width */
.flash-sale-section .swiper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
:root {
    /* Font Size Variables */
    --time-slot-font-base: 12px;
    --time-slot-time-base: 14px;
    --time-slot-label-base: 10px;
    --countdown-font-base: 18px;
    --view-all-font-base: 14px;
}

/* Font Size Classes */
.font-small {
    --time-slot-font-size: 10px;
    --time-slot-time-size: 12px;
    --time-slot-label-size: 8px;
    --countdown-font-size: 16px;
    --view-all-font-size: 12px;
}

.font-medium {
    --time-slot-font-size: var(--time-slot-font-base);
    --time-slot-time-size: var(--time-slot-time-base);
    --time-slot-label-size: var(--time-slot-label-base);
    --countdown-font-size: var(--countdown-font-base);
    --view-all-font-size: var(--view-all-font-base);
}

.font-large {
    --time-slot-font-size: 14px;
    --time-slot-time-size: 16px;
    --time-slot-label-size: 12px;
    --countdown-font-size: 20px;
    --view-all-font-size: 16px;
}

.font-extra-large {
    --time-slot-font-size: 16px;
    --time-slot-time-size: 18px;
    --time-slot-label-size: 14px;
    --countdown-font-size: 22px;
    --view-all-font-size: 18px;
}

/* Main Time Panel Container - Horizontal Single Row */
.flash-sale-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 30%, #ec4899 70%, #f97316 100%);
    border-radius: 0;
    color: white;
    margin-bottom: 0;
    box-shadow: none;
    backdrop-filter: none;
    border: none;
    overflow: hidden;
    min-height: 80px;
    width: 100%;
}

.flash-sale-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.05), transparent, rgba(255, 255, 255, 0.05));
    pointer-events: none;
}

/* Left Section - SALE! Logo */
.time-panel-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    min-width: 200px;
}

.flash-sale-logo {
    font-size: 48px;
    font-weight: 900;
    color: white;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    font-family: 'Arial Black', Arial, sans-serif;
    text-transform: uppercase;
    position: relative;
    z-index: 3;
}

.flash-sale-logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.8) 20%, 
        rgba(255, 255, 255, 1) 50%, 
        rgba(255, 255, 255, 0.8) 80%, 
        transparent 100%
    );
    border-radius: 2px;
}

/* Center Section - Time Slots */
.time-panel-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 500px;
}

.time-panel-label {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    opacity: 0.95;
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Time Slots Container - Horizontal Pill Style */
.time-slots-container {
    display: flex;
    gap: 0;
    align-items: center;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.time-slot {
    min-width: 120px;
    height: 60px;
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    text-align: center;
    padding: 8px 20px;
    margin: 0;
}

.time-slot .time {
    font-size: var(--time-slot-time-size, 16px);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
}

.time-slot .label {
    font-size: var(--time-slot-label-size, 11px);
    opacity: 0.9;
    line-height: 1;
}

/* Time Slot States - Pill Style */
.time-slot.completed {
    background: rgba(255, 255, 255, 0.9);
    color: #6b7280;
    border-color: rgba(255, 255, 255, 0.3);
}

.time-slot.active {
    background: #3b82f6;
    color: white;
    border-color: #1d4ed8;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.3),
        0 8px 25px rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

.time-slot.upcoming {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border-color: rgba(255, 255, 255, 0.3);
}

.time-slot:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.time-slot.active:hover {
    transform: translateY(-2px) scale(1.07);
}

/* Right Section - Countdown & View All */
.time-panel-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 200px;
}

.countdown-label {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    opacity: 0.95;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.countdown-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.countdown-display {
    display: flex;
    gap: 8px;
    align-items: center;
    font-family: 'Arial', monospace;
    position: relative;
    z-index: 2;
}

.countdown-unit {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: var(--countdown-font-size, 20px);
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.countdown-separator {
    font-size: var(--countdown-font-size, 20px);
    font-weight: bold;
    opacity: 0.8;
    animation: blink 1s infinite ease-in-out;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* View All Button - Pill Style */
.view-all-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: var(--view-all-font-size, 14px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.view-all-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.4; }
}

/* Responsive Design - Unified Panel */
@media (max-width: 768px) {
    .flash-sale-header-unified {
        padding: 15px 20px;
    }
    
    .time-panel-main {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
        padding-top: 15px;
    }
    
    .time-panel-left {
        justify-content: center;
        order: 1;
    }
    
    .time-panel-center {
        order: 2;
        justify-content: flex-start;
    }
    
    .time-panel-right {
        order: 3;
        justify-content: flex-end;
        flex-direction: row;
        gap: 15px;
    }
    
    .flash-sale-logo {
        font-size: 36px;
    }
    
    .font-controls-corner {
        top: 10px;
        right: 15px;
    }
    
    .font-controls-corner .font-size-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .flash-sale-header-unified {
        padding: 12px 15px;
    }
    
    .time-panel-main {
        padding-top: 12px;
    }
    
    .flash-sale-logo {
        font-size: 28px;
    }
    
    .time-slot {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .countdown-unit {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .view-all-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .font-controls-corner {
        top: 8px;
        right: 12px;
    }
    
    .font-controls-corner .time-panel-controls {
        gap: 3px;
        padding: 3px;
    }
    
    .font-controls-corner .font-size-btn {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

/* Animations */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.4; }
}

/* Text rendering optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}