/* Modal Styles */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    animation: zoomIn 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.image-container {
    overflow: hidden;
    position: relative;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
}

.image-container.draggable {
    cursor: grab;
}

.image-container.draggable:active {
    cursor: grabbing;
}

.modal-content img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.3s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1010;
}

.modal-close:hover {
    color: #488A31;
}

.modal-title {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.zoom-controls {
    position: absolute;
    bottom: -40px;
    right: 0;
    display: flex;
    gap: 10px;
    z-index: 1010;
}

.zoom-controls button {
    background-color: rgba(72, 138, 49, 0.8);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.zoom-controls button:hover {
    background-color: #488A31;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Cursor pointer for product cards */
.product-card .bg-cover {
    cursor: pointer;
    position: relative;
}

.product-card .bg-cover::after {
    content: '\f00e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    bottom: 10px;
    background-color: rgba(72, 138, 49, 0.8);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .bg-cover::after {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
    }
    
    .modal-title {
        bottom: -30px;
        font-size: 16px;
    }
    
    .modal-close {
        top: -30px;
        font-size: 24px;
    }
    
    .zoom-controls {
        bottom: -30px;
    }
    
    .zoom-controls button {
        width: 30px;
        height: 30px;
    }
}