/* Layout em bloco */
.checkout {
    background: #fff;
    font-family: sans-serif;
}

.checkout-container {
    display: flex;
    flex-direction: column;
    /* Empilha tudo */
    gap: 15px;
    padding: 10px;
}

.checkout-sidebar {
    order: -1;
    /* Resumo vai para o topo no celular */
}

.checkout-forms {
    order: 1;
    /* Formulários ficam abaixo do resumo */
}

/* Layout para COMPUTADOR (Telas maiores que 992px) */
@media (min-width: 992px) {
    .checkout {
        /*max-width: 600px;*/
        margin: 40px 15px;
        padding: 30px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        font-family: sans-serif;
    }

    .checkout-container {
        display: grid;
        /* Volta a ser Grid para permitir colunas */
        grid-template-columns: 2fr 1fr;
        /* Define as duas colunas */
        gap: 30px;
        align-items: start;
        /* Impede que o resumo estique verticalmente */
        max-width: 1100px;
        margin: 0 auto;
        padding: 40px 20px;
    }

    .checkout-sidebar {
        grid-column: 2;
        /* Força a ficar na segunda coluna (DIREITA) */
        grid-row: 1;
        /* Força a começar no topo, ao lado do formulário */
        position: sticky;
        top: 55px;
        height: fit-content;
        z-index: 10;
        /* Garante que o card não suma para trás de outros elementos do corpo */
    }

    .checkout-forms {
        /* order: 1; /* Formulários voltam para a primeira coluna (esquerda) */
        grid-column: 1;
        /* Força a ficar na primeira coluna */
        grid-row: 1;
        /* Força a começar no topo */
    }
}

/* Etapas *  PADRÃO CELULAR */
.etapa-checkout {
    display: none;
}

.etapa-checkout.ativa {
    display: block;
}

.navigation-btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-direction: row;
    justify-content: flex-end;
}

.btn-proximo {
    flex: 1;
    padding: 15px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    max-width: 150px;
}

.btn-proximo:disabled {
    background-color: #ccc !important;
    color: #888 !important;
    cursor: not-allowed !important;
    opacity: 0.5;
    transform: none !important;
}

.btn-voltar {
    flex: 1;
    padding: 15px;
    background: #eee;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    max-width: 100px;
}

/* AJUSTE PARA DESKTOP */
@media (min-width: 992px) {
    .etapa-checkout {
        display: block !important;
        margin-bottom: 20px;
    }

    .btn-proximo {
        display: none;
    }

    .btn-voltar {
        display: none;
    }

    .btn-checkout {
        width: 100%;
        max-width: none;
        font-size: 16px;
    }
}


/* Estilos do Formulário */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
    color: #555;
}


.btn-checkout {
    padding: 15px;
    background-color: var(--cor-primaria);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(var(--cor-primaria-rgb), 0.2);
    letter-spacing: 1px;
    max-width: 215px;
}

.btn-checkout:hover {
    filter: brightness(0.85);
    transform: translateY(-2px);
    /* Efeito de elevação ao passar o mouse */
}

.btn-checkout:active {
    transform: translateY(0);
}

.lock-icon {
    width: 18px;
    height: 18px;
}

.lupa-svg {
    width: 18px;
    height: 18px;
}

