/* ============================================
   🎄 CHRISTMAS THEME 2024 🎄
   Festive holiday styling for FleetCart
   ============================================ */

:root {
    --christmas-red: #c41e3a;
    --christmas-green: #146b3a;
    --christmas-gold: #f5b700;
    --christmas-dark-green: #0d4d2b;
    --christmas-light-red: #ff6b6b;
    --christmas-snow: #ffffff;
    --christmas-pine: #1a472a;
    --christmas-berry: #bb2528;
    --christmas-cream: #fff8e7;
}

/* ============================================
   SNOWFALL ANIMATION
   ============================================ */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -5%;
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: snowfall linear infinite;
    opacity: 0.9;
}

.snowflake:nth-child(1) { left: 1%; animation-duration: 10s; animation-delay: 0s; font-size: 1.2em; }
.snowflake:nth-child(2) { left: 10%; animation-duration: 12s; animation-delay: 1s; font-size: 0.8em; }
.snowflake:nth-child(3) { left: 20%; animation-duration: 8s; animation-delay: 0.5s; font-size: 1.5em; }
.snowflake:nth-child(4) { left: 30%; animation-duration: 14s; animation-delay: 2s; font-size: 0.6em; }
.snowflake:nth-child(5) { left: 40%; animation-duration: 9s; animation-delay: 3s; font-size: 1.1em; }
.snowflake:nth-child(6) { left: 50%; animation-duration: 11s; animation-delay: 4s; font-size: 0.9em; }
.snowflake:nth-child(7) { left: 60%; animation-duration: 13s; animation-delay: 1.5s; font-size: 1.3em; }
.snowflake:nth-child(8) { left: 70%; animation-duration: 10s; animation-delay: 2.5s; font-size: 0.7em; }
.snowflake:nth-child(9) { left: 80%; animation-duration: 15s; animation-delay: 0.2s; font-size: 1.4em; }
.snowflake:nth-child(10) { left: 90%; animation-duration: 7s; animation-delay: 3.5s; font-size: 1em; }
.snowflake:nth-child(11) { left: 5%; animation-duration: 11s; animation-delay: 4.5s; font-size: 0.85em; }
.snowflake:nth-child(12) { left: 15%; animation-duration: 9s; animation-delay: 5s; font-size: 1.25em; }
.snowflake:nth-child(13) { left: 25%; animation-duration: 13s; animation-delay: 0.8s; font-size: 0.75em; }
.snowflake:nth-child(14) { left: 35%; animation-duration: 8s; animation-delay: 2.2s; font-size: 1.15em; }
.snowflake:nth-child(15) { left: 45%; animation-duration: 12s; animation-delay: 1.8s; font-size: 0.95em; }
.snowflake:nth-child(16) { left: 55%; animation-duration: 10s; animation-delay: 3.2s; font-size: 1.35em; }
.snowflake:nth-child(17) { left: 65%; animation-duration: 14s; animation-delay: 4.2s; font-size: 0.65em; }
.snowflake:nth-child(18) { left: 75%; animation-duration: 9s; animation-delay: 0.3s; font-size: 1.45em; }
.snowflake:nth-child(19) { left: 85%; animation-duration: 11s; animation-delay: 2.8s; font-size: 0.55em; }
.snowflake:nth-child(20) { left: 95%; animation-duration: 8s; animation-delay: 5.5s; font-size: 1.05em; }

@keyframes snowfall {
    0% {
        transform: translateY(-5vh) rotate(0deg) translateX(0);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) rotate(90deg) translateX(15px);
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(-15px);
    }
    75% {
        transform: translateY(75vh) rotate(270deg) translateX(15px);
    }
    100% {
        transform: translateY(105vh) rotate(360deg) translateX(-15px);
        opacity: 0.3;
    }
}

/* ============================================
   CHRISTMAS LIGHTS BANNER
   ============================================ */
.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 25px;
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    pointer-events: none;
}

.christmas-lights::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        #1a472a 0%, 
        #1a472a 100%
    );
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.lights-string {
    display: flex;
    gap: 25px;
    padding: 0 10px;
}

.light-bulb {
    width: 12px;
    height: 18px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    top: 3px;
    animation: glow 1.5s ease-in-out infinite;
}

.light-bulb::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 2px 2px 0 0;
}

