/* Itens Renderizados do carrinho */
.item-lista.removendo {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/*Loading de itens*/
.item-loading {
  position: relative;
}

.item-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #ccc;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    background: transparent;
    z-index: 10;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.item-loading > * {
  opacity: 0.4;
  pointer-events: none;
}

/*Container onde serão renderizados os itens*/
#itens-carrinho {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-lista {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 0;
}
.img-produto img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.info-produto {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.info-produto .nome {
    font-size: 12px;
    font-weight: bold;
    margin: 0
}
.info-produto .precos{
    margin: 5px 0;
}
.info-produto .precos del {
    font-size: 12px;
    color: #999;
    margin-right: 5px;
    text-decoration: line-through;
}
.info-produto .precos span {
    font-size: 14px;
    color: #107410;
    font-weight: bold;
}
.info-produto .subtotal,
.info-produto .economia {
    font-size: 12px;
    margin: 0;
    line-height: 22px;
}
.item-pego {
    opacity: 0.6;
    text-decoration: line-through;
}
.pegar {
    margin-top: 10px;
}
.pegar label {
    font-size: 12px;
    color: green;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.pegar label input{
    margin: 0
}
#limpar-carrinho i{
    margin-right: 10px;
}
.acoes {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin-left: 10px;
}
.acoes button {
    background: #f0f0f0;
    border: none;
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 15px;
    font-weight: 500;
}

/* .remover button {
    background: none;
    border: none;
    color: #e53935;
    font-size: 8px;
    border: 1px solid #e53935;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    margin-left: 10px;
} */
.valor-total {
    /* position: sticky; */
    bottom: -15px;
    background: #8b8b8b;
    color: #fff;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    font-size: 16px;
    width: calc(40px + 100%);
    margin-left: -20px;
}
.valor-total p {
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    font-weight: 500;
}

.item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 10px;
  margin-bottom: 0px;
  border-radius: 12px;
  gap: 6px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  border: 1px solid #eee;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  min-height: 105px;
}

.item-card-revisao{
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 0px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  border: 1px solid #eee;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.item-card .info-produto {
  flex: 1;
}

.item-card .nome {
  font-weight: 600;
  margin: 0 0 4px;
  color: #222;
}

.item-card .precos {
  margin: 0;
  display: flex;
  gap: 8px;
  font-size: 0.95rem;
}

.item-card .precos del {
  color: #888;
}

.item-card .acoes {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-card .acoes button {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  font-weight: bold;
  background: #f2f2f2;
  cursor: pointer;
  transition: background 0.2s;
}

.item-card .acoes button:hover {
  background: #ddd;
}

.item-card .acoes span {
  min-width: 20px;
  text-align: center;
  font-weight: bold;
}

.item-card .remover {
  color: #ff7474;;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s;
}

.item-card .remover:hover {
  color: #e60023;
}

.revisao{
  font-size: 14px;
  margin-top: 5px;
}

#modal-revisao h4{
  font-weight: bold;;
}

#revisaoRetirada {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
}

.btn-custom{
  background: none;
  border: none;
  color: #0066cc;
  font-size: 10px;
  margin-top: 5px;
  position: absolute;
  right: 5px;
  top: 0px;
  /* border: 1px solid lightgray; */
  border-radius: 12px;
}

/* #retirada-revisao .btn-custom, #entrega-revisao .btn-custom{
  background: none;
  border: none;
  color: #0066cc;
  font-size: 10px;
  margin-top: 5px;
  position: absolute;
  right: 0px;
  top: 0px;
  border: 1px solid lightgray;
  border-radius: 12px;
} */

/* Task #308 Fase1 Item 1 — após finalizar a compra, bloquear alteração
   de pagamento/endereço/retirada. O JS marca .pharus-order-confirmed
   nos modais do fluxo; aqui escondemos os botões "Alterar" e aplicamos
   estado visual de read-only nos radios/inputs. */
.modal.pharus-order-confirmed .btn-custom,
.modal.pharus-order-confirmed .cart-footer-buttons,
.modal#modal-carrinho.pharus-order-confirmed #limpar-carrinho,
.modal#modal-carrinho.pharus-order-confirmed #finalizar-compra {
    display: none !important;
}

.modal.pharus-order-confirmed input[type="radio"]:disabled + span,
.modal.pharus-order-confirmed .opcao-pagamento input[type="radio"]:disabled ~ span {
    opacity: 0.55;
}

.modal.pharus-order-confirmed .opcao-pagamento {
    pointer-events: none;
    cursor: not-allowed;
}

.modal.pharus-order-confirmed .btn-cart:disabled,
.modal.pharus-order-confirmed .btn-cart.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* #listaLojas redesign movido para main-theme-two.css
   (display:flex coluna, gap 8px, sem padding horizontal assimétrico) */

/*Footer do Ecommerce*/
.resume-footer-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 2px 0;
  min-width: 75px;
}

.resume-footer-line .label {
  font-weight: 500;
  color: #333;
}

