/* ============================================================
   GO2RUN — CARRINHO — NIGHT SPEED THEME
   ============================================================ */

:root {
    --bg-base:        #06070D;
    --bg-surface:     #0F1220;
    --bg-elevated:    #171B28;
    --fire:           #EE00EE;
    --fire-mid:       #BB00BB;
    --fire-glow:      rgba(238, 0, 238, 0.25);
    --fire-subtle:    rgba(238, 0, 238, 0.08);
    --fire-border:    rgba(238, 0, 238, 0.35);
    --green:          #22c55e;
    --green-subtle:   rgba(34, 197, 94, 0.1);
    --green-border:   rgba(34, 197, 94, 0.4);
    --amber:          #f59e0b;
    --amber-subtle:   rgba(245, 158, 11, 0.1);
    --amber-border:   rgba(245, 158, 11, 0.45);
    --red:            #ef4444;
    --red-subtle:     rgba(239, 68, 68, 0.1);
    --red-border:     rgba(239, 68, 68, 0.4);
    --text-primary:   #EEF1FF;
    --text-secondary: #8A92B0;
    --border-subtle:  rgba(255, 255, 255, 0.06);
    --border-mid:     rgba(255, 255, 255, 0.12);
    --shadow:         0 4px 24px rgba(0, 0, 0, 0.6);
    --transition:     all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'DM Sans', 'Poppins', sans-serif;
    margin: 0;
    padding-top: 72px;
    -webkit-font-smoothing: antialiased;
}

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(6,7,13,0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(238,0,238,0.18);
    padding: 0.6rem 0;
}
.navbar .nav-link { color: rgba(255,255,255,0.88) !important; transition: color 0.2s; font-weight: 500; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: #EE00EE !important; }
.navbar .navbar-brand img { max-height: 36px; width: auto; }
.navbar .dropdown-menu { background: rgba(9,11,20,0.98); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; box-shadow: 0 8px 32px rgba(0,0,0,0.7); }
.navbar .dropdown-item { color: #8A92B0; transition: color 0.2s, background 0.2s; }
.navbar .dropdown-item:hover { background: rgba(238,0,238,0.1); color: #EE00EE; }
.navbar .btn-outline-primary { color: #EE00EE !important; border-color: #EE00EE !important; font-size: 0.85rem; padding: 0.35rem 1rem; }
.navbar .btn-outline-primary:hover { background: #EE00EE !important; color: #fff !important; }

/* ── PÁGINA ── */
.carrinho-page { padding: 2.5rem 0 5rem; }

.page-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.page-title i { color: var(--fire); }

/* ── ALERTAS ── */
.alerta {
    padding: 0.9rem 1.2rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alerta-sucesso {
    background: var(--green-subtle);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.alerta-erro {
    background: var(--red-subtle);
    color: var(--red);
    border: 1px solid var(--red-border);
}

/* ── LAYOUT ── */
.carrinho-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

/* ── PAINEL ITEMS ── */
.carrinho-items {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.8rem;
    margin-bottom: 1.2rem;
}

.items-section-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fire);
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── ITEM PRODUTO LOJA ── */
.carrinho-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 1.2rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
}

.carrinho-item:last-child { border-bottom: none; }

.carrinho-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    display: block;
}

.carrinho-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.carrinho-preco {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--fire);
    line-height: 1;
    margin-bottom: 0.6rem;
}

.carrinho-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-mid);
    border-radius: 4px;
    width: fit-content;
    overflow: hidden;
}

.carrinho-qty button {
    background: var(--bg-elevated);
    border: none;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    color: var(--fire);
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s;
}

.carrinho-qty button:hover { background: var(--fire-subtle); }

.carrinho-qty input {
    width: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-mid);
    border-right: 1px solid var(--border-mid);
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 0.35rem;
    font-size: 0.9rem;
}

.carrinho-remover {
    background: none;
    border: none;
    color: var(--red);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.3rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.carrinho-remover:hover { opacity: 1; }

/* ── ITEM INSCRIÇÃO ── */
.insc-item-grid {
    display: grid;
    grid-template-columns: 100px 1fr 36px;
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-subtle);
    align-items: flex-start;
}

.insc-item-grid:last-child { border-bottom: none; }

.insc-img-col { display: flex; flex-direction: column; align-items: center; }

.insc-img-mobile {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    display: block;
}

.insc-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.insc-lote-nome {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fire);
    margin: 0.2rem 0;
}

.insc-valor {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--fire);
    margin-top: 0.4rem;
}

.insc-valor-riscado {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-bottom: 0.15rem;
}

.insc-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0.15rem 0;
}

