/* ===================================
   PRO E-COMMERCE FEATURES
   Modern Shopping Experience
   =================================== */

/* ========================================
   1. PRODUCT QUICK VIEW MODAL
   ======================================== */
.quick-view-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.quick-view-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
    max-height: 90vh;
    overflow-y: auto;
}

.quick-view-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.quick-view-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* ========================================
   2. WISHLIST HEART ANIMATION
   ======================================== */
.wishlist-btn {
    position: relative;
    width: 45px;
    height: 45px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wishlist-btn i {
    font-size: 1.3rem;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    border-color: #ef4444;
    transform: scale(1.1);
}

.wishlist-btn:hover i {
    color: #ef4444;
}

.wishlist-btn.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
    animation: heartBeat 0.6s ease;
}

.wishlist-btn.active i {
    color: white;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.25); }
}

/* Wishlist particles */
.wishlist-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    pointer-events: none;
    animation: wishlistParticle 1s ease-out forwards;
}

@keyframes wishlistParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* ========================================
   3. SOCIAL PROOF NOTIFICATIONS
   ======================================== */
.social-proof-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
    transform: translateX(-150%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

.social-proof-popup.show {
    transform: translateX(0);
}

.social-proof-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #7BC043;
}

.social-proof-text {
    flex: 1;
}

.social-proof-name {
    font-weight: 700;
    color: #1976D2;
    margin-bottom: 0.25rem;
}

.social-proof-action {
    color: #6b7280;
    font-size: 0.9rem;
}

.social-proof-time {
    color: #9ca3af;
    font-size: 0.8rem;
    font-style: italic;
}

.social-proof-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-proof-close:hover {
    color: #ef4444;
}

/* ========================================
   4. FLASH SALE COUNTDOWN TIMER
   ======================================== */
.flash-sale-banner {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 1rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.flash-sale-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: flashSweep 2s infinite;
}

@keyframes flashSweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

.countdown-timer {
    display: inline-flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    min-width: 70px;
}

.countdown-number {
    font-size: 2rem;
    font-weight: 900;
    display: block;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
    opacity: 0.9;
}

/* ========================================
   5. PRODUCT COLOR SWATCHES
   ======================================== */
.color-swatches {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.color-swatch {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.color-swatch.active {
    border-color: #3B9DD5;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px white, 0 0 0 4px #3B9DD5;
}

.color-swatch::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.color-swatch.active::after {
    transform: translate(-50%, -50%) scale(1);
}

/* ========================================
   6. SIZE SELECTOR
   ======================================== */
.size-selector {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.size-option {
    min-width: 55px;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-option:hover {
    border-color: #3B9DD5;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(59, 157, 213, 0.2);
}

.size-option.active {
    background: linear-gradient(135deg, #3B9DD5, #7BC043);
    color: white;
    border-color: #3B9DD5;
    transform: translateY(-3px);
}

.size-option.out-of-stock {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* ========================================
   7. QUANTITY SELECTOR (Animated)
   ======================================== */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: #f9fafb;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 2px solid #e5e7eb;
}

.qty-btn {
    width: 35px;
    height: 35px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    color: #3B9DD5;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: linear-gradient(135deg, #3B9DD5, #7BC043);
    color: white;
    transform: scale(1.15);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-value {
    min-width: 40px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1976D2;
}

/* ========================================
   8. STICKY ADD TO CART BAR
   ======================================== */
.sticky-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1.25rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.sticky-cart-bar.active {
    transform: translateY(0);
}

.sticky-cart-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.sticky-product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sticky-product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
}

.sticky-product-name {
    font-weight: 700;
    color: #1976D2;
}

.sticky-product-price {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7BC043, #558B2F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sticky-cart-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ========================================
   9. TRUST BADGES CAROUSEL
   ======================================== */
.trust-badges-section {
    background: #f9fafb;
    padding: 2rem 0;
    overflow: hidden;
}

.trust-badges-slider {
    display: flex;
    animation: trustSlide 30s linear infinite;
}

@keyframes trustSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.trust-badge {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    margin: 0 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.trust-badge-icon {
    font-size: 2rem;
    color: #7BC043;
}

.trust-badge-text {
    font-weight: 600;
    color: #374151;
}

/* ========================================
   10. PRODUCT COMPARISON TOGGLE
   ======================================== */
.compare-checkbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.compare-checkbox input[type="checkbox"] {
    display: none;
}

.compare-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.compare-label:hover {
    background: #3B9DD5;
    color: white;
    transform: translateY(-2px);
}

.compare-checkbox input:checked + .compare-label {
    background: linear-gradient(135deg, #3B9DD5, #7BC043);
    color: white;
}

/* ========================================
   11. LIVE VIEWERS BADGE
   ======================================== */
.live-viewers {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
    z-index: 10;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========================================
   12. RECENTLY VIEWED PRODUCTS
   ======================================== */
.recently-viewed {
    background: white;
    padding: 3rem 0;
    border-top: 1px solid #e5e7eb;
}

.recently-viewed-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: #1976D2;
    margin-bottom: 2rem;
}

.recently-viewed-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: #3B9DD5 #f3f4f6;
}

.recently-viewed-slider::-webkit-scrollbar {
    height: 8px;
}

.recently-viewed-slider::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.recently-viewed-slider::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #3B9DD5, #7BC043);
    border-radius: 10px;
}

/* ========================================
   13. MEGA MENU WITH IMAGES
   ======================================== */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
}

.nav-item:hover .mega-menu {
    display: grid;
    opacity: 1;
    transform: translateY(0);
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.mega-menu-column {
    padding: 1rem;
}

.mega-menu-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1976D2;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3B9DD5;
}

.mega-menu-link {
    display: block;
    padding: 0.5rem 0;
    color: #6b7280;
    transition: all 0.3s ease;
}

.mega-menu-link:hover {
    color: #3B9DD5;
    transform: translateX(5px);
}

.mega-menu-featured {
    background: linear-gradient(135deg, #E3F2FD, #F1F8E9);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.mega-menu-featured img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* ========================================
   14. DARK MODE TOGGLE
   ======================================== */
.dark-mode-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: #e5e7eb;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-mode-toggle.active {
    background: linear-gradient(135deg, #1976D2, #3B9DD5);
}

.dark-mode-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.dark-mode-toggle.active .dark-mode-toggle-slider {
    left: 33px;
}

/* ========================================
   15. IMAGE ZOOM ON HOVER
   ======================================== */
.product-image-zoom {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.product-image-zoom img {
    transition: transform 0.3s ease;
}

.product-image-zoom:hover img {
    transform: scale(1.5);
}

.zoom-lens {
    position: absolute;
    border: 2px solid #3B9DD5;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    pointer-events: none;
    display: none;
    background: rgba(59, 157, 213, 0.1);
}

.product-image-zoom:hover .zoom-lens {
    display: block;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .quick-view-content {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    
    .social-proof-popup {
        left: 15px;
        right: 15px;
        max-width: none;
    }
    
    .countdown-timer {
        gap: 0.5rem;
    }
    
    .countdown-item {
        min-width: 60px;
        padding: 0.5rem;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    .sticky-cart-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sticky-cart-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .mega-menu {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .quick-view-modal,
    .social-proof-popup,
    .sticky-cart-bar,
    .dark-mode-toggle {
        display: none !important;
    }
}