.light-bulb.red { background: var(--christmas-red); box-shadow: 0 0 10px var(--christmas-red), 0 0 20px var(--christmas-red); }
.light-bulb.green { background: var(--christmas-green); box-shadow: 0 0 10px var(--christmas-green), 0 0 20px var(--christmas-green); animation-delay: 0.3s; }
.light-bulb.gold { background: var(--christmas-gold); box-shadow: 0 0 10px var(--christmas-gold), 0 0 20px var(--christmas-gold); animation-delay: 0.6s; }
.light-bulb.blue { background: #1e90ff; box-shadow: 0 0 10px #1e90ff, 0 0 20px #1e90ff; animation-delay: 0.9s; }
.light-bulb.white { background: #fff; box-shadow: 0 0 10px #fff, 0 0 20px rgba(255,255,255,0.8); animation-delay: 1.2s; }

@keyframes glow {
    0%, 100% { opacity: 1; filter: brightness(1.2); }
    50% { opacity: 0.6; filter: brightness(0.8); }
}

/* ============================================
   HEADER CHRISTMAS STYLING
   ============================================ */
.header-wrap {
    position: relative;
    margin-top: 28px !important;
}

.header-wrap::before {
    content: '🎄';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    z-index: 100;
    animation: treeSway 3s ease-in-out infinite;
}

.header-wrap::after {
    content: '🎅';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    z-index: 100;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes treeSway {
    0%, 100% { transform: translateY(-50%) rotate(-3deg); }
    50% { transform: translateY(-50%) rotate(3deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(-60%); }
}

/* ============================================
   FESTIVE BUTTONS & ACCENTS
   ============================================ */
.btn-primary,
.add-to-cart,
.btn-add-to-cart,
button[type="submit"]:not(.btn-link) {
    background: linear-gradient(135deg, var(--christmas-red) 0%, var(--christmas-berry) 100%) !important;
    border-color: var(--christmas-berry) !important;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover,
.add-to-cart:hover,
.btn-add-to-cart:hover,
button[type="submit"]:not(.btn-link):hover {
    background: linear-gradient(135deg, var(--christmas-berry) 0%, var(--christmas-red) 100%) !important;
    box-shadow: 0 0 20px rgba(196, 30, 58, 0.5) !important;
}

/* Green accent buttons */
.btn-success,
.btn-secondary {
    background: linear-gradient(135deg, var(--christmas-green) 0%, var(--christmas-dark-green) 100%) !important;
    border-color: var(--christmas-dark-green) !important;
}

/* ============================================
   PRODUCT CARDS CHRISTMAS STYLING
   ============================================ */
.product-card {
    position: relative;
    transition: all 0.3s ease;
}

.product-card::before {
    content: '🎁';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 20px;
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

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

/* Sale badge Christmas styling */
.badge-sale,
.product-card-badge,
.badge,
.sale-badge {
    background: linear-gradient(135deg, var(--christmas-red) 0%, var(--christmas-berry) 100%) !important;
    font-weight: bold !important;
}

/* ============================================
   NAVIGATION CHRISTMAS STYLING
   ============================================ */
.navigation {
    position: relative;
}

.navigation::after {
    content: '❄️ Holiday Deals ❄️';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--christmas-gold);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(245, 183, 0, 0.5);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   FOOTER CHRISTMAS STYLING
   ============================================ */
.footer {
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '🎄 🎁 ⭐ 🦌 🎅 ❄️ 🔔 🎄 🎁 ⭐ 🦌 🎅 ❄️ 🔔';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    font-size: 18px;
    letter-spacing: 10px;
    animation: scrollIcons 20s linear infinite;
    opacity: 0.3;
}

@keyframes scrollIcons {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   CART & WISHLIST CHRISTMAS STYLING
   ============================================ */
.header-cart .count,
.header-wishlist .count,
.header-compare .count {
    background: var(--christmas-red) !important;
    border: 2px solid var(--christmas-gold) !important;
    animation: countPulse 1.5s ease-in-out infinite;
}

@keyframes countPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 5px var(--christmas-red); }
    50% { transform: scale(1.1); box-shadow: 0 0 15px var(--christmas-red); }
}

/* ============================================
   SLIDER/BANNER CHRISTMAS OVERLAY
   ============================================ */
.home-slider,
.hero-slider,
.main-slider {
    position: relative;
}

.home-slider::after,
.hero-slider::after,
.main-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(196, 30, 58, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(20, 107, 58, 0.1) 0%, transparent 30%);
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   FESTIVE SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--christmas-pine);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--christmas-red) 0%, var(--christmas-berry) 100%);
    border-radius: 6px;
    border: 2px solid var(--christmas-pine);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--christmas-berry) 0%, var(--christmas-red) 100%);
}

/* ============================================
   CHRISTMAS CORNER ORNAMENTS
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 30px;
    left: 0;
    width: 150px;
    height: 150px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='50' font-size='50'%3E🎄%3C/text%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
    pointer-events: none;
    z-index: 9997;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='50' font-size='50'%3E🎁%3C/text%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
    pointer-events: none;
    z-index: 9997;
}

/* ============================================
   SEARCH BAR CHRISTMAS STYLING
   ============================================ */
.header-search input,
.search-input,
.form-control.search {
    border: 2px solid var(--christmas-green) !important;
    transition: all 0.3s ease;
}

.header-search input:focus,
.search-input:focus,
.form-control.search:focus {
    border-color: var(--christmas-red) !important;
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.3) !important;
}

/* ============================================
   CATEGORY CARDS CHRISTMAS STYLING
   ============================================ */
.category-card,
.category-item {
    transition: all 0.3s ease;
}

.category-card:hover,
.category-item:hover {
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.2);
}

/* ============================================
   PRICE STYLING
   ============================================ */
.product-price .current-price,
.price-current,
.sale-price {
    color: var(--christmas-red) !important;
    font-weight: bold;
}

.product-price .previous-price,
.price-previous,
.regular-price {
    color: #888 !important;
}

/* ============================================
   NEWSLETTER CHRISTMAS STYLING
   ============================================ */
.newsletter-section,
.newsletter-wrap {
    position: relative;
    overflow: hidden;
}

.newsletter-section::before,
.newsletter-wrap::before {
    content: '🎅 Subscribe for Holiday Deals! 🎄';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: var(--christmas-gold);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    white-space: nowrap;
    z-index: 10;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */
@media (max-width: 768px) {
    .snowflake {
        font-size: 0.8em;
    }
    
    .christmas-lights {
        height: 20px;
    }
    
    .light-bulb {
        width: 8px;
        height: 12px;
    }
    
    .lights-string {
        gap: 15px;
    }
    
    .header-wrap::before,
    .header-wrap::after {
        font-size: 20px;
    }
    
    .navigation::after {
        display: none;
    }
    
    body::before,
    body::after {
        width: 80px;
        height: 80px;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATION - Reduce motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .snowflake,
    .light-bulb,
    .product-card::before,
    .header-wrap::before,
    .header-wrap::after,
    .header-cart .count,
    .header-wishlist .count,
    .header-compare .count {
        animation: none !important;
    }
    
    .snowflakes {
        display: none;
    }
}