.btn-lupa {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-frete {
    background: #333;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Estilo Campo de cupom */
.coupon-wrapper {
    margin: 15px 0;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
    /* Garante que input e botão tenham a mesma altura */
    height: 45px;
    /* Define uma altura fixa para a linha */
}

.coupon-input-group input {
    flex: 2;
    /* Ocupa mais espaço que o botão */
    padding: 0 12px;
    /* Padding apenas nas laterais para não afetar a altura fixa */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    /* Aumentado um pouco para melhor leitura */
    outline: none;
    height: 100%;
    /* Preenche a altura do grupo */
}

.coupon-input-group button {
    flex: 1;
    /* Ocupa o espaço restante */
    padding: 0 10px;
    /* Espaço lateral */
    background-color: #333;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    /* IMPORTANTE: impede que o texto "Aplicar" quebre em linhas */
    height: 100%;
    /* Preenche a altura do grupo */
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .inner-box-content {
        padding: 20px;
    }

    .coupon-input-group button {
        padding: 0 15px;
    }
}

.coupon-input-group button:hover {
    background-color: #555;
}

#coupon-message {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.link-remover-cupom {
    color: #d32f2f;
    font-size: 12px;
    text-decoration: underline;
    margin-top: 10px;
    cursor: pointer;

}

/* Estilo do Grupo Expansível */
.checkout-accordion {
    width: 100%;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

/* Título do card expansível */
.arrow {
    border: solid #666;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform 0.3s;
}

.toggle-input {
    display: none;
}

.toggle-input:checked+.summary-header .arrow {
    transform: rotate(-135deg);
}

.toggle-input:checked+.summary-header+.box-content {
    max-height: 400px;
}

.toggle-input:checked+.summary-header #resumo-preco-header {
    /*  display: none; */
    opacity: 0;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.summary-header:hover {
    background-color: #f0f0f0;
}

.info-col h3 {
    margin: 0;
    font-family: var(--font-titulo-card);
    font-size: 18px;
    font-weight: 500;
    color: #777;
}

.info-col span {
    font-size: 14px;
    font-family: Source Sans Pro, Arial, sans-serif;
    font-weight: 400;
    color: #777;
}

/* Resumo * Conteúdo do card expansível */
.box-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #fff;
}

.inner-box-content {
    padding: 10px;
    border-top: 1px solid #f0f0f0;
}

/* Resumo * Informações do preço */
.price-col {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-val {
    font-weight: bold;
    color: #28a745;
    font-size: 18px;
}

.price-table {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    font-size: 14px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
}

.price-line.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #eee;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.old-price {
    text-decoration: line-through;
    color: #bbb;
    margin-right: 8px;
}

.discount-label {
    color: #28a745;
    font-weight: bold;
}

.product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.product-info p {
    margin: 0;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

/* Seletor de Quantidade */
.quantity-wrapper {
    padding: 5px 0px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /*space-between;*/
    /*border-top: 1px solid #eee;*/
}

.quantity-control {
    display: flex;
    align-items: center;
    background: #f1f1f1ad;
    border-radius: 3px;
    padding: 2px;
    margin: 0px 0px 0px 10px;
}

.qty-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.qty-btn:hover {
    color: #000;
}

.qty-input {
    width: 30px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    color: #333;
    pointer-events: none;
}

/* Remover setas nativas do input number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Estilo dos quadros */
.box-group {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.box-title:not(.--with-preview, .--box-resume) {
    padding-left: 28px;
}


.box-title {
    box-sizing: border-box;
    position: relative;
}

.box-title .holder-number {
    color: var(--step-tag-txt-color);
}

.box-title .holder-number {
    background-color: #ccc;
    border-radius: 50%;
    box-sizing: border-box;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    height: 21px;
    left: 0;
    line-height: 22px;
    position: absolute;
    text-align: center;
    top: 2;
    width: 21px;
}


.box-title:not(.--with-preview, .--box-resume) .title {
    display: unset;
    margin-bottom: unset;
}

.box-title .title {
    display: flex;
    line-height: 21px;
    margin-bottom: 16px;
    position: relative;
    top: 1px;
}

.ctx-title {
    color: #666666;
    font-family: Oswald, Sans-Serif;
    font-weight: 500;
    text-transform: initial;
    font-size: 18px;
}

.box-title:not(.--with-preview, .--box-resume) .desc {
    margin-left: -28px;
}

.box-title .desc {
    color: #666666;
    font-size: 14px;
    line-height: 1.4;
    margin-top: 8px;
    font-family: Source Sans Pro, Arial, sans-serif;
    font-weight: 400;
    margin-bottom: 20px;
}

.metodo-pagamento {
    display: flex;
    align-items: center;
}

.metodo-pagamento input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.metodo-pagamento label {
    cursor: pointer;
    font-size: 15px;
}

.lista-frete-area {
    background: #f1f8e9;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.lista-frete-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 12px 15px;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lista-frete-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lista-frete-item input {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.lista-frete-item label {
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}