/* Modal base styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius-large);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.modal-close:hover {
    transform: scale(1.1);
}

.modal-body {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* Cart modal specific */
.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--border-radius-small);
}

.cart-item-info {
    flex: 1;
}

.cart-item-info p {
    margin: 2px 0;
    font-size: 0.9rem;
}

.total {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Zoom modal */
.zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.zoom-modal.active {
    display: flex;
}

.zoom-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
}

.zoom-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
}

.zoom-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.zoom-close:hover {
    transform: scale(1.1);
}

.zoom-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: none;
    color: var(--white);
    font-size: 2rem;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 233, 229, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.zoom-nav:hover {
    background: linear-gradient(135deg, #4FE9E5, #2196F3);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 25px rgba(79, 233, 229, 0.5);
}

.zoom-prev {
    left: 10px;
}

.zoom-next {
    right: 10px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .zoom-nav {
        font-size: 1.5rem;
        padding: 10px 15px;
        box-shadow: 0 3px 12px rgba(79, 233, 229, 0.4);
    }
    
    .zoom-nav:hover {
        transform: translateY(-50%) scale(1.03);
        box-shadow: 0 4px 18px rgba(79, 233, 229, 0.6);
    }
    
    .zoom-close {
        top: -35px;
        font-size: 1.8rem;
    }
}