.insc-meta i { color: var(--fire); font-size: 0.75rem; }

/* Alerta lote encerrado */
.lote-encerrado-alerta {
    background: var(--red-subtle);
    color: var(--red);
    border: 1px solid var(--red-border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* ── PASSO CARDS ── */
.passo-card {
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.7rem;
    border-width: 1px;
    border-style: solid;
}

.passo-pending {
    border-color: var(--amber-border);
    background: var(--amber-subtle);
}

.passo-done {
    border-color: var(--green-border);
    background: var(--green-subtle);
}

.passo-card-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.passo-card-title .check-icon { color: var(--green); }
.passo-card-title .step-num { color: var(--fire); }

.passo-card-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.passo-card-hint .hint-amber { color: var(--amber); font-weight: 600; }
.passo-card-hint .hint-amber-soft { color: #d97706; font-size: 0.92em; }

/* Selects e inputs dentro de passo-cards */
.passo-card .form-select {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    color: var(--text-primary);
    font-size: 0.88rem;
    border-radius: 4px;
    max-width: 230px;
}

.passo-card .form-select:focus {
    border-color: var(--fire);
    box-shadow: 0 0 0 2px var(--fire-subtle);
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

.passo-card .form-select option { background: var(--bg-elevated); color: var(--text-primary); }

.passo-card .form-control {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    color: var(--text-primary);
    font-size: 0.88rem;
    border-radius: 4px;
}

.passo-card .form-control:focus {
    border-color: var(--fire);
    box-shadow: 0 0 0 2px var(--fire-subtle);
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

.passo-card .form-control::placeholder { color: var(--text-secondary); }

.passo-btn {
    padding: 0.45rem 0.9rem;
    background: var(--fire-subtle);
    color: var(--fire);
    border: 1px solid var(--fire-border);
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: 'DM Sans', 'Poppins', sans-serif;
}

.passo-btn:hover { background: var(--fire); color: #fff; }

/* Override Bootstrap btn-outline-primary dentro de passo-cards */
.passo-card .btn-outline-primary {
    color: var(--fire) !important;
    border-color: var(--fire-border) !important;
    background: var(--fire-subtle) !important;
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
}

.passo-card .btn-outline-primary:hover {
    background: var(--fire) !important;
    color: #fff !important;
}

.passo-card .btn-outline-primary.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

/* Mensagem de matrícula confirmada */
.matricula-ok { color: var(--green); font-weight: 600; font-size: 0.82rem; margin-top: 0.3rem; }
.modal-hint-amber { font-size: 0.82rem; color: var(--amber); margin-top: 0.3rem; }
.modal-hint-green { font-size: 0.82rem; color: var(--green); margin-top: 0.3rem; }

/* Passo grátis */
.passo-gratis-label { font-weight: 700; font-size: 0.88rem; color: var(--green); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.passo-gratis-hint { font-size: 0.8rem; color: var(--text-secondary); }

/* Percurso dentro de inscrição */
.insc-percurso { margin: 0.3rem 0 0.2rem; }
.insc-percurso-label { font-size: 0.82rem; font-weight: 600; color: var(--fire); }
.insc-percurso img { max-width: 100px; max-height: 70px; border-radius: 4px; border: 1px solid var(--border-subtle); vertical-align: middle; margin-left: 6px; }
.insc-percurso a { color: var(--fire); font-size: 0.82rem; text-decoration: underline; }

/* Pre-venda */
.pre-venda-alerta {
    background: var(--amber-subtle);
    color: var(--amber);
    border: 1px solid var(--amber-border);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin: 0.3rem 0;
    font-size: 0.85rem;
    font-weight: 600;
}
.pre-venda-alerta span { font-weight: 400; font-size: 0.82rem; display: block; margin-top: 0.15rem; opacity: 0.85; }

/* Kit atleta lista */
.insc-kit-list { font-size: 0.82rem; color: var(--text-secondary); margin: 0.2rem 0 0.4rem; }
.insc-kit-list ul { margin: 0.2rem 0 0 1.2em; padding: 0; }

/* ── RESUMO (sidebar) ── */
.carrinho-resumo {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.6rem;
    position: sticky;
    top: 90px;
}

.resumo-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 1.4rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
}

.resumo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.resumo-item:last-of-type { border-bottom: none; }

.resumo-item.desconto { color: var(--green); }
.resumo-item.taxa { color: var(--amber); }

.resumo-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.resumo-total-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}

.resumo-total-valor {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--fire);
    line-height: 1;
}

/* ── CUPOM ── */
.cupom-form {
    margin: 1.2rem 0;
    padding: 1.2rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.cupom-aplicado {
    background: var(--green-subtle);
    color: var(--green);
    border: 1px solid var(--green-border);
    border-radius: 4px;
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.cupom-form input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
    font-family: 'DM Sans', 'Poppins', sans-serif;
    transition: border-color 0.2s;
}

.cupom-form input:focus { border-color: var(--fire); outline: none; box-shadow: 0 0 0 2px var(--fire-subtle); }
.cupom-form input::placeholder { color: var(--text-secondary); }

.cupom-form button,
.btn-aplicar-cupom {
    width: 100%;
    padding: 0.65rem;
    background: var(--fire-subtle);
    color: var(--fire);
    border: 1px solid var(--fire-border);
    border-radius: 4px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: var(--transition);
}
.cupom-form button:hover, .btn-aplicar-cupom:hover { background: var(--fire); color: #fff; }

.btn-remover-cupom {
    width: 100%;
    padding: 0.6rem;
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red-border);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'DM Sans', 'Poppins', sans-serif;
}
.btn-remover-cupom:hover { background: var(--red-subtle); }

/* ── BOTÕES CHECKOUT ── */
.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    background: var(--fire);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 1rem;
}

.btn-checkout:hover:not(:disabled) { background: var(--fire-mid); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 24px var(--fire-glow); }
.btn-checkout:disabled { background: rgba(255,255,255,0.1); color: var(--text-secondary); cursor: not-allowed; opacity: 0.8; transform: none; box-shadow: none; }
.btn-checkout.encerrado { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid var(--red-border); }

.btn-continuar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-mid);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 0.5rem;
    font-family: 'DM Sans', 'Poppins', sans-serif;
}

.btn-continuar:hover { border-color: var(--fire); color: var(--fire); }

.aviso-etapas {
    font-size: 0.8rem;
    color: var(--amber);
    font-weight: 600;
    text-align: center;
    margin-top: 0.4rem;
}

.aviso-encerradas {
    font-size: 0.8rem;
    color: var(--red);
    font-weight: 600;
    text-align: center;
    margin-top: 0.4rem;
}

/* Botões de login */
.btn-entrar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    background: var(--fire);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 1rem;
}
.btn-entrar:hover { background: var(--fire-mid); color: #fff; }

.btn-criar-conta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem;
    background: transparent;
    color: var(--fire);
    border: 1px solid var(--fire-border);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 0.5rem;
    font-family: 'DM Sans', 'Poppins', sans-serif;
}
.btn-criar-conta:hover { background: var(--fire-subtle); }

/* ── VAZIO ── */
.vazio {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-secondary);
}

