/*
|--------------------------------------------------------------------------
| Cosmiclatte Membership Plans - Clean Centered Layout
|--------------------------------------------------------------------------
*/

/* Ensure the popup wrapper stays fixed to the viewport */
.mfp-wrap {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
}

/* Center the content using Flexbox */
.mfp-container {
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Reset any height or vertical alignment that might interfere */
.mfp-content {
    vertical-align: middle;
    display: inline-block;
}

/* 1. MAIN CONTAINER */
.clm-pricing {
    width: 100% !important;
    max-width: 960px !important; /* Locks width so cards stay well-proportioned */
    margin: 40px auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

.clm-pricing__header {
    text-align: center;
    margin-bottom: 40px;
}

.clm-pricing__header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #111827;
}

.clm-pricing__header p {
    font-size: 16px;
    color: #6b7280;
}

/* 2. FLEXROW WRAPPER (Fixes Theme Grid Overrides) */
.clm-pricing__grid {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 30px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. CARD CONTAINER */
.clm-plan-card {
    position: relative !important;
    flex: 1 1 0px !important; /* Forces equal width */
    max-width: 440px !important; /* Prevents cards from growing excessively wide */
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    box-sizing: border-box !important;
    margin: 0 !important; /* Overrides theme column margins */
}

.clm-plan-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.12) !important;
}

.clm-plan-card.popular {
    border: 2px solid #5b2be0 !important;
}

/* 4. OVERLAY BADGES */
.clm-plan-icon {
    position: absolute !important;
    top: -20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #5b2be0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    color: #ffc107 !important;
    z-index: 10 !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12) !important;
}

.clm-best-value {
    position: absolute !important;
    top: 16px !important;
    right: -32px !important;
    width: 125px !important;
    text-align: center !important;
    background: #ffc107 !important;
    color: #000000 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    padding: 5px 0 !important;
    transform: rotate(45deg) !important;
    z-index: 9 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
    text-transform: uppercase !important;
}

/* 5. IMAGE CONTAINER */
.clm-plan-image-wrapper {
    position: relative !important;
    height: 160px !important;
    width: 100% !important;
    overflow: hidden !important;
    border-top-left-radius: 19px !important;
    border-top-right-radius: 19px !important;
    background: #f9fafb !important;
}

.clm-plan-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* 6. CONTENT AREA */
.clm-plan-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding: 24px 28px 28px 28px !important;
}

.clm-title-area {
    text-align: center !important;
    margin-bottom: 16px !important;
}

.clm-plan-badge {
    color: #6b7280 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.clm-plan-title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    margin: 0 !important;
}

/* 7. PRICE AREA */
.clm-price-area {
    text-align: center !important;
    margin-bottom: 24px !important;
    min-height: 85px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

.clm-old-price {
    color: #9ca3af !important;
    font-size: 1rem !important;
    text-decoration: line-through !important;
    margin-bottom: 2px !important;
}

.clm-new-price {
    font-size: 3rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    color: #5b2be0 !important;
}

.clm-save-badge {
    display: inline-block !important;
    margin-top: 8px !important;
    background: #10b981 !important;
    color: #ffffff !important;
    padding: 4px 12px !important;
    border-radius: 9999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

/* 8. FEATURES LIST */
.clm-plan-features {
    flex: 1 1 auto !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 24px 0 !important;
}

.clm-plan-features li {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 0 !important;
    font-size: 14px !important;
    color: #374151 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.clm-plan-features li:last-child {
    border-bottom: none !important;
}

.clm-plan-features li span {
    color: #10b981 !important;
    font-weight: 700 !important;
}

/* 9. SUBSCRIBE BUTTON */
.clm-plan-footer {
    margin-top: auto !important;
}

.clm-subscribe-btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    text-decoration: none !important;
    color: #ffffff !important;
    background: #5b2be0 !important;
    padding: 14px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s ease !important;
}

.clm-subscribe-btn:hover {
    background: #4a21ba !important;
}

/* 10. MOBILE BREAKPOINT */
@media (max-width: 768px) {
    .clm-pricing__grid {
        flex-direction: column !important;
        align-items: center !important;
    }

    .clm-plan-card {
        width: 100% !important;
        max-width: 100% !important;
    }
}
/* =====================================================
   Premium Popup
===================================================== */

#clm-premium-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.clm-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
}

.clm-popup-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 520px;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    text-align: center;
}

.clm-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.clm-popup-box h2 {
    margin: 0 0 10px;
}

.clm-subtitle {
    color: #666;
    margin-bottom: 20px;
}

.clm-popup-box ul {
    text-align: left;
    margin: 20px 0;
    padding-left: 20px;
}

.clm-popup-box li {
    margin-bottom: 10px;
}

.clm-plans {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.clm-plans a {
    flex: 1;
    text-decoration: none;
    text-align: center;
}