/* CSS untuk Modal Detail Produk */
.detail-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.detail-modal-content {
    background-color: #fff;
    margin: 2% auto;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.4s ease;
}

.detail-modal .close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.detail-modal .close:hover {
    background-color: #f8f9fa;
    color: #e91e63;
    transform: rotate(90deg);
}

.detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

.detail-image {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px 0 0 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.detail-image img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.detail-image img:hover {
    transform: scale(1.02);
}

.detail-image .featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    z-index: 2;
}

.detail-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.detail-info h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

.detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: #e91e63;
    margin: 1rem 0;
    background: linear-gradient(135deg, #e91e63, #ff4081);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-stock {
    font-size: 1rem;
    margin: 1rem 0;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    background: #f8f9fa;
    border-left: 4px solid #27ae60;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-stock.low-stock {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: #e74c3c;
    color: #e74c3c;
    font-weight: 600;
}

.detail-stock i {
    font-size: 1.1rem;
}

.detail-description {
    margin: 1.5rem 0;
    flex: 1;
}

.detail-description h4 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-description h4 i {
    color: #e91e63;
}

.detail-description p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: justify;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-whatsapp-large {
    flex: 2;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 54px;
}

.btn-whatsapp-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    background: linear-gradient(135deg, #128C7E, #25D366);
}

.btn-close-detail {
    flex: 1;
    background: #6c757d;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 54px;
}

.btn-close-detail:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .detail-modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .detail-container {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .detail-image {
        border-radius: 16px 16px 0 0;
        padding: 1.5rem;
        max-height: 300px;
    }
    
    .detail-image img {
        max-height: 250px;
    }
    
    .detail-info {
        padding: 1.5rem;
    }
    
    .detail-info h2 {
        font-size: 1.5rem;
    }
    
    .detail-price {
        font-size: 1.6rem;
    }
    
    .detail-actions {
        flex-direction: column;
    }
    
    .btn-whatsapp-large,
    .btn-close-detail {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .detail-modal-content {
        margin: 2% auto;
        width: 98%;
        border-radius: 12px;
    }
    
    .detail-image {
        padding: 1rem;
        max-height: 250px;
    }
    
    .detail-image img {
        max-height: 200px;
    }
    
    .detail-info {
        padding: 1rem;
    }
    
    .detail-info h2 {
        font-size: 1.3rem;
    }
    
    .detail-price {
        font-size: 1.4rem;
    }
    
    .detail-stock {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

/* Scrollbar styling untuk modal */
.detail-modal-content::-webkit-scrollbar {
    width: 8px;
}

.detail-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 16px 16px 0;
}

.detail-modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.detail-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}