.product-card {
    position: relative;
    border-radius: 12px;
    overflow: visible;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: white;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000000;
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-hover-modal {
    position: absolute;
    top: -50px;
    left: -50px;
    width: calc(100% + 100px);
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: all 0.3s ease;
    overflow: hidden;
    pointer-events: none;
}

.product-card:hover .product-hover-modal,
.jumia-product-card:hover .product-hover-modal {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

.product-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-card:hover .product-modal-backdrop,
.jumia-product-card:hover .product-modal-backdrop {
    opacity: 1;
    visibility: visible;
}

.product-modal-image {
    height: 400px;
    overflow: hidden;
    position: relative;
}

.modal-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

.product-modal-content {
    padding: 40px;
    text-align: center;
}

.product-modal-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
    margin-bottom: 20px;
    max-height: 80px;
    overflow-y: auto;
}

.product-modal-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.product-modal-button:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.product-info {
    padding: 20px;
    transition: all 0.3s ease;
}

.product-card:hover .product-info {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.product-category {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-title {
    margin-bottom: 12px;
}

.product-title a {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.product-card:hover .product-title a {
    color: #2c3e50;
}

.product-price {
    margin-bottom: 15px;
    font-weight: 600;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

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

.product-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-actions .add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.product-actions .buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.product-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    padding: 6px 10px;
    border-radius: 0 0 0 8px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 80%);
}

.product-badge.featured {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.product-badge.sale {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.product-badge.top-rated {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.product-badge.best-deal {
    background: linear-gradient(135deg, #ff9a56, #ff6b35);
    color: white;
}

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

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .product-hover-modal {
        top: -60px;
        left: -60px;
        width: calc(100% + 120px);
    }
    
    .product-modal-image {
        height: 350px;
    }
    
    .product-modal-content {
        padding: 35px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-hover-modal {
        top: -40px;
        left: -40px;
        width: calc(100% + 80px);
    }
    
    .product-modal-image {
        height: 280px;
    }
    
    .product-modal-content {
        padding: 25px;
    }
    
    .product-modal-description {
        font-size: 0.85rem;
        max-height: 70px;
    }
    
    .product-modal-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .carousel-dot {
        width: 7px;
        height: 7px;
    }
    

}

/* Large phones */
@media (max-width: 480px) {
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-hover-modal {
        top: -30px;
        left: -30px;
        width: calc(100% + 60px);
    }
    
    .product-modal-image {
        height: 220px;
    }
    
    .product-modal-content {
        padding: 20px;
    }
    
    .product-modal-description {
        font-size: 0.8rem;
        max-height: 60px;
        margin-bottom: 15px;
    }
    
    .product-modal-button {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .carousel-btn.prev {
        left: 8px;
    }
    
    .carousel-btn.next {
        right: 8px;
    }
    
    .carousel-dot {
        width: 6px;
        height: 6px;
    }
    

}

/* Small phones */
@media (max-width: 360px) {
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-hover-modal {
        top: -20px;
        left: -20px;
        width: calc(100% + 40px);
    }
    
    .product-modal-image {
        height: 180px;
    }
    
    .product-modal-content {
        padding: 15px;
    }
    
    .product-modal-description {
        font-size: 0.75rem;
        max-height: 50px;
        margin-bottom: 12px;
    }
    
    .product-modal-button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .carousel-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .carousel-btn.prev {
        left: 6px;
    }
    
    .carousel-btn.next {
        right: 6px;
    }
    
    .carousel-dots {
        bottom: 10px;
    }
    
    .carousel-dot {
        width: 5px;
        height: 5px;
    }
    

}

/* Extra small phones */
@media (max-width: 320px) {
    .product-image {
        height: 140px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-hover-modal {
        top: -15px;
        left: -15px;
        width: calc(100% + 30px);
    }
    
    .product-modal-image {
        height: 160px;
    }
    
    .product-modal-content {
        padding: 12px;
    }
    
    .product-modal-description {
        font-size: 0.7rem;
        max-height: 45px;
        margin-bottom: 10px;
    }
    
    .product-modal-button {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .carousel-btn {
        width: 25px;
        height: 25px;
        font-size: 10px;
    }
    
    .carousel-btn.prev {
        left: 5px;
    }
    
    .carousel-btn.next {
        right: 5px;
    }
    
    .carousel-dots {
        bottom: 8px;
    }
    
    .carousel-dot {
        width: 4px;
        height: 4px;
    }
    

}