/* ============================================
   MEMBERSHIP & PAGES STYLESHEET
   Gabochie Value theme — design-system tokens
   Sections: Login/Register · Dashboard · PMPro
   · Membership Levels · Common · WC Fixes
   @package Gabochie_Value
   ============================================ */


/* ══════════════════════════════════════════════
   1. LOGIN / REGISTER  ( mem- prefix )
   ══════════════════════════════════════════════ */

.mem-login-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* ---- Form card ---- */
.mem-login-card {
    background: var(--cream);
    padding: 2.5rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border-light);
}

.mem-login-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.mem-login-card .mem-subtitle {
    color: var(--mist);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ---- Alert banners ---- */
.mem-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--r-sm);
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.mem-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.mem-alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}

/* ---- Login / register links ---- */
.mem-login-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--teal);
    text-decoration: underline;
    font-size: 0.85rem;
}

.mem-login-link:hover {
    color: var(--gold);
}

/* ---- Trust row ---- */
.mem-trust-row {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding: 0 0.5rem;
}

.mem-trust-stat {
    flex: 1;
    text-align: center;
}

.mem-trust-stat-n {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 0.15rem;
}

.mem-trust-stat-l {
    font-size: 0.75rem;
    color: var(--mist);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---- Conversion panel ---- */
.mem-convert-card {
    background: var(--ivory);
    padding: 2.5rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border-light);
}

.mem-convert-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.mem-convert-card .mem-subtitle {
    color: var(--mist);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.mem-convert-card form {
    margin-bottom: 2rem;
}

.mem-convert-card label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.mem-convert-card input,
.mem-convert-card select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-size: 0.95rem;
    background: var(--ivory);
    color: var(--charcoal);
    transition: border-color 0.2s;
    margin-bottom: 1rem;
}

.mem-convert-card input:focus,
.mem-convert-card select:focus {
    outline: none;
    border-color: var(--teal);
}

.mem-convert-card .mem-cta-btn {
    display: block;
    width: 100%;
    padding: 0.9rem 2rem;
    background: var(--gold);
    color: var(--teal-dark);
    border: none;
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    text-decoration: none;
}

.mem-convert-card .mem-cta-btn:hover {
    opacity: 0.9;
    color: var(--teal-dark);
}

/* ---- Testimonial quote ---- */
.mem-convert-quote {
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
}

.mem-convert-quote h4 {
    font-size: 0.9rem;
    color: var(--charcoal);
    margin-bottom: 1rem;
}

.mem-convert-quote .mem-quote-text {
    font-size: 0.85rem;
    color: var(--mist);
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.mem-convert-quote .mem-quote-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mem-convert-quote .mem-quote-avatar {
    width: 36px;
    height: 36px;
    background: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ivory);
    font-size: 0.85rem;
    font-weight: 500;
    flex-shrink: 0;
}

.mem-convert-quote .mem-quote-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--charcoal);
}

.mem-convert-quote .mem-quote-loc {
    font-size: 0.7rem;
    color: var(--mist);
}


/* ══════════════════════════════════════════════
   2. DASHBOARD  ( d2- prefix )
   Extracted from template-dashboard.php inline
   <style> block, tokenized to design system.
   ══════════════════════════════════════════════ */

.d2-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

/* ---- Hero stats ---- */
.d2-hero {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.d2-stat {
    background: var(--ivory);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
}

.d2-stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mist);
    margin-bottom: 0.35rem;
}

.d2-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--teal);
    font-family: 'Playfair Display', serif;
}

.d2-stat-sub {
    font-size: 0.78rem;
    color: var(--mist);
    margin-top: 0.2rem;
}

/* ---- Sections ---- */
.d2-section {
    background: var(--ivory);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.d2-section-head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.d2-section-head h3 {
    font-size: 1.05rem;
    color: var(--charcoal);
}

.d2-section-body {
    padding: 1.5rem;
}

/* ---- Badges ---- */
.d2-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 600;
}

.d2-badge.green {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.d2-badge.orange {
    background: rgba(230, 126, 34, 0.1);
    color: #E67E22;
}

.d2-badge.red {
    background: rgba(192, 57, 43, 0.1);
    color: #C0392B;
}

.d2-badge.teal {
    background: rgba(13, 92, 82, 0.1);
    color: var(--teal);
}

.d2-badge.gold {
    background: rgba(201, 169, 110, 0.15);
    color: var(--gold);
}

.d2-badge.blue {
    background: rgba(41, 128, 185, 0.1);
    color: #2980B9;
}

/* ---- Timeline ---- */
.d2-timeline {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 1rem 0;
}

.d2-tl-stage {
    flex: 0 0 auto;
    text-align: center;
    position: relative;
    min-width: 80px;
}

.d2-tl-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    background: var(--ivory);
    margin: 0 auto 0.4rem;
    position: relative;
    z-index: 2;
    transition: all 0.2s;
}

