.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    direction: ltr;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    min-width: 100px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.countdown-item::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) 100%);
    pointer-events: none;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.4);
}

.countdown-number {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 8px;
    font-family: 'Arial', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.countdown-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* انیمیشن برای تغییر اعداد */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.countdown-number.updating {
    animation: pulse 0.3s ease;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .countdown-container {
        gap: 10px;
    }
    
    .countdown-item {
        padding: 15px 20px;
        min-width: 80px;
    }
    
    .countdown-number {
        font-size: 36px;
    }
    
    .countdown-label {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .countdown-item {
        padding: 12px 15px;
        min-width: 70px;
    }
    
    .countdown-number {
        font-size: 28px;
    }
    
    .countdown-label {
        font-size: 10px;
    }
}

/* پیام پایان فروش */
.countdown-expired {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #ef4444;
    padding: 20px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border: 2px solid #ef4444;
    animation: fadeIn 0.5s ease;
}

.countdown-no-date {
    text-align: center;
    padding: 15px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================
   Themes and sale visuals
   ========================== */

.countdown-wrapper {
    position: relative;
    padding: 12px;
}

.sale-badge {
    display: inline-block;
    margin: 0 auto 12px;
    text-align: center;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: #fff;
}

.sale-cta-wrap {
    text-align: center;
    margin-top: 12px;
}
.sale-cta {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.sale-cta.disabled {
    opacity: 0.6;
    pointer-events: none;
    background: #9ca3af;
}

/* Sale Banner Theme: prominent colored blocks and background */
.theme-sale-banner { background: linear-gradient(90deg, rgba(99,102,241,0.06), rgba(139,92,246,0.03)); border-radius: 12px; padding: 18px; }
.theme-sale-banner .sale-badge { background: linear-gradient(90deg,#ef4444,#f97316); box-shadow: 0 6px 18px rgba(249,115,22,0.12); }
.theme-sale-banner .countdown-item { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); }

/* Minimal theme: subtle, clean */
.theme-minimal .sale-badge { background: #111827; color: #fff; opacity: 0.95; }
.theme-minimal .countdown-item { background: #ffffff; border: 1px solid #e6e6e6; box-shadow: none; }
.theme-minimal .countdown-number { color: #111827; }
.theme-minimal .countdown-label { color: #6b7280; text-transform: none; }
.theme-minimal .sale-cta { background: #111827; }

/* Neon / Urgent theme: dark background and glow, used to create 'last-minute' urgency */
.theme-neon { background: #0b1020; border-radius: 12px; padding: 18px; }
.theme-neon .sale-badge { background: linear-gradient(90deg,#06b6d4,#8b5cf6); color: #031024; box-shadow: 0 6px 24px rgba(107,114,128,0.06); }
.theme-neon .countdown-item { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); box-shadow: 0 6px 18px rgba(99,102,241,0.08); }
.theme-neon .countdown-number { color: #06b6d4; text-shadow: 0 4px 18px rgba(6,182,212,0.18); }
.theme-neon .countdown-label { color: rgba(255,255,255,0.7); }
.theme-neon .sale-cta { background: #06b6d4; color: #021425; }

/* Urgent animation when time is very low */
.countdown-wrapper.urgent .countdown-item {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(239,68,68,0.18);
}
.countdown-wrapper.urgent .countdown-number {
    animation: pulse 0.8s ease-in-out infinite;
}

/* Expired state per theme */
.theme-minimal .countdown-expired { background: rgba(16,185,129,0.06); color: #065f46; border-color: #10b981; }
.theme-sale-banner .countdown-expired { background: rgba(239,68,68,0.06); color: #b91c1c; border-color: #ef4444; }
.theme-neon .countdown-expired { background: rgba(255,255,255,0.03); color: #fca5a5; border-color: rgba(255,255,255,0.06); }