/**
 * ElectWatch - Product Modal Styles
 * CSS pour la modal de détails produit
 */

/* Modal Overlay */
.ew-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal */
.ew-modal {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    /* Jumia Style: 8px */
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    /* Softer shadow */
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.ew-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
}

.ew-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* Modal Content */
.ew-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

@media (max-width: 968px) {
    .ew-modal-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }
}

/* Gallery */
.ew-modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ew-main-image {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.ew-modal-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Installation Media */
.ew-installation-media h4 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    color: #1a1a1a;
}

.ew-media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.ew-media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 16/9;
}

.ew-media-item .ew-video,
.ew-media-item .ew-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Details */
.ew-modal-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ew-badge-large {
    display: inline-block;
    background: #f68b1e;
    /* Jumia Orange */
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    width: fit-content;
}

.ew-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

.ew-modal-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Pricing Large */
.ew-pricing-large {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.ew-old-price-large {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.ew-price-large {
    font-size: 2.2rem;
    font-weight: 700;
    color: #f68b1e;
    /* Jumia Orange */
}

.ew-discount-badge {
    background: #EF4444;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Sections */
.ew-section {
    border-top: 1px solid #e5e5e5;
    padding-top: 20px;
}

.ew-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

/* Items List */
.ew-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ew-items-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ew-items-list li:last-child {
    border-bottom: none;
}

.ew-item-icon {
    font-size: 1.2rem;
}

.ew-item-quantity {
    font-weight: 600;
    color: #f68b1e;
    /* Jumia Orange */
}

.ew-item-name {
    color: #1a1a1a;
}

/* Features List */
.ew-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ew-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    color: #555;
    line-height: 1.5;
}

.ew-check {
    color: #10B981;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Features RTL (pour texte arabe) */
.ew-features-list.ew-features-rtl {
    direction: rtl;
    text-align: right;
}

.ew-features-list.ew-features-rtl li {
    flex-direction: row-reverse;
}

/* Stock */
.ew-stock {
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
}

.ew-stock-ok {
    color: #10B981;
}

.ew-stock-warning {
    color: #F59E0B;
}

/* Actions */
.ew-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.ew-btn-large {
    padding: 16px 24px;
    font-size: 1.1rem;
    border-radius: 8px;
}

/* Helper classes if needed */
.ew-btn-primary {
    background: #f68b1e;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.ew-btn-primary:hover {
    background: #e07e1b;
}

.ew-btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #ffffff;
    border-radius: 8px;
}

.ew-btn-whatsapp:hover {
    background: #1EBA59;
}

/* Body with modal open */
body.ew-modal-open {
    overflow: hidden;
}

/* Scrollbar custom */
.ew-modal::-webkit-scrollbar {
    width: 8px;
}

.ew-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ew-modal::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.ew-modal::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ========================================
   ANIMATIONS J'AIME - STYLE TIKTOK (Optimized)
   ======================================== */

/* Animation cœur volant */
@keyframes heartFloat {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }

    10% {
        transform: translateY(-10px) scale(1.2);
        opacity: 1;
    }

    50% {
        transform: translateY(-80px) scale(1.5);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-150px) scale(0.5);
        opacity: 0;
    }
}

/* Style cœur volant */
.ew-like-heart {
    position: fixed;
    font-size: 24px;
    pointer-events: none;
    z-index: 999999;
    animation: heartFloat 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    filter: drop-shadow(0 2px 8px rgba(255, 0, 80, 0.6));
}

/* Animation pulse continue pour bouton liked */
@keyframes likePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

/* Bouton like état liked */
.ew-like-btn.liked {
    color: #FF0050 !important;
    animation: likePulse 1.5s ease-in-out infinite;
}

.ew-like-btn.liked:hover {
    color: #FF3060 !important;
}

/* Transition fluide sur le bouton */
.ew-like-btn {
    transition: transform 0.15s cubic-bezier(0.68, -0.55, 0.27, 1.55),
        color 0.2s ease;
}

/* État loading */
.ew-like-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}