/* =====================================================
   Layout 2 — visual "marketplace" (header azul).
   Carregado só quando active_layout() === 'layout2'.
   Sobrepõe o style.css base apenas na APARÊNCIA.
   ===================================================== */
:root {
    --l2-blue: #0E89FF;
    --l2-blue-dark: #0A6FD1;
}

/* Esconde o cabeçalho padrão caso algo escape (segurança visual). */
body.layout-layout2 .topbar,
body.layout-layout2 .site-header { display: none; }

/* ---------- Header ---------- */
.l2-sticky { position: sticky; top: 0; z-index: 60; box-shadow: 0 2px 10px rgba(8,44,105,.18); }
.l2-header { background: var(--l2-blue); color: #fff; }
.l2-bar { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.l2-burger { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; }

.l2-logo { display: flex; align-items: center; flex-shrink: 0; }
.l2-logo img { height: 56px; width: auto; }   /* logo maior no desktop */
.l2-logo-text { color: #fff; font-weight: 800; font-size: 1.4rem; letter-spacing: .2px; }
.l2-logo-d { display: block; }   /* versão desktop visível por padrão */
.l2-logo-m { display: none; }    /* versão mobile só aparece no @media abaixo */

/* Barra de menu (subnav) — categorias + institucionais, só desktop.
   Mesma cor do header; ambos ficam grudados na área fixa .l2-sticky. */
.l2-subnav { background: var(--l2-blue); border-top: 1px solid rgba(255,255,255,.12); }
.l2-subnav-inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 22px; height: 44px; overflow-x: auto; scrollbar-width: none; }
.l2-subnav-inner::-webkit-scrollbar { display: none; }
.l2-subnav-menu { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff; font-weight: 700; cursor: pointer; font-size: .9rem; flex-shrink: 0; padding: 0; }
.l2-subnav a { color: #fff; font-size: .88rem; white-space: nowrap; opacity: .95; }
.l2-subnav a:hover { opacity: 1; text-decoration: underline; }

/* Localização */
.l2-loc { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff; cursor: pointer; flex-shrink: 0; padding: 4px 6px; border-radius: 8px; transition: background .15s; }
.l2-loc:hover { background: rgba(255,255,255,.12); }
.l2-loc svg { flex-shrink: 0; }
.l2-loc-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.l2-loc-text small { font-size: .72rem; opacity: .9; }
.l2-loc-text strong { font-size: .92rem; font-weight: 700; }

/* Busca */
.l2-search { flex: 1; min-width: 200px; display: flex; background: #fff; border-radius: 8px; overflow: hidden; }
.l2-search input { flex: 1; border: 0; padding: 11px 16px; font-size: .95rem; outline: none; color: var(--text); }
.l2-search button { border: 0; background: #fff; color: var(--l2-blue); padding: 0 16px; cursor: pointer; display: flex; align-items: center; }
.l2-search button:hover { color: var(--l2-blue-dark); }

/* Ações à direita */
.l2-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.l2-ico { color: #fff; display: inline-flex; position: relative; padding: 2px; transition: opacity .15s; }
.l2-ico:hover { opacity: .8; text-decoration: none; }
.l2-cart-badge { position: absolute; top: -6px; right: -8px; background: #fff; color: var(--l2-blue-dark); }
.l2-account { display: flex; align-items: center; gap: 8px; }
.l2-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); color: #fff; flex-shrink: 0; }
.l2-account-text { display: flex; flex-direction: column; line-height: 1.2; font-size: .88rem; font-weight: 700; }
.l2-account-text small { font-weight: 400; opacity: .92; font-size: .76rem; }

/* ---------- Bottom-sheet de CEP (abre de baixo para cima) ---------- */
.l2-cep-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.5); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; z-index: 210; }
.l2-cep-overlay.is-open { opacity: 1; visibility: visible; }
.l2-cep-modal { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 460px; max-width: 100%; background: #fff; border-radius: 16px 16px 0 0; padding: 26px 22px; z-index: 211; transition: transform .28s ease; box-shadow: 0 -8px 40px rgba(16,24,40,.22); color: var(--text); }
.l2-cep-modal.is-open { transform: translate(-50%, 0); }
.l2-cep-close { position: absolute; top: 14px; right: 14px; background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; display: flex; }
.l2-cep-title { display: block; font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.l2-cep-sub { font-size: .9rem; color: var(--muted); margin-bottom: 20px; }
.l2-cep-label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 8px; color: var(--text); }
.l2-cep-modal input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 13px 14px; font-size: 1rem; }
.l2-cep-nao { display: inline-block; color: var(--l2-blue); font-weight: 600; font-size: .88rem; margin-top: 12px; }
.l2-cep-result { margin-top: 10px; font-size: .88rem; min-height: 16px; }
.l2-cep-ok { color: var(--green); font-weight: 600; }
.l2-cep-err { color: #c0392b; }
.l2-cep-loading { color: var(--muted); }
.l2-cep-confirm { width: 100%; margin-top: 16px; background: var(--l2-blue); color: #fff; border: 0; border-radius: 8px; padding: 14px; font-weight: 700; font-size: 1rem; cursor: pointer; }
.l2-cep-confirm:hover { background: var(--l2-blue-dark); }

/* ---------- Menu lateral (mobile) ---------- */
body.l2-menu-lock { overflow: hidden; }
.l2-menu-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.5); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; z-index: 210; }
.l2-menu-overlay.is-open { opacity: 1; visibility: visible; }
.l2-menu { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 84vw; background: #fff; z-index: 211; transform: translateX(-100%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: 6px 0 26px rgba(16,24,40,.18); }
.l2-menu.is-open { transform: translateX(0); }
.l2-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--l2-blue); color: #fff; font-weight: 700; }
.l2-menu-close { background: none; border: 0; color: #fff; cursor: pointer; display: flex; padding: 2px; }
.l2-menu nav { display: flex; flex-direction: column; padding: 8px 0; }
.l2-menu nav a { padding: 14px 20px; color: var(--text); font-weight: 600; border-bottom: 1px solid var(--border); }
.l2-menu nav a:hover { background: #f4f8ff; color: var(--l2-blue); text-decoration: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .l2-subnav { display: none; }   /* no mobile, navegação vai pelo hambúrguer */
    .l2-bar { gap: 8px 10px; padding: 10px 12px; }
    .l2-burger { display: inline-flex; order: 0; flex-shrink: 0; padding: 2px; }
    .l2-logo { order: 1; flex: 0 1 auto; min-width: 0; overflow: hidden; }  /* encolhe p/ caber */
    .l2-logo-d { display: none; }
    .l2-logo-m { display: block; }
    .l2-logo img { max-height: 34px; max-width: 100%; }
    .l2-logo-m.l2-logo-text { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .l2-actions { order: 2; margin-left: auto; gap: 10px; flex-shrink: 0; }  /* nunca quebra p/ baixo */
    .l2-account-text { display: none; }           /* no mobile, só o avatar */
    .l2-avatar { width: 34px; height: 34px; }
    .l2-ico svg { width: 22px; height: 22px; }
    .l2-search { order: 3; flex-basis: 100%; min-width: 0; }   /* vai p/ a 2ª linha */
    .l2-loc { order: 4; flex-basis: 100%; }                    /* localização na 3ª linha */
    .l2-loc-text { flex-direction: row; gap: 4px; align-items: baseline; }
}
@media (max-width: 380px) {
    .l2-actions { gap: 8px; }
    .l2-ico svg { width: 20px; height: 20px; }
    .l2-avatar { width: 30px; height: 30px; }
}

/* =====================================================
   Layout 2 — Página de produto
   ===================================================== */
.l2p { padding-top: 18px; }
.l2p-crumb { margin-bottom: 16px; }

.l2p-main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 30px; align-items: start; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }

/* Galeria */
.l2p-gallery { position: sticky; top: 90px; }
.l2p-frame { position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.l2p-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; background: #fff; -ms-overflow-style: none; scrollbar-width: none; }
.l2p-slides::-webkit-scrollbar { display: none; }
.l2p-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; background: #fff; }
.l2p-slide img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 26px; }
.l2p-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.l2p-thumb { width: 64px; height: 64px; border: 2px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; cursor: pointer; padding: 4px; flex-shrink: 0; }
.l2p-thumb.is-active { border-color: var(--l2-blue); }
.l2p-thumb img { width: 100%; height: 100%; object-fit: contain; }

/* Botões decorativos sobre a foto (favoritar / compartilhar) */
.l2p-fav, .l2p-share { position: absolute; right: 12px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; background: #f0f1f3; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--l2-blue); transition: background .15s; }
.l2p-fav:hover, .l2p-share:hover { background: #e4e6ea; }
.l2p-fav { top: 12px; }
.l2p-share { bottom: 12px; }
.l2p-fav.is-active { color: #e0245e; }
.l2p-fav.is-active svg { fill: #e0245e; }

/* Info em blocos separados por divisórias (estilo marketplace) */
.l2p-info { align-self: start; }
.l2p-block { padding-bottom: 18px; }
.l2p-block + .l2p-block, .l2p-guarantees { border-top: 8px solid var(--bg); padding-top: 18px; }

.l2p-badges { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.l2p-badge-ship { display: inline-flex; align-items: center; gap: 6px; background: var(--l2-blue); color: #fff; font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 5px; }
.l2p-badge-rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .85rem; color: var(--text); }
.l2p-badge-rating small { color: var(--muted); font-weight: 400; }
.l2p-title { font-size: 1.4rem; line-height: 1.35; margin-bottom: 8px; color: var(--text); font-weight: 400; }
.l2p-sold { font-size: .85rem; color: var(--muted); }
.l2p-sold strong { color: #111827; font-weight: 600; }

.l2p-price { font-size: 2.1rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.l2p-installment { color: var(--text); font-weight: 400; font-size: .95rem; margin-top: 4px; }
.l2p-payopts { display: inline-block; color: var(--l2-blue); font-weight: 600; font-size: .9rem; margin-top: 4px; }
.l2p-pay { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.l2p-stock { font-size: .9rem; font-weight: 700; }
.l2p-stock.out { color: #c0392b; }

/* Entrega */
.l2p-region-box { display: flex; align-items: center; gap: 8px; background: #f4f5f7; border-radius: 8px; padding: 11px 12px; color: var(--text); font-size: .9rem; }
.l2p-region-box > svg { color: var(--l2-blue); flex-shrink: 0; }
.l2p-region-box > span { flex: 1; }
.l2p-alterar { background: none; border: 0; color: var(--l2-blue); font-weight: 700; font-size: .85rem; cursor: pointer; flex-shrink: 0; }
.l2p-delivery { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.l2p-delivery[hidden] { display: none; }
.l2p-delivery > svg { color: var(--muted); flex-shrink: 0; }
.l2p-delivery-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.l2p-delivery-txt strong { font-size: .92rem; color: var(--text); font-weight: 700; }
.l2p-delivery-txt small { font-size: .74rem; color: var(--muted); }
.l2p-freight { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.l2p-free { color: var(--green); }
.l2p-ship-hint { font-size: .78rem; color: var(--muted); margin-top: 10px; }

/* Ações */
.l2p-buy { display: flex; flex-direction: column; gap: 10px; }
.l2p-qty-row { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--muted); flex-wrap: wrap; margin-bottom: 4px; }
.l2p-avail { font-size: .82rem; }
.l2p-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; border-radius: 8px; font-weight: 700; font-size: 1rem; cursor: pointer; border: 2px solid transparent; }
.l2p-btn-cart { background: var(--green); color: #fff; border-color: var(--green); }
.l2p-btn-cart:hover { filter: brightness(.94); }
.l2p-btn-buy { background: #fff; color: var(--green); border-color: var(--green); }
.l2p-btn-buy:hover { background: #eef7f0; }
.l2p-btn-pickup { background: var(--l2-blue); color: #fff; border-color: var(--l2-blue); }
.l2p-btn-pickup:hover { background: var(--l2-blue-dark); border-color: var(--l2-blue-dark); }

/* Garantias */
.l2p-guarantees { display: flex; flex-direction: column; gap: 12px; }
.l2p-guarantees > div { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: var(--muted); }
.l2p-guarantees svg { color: var(--l2-blue); flex-shrink: 0; margin-top: 2px; }
.l2p-guarantees strong { color: var(--text); }

/* Descrição — no DESKTOP aparece inteira; no mobile fica retrátil (ver media query) */
.l2p-desc { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-top: 22px; }
.l2p-desc h2 { color: var(--l2-blue); font-size: 1.25rem; margin-bottom: 12px; }
.l2p-desc-body { position: relative; line-height: 1.7; color: var(--text); }
.l2p-desc-toggle { display: none; margin-top: 14px; background: none; border: 0; color: var(--l2-blue); font-weight: 700; cursor: pointer; padding: 6px 0; }

/* Relacionados (carrossel) */
.l2p-related { margin-top: 26px; }
.l2p-related h2 { color: var(--text); font-size: 1.3rem; margin-bottom: 14px; }
.l2p-carousel { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.l2p-carousel-item { flex: 0 0 240px; scroll-snap-align: start; }

/* Avaliações */
.l2p-reviews { margin: 26px 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.l2p-reviews h2 { color: var(--text); font-size: 1.3rem; margin-bottom: 14px; }
.l2p-reviews-empty { color: var(--muted); font-size: .92rem; }
.l2p-reviews-summary { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.l2p-reviews-avg { font-size: 2rem; font-weight: 800; color: var(--text); }
.l2p-reviews-count { color: var(--muted); font-size: .88rem; }
.l2p-review { border-top: 1px solid var(--border); padding: 14px 0; }
.l2p-review-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.l2p-review-stars { color: #f5a623; letter-spacing: 1px; }
.l2p-review-stars-off { color: #d7dbe0; }
.l2p-review p { font-size: .9rem; color: var(--text); }

@media (max-width: 860px) {
    /* Some a linha de categorias e cola a foto no header */
    .l2p.container { padding-left: 0; padding-right: 0; }
    .l2p-crumb { display: none; }
    .l2p-main { grid-template-columns: 1fr; gap: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }

    /* Galeria full-bleed, fundo branco, encostada no topo */
    .l2p-gallery { position: static; background: #fff; }
    .l2p-frame { border: 0; border-radius: 0; }
    .l2p-thumbs { padding: 12px 14px 0; margin-top: 0; }

    /* Blocos de info com respiro lateral e divisórias cinza (cards) */
    .l2p-info { background: #fff; }
    .l2p-block { padding: 16px 14px; }
    .l2p-block + .l2p-block, .l2p-guarantees { border-top-width: 8px; padding: 16px 14px; }
    .l2p-guarantees { background: #fff; }

    .l2p-title { font-size: 1.2rem; }
    .l2p-price { font-size: 1.7rem; }

    /* Descrição, relacionados e avaliações voltam a ter respiro lateral */
    .l2p-desc, .l2p-reviews { border-radius: 0; border-left: 0; border-right: 0; margin-top: 10px; }
    .l2p-related { margin: 16px 14px 0; }
    .l2p-carousel-item { flex-basis: 68%; }

    /* No MOBILE a descrição é retrátil (recorta + mostra o botão "Ver ficha técnica completa") */
    .l2p-desc-body { max-height: 160px; overflow: hidden; transition: max-height .3s ease; }
    .l2p-desc-body.is-open { max-height: 4000px; }
    .l2p-desc-body:not(.is-open)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(rgba(255,255,255,0), #fff); }
    .l2p-desc-toggle { display: block; }
}

/* =====================================================
   Layout 2 — Barra de compra fixa (só mobile)
   ===================================================== */
.l2p-stickybuy { display: none; }
@media (max-width: 860px) {
    .l2p-stickybuy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; align-items: center; gap: 12px; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(16,24,40,.12); padding: 10px 14px; transform: translateY(120%); transition: transform .25s ease; }
    .l2p-stickybuy.is-visible { transform: translateY(0); }
    .l2p-stickybuy-price { font-weight: 800; font-size: 1.2rem; color: var(--text); white-space: nowrap; }
    .l2p-stickybuy-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--green); color: #fff; border: 0; border-radius: 8px; padding: 13px; font-weight: 700; font-size: 1rem; cursor: pointer; }
    .l2p-stickybuy-btn:hover { filter: brightness(.95); }
}

/* =====================================================
   Layout 2 — Footer minimalista (fundo branco, texto cinza escuro)
   ===================================================== */
.l2-footer { background: #fff; border-top: 1px solid var(--border); color: #374151; padding: 30px 0 26px; margin-top: 40px; }
.l2-footer-badges { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.l2-footer-badgecol { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.l2-footer-label { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; }
.l2-footer .badges-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.l2-footer .pay-badge { width: 50px; height: 32px; background: #fff; border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 3px; box-shadow: none; }
.l2-footer .pay-badge svg { width: 100%; height: 100%; }
.l2-sec-badge { display: flex; align-items: center; gap: 8px; color: #374151; font-size: .78rem; font-weight: 600; line-height: 1.35; }
.l2-sec-badge svg { color: #4b5563; flex-shrink: 0; }
.l2-sec-badge small { font-weight: 400; color: #6b7280; font-size: .72rem; }
.l2-social { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #4b5563; }
.l2-social:hover { color: var(--l2-blue); border-color: var(--l2-blue); text-decoration: none; }
.l2-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; padding: 20px 0; }
.l2-footer-links a { color: #374151; font-size: .85rem; }
.l2-footer-links a:hover { color: var(--l2-blue); }
.l2-footer-info { text-align: center; color: #6b7280; font-size: .8rem; line-height: 1.6; }
.l2-footer-info strong { color: #374151; }
.l2-footer-copy { margin-top: 8px; }
@media (max-width: 860px) {
    .l2-footer { padding-bottom: 88px; }   /* espaço p/ a barra fixa não cobrir */
}

/* =====================================================
   Layout 2 — Checkout em etapas
   ===================================================== */
/* Esconde o botão laranja "Comprar" nos relacionados */
.l2p-carousel .btn { display: none; }

/* Header enxuto do checkout */
.l2-checkout-secure { flex: 1; display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; font-size: .92rem; }

/* Fitinha colorida */
.l2c-ribbon { height: 4px; background: linear-gradient(90deg, #ffd400 0 12.5%, #ff8a00 0 25%, #ff2d2d 0 37.5%, #ff4fa3 0 50%, #9b30ff 0 62.5%, #0E89FF 0 75%, #00c6d4 0 87.5%, #2ecc40 0 100%); }

/* Indicador de etapas */
.l2c-steps { display: flex; justify-content: center; align-items: flex-start; max-width: 620px; margin: 22px auto 6px; padding: 0 12px; }
.l2c-stepi { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; }
.l2c-stepi:not(:first-child)::before { content: ''; position: absolute; top: 27px; left: -50%; width: 100%; height: 3px; background: #c9ced6; z-index: 0; }
.l2c-stepi-ic { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #c9ced6; color: #c9ced6; background: #fff; display: flex; align-items: center; justify-content: center; z-index: 1; }
.l2c-stepi-lb { margin-top: 8px; font-size: .95rem; font-weight: 600; color: #9aa1ac; }
.l2c-stepi.is-done .l2c-stepi-ic { border-color: #2ecc40; color: #2ecc40; }
.l2c-stepi.is-done .l2c-stepi-lb { color: #2ecc40; }
.l2c-stepi.is-done:not(:first-child)::before { background: #2ecc40; }
.l2c-stepi.is-active .l2c-stepi-ic { border-color: var(--l2-blue); color: var(--l2-blue); }
.l2c-stepi.is-active .l2c-stepi-lb { color: var(--l2-blue); }
.l2c-stepi.is-active:not(:first-child)::before { background: var(--l2-blue); }

/* Layout do checkout */
.l2c { padding: 14px 0 34px; }
.l2c-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.l2c-form { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.l2c-step.is-hidden { display: none; }
.l2c-section-hint { font-size: 1.05rem; color: #9aa1ac; font-weight: 600; margin-bottom: 16px; }
.l2c-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.l2c-fields .full { grid-column: 1 / -1; }
.l2c-fields label { display: block; font-size: .85rem; color: #4b5563; font-weight: 600; margin-bottom: 5px; }
.l2c-fields input, .l2c-fields select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 1rem; background: #fff; }
.l2c-fields input:focus, .l2c-fields select:focus { outline: none; border-color: var(--l2-blue); }
.l2c-invalid { border-color: #c0392b !important; }

.l2c-next, .l2c-pay-btn { display: block; width: 100%; margin-top: 20px; background: var(--l2-blue); color: #fff; border: 0; border-radius: 8px; padding: 14px; font-weight: 700; font-size: 1rem; cursor: pointer; }
.l2c-next:hover { background: var(--l2-blue-dark); }
.l2c-pay-btn { background: var(--green); }
.l2c-pay-btn:hover { filter: brightness(.95); }
.l2c-nav { display: flex; gap: 12px; margin-top: 20px; align-items: center; }
.l2c-nav .l2c-next, .l2c-nav .l2c-pay-btn { margin-top: 0; flex: 1; }
.l2c-back { background: none; border: 0; color: var(--muted); font-weight: 600; cursor: pointer; padding: 14px 8px; flex-shrink: 0; }
.l2c-back:hover { color: var(--text); }

/* Cartões de pagamento */
.l2c-pays { display: flex; flex-direction: column; gap: 12px; }
.l2c-pay { display: flex; align-items: center; gap: 14px; border: 2px solid var(--border); border-radius: 10px; padding: 16px; cursor: pointer; position: relative; background: #fff; }
.l2c-pay.is-selected { border-color: var(--l2-blue); box-shadow: 0 0 0 1px var(--l2-blue); }
.l2c-pay input { position: absolute; opacity: 0; pointer-events: none; }
.l2c-pay-ic { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.l2c-pay-body { display: flex; flex-direction: column; flex: 1; }
.l2c-pay-body strong { font-size: 1rem; color: var(--text); }
.l2c-pay-body small { font-size: .82rem; color: var(--muted); }
.l2c-pay-badge { background: #e8f5ec; color: var(--green); font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 5px; flex-shrink: 0; }

.l2c-terms { display: flex; gap: 8px; align-items: flex-start; margin-top: 18px; font-size: .88rem; color: var(--text); }
.l2c-terms input { width: auto; margin-top: 3px; flex-shrink: 0; }
.l2c-terms.l2c-invalid { color: #c0392b; border: 0 !important; }
.l2c-pay-note { font-size: .8rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* Resumo */
.l2c-summary { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; position: sticky; top: 90px; }
.l2c-summary h3 { font-size: 1.05rem; margin-bottom: 12px; color: var(--text); }
.l2c-sum-row { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; padding: 6px 0; color: var(--muted); }
.l2c-sum-total { font-size: 1.1rem; font-weight: 800; color: var(--text); border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.l2c-sum-trust { margin-top: 14px; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }

@media (max-width: 860px) {
    .l2c-layout { grid-template-columns: 1fr; }
    .l2c-summary { position: static; margin-top: 16px; }
    .l2c-fields { grid-template-columns: 1fr; }
    .l2c-form { padding: 18px 16px; }
    .l2c-stepi-ic { width: 46px; height: 46px; }
    .l2c-stepi-ic svg { width: 22px; height: 22px; }
    .l2c-stepi:not(:first-child)::before { top: 23px; }
    .l2c-stepi-lb { font-size: .82rem; }
}

/* =====================================================
   Layout 2 — Página do pedido / PIX
   ===================================================== */
.l2o-ribbon { height: 4px; background: linear-gradient(90deg, #ffd400 0 12.5%, #ff8a00 0 25%, #ff2d2d 0 37.5%, #ff4fa3 0 50%, #9b30ff 0 62.5%, #0E89FF 0 75%, #00c6d4 0 87.5%, #2ecc40 0 100%); }
.l2o { padding: 24px 0 40px; }
.l2o-card { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 26px; box-shadow: var(--shadow); text-align: center; }
.l2o-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.l2o-code { font-weight: 700; color: var(--muted); font-size: .95rem; }
.l2o-title { font-size: 1.4rem; color: var(--text); margin-bottom: 6px; }
.l2o-sub { color: var(--muted); font-size: .92rem; margin-bottom: 20px; line-height: 1.5; }

/* Tela de PIX (padrão de checkout PIX) */
.l2o-pixlogo { margin-bottom: 8px; }
.l2o-pixtitle { font-size: 1.4rem; font-weight: 800; color: #1a1a1a; margin-bottom: 14px; }
.l2o-pixsub { color: #6b7280; font-size: .98rem; line-height: 1.5; margin-bottom: 22px; }
.l2o-pixcode { border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; font-size: .95rem; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; margin-bottom: 12px; }
.l2o-pixbtn { width: 100%; background: #4caf27; color: #fff; border: 0; border-radius: 10px; padding: 16px; font-size: 1.15rem; font-weight: 700; cursor: pointer; }
.l2o-pixbtn:hover { filter: brightness(.95); }
.l2o-pixbtn.is-copied { background: #2e7d16; }
.l2o-pixvalid { font-weight: 800; color: #1a1a1a; font-size: 1rem; margin: 18px 0 22px; }
.l2o-pixqr { background: #f4f5f7; border-radius: 12px; padding: 24px; display: inline-block; }
.l2o-pixqr img, .l2o-pixqr #qr-canvas { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.l2o-pixcancel { font-weight: 700; color: #9aa1ac; font-size: .95rem; margin-top: 24px; line-height: 1.5; }

.l2o-spinner { width: 44px; height: 44px; border: 4px solid var(--border); border-top-color: var(--l2-blue); border-radius: 50%; margin: 20px auto; animation: l2o-spin .9s linear infinite; }
@keyframes l2o-spin { to { transform: rotate(360deg); } }

.l2o-success-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.l2o-track { margin-top: 8px; font-size: .92rem; }

.l2o-summary { text-align: left; border-top: 1px solid var(--border); margin-top: 24px; padding-top: 18px; }
.l2o-summary h3 { font-size: 1rem; margin-bottom: 10px; color: var(--text); }
.l2o-sum-row { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; padding: 5px 0; color: var(--muted); }
.l2o-sum-total { font-size: 1.05rem; font-weight: 800; color: var(--text); border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.l2o-addr { font-size: .82rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.l2o-help { font-size: .85rem; color: var(--muted); margin-top: 18px; }

@media (max-width: 560px) {
    .l2o-card { border-radius: 0; border-left: 0; border-right: 0; padding: 20px 16px; }
}