.d2-tl-dot.done {
    background: var(--teal);
    border-color: var(--teal);
}

.d2-tl-dot.current {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.25);
    transform: scale(1.2);
}

.d2-tl-line {
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-light);
    z-index: 1;
}

.d2-tl-stage:first-child .d2-tl-line {
    left: 50%;
}

.d2-tl-stage:last-child .d2-tl-line {
    right: 50%;
}

.d2-tl-line.done {
    background: var(--teal);
}

.d2-tl-label {
    font-size: 0.6rem;
    color: var(--mist);
    max-width: 70px;
    line-height: 1.2;
}

.d2-tl-label.current {
    color: var(--gold);
    font-weight: 600;
}

/* ---- Progress bar ---- */
.d2-progress {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin: 1rem 0;
}

.d2-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    border-radius: 3px;
    transition: width 0.4s;
}

/* ---- Grid layouts ---- */
.d2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.d2-grid.three {
    grid-template-columns: 1fr 1fr 1fr;
}

/* ---- Documents ---- */
.d2-doc-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.d2-doc-item:last-child {
    border-bottom: none;
}

.d2-doc-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.d2-doc-icon.plan {
    background: rgba(13, 92, 82, 0.1);
    color: var(--teal);
}

.d2-doc-icon.perm {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.d2-doc-icon.fin {
    background: rgba(201, 169, 110, 0.15);
    color: var(--gold);
}

.d2-doc-icon.photo {
    background: rgba(41, 128, 185, 0.1);
    color: #2980B9;
}

.d2-doc-icon.other {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.d2-doc-title {
    font-size: 0.85rem;
    font-weight: 500;
}

.d2-doc-meta {
    font-size: 0.72rem;
    color: var(--mist);
}

/* ---- Messages ---- */
.d2-msg {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
}

.d2-msg:last-child {
    border-bottom: none;
}

.d2-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--ivory);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.d2-msg-avatar.system {
    background: var(--gold);
}

.d2-msg-body {
    flex: 1;
    min-width: 0;
}

.d2-msg-sender {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--charcoal);
}

.d2-msg-text {
    font-size: 0.82rem;
    color: var(--mist);
    margin-top: 0.15rem;
    line-height: 1.45;
}

.d2-msg-time {
    font-size: 0.65rem;
    color: var(--mist);
    margin-top: 0.2rem;
}

.d2-msg-unread {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.4rem;
}

/* ---- Audit log ---- */
.d2-audit-item {
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-light);
}

.d2-audit-item:last-child {
    border-bottom: none;
}

.d2-audit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.d2-audit-dot.created { background: #27AE60; }
.d2-audit-dot.updated { background: var(--gold); }
.d2-audit-dot.deleted { background: #C0392B; }
.d2-audit-dot.message { background: #2980B9; }
.d2-audit-dot.phase   { background: #8E44AD; }
.d2-audit-dot.document { background: var(--teal); }
.d2-audit-dot.cost    { background: #E67E22; }

.d2-audit-text {
    color: var(--mist);
    line-height: 1.4;
}

.d2-audit-time {
    font-size: 0.68rem;
    color: var(--mist);
}

/* ---- Gap list ---- */
.d2-gap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(230, 126, 34, 0.06);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

.d2-gap-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E67E22;
    flex-shrink: 0;
}

.d2-gap-label {
    font-weight: 500;
    color: var(--charcoal);
}

/* ---- Empty state ---- */
.d2-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--mist);
}

.d2-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

.d2-empty p {
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* ---- Message input ---- */
.d2-msg-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

.d2-msg-input input {
    flex: 1;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-family: 'Jost', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    background: var(--ivory);
    color: var(--charcoal);
}

.d2-msg-input input:focus {
    border-color: var(--teal);
}

.d2-msg-input button {
    background: var(--teal);
    color: var(--ivory);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
    transition: background 0.2s;
}

.d2-msg-input button:hover {
    background: var(--teal-deep);
}

.d2-msg-input button:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ---- Cost bar ---- */
.d2-cost-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--border);
    margin: 0.75rem 0;
}

.d2-cost-seg {
    transition: width 0.3s;
}

/* ---- Tabs ---- */
.d2-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.d2-tab {
    padding: 0.6rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--mist);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}

