/* ===== Layout geral do checkout - fundo e cards ===== */
.checkout-bg {
    width: auto;
    background-color: rgb(249, 249, 249);
    padding: 30px 0 60px;
    margin: 0 -15px;
}

.checkout-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.checkout-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

.checkout-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1a1a;
}

.checkout-subtitle {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin: 0 0 20px;
}

/* ===== Grid principal (Bootstrap row/col) ===== */
.checkout-main,
.checkout-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 991.98px) {
    .checkout-side {
        margin-top: 40px;
    }
}

/* ===== Card do produto ===== */
.produto-card {
    position: relative;
    padding: 20px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    min-height: 134px;
}

.produto-card .btnRemove-x {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    text-align: center;
    border-radius: 50%;
    border: 1px solid rgba(128, 128, 128, 0.384);

    svg {
       width: 15px; 
       height: 15px;
    }
}

.produto-card .btnRemove-x:hover {
    color: #666;
}

.produto-imagem-box {
    max-width: 130px;
    max-height: 110px;
    border-radius: 8px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.produto-imagem-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center top;
}

.produto-info-box {
    flex: 1;
    min-width: 190px;
    display: flex;
    flex-direction: row;
    gap: 40px;
    padding-right: 20px;
    justify-content: space-between;
    align-items: center;
}

.produto-nome {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1a1a1a;
    text-decoration: none;
}

.produto-ref {
    font-size: 12px;
    font-weight: 600;
    color: #646464;
    margin: 0;
}

.info-text {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 17px;
}

.produto-qtd {
    flex: 0 0 80px;
    width: 80px;
}

.produto-qtd select {
    width: 80px;
    height: 35px;
    background-color: transparent;
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 4px 20px 4px 6px;
    font-size: 13px;

    /* Remove a seta nativa do navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* setas via SVG */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'><path fill='%23666' d='M5 1l4 4H1zM5 13l4-4H1z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

.produto-precos {
    margin-left: auto;
    text-align: left;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    white-space: nowrap;
    width: 240px;
    flex: 0 0 240px;
}

.produto-precos > div {
    display: grid;
    grid-template-columns: 130px 1fr;
}

.produto-precos .produto-preco-titulo {
    font-weight: 600;
    color: #646464;
}

.produto-precos .valor {
    font-weight: 700;
    color: #1a1a1a;
    text-align: left;
}

/* ===== Card do cupom (oculto por padrão) ===== */
.cupom-card {
    margin-top: -15px;
    padding: 16px 20px;
}

.cupom-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.cupom-header-row .fa-tag {
    flex-shrink: 0;
    font-size: 17px;
}

.cupom-header-row span.cupom-pergunta {
    font-size: 14px;
    color: #333;
}

.cupom-seta {
    margin-left: auto;
    transition: transform .3s;
    color: #999;
    font-size: 12px;
}

.cupom-box-conteudo {
    overflow: hidden;
    transition: max-height .3s ease;
}

.cupom-box-inner {
    padding-top: 14px;
}

.cupom-input-row {
    display: flex;
    gap: 10px;
}

.cupom-input-row input,
.cep-field input {
    flex: 1;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 13px;
}

.cupom-input-row input {
    height: 42px;
    padding: 0 12px;
}

.cupom-input-row button,
.cep-row button {
    border-radius: 8px;
    border: none;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.cupom-input-row button {
    height: 42px;
    padding: 0 20px;
    background: #f0f0f0;
}

.cupom-erro-msg {
    font-size: 12px;
    color: #c0392b;
    margin: 8px 0 0;
}

.cupom-aplicado-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #eafbea;
    border-radius: 8px;
    padding: 12px 14px;
}

.cupom-divisor {
    height: 1px;
    background: #e5e5e5;
    margin: 14px 0 15px;
}

.cupom-aplicado-texto {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #1c8a1c;
    line-height: 1.3;
}

.cupom-aplicado-texto .fa-tag {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 16px;
    color: black;
}

.cupom-aplicado-texto strong {
    font-weight: 700;
}

.btn-remover-cupom {
    background: none;
    border: none;
    color: #1c8a1c;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    text-decoration: none;
}

.btn-remover-cupom:hover {
    text-decoration: underline;
}

/* ===== Continuar comprando ===== */
.continuar-comprando-link {
    font-size: 13px;
    margin-top: 4px;
}

.continuar-comprando-link a {
    color: #333;
    text-decoration: none;
}

.continuar-comprando-link a:hover {
    text-decoration: underline;
}

/* ===== Card ENTREGA ===== */
.entrega-card,
.resumo-card {
    padding: 20px;
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0 0 16px;
}

.card-heading .fas {
    font-size: 16px;
}

.cep-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.cep-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cep-field label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin: 0;
}

.cep-field input {
    height: 40px;
    padding: 0 10px;
}

.cep-row button {
    height: 40px;
    background: #eee;
    padding: 0 18px;
    color: #999;
}

