.checkout-body {
    background:
        radial-gradient(circle at top left, rgba(212, 168, 138, 0.28), transparent 34%),
        radial-gradient(circle at bottom right, rgba(92, 48, 32, 0.12), transparent 32%),
        linear-gradient(135deg, var(--creme) 0%, var(--creme-escuro) 100%);
    color: var(--texto-escuro);
    min-height: 100vh;
    opacity: 0;
    animation: checkoutPageFadeIn 0.75s ease forwards;
}

@keyframes checkoutPageFadeIn {
    to { opacity: 1; }
}

.checkout-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(245, 234, 224, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(92, 48, 32, 0.1);
    box-shadow: 0 4px 20px rgba(92, 48, 32, 0.08);
    animation: checkoutHeaderDown 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes checkoutHeaderDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-right {
    justify-content: flex-end;
    gap: 8px;
}

.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    transition: transform var(--transicao-rapida);
}

.auth-logo:hover { transform: scale(1.02); }

.auth-logo-texto {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}

.logo-tua {
    font-family: var(--fonte-script), cursive;
    color: var(--marrom);
    line-height: 1;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

.logo-pele {
    font-family: var(--fonte-titulo), serif;
    font-weight: 900;
    color: var(--marrom);
    letter-spacing: -0.04em;
    line-height: 1;
    position: relative;
    z-index: 1;
    -webkit-text-stroke: 0.03em var(--marrom);
}

.auth-logo .logo-tua { font-size: 2.2rem; }
.auth-logo .logo-pele { font-size: 1.6rem; }

.auth-lema {
    font-family: var(--fonte-titulo);
    font-size: 0.95rem;
    color: var(--marrom);
    font-weight: 300;
    margin-top: -6px;
    margin-left: 20px;
    letter-spacing: 0.01em;
    line-height: 1;
}

.page-title-pill {
    height: 40px;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--branco);
    border: 1.5px solid rgba(92, 48, 32, 0.13);
    color: var(--marrom);
    font-size: 14px;
    font-weight: 700;
    box-shadow: inset 0 2px 4px rgba(92, 48, 32, 0.02);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-icon-btn,
.hamburger-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--creme-escuro);
    border: 1px solid rgba(92, 48, 32, 0.06);
    color: var(--marrom);
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(92, 48, 32, 0.1);
    transition: all 0.25s ease;
}

.header-icon-btn:hover,
.hamburger-btn:hover {
    background: var(--marrom);
    color: var(--creme);
    transform: translateY(-2px);
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 24, 16, 0.45);
    backdrop-filter: blur(5px);
    z-index: 1450;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transicao-lenta);
}

.drawer-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

.nav-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    z-index: 1500;
    background: var(--creme-claro);
    box-shadow: var(--sombra-xl);
    padding: var(--space-12) var(--space-6);
    transition: left var(--transicao-lenta);
    border-right: 1px solid rgba(92, 48, 32, 0.12);
    overflow-y: auto;
}

.nav-drawer.aberto { left: 0; }

.drawer-brand {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-bottom: var(--space-10);
}

.drawer-brand .logo-tua { font-size: 2.5rem; }
.drawer-brand .logo-pele { font-size: 1.8rem; }

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.drawer-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-full);
    color: var(--marrom);
    font-family: var(--fonte-corpo);
    font-size: var(--texto-md);
    font-weight: 700;
    transition: all var(--transicao-normal);
    text-decoration: none;
}

.drawer-nav a:hover,
.drawer-nav a.active {
    background: var(--marrom);
    color: var(--creme);
    transform: translateX(4px);
}

.checkout-shell {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 84px 16px 34px;
}

.checkout-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.step-card {
    min-width: 0;
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(92, 48, 32, 0.1);
    box-shadow: 0 12px 26px rgba(92, 48, 32, 0.08);
}

.step-number {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--creme-escuro);
    color: var(--marrom);
    font-weight: 900;
}

.step-card.done .step-number,
.step-card.active .step-number {
    background: var(--marrom);
    color: var(--creme);
}