.d2-tab:hover {
    color: var(--charcoal);
}

.d2-tab.active {
    color: var(--teal);
    border-bottom-color: var(--teal);
    font-weight: 600;
}

.d2-tab-content {
    display: none;
}

.d2-tab-content.active {
    display: block;
}

/* ---- Readiness Score ---- */
.gr-section .gr-dim-bar {
    margin-bottom: 0.5rem;
}

.gr-dim-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}

.gr-dim-bar-label span:first-child {
    font-weight: 500;
    color: var(--charcoal);
}

.gr-dim-bar-label span:last-child {
    font-weight: 600;
}

.gr-dim-bar-track {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.gr-dim-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease-out;
}

.gr-strength-item,
.gr-gap-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0;
    font-size: 0.78rem;
    color: var(--mist);
}

.gr-strength-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #27AE60;
    flex-shrink: 0;
}

.gr-gap-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E67E22;
    flex-shrink: 0;
}

/* ---- Dashboard membership additions ---- */
.d2-member-tier {
    background: var(--gold-pale);
    border: 1px solid var(--gold-light);
    border-radius: var(--r-sm);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.d2-tier-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--teal);
}

.d2-tier-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--gold);
    color: var(--teal-dark);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
}

.d2-payment-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.d2-payment-row:last-child {
    border-bottom: none;
}

.d2-payment-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
}

.d2-payment-status.completed {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.d2-payment-status.pending {
    background: rgba(230, 126, 34, 0.1);
    color: #E67E22;
}

.d2-payment-status.failed {
    background: rgba(192, 57, 43, 0.1);
    color: #C0392B;
}

/* ---- Dashboard media queries ---- */
@media (max-width: 768px) {
    .d2-hero {
        grid-template-columns: repeat(2, 1fr);
    }

    .d2-grid {
        grid-template-columns: 1fr;
    }

    .d2-grid.three {
        grid-template-columns: 1fr;
    }

    .d2-timeline {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .mem-login-wrap {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .d2-hero {
        grid-template-columns: 1fr;
    }

    .mem-login-wrap {
        padding: 2rem 1rem 4rem;
    }
}


/* ══════════════════════════════════════════════
   3. PMPRO PAGES  ( pmpro- prefix overrides )
   ══════════════════════════════════════════════ */

/* ---- Levels grid ---- */
.pmpro-levels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.pmpro-level {
    background: var(--cream);
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    padding: 2rem 1.5rem;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.pmpro-level:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.pmpro-level .pmpro-level-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.pmpro-level .pmpro-level-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.pmpro-level .pmpro-level-description {
    color: var(--mist);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.pmpro-level .pmpro-level-select,
.pmpro-level .pmpro-level-select button {
    display: block;
    width: 100%;
    padding: 0.85rem 2rem;
    background: var(--teal);
    color: var(--ivory);
    border: none;
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
}

.pmpro-level .pmpro-level-select:hover,
.pmpro-level .pmpro-level-select button:hover {
    background: var(--teal-deep);
    color: var(--ivory);
}

/* Featured / highlighted level */
.pmpro-level.featured,
.pmpro-level.highlighted {
    border-color: var(--gold);
    background: var(--gold-pale);
    position: relative;
}

.pmpro-level.featured::before,
.pmpro-level.highlighted::before {
    content: "Most Popular";
    position: absolute;
    top: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--teal-dark);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* ---- Account page ---- */
.pmpro-account {
    max-width: 960px;
    margin: 0 auto;
}

.pmpro-account .pmpro-level-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--teal);
}

.pmpro-account .pmpro-level-price {
    color: var(--gold);
}

/* ---- Invoices table ---- */
.pmpro-invoices {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    overflow: hidden;
}

.pmpro-invoices th,
.pmpro-invoices td {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}

.pmpro-invoices th {
    background: var(--teal-light);
    color: var(--teal);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pmpro-invoices tr:nth-child(even) {
    background: var(--cream);
}

.pmpro-invoices tr:hover {
    background: var(--teal-light);
}

.pmpro-invoice a {
    color: var(--teal);
    font-weight: 500;
}

/* ---- Checkout form ---- */
.pmpro-checkout-form {
    max-width: 640px;
    margin: 0 auto;
}

.pmpro-checkout-form label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.pmpro-checkout-form input,
.pmpro-checkout-form select,
.pmpro-checkout-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-size: 0.95rem;
    background: var(--cream);
    color: var(--charcoal);
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.pmpro-checkout-form input:focus,
.pmpro-checkout-form select:focus,
.pmpro-checkout-form textarea:focus {
    outline: none;
    border-color: var(--teal);
}

.pmpro-checkout-form .pmpro_msg {
    padding: 0.75rem 1rem;
    border-radius: var(--r-sm);
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.pmpro-checkout-form .pmpro_msg.pmpro_msg-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.pmpro-checkout-form .pmpro_msg.pmpro_msg-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}

.pmpro-submit {
    display: block;
    width: 100%;
    padding: 0.9rem 2rem;
    background: var(--gold);
    color: var(--teal-dark);
    border: none;
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
}

.pmpro-submit:hover {
    opacity: 0.9;
}

/* ---- Billing form ---- */
.pmpro-billing {
    max-width: 640px;
    margin: 0 auto;
}

.pmpro-billing label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.pmpro-billing input,
.pmpro-billing select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-size: 0.95rem;
    background: var(--cream);
    color: var(--charcoal);
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.pmpro-billing input:focus,
.pmpro-billing select:focus {
    outline: none;
    border-color: var(--teal);
}

/* ---- Confirmation page ---- */
.pmpro-confirmation {
    text-align: center;
    max-width: 640px;
    margin: 3rem auto;
    padding: 2.5rem;
}

.pmpro-confirmation .pmpro-confirmation-head {
    margin-bottom: 1.5rem;
}

.pmpro-confirmation .pmpro-confirmation-head h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--teal);
    margin-bottom: 0.5rem;
}

.pmpro-confirmation .pmpro-confirmation-head p {
    color: var(--mist);
    font-size: 0.9rem;
}

.pmpro-confirmation .pmpro-invoice {
    background: var(--cream);
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
    font-size: 0.85rem;
}

/* ---- General PMPro content ---- */
.pmpro_content {
    padding: 4.5rem 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.pmpro_content h2,
.pmpro_content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--charcoal);
}

.pmpro_content p {
    color: var(--mist);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ---- PMPro level details / benefit list ---- */
.pmpro-level .pmpro-level-benefits,
.pmpro-level ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.pmpro-level .pmpro-level-benefits li,
.pmpro-level ul li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.5rem;
    font-size: 0.88rem;
    color: var(--charcoal);
}

.pmpro-level .pmpro-level-benefits li::before,
.pmpro-level ul li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
}


