/* Smart Offer Pro Checkout Popup */
.sop-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sop-popup-overlay.sop-active {
    opacity: 1;
    visibility: visible;
}

.sop-popup-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.sop-popup-overlay.sop-active .sop-popup-content {
    transform: translateY(0);
}

.sop-popup-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sop-popup-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.sop-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
}

.sop-popup-close:hover {
    color: #333;
}

.sop-popup-body {
    padding: 20px;
}

.sop-product-display {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.sop-product-image {
    flex: 0 0 120px;
}

.sop-product-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    border: 1px solid #eee;
}

.sop-product-details {
    flex: 1;
}

.sop-product-name {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 10px;
    color: #333;
}

.sop-product-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.sop-price-box {
    margin-bottom: 15px;
}

.sop-price-label {
    font-size: 13px;
    color: #777;
}

.sop-old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 5px;
}

.sop-new-price {
    font-weight: bold;
    color: #27ae60;
    font-size: 18px;
}

.sop-variations {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.sop-variation-row {
    margin-bottom: 10px;
}

.sop-variation-row:last-child {
    margin-bottom: 0;
}

.sop-variation-row label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 3px;
    text-align: start;
}

.sop-variation-row select {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.sop-popup-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.sop-decline-btn {
    background: #e0e0e0;
    color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.sop-decline-btn:hover {
    background: #d0d0d0;
}

.sop-accept-btn {
    background: #27ae60;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.sop-accept-btn:hover {
    background: #219150;
}

.sop-accept-btn.sop-loading {
    opacity: 0.7;
    cursor: wait;
}

.sop-discount {
    background: #e74c3c;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
    display: inline-block;
}

/* Responsive */
@media (max-width: 480px) {
    .sop-product-display {
        flex-direction: column;
    }

    .sop-product-image {
        flex: 0 0 auto;
        width: 100px;
        margin: 0 auto;
    }

    .sop-popup-footer {
        flex-direction: column-reverse;
    }

    .sop-accept-btn,
    .sop-decline-btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   ROW & COLUMN RESPONSIVE SYSTEM
   ============================================ */

/* Desktop - Horizontal by default */
.sop-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px;
    width: 100%;
}

/* Vertical direction (stacked) */
.sop-row-direction-vertical {
    flex-direction: column !important;
}

/* Column base styles */
.sop-column {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0%;
    min-width: 0;
}

/* Mobile Responsive - Auto-stack columns */
@media (max-width: 767px) {
    .sop-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 15px;
        width: 100%;
    }

    .sop-column {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Allow horizontal on mobile if explicitly set */
    .sop-row[data-mobile-direction="horizontal"] {
        flex-direction: row !important;
    }

    .sop-row[data-mobile-direction="horizontal"] .sop-column {
        flex: 1 !important;
        width: auto !important;
    }
}