.step-card strong,
.step-card small {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-card strong {
    color: var(--marrom);
    font-size: 0.95rem;
}

.step-card small {
    color: var(--texto-medio);
    font-size: 0.76rem;
    margin-top: 2px;
}

.state-box,
.checkout-panel,
.summary-card {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(92, 48, 32, 0.1);
    box-shadow: 0 18px 44px rgba(92, 48, 32, 0.12);
    backdrop-filter: blur(10px);
}

.state-box {
    display: none;
    padding: clamp(30px, 5vw, 54px) 22px;
    text-align: center;
}

.state-box.show { display: block; }

.state-icon {
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--creme-escuro);
    color: var(--marrom);
    font-size: 1.7rem;
    box-shadow: inset 0 0 0 1px rgba(92, 48, 32, 0.08);
}

.state-box h2 {
    margin: 0 0 10px;
    color: var(--marrom);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.state-box p {
    max-width: 560px;
    margin: 0 auto;
    color: var(--texto-medio);
}

.state-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.state-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.22s ease;
}

.state-btn.primary {
    background: var(--marrom);
    color: var(--creme);
    box-shadow: 0 12px 26px rgba(92, 48, 32, 0.18);
}

.state-btn.secondary {
    background: transparent;
    color: var(--marrom);
    border: 1.5px solid var(--marrom);
}

.state-btn:hover { transform: translateY(-2px); }

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 18px;
}

.checkout-form {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.checkout-panel,
.summary-card {
    padding: 20px;
    overflow: hidden;
}

.panel-heading,
.summary-heading {
    margin-bottom: 18px;
}

.panel-kicker {
    display: block;
    color: var(--marrom-medio);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.panel-heading h2,
.summary-heading h2 {
    margin: 0;
    color: var(--marrom);
    font-size: clamp(1.55rem, 3.2vw, 2.25rem);
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-span { grid-column: 1 / -1; }

.form-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.form-field span {
    color: var(--marrom);
    font-size: 0.82rem;
    font-weight: 800;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid rgba(92, 48, 32, 0.12);
    background: rgba(253, 248, 244, 0.82);
    color: var(--texto-escuro);
    border-radius: 18px;
    padding: 13px 14px;
    outline: none;
    transition: all 0.22s ease;
}

.form-field textarea {
    resize: vertical;
    min-height: 92px;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: rgba(92, 48, 32, 0.42);
    box-shadow: 0 0 0 4px rgba(92, 48, 32, 0.08);
    background: var(--branco);
}

.choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.choice-card,
.payment-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(253, 248, 244, 0.72);
    border: 1px solid rgba(92, 48, 32, 0.12);
    cursor: pointer;
    transition: all 0.22s ease;
}

.choice-card:hover,
.payment-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(92, 48, 32, 0.08);
}

.choice-card:has(input:checked),
.payment-main:has(input:checked) {
    border-color: rgba(92, 48, 32, 0.34);
    background: rgba(245, 234, 224, 0.95);
}

.choice-card input,
.payment-main input {
    accent-color: var(--marrom);
    flex: 0 0 auto;
}

.choice-icon,
.payment-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--marrom);
    color: var(--creme);
}

.choice-card span:last-child,
.payment-main span:last-child {
    min-width: 0;
}