/* ══════════════════════════════════════════════
   4. MEMBERSHIP LEVELS PAGE  ( mem- prefix )
   ══════════════════════════════════════════════ */

/* ---- Hero ---- */
.mem-levels-hero {
    background: var(--teal-dark);
    color: var(--cream);
    padding: 7rem 2.5rem 3rem;
    text-align: center;
}

.mem-levels-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.mem-levels-hero h1 em {
    font-style: italic;
    color: var(--gold);
}

.mem-levels-hero p {
    font-size: 1.05rem;
    color: rgba(250, 247, 242, 0.65);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Levels grid ---- */
.mem-levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: -2rem auto 0;
    padding: 0 2.5rem 4.5rem;
    position: relative;
    z-index: 10;
}

/* ---- Level card ---- */
.mem-level-card {
    background: var(--cream);
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s;
}

.mem-level-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Featured card */
.mem-level-card.featured {
    border-color: var(--gold);
    background: var(--gold-pale);
    position: relative;
}

.mem-level-card.featured::before {
    content: "Most Popular";
    position: absolute;
    top: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--teal-dark);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.mem-level-card .mem-level-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--teal-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.mem-level-card .mem-level-icon svg {
    stroke: var(--teal);
    fill: none;
    width: 28px;
    height: 28px;
}

.mem-level-card .mem-level-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.mem-level-card .mem-level-price {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.25rem;
}

.mem-level-card .mem-level-period {
    font-size: 0.78rem;
    color: var(--mist);
    margin-bottom: 1rem;
}

.mem-level-card .mem-level-desc {
    color: var(--mist);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    flex: 1;
}

/* Feature list */
.mem-level-card .mem-level-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.mem-level-card .mem-level-features li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.75rem;
    font-size: 0.88rem;
    color: var(--charcoal);
}