.tipo-entrega-titulo {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.tipo-entrega-sub {
    font-size: 12px;
    color: #888;
    margin: 0 0 12px;
}

.lista-fretes {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lista-fretes li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #333;
}

.lista-fretes li strong {
    font-weight: 600;
}

.lista-fretes input[type="radio"] {
    /* Esconde a renderização nativa */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Tamanho do círculo externo */
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 50%;
    outline: none;
    cursor: pointer;

    /* Centraliza a bolinha interna */
    display: inline-grid;
    place-content: center;
    margin: 0;
    vertical-align: middle;
}

.lista-fretes input[type="radio"]:checked {
    border-color: black;
}

/* Cria a bolinha verde interna proporcional */
.lista-fretes input[type="radio"]:checked::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #04b950; 
}

/* ===== Card RESUMO ===== */
.resumo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.resumo-table th {
    text-align: center;
    font-size: 14px;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.resumo-table th:first-child {
    text-align: left;
}

.resumo-table td {
    padding: 7px 4px;
    text-align: center;
    white-space: nowrap;
    color: #333;
}

.resumo-table td:first-child {
    text-align: left;
    color: #666;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
}

.resumo-table tr.total-row td {
    font-weight: 800;
    font-size: 15px;
    color: #1a1a1a;
    border-top: 1px solid #eee;
    padding-top: 14px;
}

.btn-finalizar {
    width: 100%;
    margin-top: 18px;
    height: 48px;
    border-radius: 10px;
    border: none;
    background: #2ecc71;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .3px;
    cursor: pointer;
}

.btn-finalizar:hover {
    background: #27ae60;
}

.frete-alerta-box,
.frete-indisponivel-box {
    border: none;
    box-shadow: none;
    border-radius: 8px;
}

.frete-indisponivel-box {
    background: #fdecea;
    padding: 12px 14px;
    font-size: 13px;
    color: #c0392b;
    margin-bottom: 0;
}

.frete-alerta-box {
    background: #ffd500;
    color: #1a1a1a;
    padding: 10px 14px;
    font-size: 12px;
    margin-bottom: 14px;
}

.quase-frete-gratis-box {
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
    color: #666;
    margin: 4px 0 0;
}

/* ===== Responsividade ===== */

@media (max-width: 1105px) and (min-width: 992px) {
  .produto-info-box {
    gap: 15px;
    padding-right: 15px;
  }

  .produto-precos {
    flex: 0 0 auto;
    width: auto;
    font-size: 12px;
  }

  .produto-precos > div {
    grid-template-columns: auto auto;
    gap: 6px;
  }

  .resumo-card {
    padding: 16px 10px;
  }

  .resumo-table {
    font-size: 9px;
  }

  .resumo-table th {
    font-size: 9px;
  }

  .resumo-table th,
  .resumo-table td {
    padding: 6px 2px;
  }

  .cep-row {
    flex-wrap: wrap;
  }
  .cep-field {
    min-width: 0;
    flex: 1 1 100%;
  }
  .cep-field input {
    min-width: 0;
  }
  .cep-row button {
    flex: 1 1 100%;
  }
}

@media (max-width: 1215px) and (min-width: 753px) {
  .produto-precos {
    margin-right: 0;
  }
  .produto-info-box {
    gap: 20px;
  }
}

@media (max-width: 752px) {
  .produto-card {
    max-height: none;
    align-items: flex-start;
  }

  .produto-info-box {
    flex: 1;
    min-width: 0; 
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px 16px;
    padding-right: 0;
  }

  .info-text {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0; 
  }

  .produto-nome {
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .produto-ref {
    white-space: normal;
    word-break: break-word;
  }

  .produto-qtd {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
  }

  .produto-precos {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin-left: 0;
    white-space: normal;
  }

  .produto-precos > div {
    grid-template-columns: auto 1fr;
    gap: 8px;
  }
}

@media (max-width: 442px) {
  .produto-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 16px 12px;
    gap: 12px 10px;
  }

  .produto-imagem-box {
    max-width: 85px;
    max-height: 85px;
    flex: 0 0 85px;
  }

  .produto-info-box {
    display: contents;
  }

  .info-text {
    flex: 1 1 calc(100% - 95px);
    min-width: 0;
    padding-right: 28px; 
  }

  .produto-qtd {
    flex: 0 0 auto;
    width: auto;
    margin-top: 6px;
  }

  .produto-precos {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 6px;
    margin-left: 8px; 
    font-size: 12px;
  }

  .produto-precos > div {
    grid-template-columns: auto 1fr;
    gap: 6px;
  }
}

@media (max-width: 368px) {
  .cep-row {
    flex-wrap: wrap;
  }
  .cep-field {
    min-width: 0;
    flex: 1 1 100%;
  }
  .cep-field input {
    min-width: 0;
  }
  .cep-row button {
    flex: 1 1 100%;
  }

  .resumo-table {
    table-layout: fixed;
    width: 100%;
  }
  .resumo-table td,
  .resumo-table th {
    white-space: normal;
    word-break: break-word;
    padding-left: 2px;
    padding-right: 2px;
  }
}

@media (max-width: 330px) {
  .produto-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 12px;
    gap: 14px;
  }

  .produto-imagem-box {
    max-width: 100px;
    max-height: 100px;
  }

  .produto-info-box {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px 12px;
  }

  .info-text {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
  }

  .produto-qtd {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
  }

  .produto-precos {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    font-size: 12px;
  }

  .produto-precos > div {
    grid-template-columns: auto 1fr;
    gap: 6px;
  }
}