.mg-variation-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.mg-variation-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mg-variation-popup-content {
    background: #fff;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.mg-variation-popup-overlay.active .mg-variation-popup-content {
    transform: translateY(0);
}

.mg-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
}

.mg-popup-close:hover {
    color: #000;
}

.mg-popup-product-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.mg-popup-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.mg-popup-title {
    font-size: 16px;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.mg-popup-price {
    margin: 0;
    font-weight: 500;
    color: #333;
}

.mg-attribute-row {
    margin-bottom: 15px;
}

.mg-attribute-label {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 500;
}

.mg-attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mg-size-option {
    border: 1px solid #ddd;
    background: #fff;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.mg-size-option:hover:not(.disabled) {
    border-color: #000;
}

.mg-size-option.selected {
    background: #000;
    color: #fff;
    border-color: #000;
}

.mg-size-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.mg-popup-add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.mg-popup-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.mg-popup-add-to-cart-btn:hover:not(:disabled) {
    background: #333;
}

.mg-popup-add-to-cart-btn.loading {
    opacity: 0.8;
    cursor: wait;
}