.choice-card strong,
.choice-card small,
.payment-main strong,
.payment-main small {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.choice-card strong,
.payment-main strong {
    color: var(--marrom);
    font-size: 0.94rem;
}

.choice-card small,
.payment-main small {
    color: var(--texto-medio);
    font-size: 0.76rem;
    margin-top: 2px;
}

.delivery-fields.is-muted {
    opacity: 0.55;
}

.payment-box {
    display: grid;
    gap: 12px;
}

/* Os quatro canais de pagamento.
   Duas colunas em vez de uma lista: as quatro opções cabem num ecrã de
   telemóvel sem scroll, e é a última decisão antes de pagar — obrigar a rolar
   para ver a última é onde se perdem compras. */
.payment-canais {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.payment-canal {
    min-width: 0;
    /* 56px: bem acima dos 44px mínimos para o dedo, e a linha de baixo
       (a operadora e o mínimo) ainda respira. */
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(253, 248, 244, 0.72);
    border: 1px solid rgba(92, 48, 32, 0.12);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.payment-canal:hover {
    transform: translateY(-1px);
    border-color: rgba(92, 48, 32, 0.24);
}

/* O escolhido tem de se ver de relance. Um cliente que pague pelo canal
   errado não repete o erro: desiste. */
.payment-canal:has(input:checked) {
    border-color: var(--marrom);
    background: rgba(245, 234, 224, 0.95);
}

.payment-canal input {
    /* O botão em si não aparece: o cartão inteiro é a área de toque, e o
       estado lê-se pela borda. Continua acessível ao teclado e ao leitor de
       ecrã, ao contrário de um display:none. */
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-canal:has(input:focus-visible) {
    outline: 2px solid var(--marrom);
    outline-offset: 2px;
}

.payment-canal .payment-icon {
    width: 34px;
    height: 34px;
    font-size: 0.86rem;
}

/* O LOGÓTIPO DA CARTEIRA SAI DO CÍRCULO CASTANHO.
   O `.payment-icon` normal é um disco castanho com um ícone branco por cima.
   Estas marcas têm cores próprias — o vermelho do M-Pesa, o laranja do e-Mola
   — e sobre o castanho ficavam ilegíveis. Aqui o fundo é claro e o logótipo
   fala por si.

   44px e não 34: os ficheiros trazem a palavra desenhada por baixo da marca,
   e a 34 não se lia nenhuma das duas. */
.payment-canal .payment-icon--logo {
    width: 44px;
    height: 44px;
    padding: 4px;
    background: #FFFFFF;
    border: 1px solid rgba(92, 48, 32, 0.1);
    border-radius: 12px;
}

.payment-canal .payment-icon--logo img {
    width: 100%;
    height: 100%;
    /* Nunca esticar: são marcas registadas e deformá-las lê-se como descuido. */
    object-fit: contain;
    display: block;
}

.payment-canal span:last-child { min-width: 0; }

.payment-canal strong,
.payment-canal small {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.payment-canal strong {
    color: var(--marrom);
    font-size: 0.9rem;
}

.payment-canal small {
    color: var(--texto-medio);
    font-size: 0.72rem;
    margin-top: 1px;
}

/* Quando o canal escolhido está abaixo do mínimo, o cartão avisa em vez de
   deixar o cliente descobrir no botão de pagar. */
.payment-canal.is-indisponivel {
    opacity: 0.45;
    cursor: not-allowed;
}

.payment-canal.is-indisponivel small { color: var(--erro); }

@media (max-width: 380px) {
    .payment-canais { grid-template-columns: 1fr; }
}

.payment-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.payment-options label {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(253, 248, 244, 0.72);
    border: 1px solid rgba(92, 48, 32, 0.1);
    color: var(--marrom);
    font-size: 0.84rem;
    font-weight: 800;
}

.payment-options input { accent-color: var(--marrom); }

/* Sem métodos guardados não se mostram botões de pagamento que não levam a
   lado nenhum: mostra-se o caminho para os cadastrar. */
.payment-vazio {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(253, 248, 244, 0.72);
    border: 1px dashed rgba(92, 48, 32, 0.22);
}

.payment-vazio > i {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--creme);
    color: var(--marrom);
    font-size: 0.9rem;
}

.payment-vazio > div { min-width: 0; flex: 1; }

.payment-vazio strong {
    display: block;
    color: var(--marrom);
    font-size: 0.9rem;
}

.payment-vazio p {
    margin: 2px 0 0;
    color: var(--texto-medio);
    font-size: 0.76rem;
    line-height: 1.4;
}

.payment-vazio__accao {
    flex: 0 0 auto;
    /* 40px de altura: é a única saída deste estado, e tem de ser fácil de
       acertar com o dedo. */
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--marrom);
    color: var(--creme);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.payment-vazio__accao:hover { background: var(--marrom-medio); }

@media (max-width: 420px) {
    /* Em ecrãs estreitos o botão passa para baixo em vez de espremer o texto. */
    .payment-vazio {
        flex-wrap: wrap;
    }
    .payment-vazio__accao {
        width: 100%;
        justify-content: center;
    }
}

.payment-hosted-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(253, 248, 244, 0.72);
    border: 1px solid rgba(92, 48, 32, 0.1);
    color: var(--texto-medio);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.45;
}


.note-field {
    margin-top: 16px;
}

.checkout-summary {
    position: sticky;
    top: 84px;
    min-width: 0;
}

.summary-items {
    display: grid;
    gap: 10px;
    max-height: 310px;
    overflow-y: auto;
    padding-right: 4px;
}

.summary-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 20px;
    background: rgba(253, 248, 244, 0.72);
    border: 1px solid rgba(92, 48, 32, 0.08);
}

.summary-thumb {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--creme-escuro);
}

.summary-item-main {
    min-width: 0;
}

.summary-item-name,
.summary-item-meta,
.summary-item-total {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-item-name {
    color: var(--texto-escuro);
    font-size: 0.88rem;
    font-weight: 900;
}

.summary-item-meta {
    color: var(--texto-medio);
    font-size: 0.76rem;
    margin-top: 2px;
}

.summary-item-total {
    color: var(--marrom);
    font-size: 0.85rem;
    font-weight: 900;
    margin-top: 4px;
}

.summary-lines {
    display: grid;
    gap: 10px;
    padding: 18px 0;
    margin-top: 14px;
    border-top: 1px solid rgba(92, 48, 32, 0.1);
    border-bottom: 1px solid rgba(92, 48, 32, 0.1);
}

.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--texto-medio);
    font-size: 0.92rem;
}

