/* =====================================================
   KHALLET JANZOUR - INTERACTIVE STYLES
   ===================================================== */

/* =====================================================
   1. IMAGE LIGHTBOX
   ===================================================== */
.image-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #ff4444;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* =====================================================
   2. FLOATING WHATSAPP BUTTON
   ===================================================== */
.floating-whatsapp {
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    }
}

/* =====================================================
   3. BACK TO TOP BUTTON
   ===================================================== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 999;
    background: var(--color-primary, #2C5F7F);
    color: white;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 95, 127, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-soft, #4A90B8);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(44, 95, 127, 0.4);
}

/* =====================================================
   4. TESTIMONIALS CAROUSEL
   ===================================================== */
.testimonials-carousel {
    position: relative;
    overflow: hidden;
}

.testimonial-item {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease;
    position: absolute;
    width: 100%;
    visibility: hidden;
}

.testimonial-item.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    visibility: visible;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active,
.carousel-dot:hover {
    background: var(--color-primary, #2C5F7F);
    transform: scale(1.2);
}

/* =====================================================
   5. ENHANCED CARD HOVER EFFECTS
   ===================================================== */
.hover-lift {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Card shine effect */
.hover-lift::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.hover-lift:hover::before {
    left: 100%;
}

/* =====================================================
   6. NAVBAR SCROLL EFFECT
   ===================================================== */
.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* =====================================================
   7. LAZY LOAD IMAGE ANIMATION
   ===================================================== */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* =====================================================
   8. CUSTOM CURSOR (OPTIONAL)
   ===================================================== */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary, #2C5F7F);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: all 0.2s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor.cursor-hover {
    width: 40px;
    height: 40px;
    background: rgba(44, 95, 127, 0.1);
}

/* =====================================================
   9. FLOATING LABEL EFFECT
   ===================================================== */
.form-floating.focused label {
    color: var(--color-primary, #2C5F7F);
    font-weight: 500;
}

/* =====================================================
   10. ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =====================================================
   11. RIPPLE EFFECT ON BUTTONS
   ===================================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* =====================================================
   12. STATISTICS COUNTER ANIMATION
   ===================================================== */
.counter {
    font-size: 3rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.counter.counting {
    color: var(--color-primary, #2C5F7F);
    text-shadow: 0 0 10px rgba(44, 95, 127, 0.3);
}

/* =====================================================
   13. PRODUCT QUICK VIEW BADGE
   ===================================================== */
.quick-view-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-image:hover .quick-view-badge {
    opacity: 1;
}

/* =====================================================
   14. RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 768px) {
    .floating-whatsapp {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 70px;
        right: 20px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 18px;
        bottom: 15px;
        right: 20px;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 10px 15px;
        font-size: 20px;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .hover-lift {
        /* Disable 3D tilt on mobile for performance */
        transform: none !important;
    }

    .hover-lift:hover {
        transform: translateY(-5px) !important;
    }
}

/* =====================================================
   15. SMOOTH TRANSITIONS
   ===================================================== */
* {
    scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