.resume-footer-line .value {
  font-weight: 600;
  color: #000;
}

.resume-footer-total {
  border-top: 1px solid #ddd;
  margin-top: 6px;
  padding-top: 8px;
}

.resume-footer-total .label,
.resume-footer-total .value {
  font-size: 16px;
  font-weight: 700;
}

/* ── Product image in cart ── */
.item-card .img-produto {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-card .img-produto img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 6px;
}

/* ── Editable quantity input ── */
.cart-qty-input {
  width: 36px;
  height: 30px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  background: #fff;
  -moz-appearance: textfield;
  padding: 0;
  margin: 0;
  margin-bottom: 0;
  line-height: 30px;
}

/* ── Cart item layout fix — prices on same line ── */
.item-card .info-produto .precos {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.item-card .acoes {
  gap: 4px;
  margin-left: 6px;
  align-items: center;
}
.item-card .acoes button {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
}
.item-card .acoes .cart-qty-input {
  height: 30px;
  line-height: 30px;
  vertical-align: middle;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-qty-input:focus {
  outline: 2px solid #107410;
  border-color: transparent;
}

/* ── Minimum purchase banner ── */
.cart-min-purchase-banner {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  font-size: 13px;
  color: #856404;
}

.cart-min-purchase-banner i {
  font-size: 16px;
  flex-shrink: 0;
}

/* ── Clear cart button ── */
.btn-limpar-carrinho {
  font-size: 10px;
  border: none;
  color: red;
  background-color: #fff;
}

.btn-limpar-carrinho i {
  margin-right: 10px;
}

/* ── Cart loading overlay ── */
.carrinho-loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

/* ── Success step ── */
.cart-success-step {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  min-height: 300px;
}

.cart-success-icon {
  font-size: 72px;
  color: #28a745;
  animation: successBounce 0.6s ease;
}

@keyframes successBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.cart-success-title {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #222 !important;
  margin-bottom: 12px !important;
  text-align: center !important;
}

.cart-success-order {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 600;
  text-align: center;
}

.cart-success-msg {
  font-size: 13px;
  color: #666;
  margin-bottom: 32px;
  line-height: 1.6;
  text-align: center;
  max-width: 280px;
  margin-bottom: 20px !important;
}

.cart-success-btn {
  min-width: 200px;
}

/* ── Finalizar button spinner ── */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ── Details modal skeleton ── */
.detalhes-skeleton {
  padding: 10px 0;
}

.skeleton-bar {
  width: 80%;
  height: 50px;
  border-radius: 6px;
  margin: 0 auto 16px;
}

.skeleton-status {
  width: 40%;
  height: 20px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Barcode area in details modal ── */
.detalhes-barcode-area {
  padding: 8px 0;
}

.detalhes-barcode-area svg {
  max-width: 100%;
  height: auto;
}

/* ── Option cards (entrega/pagamento) — less spacing ── */
.lista-pagamentos {
  display: flex;
  flex-direction: column;
  gap: 8px !important;
}
.lista-pagamentos .opcao-pagamento {
  margin-bottom: 0 !important;
}

/* ── Back button for steps ── */
.btn-voltar-step {
  background: none;
  border: 1px solid #ddd;
  color: #333;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.btn-voltar-step:hover {
  background: #f5f5f5;
}

/* ── Padronização global de botões e cards no mobile cart ── */
.btn-cart {
  border-radius: 25px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}

/* v4.77.47 — #finalizar-compra e demais btn-cart.btn--success com contraste
   explícito. Antes o background var(--color-success) herdava mas o .btn base
   tinha `color: var(--text-primary)` (cinza escuro sobre verde claro = ilegível).
   Força cor da marca (verde brand) + texto branco + ícone branco. */
.btn.btn--success.btn-cart,
#finalizar-compra {
  background: var(--color-success, #059669) !important;
  color: #ffffff !important;
  border-color: var(--color-success, #059669) !important;
}
.btn.btn--success.btn-cart i,
#finalizar-compra i {
  color: #ffffff !important;
}
.btn.btn--success.btn-cart:active,
#finalizar-compra:active {
  background: color-mix(in srgb, var(--color-success, #059669) 85%, #000) !important;
}
.item-card,
.item-card-revisao {
  border-radius: 12px;
}
.opcao-pagamento {
  border-radius: 12px !important;
}

/* ── Revisão: padding para não ficar atrás do atalhosApp ── */
#modal-revisao .contentModal {
  padding-bottom: 150px !important;
}
#modal-carrinho .contentModal {
  padding-bottom: 80px !important;
}

/* ── Footer buttons row ── */
.cart-footer-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}

/* ── Review product image ── */
.resumo .item-revisao {
  display: flex;
  align-items: center;
  gap: 10px;
}
.resumo .item-revisao .img-revisao {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── Fix finalizar button z-index above atalhosApp ── */
#modal-revisao .btn-cart,
#modal-revisao .d-flex {
  position: relative;
  z-index: 10;
}
#modal-revisao .contentModal {
  padding-bottom: 80px;
}
