.meercato-zoom-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

.zoom-icon {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.zoom-icon:hover {
    background: #fff;
    transform: scale(1.1);
}

.zoom-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
}

.zoom-popup-content {
    position: relative;
    width: 90%;
    height: 90%;
    margin: 2% auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zoomed-image-container {
    max-width: 100%;
    max-height: 100%;
    position: relative;
    overflow: hidden;
}

#zoom-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.close-zoom {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close-zoom:hover {
    color: #ccc;
}

.zoom-window {
    position: absolute;
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: none;
    z-index: 9999;
}

/* RTL Support */
html[lang="ar"] .zoom-window {
    direction: rtl;
}

html[lang="ar"] .meercato-zoom-container {
    right: auto;
    left: 10px;
}

html[lang="ar"] .zoomed-image {
    transform-origin: right top;
}

.zoomed-image {
    position: absolute;
    max-width: none;
    max-height: none;
    pointer-events: none;
    left: 0;
    top: 0;
    transform-origin: left top;
    will-change: transform;
}

/* Ensure proper RTL handling for Fotorama */
html[lang="ar"] .fotorama__stage {
    direction: ltr;
}

html[lang="ar"] .fotorama__stage__frame {
    direction: ltr;
}

html[lang="ar"] .fotorama__img {
    direction: ltr;
}

.fotorama__stage__frame.fotorama__active img.fotorama__img {
    cursor: crosshair !important;
}

.product.media {
    position: relative;
    overflow: visible !important;
}

.fotorama__img {
    max-width: 100%;
    height: auto;
}

.zoom-icon,
#meercato-zoom-popup,
.meercato-zoom-container {
    display: none !important;
}

.fotorama--fullscreen .fotorama__stage__frame.fotorama__active img.fotorama__img {
    cursor: crosshair !important;
}

.fotorama__stage {
    overflow: visible !important;
}