.summary-line strong {
    color: var(--marrom);
    white-space: nowrap;
}

.summary-line.total {
    color: var(--texto-escuro);
    font-size: 1.08rem;
    font-weight: 900;
}

.summary-line.total strong {
    font-size: 1.25rem;
}


.policy-index {
    margin: 10px 0 0;
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--texto-medio);
}

.policy-index a {
    color: var(--marrom);
    text-decoration: none;
    border-bottom: 1px solid rgba(92, 48, 32, 0.28);
}

.refund-policy-box {
    margin-top: 16px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(92, 48, 32, 0.06);
    border: 1px solid rgba(92, 48, 32, 0.14);
}

.refund-policy-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--marrom);
    font-weight: 900;
    font-size: 0.9rem;
}

.refund-policy-box p {
    margin: 8px 0 10px;
    color: var(--texto-medio);
    font-size: 0.78rem;
    line-height: 1.5;
}

.refund-policy-values {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--texto-escuro);
    font-size: 0.78rem;
}

.refund-policy-values strong { color: var(--marrom); }

.refund-policy-accept {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--texto-escuro);
    font-size: 0.8rem;
    line-height: 1.45;
    font-weight: 700;
}

.refund-policy-accept input {
    width: 18px;
    height: 18px;
    accent-color: var(--marrom);
    flex: 0 0 auto;
    margin-top: 1px;
}

.refund-policy-accept a {
    color: var(--marrom);
    text-decoration: underline;
    font-weight: 900;
}

.finish-order-btn {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    border-radius: 999px;
    background: var(--marrom);
    color: var(--creme);
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 16px 28px rgba(92, 48, 32, 0.18);
    transition: all 0.22s ease;
}

.finish-order-btn:hover {
    background: var(--marrom-medio);
    transform: translateY(-2px);
}

.finish-order-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.summary-note {
    margin-top: 12px;
    color: var(--texto-medio);
    font-size: 0.78rem;
    line-height: 1.55;
    text-align: center;
}

#toast-container {
    position: fixed;
    top: 78px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 24px));
    pointer-events: none;
}

.toast {
    width: 100%;
    padding: 13px 16px;
    border-radius: 16px;
    color: var(--creme);
    font-weight: 800;
    text-align: center;
    box-shadow: var(--sombra-lg);
    animation: checkoutToast 3s ease forwards;
    background: var(--marrom);
}

.toast.error { background: var(--erro); }
.toast.info { background: var(--marrom-medio); }
.toast.success { background: var(--sucesso); }

