/* --- 1. השכבה שלנו (Overlay) --- */
.wc-cropper-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 990; /* גבוה, אבל לא משוגע */
    
    /* === התיקון הקריטי === */
    /* זה גורם לכל הצל שחורג מגבולות התמונה להיחתך ולא להופיע על כל הדף */
    overflow: hidden !important; 
    
    border-radius: inherit; 
    background: transparent; 
    cursor: crosshair;
    
    /* וידוא שהקונטיינר עצמו לא חורג */
    max-width: 100%;
}

/* --- 2. אזור החיתוך (המסגרת) --- */
.wc-crop-box {
    position: absolute;
    z-index: 999; 
    cursor: move; 
    display: none; 
    box-sizing: border-box;
    border: 2px solid #fff; 
    
    /* הטריק: צל ענק. בגלל התיקון למעלה, הוא ייחתך בקצה התמונה */
    box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.6); 
    
    background: transparent;
}

/* קווי גריד פנימיים */
.wc-crop-box::before, .wc-crop-box::after {
    content: '';
    position: absolute;
    /*background: rgba(255, 255, 255, 0.4);*/
    pointer-events: none;
}
.wc-crop-box::before { top: 33.3%; bottom: 33.3%; left: 0; right: 0; }
.wc-crop-box::after { left: 33.3%; right: 33.3%; top: 0; bottom: 0; }

/* --- 3. תיקון לתמונה עצמה --- */
.woocommerce-product-gallery__image {
    /* חובה כדי שה-Overlay יתמקם יחסית לתמונה */
    position: relative !important;
    /* שכבת הגנה נוספת לחיתוך */
    overflow: hidden !important; 
}

/* --- 4. עיצוב הטופס --- */
#wallpaper-cropper-app {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
}

.crop-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-wrap { flex: 1; }
.input-wrap input { width: 100%; }

#crop-price-preview {
    font-weight: bold;
    color: #333;
    padding-top: 10px;
    border-top: 1px solid #f1f1f1;
}

#wall_width, #wall_height{
    max-width: 100%;
}