.mem-level-card .mem-level-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-pale);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

/* CTA button */
.mem-level-card .mem-level-cta {
    display: block;
    width: 100%;
    padding: 0.85rem 2rem;
    background: var(--teal);
    color: var(--ivory);
    border: none;
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
}

.mem-level-card .mem-level-cta:hover {
    background: var(--teal-deep);
    color: var(--ivory);
}

.mem-level-card.featured .mem-level-cta {
    background: var(--gold);
    color: var(--teal-dark);
}

.mem-level-card.featured .mem-level-cta:hover {
    opacity: 0.9;
    color: var(--teal-dark);
}

/* ---- Tier badges ---- */
.mem-tier-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mem-tier-free {
    background: var(--teal-light);
    color: var(--teal);
}

.mem-tier-active {
    background: var(--gold-pale);
    color: var(--gold);
}

.mem-tier-premium {
    background: var(--teal-dark);
    color: var(--cream);
}

/* ---- Levels page responsive ---- */
@media (max-width: 768px) {
    .mem-levels-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .pmpro-levels {
        grid-template-columns: 1fr;
    }
}


/* ══════════════════════════════════════════════
   5. COMMON COMPONENTS  ( mem- prefix )
   ══════════════════════════════════════════════ */

.mem-section {
    padding: 4.5rem 2.5rem;
}

.mem-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Card ---- */
.mem-card {
    background: var(--cream);
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    padding: 2rem;
}

/* ---- Buttons ---- */
.mem-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--teal);
    color: var(--ivory);
    border: none;
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    text-align: center;
}

.mem-btn:hover {
    background: var(--teal-deep);
    color: var(--ivory);
    transform: translateY(-1px);
}

.mem-btn-gold {
    background: var(--gold);
    color: var(--teal-dark);
}

.mem-btn-gold:hover {
    opacity: 0.9;
    color: var(--teal-dark);
}

.mem-btn-outline {
    background: transparent;
    border: 1px solid var(--teal);
    color: var(--teal);
}

.mem-btn-outline:hover {
    background: var(--teal);
    color: var(--ivory);
}

/* ---- Form group ---- */
.mem-form-group {
    margin-bottom: 1.25rem;
}

.mem-form-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.mem-form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-size: 0.95rem;
    background: var(--cream);
    color: var(--charcoal);
    transition: border-color 0.2s;
}

.mem-form-input:focus {
    outline: none;
    border-color: var(--teal);
}

/* ---- Badges ---- */
.mem-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mem-badge-success {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.mem-badge-warning {
    background: rgba(230, 126, 34, 0.1);
    color: #E67E22;
}

.mem-badge-error {
    background: rgba(192, 57, 43, 0.1);
    color: #C0392B;
}

/* ---- Empty state ---- */
.mem-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--mist);
}

.mem-empty-state h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.mem-empty-state p {
    font-size: 0.88rem;
    line-height: 1.6;
}


/* ══════════════════════════════════════════════
   6. WOOCOMMERCE PRODUCT PAGE FIXES
   ══════════════════════════════════════════════ */

body.woocommerce .page-hero {
    padding-bottom: 3rem;
}

body.woocommerce-page .mem-section {
    padding-top: 3rem;
}

body.woocommerce .woocommerce-notices-wrapper:empty {
    display: none;
}

body.woocommerce .woocommerce ul.products li.product {
    background: var(--cream);
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    padding: 1rem;
    transition: transform 0.25s, box-shadow 0.25s;
}

body.woocommerce .woocommerce ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

body.woocommerce .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Playfair Display', serif;
    color: var(--charcoal);
}

body.woocommerce .woocommerce ul.products li.product .price {
    color: var(--gold);
    font-family: 'Playfair Display', serif;
}

body.woocommerce .woocommerce ul.products li.product .button {
    background: var(--teal);
    color: var(--ivory);
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: background 0.2s;
}

body.woocommerce .woocommerce ul.products li.product .button:hover {
    background: var(--teal-deep);
}

body.woocommerce .woocommerce .quantity .qty {
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
}

body.woocommerce button.button.alt,
body.woocommerce a.button.alt {
    background: var(--gold) !important;
    color: var(--teal-dark) !important;
    border-radius: var(--r-sm);
    font-family: 'Jost', sans-serif;
    font-weight: 600;
}

body.woocommerce button.button.alt:hover,
body.woocommerce a.button.alt:hover {
    opacity: 0.9;
}