@keyframes checkoutToast {
    0% { opacity: 0; transform: translateY(-10px); }
    12%, 88% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

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

    .checkout-summary {
        position: static;
    }
}

@media (max-width: 720px) {
    .checkout-header {
        padding: 8px 12px;
    }

    .auth-lema {
        display: none;
    }

    .auth-logo .logo-tua { font-size: 2rem; }
    .auth-logo .logo-pele { font-size: 1.45rem; }

    .page-title-pill {
        padding: 0 12px;
        font-size: 13px;
    }

    .checkout-shell {
        padding: 80px 12px 28px;
    }

    .checkout-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .step-card {
        min-height: 62px;
        padding: 10px 8px;
        gap: 8px;
    }

    .step-number {
        width: 34px;
        height: 34px;
        font-size: 0.82rem;
    }

    .step-card strong { font-size: 0.8rem; }
    .step-card small { font-size: 0.64rem; }

    .checkout-panel,
    .summary-card {
        padding: 16px;
        border-radius: 24px;
    }

    .form-grid.two-cols {
        grid-template-columns: 1fr;
    }

    /* A `.choice-row` saiu daqui de propósito: entrega e levantamento ficam
       lado a lado em qualquer ecrã. São duas opções curtas, e empilhá-las
       empurrava o pagamento para fora do primeiro ecrã do telemóvel. */
    .choice-row {
        gap: 8px;
    }

    .choice-card {
        padding: 11px 10px;
        gap: 8px;
    }

    .choice-icon {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .choice-card strong { font-size: 0.86rem; }
    .choice-card small { font-size: 0.7rem; }
}

@media (max-width: 420px) {
    .header-left {
        max-width: 112px;
        overflow: hidden;
    }

    .header-icon-btn,
    .hamburger-btn {
        width: 38px;
        height: 38px;
    }

    .checkout-steps {
        gap: 6px;
    }

    .step-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .step-card small {
        display: none;
    }
}

.delivery-post-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(92, 48, 32, 0.08);
    border: 1px solid rgba(92, 48, 32, 0.12);
    color: var(--marrom, #5C3020);
    font-weight: 700;
    line-height: 1.45;
}

/* ============================================================
   CHECKOUT COMPRIMIDO
   ============================================================ */

/* O cabeçalho de um painel que traz uma acção à direita. */
.panel-heading--com-accao {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

/* O "+" para acrescentar um método. Só aparece quando já há lista: com a lista
   vazia, quem convida é o cartão inteiro por baixo, e dois convites para a
   mesma coisa fazem o pequeno roubar o toque ao que explica. */
.panel-heading__mais {
    flex: 0 0 auto;
    /* 40px: chega ao mínimo do dedo sem competir em peso com o botão de pagar. */
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--marrom);
    color: var(--creme);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.panel-heading__mais:hover {
    background: var(--marrom-medio);
    transform: translateY(-1px);
}

.panel-heading__mais[hidden] { display: none !important; }

/* O cartão do endereço passou a ser o link inteiro.
   Numa lista de coisas tocáveis, a que tem o alvo mais pequeno é a que se
   falha — e esta é a que decide para onde a encomenda vai. */
a.delivery-profile-address {
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

a.delivery-profile-address:hover {
    border-color: rgba(92, 48, 32, 0.3);
}

a.delivery-profile-address:focus-visible {
    outline: 2px solid var(--marrom);
    outline-offset: 2px;
}

.delivery-profile-address__accao {
    margin-left: auto;
    flex: 0 0 auto;
    align-self: center;
    color: var(--marrom-medio) !important;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* O reembolso máximo é mais uma linha da conta, mas não é dinheiro a pagar:
   fica mais leve do que o subtotal para não se confundir com ele. */
.summary-line--nota {
    padding-top: 8px;
    border-top: 1px dashed rgba(92, 48, 32, 0.14);
    font-size: 0.82rem;
}

.summary-line--nota strong {
    color: var(--texto-medio) !important;
    font-weight: 700;
}

/* A aceitação da política ficou sozinha, sem o cartão à volta. */
.refund-policy-accept {
    margin-top: 14px;
}
