/* MLC Tech Cross Sell Popup CSS */

:root {
    --mlctech-primary: #8a2be2;
    --mlctech-primary-hover: #7b1fa2;
    --mlctech-bg-glass: rgba(255, 255, 255, 0.85);
    --mlctech-text: #1e293b;
    --mlctech-text-muted: #64748b;
    --mlctech-border: rgba(255, 255, 255, 0.4);
    --mlctech-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.mlctech-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mlctech-modal-overlay.active {
    opacity: 1;
}

.mlctech-modal-container {
    background: var(--mlctech-bg-glass);
    border: 1px solid var(--mlctech-border);
    box-shadow: var(--mlctech-shadow);
    border-radius: 24px;
    width: 90%;
    max-width: 680px;
    padding: 32px;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.mlctech-modal-overlay.active .mlctech-modal-container {
    transform: translateY(0) scale(1);
}

.mlctech-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--mlctech-text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.mlctech-modal-close:hover {
    color: var(--mlctech-text);
    transform: rotate(90deg);
}

/* Header design */
.mlctech-upsell-header {
    text-align: center;
    margin-bottom: 28px;
}

.mlctech-gift-icon {
    font-size: 40px;
    margin-bottom: 12px;
    animation: mlctech-bounce 2s infinite ease-in-out;
    display: inline-block;
}

.mlctech-upsell-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--mlctech-text);
    margin: 0 0 8px 0;
}

.mlctech-upsell-header p {
    font-size: 14px;
    color: var(--mlctech-text-muted);
    margin: 0;
}

/* Product Cards layout */
.mlctech-upsell-products {
    display: grid;
    gap: 20px;
    margin-bottom: 28px;
}

.mlctech-upsell-products.single-product {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.mlctech-upsell-products.dual-products {
    grid-template-columns: 1fr 1fr;
}

.mlctech-product-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mlctech-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.mlctech-product-image-wrapper {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.mlctech-product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.mlctech-product-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mlctech-product-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--mlctech-text);
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.mlctech-product-desc {
    font-size: 12px;
    color: var(--mlctech-text-muted);
    margin: 0 0 12px 0;
    line-height: 1.4;
    height: 3.2em;
    overflow: hidden;
}

.mlctech-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--mlctech-primary);
    margin-bottom: 14px;
}

/* Add to cart forms and buttons */
.mlctech-add-to-cart-form {
    width: 100%;
    margin-top: auto;
}

.mlctech-product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.mlctech-add-to-cart-btn {
    width: 100%;
    background: var(--mlctech-primary) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 10px 16px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mlctech-add-to-cart-btn:hover {
    background: var(--mlctech-primary-hover) !important;
    transform: translateY(-1px);
}

.mlctech-add-to-cart-btn:active {
    transform: translateY(1px);
}

.mlctech-view-product-btn {
    width: 100%;
    background: transparent !important;
    border: 1px solid var(--mlctech-text-muted) !important;
    color: var(--mlctech-text-muted) !important;
    padding: 9px 16px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.mlctech-view-product-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--mlctech-text) !important;
    border-color: var(--mlctech-text) !important;
}

/* Footer layout */
.mlctech-upsell-footer {
    text-align: center;
}

.mlctech-btn-close-modal {
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--mlctech-text-muted);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mlctech-btn-close-modal:hover {
    color: var(--mlctech-text);
}

@keyframes mlctech-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-6px) scale(1.05);
    }
}

/* Responsive adjustments */
@media (max-width: 580px) {
    .mlctech-upsell-products.dual-products {
        grid-template-columns: 1fr;
    }
    .mlctech-modal-container {
        padding: 20px;
    }
}
