/* ==========================================================================
   CHECKOUT — estilo carrinho (Hostinger)
   ========================================================================== */

body.page-template-page-comprar-php {
    background: var(--md-bg-alt);
}

.md-checkout {
    padding: 2rem 0 4rem;
}

.md-checkout-shell {
    max-width: 1080px;
}

.md-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.md-checkout-header h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    letter-spacing: -0.03em;
    font-weight: 700;
}

.md-checkout-change-plan {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--md-primary);
    text-decoration: none;
}

.md-checkout-change-plan:hover {
    text-decoration: underline;
}

/* --- Alerts --- */

.md-checkout-alert {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.md-checkout-alert--success {
    background: var(--md-success-bg);
    border: 1px solid var(--md-success-border);
    color: var(--md-success-text);
}

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

/* --- Layout --- */

.md-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 1.25rem;
    align-items: start;
}

.md-checkout-main {
    display: grid;
    gap: 1rem;
}

.md-checkout-panel {
    padding: 1.35rem 1.5rem;
    border-radius: 16px;
    background: var(--md-surface);
    border: 1px solid var(--md-border);
    box-shadow: var(--md-shadow-soft);
}

.md-checkout-panel h3 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
}

/* --- Plan head --- */

.md-checkout-plan-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.md-checkout-plan-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--md-primary-bg);
    border: 1px solid var(--md-primary-border);
    color: var(--md-primary);
    font-size: 0.82rem;
    font-weight: 800;
    flex-shrink: 0;
}

.md-checkout-plan-head h2 {
    margin: 0 0 0.2rem;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.md-checkout-plan-head p {
    margin: 0;
    color: var(--md-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

/* --- Period --- */

.md-checkout-period {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 1rem 1.25rem;
    align-items: end;
    padding: 1rem 0;
    border-top: 1px solid var(--md-border);
    border-bottom: 1px solid var(--md-border);
    margin-bottom: 1rem;
}

.md-checkout-period-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.md-checkout-period-field select {
    width: 100%;
    height: 46px;
    padding: 0 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--md-border);
    background: var(--md-surface);
    color: var(--md-text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.md-checkout-period-field select:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.md-checkout-period-pricing {
    text-align: right;
}

.md-checkout-period-pricing-main {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.2rem;
}

.md-checkout-period-pricing-main strong {
    font-size: 1.85rem;
    letter-spacing: -0.04em;
    line-height: 1;
}

.md-checkout-period-pricing-main span {
    color: var(--md-muted);
    font-size: 0.92rem;
}

.md-checkout-period-pricing-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.md-checkout-period-pricing-meta s {
    color: var(--md-muted);
    font-size: 0.82rem;
}

.md-checkout-save-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: var(--md-success-bg);
    border: 1px solid var(--md-success-border);
    color: var(--md-success-text);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.md-checkout-save-badge.is-hidden {
    display: none;
}

.md-checkout-renewal {
    margin: 0 0 1rem;
    color: var(--md-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.md-checkout-note {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: var(--md-primary-bg);
    border: 1px solid var(--md-primary-border);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* --- Perks --- */

.md-checkout-perks {
    margin: 0;
    padding: 0;
    list-style: none;
}

.md-checkout-perks li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.35rem;
    font-size: 0.9rem;
    color: var(--md-text);
    border-top: 1px solid #f2f2f2;
}

.md-checkout-perks li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--md-success);
    font-weight: 700;
}

.md-checkout-form-hidden {
    display: none;
}

/* --- Form (reservado para etapas futuras) --- */

.md-checkout-sidebar {
    position: sticky;
    top: 1.25rem;
}

.md-checkout-order {
    padding: 1.35rem 1.5rem;
    border-radius: 16px;
    background: var(--md-surface);
    border: 1px solid var(--md-border);
    box-shadow: var(--md-shadow-card);
}

.md-checkout-order h3 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.md-checkout-order-lines {
    margin: 0 0 1rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--md-border);
}

.md-checkout-order-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.md-checkout-order-line dt {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
}

.md-checkout-order-line dt small {
    display: block;
    margin-top: 0.15rem;
    color: var(--md-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.md-checkout-order-line dd {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    margin: 0;
    text-align: right;
}

.md-checkout-order-line dd s {
    color: var(--md-muted);
    font-size: 0.78rem;
}

.md-checkout-order-line dd strong {
    font-size: 0.95rem;
}

.md-checkout-order-total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.md-checkout-order-total-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.md-checkout-order-total s {
    color: var(--md-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.md-checkout-order-total strong {
    font-size: 1.45rem;
    letter-spacing: -0.03em;
    line-height: 1;
}

.md-checkout-guarantee {
    margin: 0.85rem 0 0;
    font-size: 0.8rem;
    color: var(--md-muted);
    line-height: 1.45;
    text-align: center;
}

.md-checkout-login {
    margin: 1rem 0 0;
    font-size: 0.88rem;
    color: var(--md-muted);
    line-height: 1.5;
    text-align: center;
}

.md-checkout-login a {
    color: var(--md-primary);
    font-weight: 600;
}

@media (max-width: 900px) {
    .md-checkout-layout {
        grid-template-columns: 1fr;
    }

    .md-checkout-sidebar {
        position: static;
    }

    .md-checkout-period {
        grid-template-columns: 1fr;
    }

    .md-checkout-period-pricing {
        text-align: left;
    }

    .md-checkout-period-pricing-main,
    .md-checkout-period-pricing-meta {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .md-checkout-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .md-checkout-panel {
        padding: 1.15rem;
    }
}
