/* Product Image */
.product-image,
.product-image-thumbnail {
    display: block;
    margin: 0 auto;
    border: 1px solid #ddd;
    background: #fff;
    object-fit: contain;
}

/* Full image */
.product-image {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
}

/* Thumbnail */
.product-image-thumbnail {
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
}
/* Saving overlay */
.saving-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.75);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.saving-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #2196F3;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.saving-text {
    margin-top: 12px;
    font-size: 1.2em;
    color: #333;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ─── Loading Overlay ─── */
.ui-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ui-loading-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #2196F3;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: ui-spin 1s linear infinite;
}

.ui-loading-text {
    margin-top: 12px;
    font-size: 1.1em;
    color: #333;
}

@keyframes ui-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ─── Toasts / Snackbar ─── */
.ui-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0.95;
    z-index: 10000;
    transition: transform 0.3s, opacity 0.3s;
}

.ui-toast-info { background: #2196F3; }
.ui-toast-ok   { background: #4CAF50; }
.ui-toast-error{ background: #F44336; }

.ui-toast-hide {
    opacity: 0;
    transform: translateX(-50%) translateY(40px);
}

/* ─── Progress Bar ─── */
.ui-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin-top: 8px;
}

.ui-progress-fill {
    width: 0;
    height: 100%;
    background: #2196F3;
    border-radius: 3px;
    transition: width 0.2s ease;
}
