/* ══════════════════════════════════════════════════════════════════
   KHEMA — หน้าขาย / ยืนยันเข้าสู่ระบบ / สิทธิ์การใช้งาน โปรแกรม Formulus Khema
   ══════════════════════════════════════════════════════════════════ */

.khema-wrap { max-width: 1040px; }

.khema-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--steel) 100%);
    color: white;
    padding: 3rem 0 2.5rem;
    text-align: center;
}

    .khema-hero h1 { font-size: 2.2rem; font-weight: 800; margin: 1rem 0 0.6rem; }

.khema-hero-logo {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border: 3px solid rgba(255,255,255,0.85);
    background: white;
    object-fit: cover;
}

.khema-hero-price {
    display: inline-flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    margin-bottom: 1.25rem;
}

.khema-hero-price-old { text-decoration: line-through; opacity: 0.7; }
.khema-hero-price-new { font-size: 1.35rem; font-weight: 800; color: var(--gold); }
.khema-hero-price-tag {
    background: #e5484d;
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
}

.khema-hero-sub {
    max-width: 640px;
    margin: 0 auto 1.5rem;
    opacity: 0.92;
    line-height: 1.7;
}

.khema-hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.khema-hero-version { margin-top: 1rem; font-size: 0.8rem; opacity: 0.75; }

.khema-h2 { font-size: 1.2rem; font-weight: 800; margin: 2rem 0 1rem; color: var(--navy); }
.khema-box .khema-h2 { margin-top: 0; }
.khema-h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.75rem; color: var(--navy); }

.khema-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.khema-feature {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}

    .khema-feature i { font-size: 1.6rem; color: var(--steel); }
    .khema-feature h3 { font-size: 1rem; font-weight: 700; margin: 0.6rem 0 0.4rem; }
    .khema-feature p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

.khema-shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.khema-shot {
    margin: 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: white;
    overflow: hidden;
    cursor: zoom-in;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

    .khema-shot:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
    .khema-shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; }
    .khema-shot figcaption { padding: 0.6rem 0.9rem; font-size: 0.85rem; font-weight: 600; color: var(--navy); }
    .khema-shot figcaption i { color: var(--steel-light); margin-right: 0.3rem; }

.khema-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 18, 36, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: zoom-out;
}

    .khema-lightbox img { max-width: 100%; max-height: calc(100vh - 6rem); border-radius: var(--radius-sm); box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.khema-lightbox-caption { color: white; margin-top: 0.75rem; font-weight: 600; }
.khema-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
}

.khema-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.khema-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-card);
}

.khema-terms { margin-top: 1rem; }

.khema-list, .khema-steps { margin: 0; padding-left: 1.25rem; line-height: 1.9; font-size: 0.9rem; }

.khema-price-card {
    position: relative;
    border: 2px solid var(--gold);
    text-align: center;
    overflow: hidden;
    padding-top: 2.6rem;
}

.khema-price-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #e5484d;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.4rem;
}

.khema-price-old { color: var(--text-muted); font-size: 0.95rem; }
.khema-price-new { font-size: 3rem; font-weight: 800; color: var(--navy); line-height: 1.1; margin: 0.2rem 0; }
    .khema-price-new span { font-size: 1.1rem; font-weight: 700; }
.khema-price-note { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; }

.khema-price-list { list-style: none; padding: 0; text-align: left; display: inline-block; margin-bottom: 1.25rem; }
    .khema-price-list i { color: #1a7f3c; margin-right: 0.4rem; }

.khema-price-cta { display: flex; justify-content: center; font-size: 1rem; }

.khema-email {
    margin-top: 1rem;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    background: #eef3fa;
    font-size: 0.875rem;
}

.khema-bottom { text-align: center; margin: 1.5rem 0 2.5rem; }

.khema-muted { color: var(--text-muted); font-size: 0.875rem; }

.khema-auth-logo { width: 76px; height: 76px; border-radius: 18px; box-shadow: var(--shadow-card); margin-bottom: 0.5rem; }

.khema-title-logo { width: 40px; height: 40px; border-radius: 10px; vertical-align: middle; margin-right: 0.5rem; box-shadow: var(--shadow-card); }

.khema-actions { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }

.khema-btn-light { background: var(--cream); color: var(--navy); }
    .khema-btn-light:hover { background: var(--cream-dark); }

.khema-link-btn {
    background: none;
    border: none;
    color: var(--navy);
    cursor: pointer;
    font: inherit;
    font-size: 0.825rem;
    padding: 0.2rem 0.4rem;
    text-decoration: underline;
}

    .khema-link-btn:disabled { opacity: 0.4; cursor: default; }

.khema-danger { color: #b3261e; }

.khema-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
    .khema-table th { text-align: left; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 0.4rem 0.5rem; }
    .khema-table td { border-bottom: 1px solid #eee8e1; padding: 0.5rem; vertical-align: middle; }
.khema-table-plain td { border: none; padding: 0.35rem 0.5rem; }
    .khema-table-plain td:first-child { color: var(--text-muted); width: 38%; }
.khema-row-off td { color: #a39d96; }

.khema-status-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }

.khema-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.khema-badge-ok { background: #e3f4e8; color: #1a7f3c; }
.khema-badge-trial { background: #fff3dc; color: #a46a00; }
.khema-badge-none { background: #fbe4e2; color: #b3261e; }

@media (max-width: 600px) {
    .khema-hero h1 { font-size: 1.7rem; }
    .khema-hero-logo { width: 104px; height: 104px; border-radius: 22px; }
    .khema-price-new { font-size: 2.4rem; }
    .khema-box { padding: 1rem; }
    .khema-table-plain td:first-child { width: 42%; }
}
