/* Modern Cart Styling */
:root {
    --success-color: #198754;
    --bg-light: #f8f9fa;
    --step-bg: #e9ecef;
}

/* ===== Clean header/footer (checkout without site chrome) ===== */
.cart-clean-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: transparent;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.cart-clean-header.is-scrolled {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.cart-clean-header + .cart-shell {
    padding-top: 80px;
}

.cart-clean-logo img {
    height: 42px;
}

.cart-clean-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cart-clean-footer {
    border-top: 1px solid #e9ecef;
    color: #94a3b8;
    font-size: 0.85rem;
}

.cart-shell {
    background: var(--bg-light);
    min-height: 60vh;
}

#cart-app {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
}

.cart-step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.cart-step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card.selected {
    border-color: var(--primary, #0d6efd);
}

/* Billing Cycle Options */
.cycle-option {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    position: relative;
}

.cycle-option:hover {
    border-color: #cbd5e1;
}

.cycle-option:has(input:checked) {
    border-color: var(--primary, #0d6efd);
    background: rgba(13, 110, 253, 0.04);
}

.cycle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

/* indicador de seleção (estilo radio), sempre reage ao :checked nativo, sem depender de JS */
.cycle-check {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    transition: all 0.2s ease;
}

.cycle-option input[type="radio"]:checked ~ .cycle-check {
    border-color: var(--primary, #0d6efd);
    background: var(--primary, #0d6efd);
    box-shadow: inset 0 0 0 3px #fff;
}

/* Cart Item */
.cart-item {
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.cart-item:last-child {
    border-bottom: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.cart-item-details {
    color: #64748b;
    font-size: 0.8rem;
}

.cart-item-price {
    font-weight: bold;
    font-size: 0.9rem;
    color: #334155;
}

/* ===== Cart card (left column, step content) ===== */
.cart-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.cart-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.cart-card-subtitle {
    color: #64748b;
}

.cart-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1rem;
}

.cart-badge-secure {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* ===== Billing cycle cards ===== */
.cycle-option-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #334155;
    padding-right: 1.1rem;
}

.cycle-option-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary, #0d6efd);
    margin-top: 0.35rem;
}

.cycle-option-price small {
    font-size: 0.7rem;
    font-weight: 400;
    color: #64748b;
}

.cycle-option-total {
    font-size: 0.7rem;
    color: #94a3b8;
}

.cycle-option-setup {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.15rem;
}

/* ===== Plan card (title + description) ===== */
.cart-plan-card {
    background: rgb(248 249 250);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
}

.cart-plan-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.cart-plan-desc {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Domain configurator ===== */
.cart-domain-box {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}

/* input do nome + select do TLD "integrados" como um único campo, ocupando a linha toda.
   o wrap também é flex (em vez de height:100%) pra herdar a altura por stretch mesmo
   quando é o único item da linha (modo "já tenho", sem o select de TLD ao lado) */
.cart-domain-input-wrap {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

/* existe um segundo ".form-control"/".form-select" mais abaixo em style.css (de um componente
   não relacionado) que força height/padding/font-size diferentes e vence por ordem de origem -
   os seletores por ID abaixo têm especificidade maior e restauram o tamanho compacto pretendido
   pros dois lados baterem certinho, sem depender de height/min-height "no chute" */
#txtDominioNome {
    width: 100%;
    height: auto;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#txtDominioTld {
    flex: 0 0 auto;
    width: auto;
    max-width: 150px;
    height: auto;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
}

/* "já tenho um domínio": TLD escondido, input sozinho volta a ficar arredondado nos dois lados */
.cart-domain-group-solo #txtDominioTld {
    display: none;
}

.cart-domain-group-solo .cart-domain-input-wrap .form-control {
    border-radius: 0.75rem;
}

.cart-domain-spinner {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary, #0d6efd);
}

.cart-domain-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
}

.cart-domain-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    color: #fff;
    font-size: 0.7rem;
}

.cart-domain-status-ok {
    color: var(--success-color);
    background: rgba(25, 135, 84, 0.1);
}

.cart-domain-status-ok .cart-domain-status-icon {
    background: var(--success-color);
}

.cart-domain-status-erro {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.cart-domain-status-erro .cart-domain-status-icon {
    background: #dc3545;
}

/* ===== Configurable options / addons (radio & checkbox rows) ===== */
.cart-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    margin-bottom: 0.6rem;
}

.cart-option-item:hover {
    border-color: #cbd5e1;
}

.cart-option-item:has(input:checked) {
    border-color: var(--primary, #0d6efd);
    background: color-mix(in srgb, var(--primary, #0d6efd) 5%, #fff);
}

.cart-option-item .form-check-input {
    margin-right: 0.5rem;
}

.cart-option-price {
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.cart-option-setup {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
}

.cart-option-description {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 400;
    margin-top: 0.15rem;
}

.cart-option-badge-unico {
    display: inline-block;
    margin-left: 0.5rem;
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}

.cart-badge-gratis {
    display: inline-block;
    background: rgba(25, 135, 84, 0.12);
    color: var(--success-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* ===== Ciclo de pagamento (dropdown + preço em destaque) ===== */
.cart-cycle-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}

.cart-cycle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cart-cycle-row .form-select {
    flex: 0 1 240px;
}

.cart-cycle-price-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
}

.cart-badge-economize {
    display: inline-block;
    background: rgba(25, 135, 84, 0.12);
    color: var(--success-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.cart-cycle-price-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.cart-cycle-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary, #0d6efd);
}

.cart-cycle-price small {
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
}

.cart-cycle-price-riscado {
    font-size: 0.9rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.cart-cycle-renovacao {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #64748b;
}

.cart-cycle-setup {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.cart-cycle-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1rem;
    padding: 0.85rem 1.1rem;
    background: color-mix(in srgb, var(--primary, #0d6efd) 7%, #fff);
    border: 1px dashed color-mix(in srgb, var(--primary, #0d6efd) 35%, #fff);
    border-radius: 12px;
    flex-wrap: wrap;
}

.cart-cycle-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    background: var(--primary, #0d6efd);
    color: #fff;
    font-size: 0.95rem;
    border-radius: 50%;
}

.cart-cycle-banner-text {
    color: #334155;
    font-size: 0.85rem;
    flex: 1 1 220px;
}

.cart-cycle-banner-text strong {
    font-weight: 700;
    color: #1e293b;
}

.cart-cycle-banner-btn {
    background: var(--primary, #0d6efd);
    border: none;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    white-space: nowrap;
}

.cart-cycle-banner-btn:hover {
    filter: brightness(0.92);
}

/* ===== Resumo do pedido: nome do plano + linhas de item (rótulo à esquerda, valor fixo à direita) ===== */
.cart-summary-plan-name {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.cart-summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.cart-summary-row:last-child {
    border-bottom: 0;
}

.cart-summary-row-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    flex: 1 1 auto;
    min-width: 0;
}

.cart-summary-row-sub {
    font-weight: 400;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.cart-summary-row-value {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
}

.cart-summary-row-riscado {
    font-weight: 400;
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: line-through;
}

/* opções/adicionais: menores e recuados, para ficar claro que pertencem ao produto acima */
.cart-summary-row-addon {
    padding-left: 0.85rem;
    border-left: 2px solid #e2e8f0;
}

.cart-summary-row-addon .cart-summary-row-label {
    font-weight: 500;
    font-size: 0.82rem;
    color: #475569;
}

.cart-summary-row-addon .cart-summary-row-value {
    font-size: 0.82rem;
    font-weight: 600;
}

.cart-summary-total-value {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    white-space: nowrap;
}

/* ===== Order summary empty state ===== */
.cart-summary-empty {
    color: #94a3b8;
    font-size: 0.9rem;
}

.cart-btn-primary {
    padding: 1rem 3rem;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 10px;
}

/* ===== Order summary (right column) ===== */
/* o resumo e o selo "Compra Segura" ficam juntos dentro de um único wrapper sticky, senão o
   selo (que fica fora do card) não acompanha o resumo ao grudar no topo durante o scroll.
   o "top" soma a altura do header fixo (.cart-clean-header, 80px) + uma margem, senão o
   resumo gruda por baixo do header em vez de parar logo abaixo dele */
.cart-summary-sticky {
    position: sticky;
    top: 96px;
}

.cart-summary {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.cart-summary-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    color: #64748b;
    font-size: 0.85rem;
    border-top: 1px solid #f1f5f9;
}

.cart-summary-recorrencia span:last-child {
    color: #334155;
    font-weight: 600;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.5rem;
    margin-top: 0.15rem;
    border-top: 2px solid #e2e8f0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.cart-trust {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.cart-trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.8rem;
}

/* ===== Cupom de desconto (dentro do resumo do pedido, ao lado do botão Continuar) ===== */
.cart-cupom-area {
    margin-top: 0.75rem;
}

.cart-cupom-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary, #0d6efd);
    text-decoration: none;
}

/* input-group-sm reduz o raio - restaura o mesmo tom/raio do select de Período (.form-select),
   mas só no lado externo, mantendo o canto que encosta no botão achatado (input-group integrado) */
#txtCupom {
    background-color: #F9F9F9;
    border: 1px solid var(--primary, #0d6efd);
    border-right: none;
    border-radius: 0.60rem 0 0 0.60rem;
}

#btnAplicarCupom {
    border-width: 1px;
    border-radius: 0 0.60rem 0.60rem 0;
}

.cart-cupom-link:hover {
    text-decoration: underline;
}

.cart-contrato-label {
    font-size: 0.8rem;
}

.cart-contrato-link {
    color: var(--primary, #0d6efd);
}

#cupomFormRow, #cupomAplicadoPill {
    display: none;
}

.cart-cupom-area[data-estado="form"] #linkMostrarCupom {
    display: none;
}

.cart-cupom-area[data-estado="form"] #cupomFormRow {
    display: flex;
}

.cart-cupom-area[data-estado="aplicado"] #linkMostrarCupom {
    display: none;
}

.cart-cupom-area[data-estado="aplicado"] #cupomAplicadoPill {
    display: flex;
}

.cart-cupom-pill {
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: rgba(25, 135, 84, 0.1);
    border-radius: 999px;
    padding: 0.4rem 0.4rem 0.4rem 0.9rem;
    font-size: 0.8rem;
    color: #334155;
}

.cart-cupom-pill-label strong {
    color: var(--success-color);
}

.cart-cupom-pill-remove {
    background: transparent;
    border: none;
    color: var(--success-color);
    font-size: 1.1rem;
    line-height: 1;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    flex: 0 0 auto;
}

.cart-cupom-pill-remove:hover {
    background: rgba(25, 135, 84, 0.2);
}

.cart-summary-row-desconto .cart-summary-row-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--success-color);
    font-weight: 600;
}

.cart-cupom-tag-icon {
    flex: 0 0 auto;
}

.cart-summary-row-desconto .cart-summary-row-value {
    color: var(--success-color);
}
