#cart-list img,
.shopping-cart-img img {
  width: 75px;
  height: 75px;
  object-fit: contain;
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  padding: 4px;
  transition: transform 0.2s ease;
}

#cart-list tr:hover img {
  transform: scale(1.04);
}

.fs-7 {
  font-size: 0.825rem;
}

.py-2-5 {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.letter-spacing-1 {
  letter-spacing: 0.5px;
}

.max-w-500 {
  max-width: 500px;
}

.product-name-table a {
  color: #212529;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.product-name-table a:hover {
  color: #198754;
}

.product-des .font-xs {
  color: #6c757d;
  font-size: 0.785rem;
  margin-top: 4px;
  margin-bottom: 0;
}

.btn-delete-item-cart {
  background: none;
  border: none;
  color: #dc3545;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-delete-item-cart:hover {
  background-color: #fce8e6;
  color: #a91e2c;
}

.detail-qty {
  display: inline-flex;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #dee2e6 !important;
  border-radius: 20px !important;
  padding: 4px 8px;
}

.detail-qty a {
  color: #495057;
  padding: 2px 6px;
  text-decoration: none;
}

.detail-qty a:hover {
  color: #198754;
}

.detail-qty input.qty-val {
  width: 35px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Redesenho da estrutura Mobile (Flexbox Moderna) */
@media (max-width: 767.98px) {
  .table-responsive-custom #cart-list tr {
    display: flex;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04);
    position: relative;
  }

  .table-responsive-custom #cart-list td {
    display: block;
    padding: 0;
    border: none;
  }

  /* Alinha a imagem à esquerda */
  .table-responsive-custom td.product-thumbnail {
    flex: 0 0 75px;
    /* Tamanho fixo para a imagem não esticar */
    margin-right: 12px;
  }

  /* Alinha o título e os textos ao lado da imagem */
  .table-responsive-custom td.product-name-table {
    flex: 1;
    /* Ocupa o espaço restante */
    padding-right: 35px;
    /* Evita que o texto passe por baixo do botão de deletar */
    min-height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Move a lixeira para o extremo oposto (canto superior direito) */
  .table-responsive-custom td.action {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto !important;
    z-index: 2;
  }

  .btn-delete-item-cart {
    padding: 6px 10px;
  }

  /* Preço ocupa linha cheia abaixo do bloco superior */
  .table-responsive-custom td.price {
    flex: 0 0 100%;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #f1f3f5;
    display: flex;
    align-items: center;
  }

  .table-responsive-custom td.price::before {
    content: 'Preço: ';
    font-weight: 600;
    color: #6c757d;
    font-size: 0.85rem;
    margin-right: 6px;
  }

  /* Quantidade ocupa linha cheia abaixo do preço */
  .table-responsive-custom td[data-title='Stock'] {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    margin-top: 4px;
  }

  .table-responsive-custom td[data-title='Stock']::before {
    content: 'Quantidade:';
    font-weight: 600;
    color: #6c757d;
    font-size: 0.85rem;
  }

  .detail-qty {
    margin: 0 !important;
  }
}

/* Estilo para o input numérico do mini-carrinho */
.qty-cart-menu-input {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 32px;
  height: 24px;
  background: #198754;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0;
  z-index: 3;
}

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

.qty-cart-menu-input {
  -moz-appearance: textfield;
}

.qty-cart-menu-x {
  position: absolute;
  top: -3px;
  right: -15px;
  color: #6c757d;
  font-weight: bold;
  font-size: 0.85rem;
}

.table-responsive-custom,
.table-responsive-custom th,
.table-responsive-custom td {
  border-bottom: none !important;
}
