/* =========================================================
   RESET
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f6f7f9;
    color: #1f2937;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font-family: inherit;
}

/* =========================================================
   HEADER
========================================================= */
.checkout-header {
    width: 100%;
    height: 88px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 36px;
}

.checkout-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-logo img {
    height: 42px;
    width: auto;
}

.checkout-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #0b1f5f;
}

/* =========================================================
   CONTAINER GERAL
========================================================= */
.checkout-page {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 28px 32px 48px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 420px;
    gap: 28px;
    align-items: start;
}

/* =========================================================
   PASSOS
========================================================= */
.checkout-steps {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9ca3af;
    font-size: 14px;
}

.step-item::after {
    content: "";
    width: 90px;
    height: 1px;
    background: #d1d5db;
    display: block;
    margin-left: 8px;
}

.step-item:last-child::after {
    display: none;
}

.step-bullet {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d1d5db;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.step-item.active {
    color: var(--brand-primary);
    font-weight: 600;
}

.step-item.active .step-bullet {
    background: #0b1f5f;
}

/* =========================================================
   CARDS
========================================================= */
.checkout-card,
.summary-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 26px;
}

.checkout-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 22px;
    color: #111827;
}

/* =========================================================
   FORMULÁRIOS
========================================================= */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}

.form-group label .required {
    color: #dc2626;
}

.form-control {
    width: 100%;
    height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    padding: 0 14px;
    font-size: 14px;
    color: #111827;
    outline: none;
    transition: 0.2s ease;
}

.form-control:focus {
    border-color: #0b1f5f;
    box-shadow: 0 0 0 3px rgba(11, 31, 95, 0.08);
}

.form-control::placeholder {
    color: #9ca3af;
}

/* =========================================================
   CHECKBOX TERMOS
========================================================= */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 18px;
    font-size: 13px;
    color: #374151;
}

.form-check input {
    width: 16px;
    height: 16px;
    accent-color: #0b1f5f;
}

.form-check a {
    color: #0b63ce;
    text-decoration: underline;
}

/* =========================================================
   BOTÕES
========================================================= */
.btn-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    min-width: 170px;
    height: 46px;
    border: none;
    border-radius: 999px;
    background: var(--brand-primary);
    color: var(--brand-button-text, #ffffff);
    font-size: 15px;
    font-weight: 600;
    padding: 0 26px;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary:hover {
    background: #102b81;
}

.btn-secondary {
    min-width: 150px;
    height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 15px;
    font-weight: 600;
    padding: 0 22px;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-secondary:hover {
    background: #f9fafb;
}

.btn-full {
    width: 100%;
}

/* =========================================================
   CARRINHO / LISTA DE PRODUTOS
========================================================= */
.cart-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cart-item {
    display: grid;
    grid-template-columns: 72px 1fr 150px 170px;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #eef0f3;
}

.cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cart-item-image {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.cart-item-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 5px;
}

.cart-item-info p {
    font-size: 13px;
    color: #6b7280;
}

.cart-item-qty label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.qty-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 138px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.qty-btn {
    width: 38px;
    height: 100%;
    border: none;
    background: #ffffff;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
}

.qty-btn:hover {
    background: #f3f4f6;
}

.qty-value {
    width: 62px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 14px;
    color: #111827;
    background: transparent;
}

.cart-item-price {
    text-align: right;
}

.cart-item-price .price-cash {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.cart-item-price .price-installments {
    display: block;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* =========================================================
   RESUMO
========================================================= */
.summary-card {
    position: sticky;
    top: 24px;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
}

.summary-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 12px;
    align-items: center;
}

.summary-action {
    margin-top: 22px;
    margin-bottom: 10px;
}

.summary-action .btn-primary {
    height: 52px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(11, 31, 95, 0.14);
}

.summary-header {
    margin-bottom: 18px;
}

.summary-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.summary-header p {
    font-size: 13px;
    color: #6b7280;
}

.summary-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
    background: #f8fafc;
    padding: 4px;
}

.summary-item-info strong {
    display: block;
    font-size: 14px;
    color: #111827;
    margin-bottom: 3px;
}

.summary-item-info span {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.summary-item-actions {
    margin-top: 8px;
}

.summary-qty-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.summary-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s ease;
}

.summary-qty-btn:hover {
    background: #f3f4f6;
}

.summary-qty-input {
    width: 58px;
    height: 30px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    color: #111827;
    outline: none;
}

.summary-qty-input:focus {
    border-color: #0b1f5f;
    box-shadow: 0 0 0 3px rgba(11, 31, 95, 0.08);
}

.summary-remove-form {
    margin-top: 2px;
}

.summary-remove-btn {
    border: none;
    background: transparent;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.summary-remove-btn:hover {
    text-decoration: underline;
}

.summary-item-price {
    text-align: right;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}

.summary-divider {
    border-top: 1px solid #e5e7eb;
    margin: 16px 0;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
    color: #374151;
}

.summary-row strong {
    color: #111827;
}

.summary-total {
    margin-top: 14px;
    padding-top: 18px;
    padding-bottom: 18px;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #eef2f7;
}

.summary-total .summary-row {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.summary-total-small {
    text-align: right;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}



/* =========================================================
   INFORMAÇÕES EXTRAS
========================================================= */
.checkout-infos {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.info-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #374151;
    margin-bottom: 12px;
    line-height: 1.5;
}

.info-line strong {
    color: #111827;
}

.info-note {
    margin-top: 14px;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.5;
}

/* =========================================================
   PAGAMENTO
========================================================= */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.payment-option {
    height: 56px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: 0.2s ease;
}

.payment-option.active {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.payment-option.disabled {
    background: #f3f4f6;
    color: #c4c9d1;
    cursor: not-allowed;
}

.recaptcha-box {
    width: 210px;
    height: 78px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    margin: 18px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 13px;
}

/* =========================================================
   FOOTER VERSÃO
========================================================= */
.checkout-version {
    text-align: center;
    margin-top: 26px;
    font-size: 11px;
    color: #9ca3af;
}

/* =========================================================
   RESPONSIVO
========================================================= */
@media (max-width: 1100px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .summary-card {
        position: static;
    }

    .checkout-steps {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .checkout-page {
        padding: 18px 14px 32px;
    }

    .checkout-header {
        padding: 0 16px;
        height: 74px;
    }

    .form-row,
    .form-row-3,
    .payment-methods {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 56px 1fr;
        gap: 12px;
    }

    .cart-item-qty,
    .cart-item-price {
        grid-column: 2;
        text-align: left;
    }

    .step-item::after {
        width: 38px;
    }
}