.vazio i {
    font-size: 3.5rem;
    color: rgba(238,0,238,0.2);
    margin-bottom: 1.2rem;
    display: block;
}

.vazio h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.vazio p { font-size: 0.9rem; color: var(--text-secondary); }

.btn-ver-corridas {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background: var(--fire);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: var(--transition);
}
.btn-ver-corridas:hover { background: var(--fire-mid); color: #fff; }

/* Subtotal item */
.item-subtotal { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; margin-bottom: 0.6rem; }

/* Laudo spinner/erro */
.laudo-spinner { font-size: 0.88rem; color: var(--text-secondary); }
.laudo-erro { font-size: 0.88rem; color: var(--red); font-weight: 600; }
.laudo-status { font-size: 0.85rem; font-weight: 600; color: var(--green); margin-bottom: 0.4rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .carrinho-container { grid-template-columns: 1fr; gap: 1.2rem; }
    .carrinho-resumo { position: static; }
}

@media (max-width: 768px) {
    .carrinho-items { padding: 1rem; }
    .carrinho-item { grid-template-columns: 70px 1fr auto; gap: 0.7rem; padding: 0.9rem 0; }
    .carrinho-img { width: 70px; height: 70px; }
    .insc-item-grid { grid-template-columns: 70px 1fr 28px; gap: 0.6rem; }
    .insc-img-mobile { width: 70px; height: 70px; }
    .passo-card .form-select, .passo-card .form-control { max-width: 100%; width: 100%; }
    .passo-card form > div { flex-direction: column !important; align-items: stretch !important; gap: 0.4rem !important; }
    .passo-card .btn-outline-primary, .passo-btn { width: 100%; text-align: center; justify-content: center; display: flex; }
}

@media (max-width: 480px) {
    .insc-item-grid { grid-template-columns: 55px 1fr 24px; }
    .insc-img-mobile { width: 55px; height: 55px; }
    .carrinho-item { grid-template-columns: 55px 1fr auto; }
    .carrinho-img { width: 55px; height: 55px; }
    .carrinho-page { padding: 1.5rem 0 3rem; }
}
