/* crosssell-popup.css */
.crosssell-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.crosssell-popup {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease-out;
    position: relative;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.crosssell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px 15px 0 0;
    color: white;
}

.crosssell-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.crosssell-close {
    font-size: 28px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.crosssell-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.crosssell-content {
    padding: 30px;
}

.crosssell-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Galerie d'images */
.crosssell-image-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.crosssell-main-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.crosssell-main-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.crosssell-main-image:hover img {
    transform: scale(1.05);
}

.crosssell-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.crosssell-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.crosssell-thumbnail.active {
    border-color: #667eea;
    transform: scale(1.1);
}

.crosssell-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crosssell-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Détails du produit */
.crosssell-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.crosssell-details h4 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.3;
}

.crosssell-details p {
    color: #666;
    line-height: 1.6;
    font-size: 16px;
    margin: 0;
}

.crosssell-price {
    font-size: 28px;
    font-weight: bold;
    color: #e74c3c;
    margin: 0;
}

.crosssell-price .woocommerce-Price-amount {
    font-size: 28px;
    font-weight: bold;
}

/* Badges et infos supplémentaires */
.crosssell-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.crosssell-badge {
    background: #27ae60;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crosssell-badge.sale {
    background: #e74c3c;
}

.crosssell-badge.featured {
    background: #f39c12;
}

/* Actions */
.crosssell-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
}

.crosssell-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.crosssell-quantity label {
    font-weight: 500;
    color: #2c3e50;
}

.crosssell-quantity input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.crosssell-action-buttons {
    display: flex;
    gap: 10px;
}

.crosssell-add-btn, .crosssell-skip-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crosssell-add-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    flex: 2;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.crosssell-add-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.crosssell-add-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.crosssell-skip-btn {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
    flex: 1;
}

.crosssell-skip-btn:hover {
    background: #f8f9fa;
    color: #333;
    border-color: #aaa;
}

/* Loading animation */
.crosssell-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lightbox pour les images */
.crosssell-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.crosssell-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.crosssell-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10001;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .crosssell-popup {
        max-width: 700px;
    }
    
    .crosssell-product {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .crosssell-main-image img {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .crosssell-overlay {
        padding: 10px;
    }
    
    .crosssell-popup {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .crosssell-header {
        padding: 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .crosssell-header h3 {
        font-size: 20px;
    }
    
    .crosssell-content {
        padding: 20px;
    }
    
    .crosssell-product {
        gap: 20px;
    }
    
    .crosssell-main-image img {
        height: 200px;
    }
    
    .crosssell-details h4 {
        font-size: 20px;
    }
    
    .crosssell-price {
        font-size: 24px;
    }
    
    .crosssell-action-buttons {
        flex-direction: column;
    }
    
    .crosssell-add-btn,
    .crosssell-skip-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .crosssell-thumbnails {
        gap: 6px;
    }
    
    .crosssell-thumbnail {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .crosssell-overlay {
        padding: 5px;
    }
    
    .crosssell-header {
        padding: 15px;
    }
    
    .crosssell-header h3 {
        font-size: 18px;
    }
    
    .crosssell-content {
        padding: 15px;
    }
    
    .crosssell-main-image img {
        height: 180px;
    }
    
    .crosssell-details h4 {
        font-size: 18px;
    }
    
    .crosssell-price {
        font-size: 22px;
    }
    
    .crosssell-thumbnails {
        gap: 4px;
    }
    
    .crosssell-thumbnail {
        width: 45px;
        height: 45px;
    }
}

/* Animations d'entrée pour les éléments */
.crosssell-product > * {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.crosssell-image-gallery {
    animation-delay: 0.1s;
}

.crosssell-details {
    animation-delay: 0.2s;
}

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