@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  main {
    padding-top: 120px;
  }

  .product-card {
    max-width: 100%;
    min-height: 300px;
  }

  .product-card img {
    max-height: 140px;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  .modal-content img {
    max-height: 250px;
  }

  #filter-form {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    max-width: 100%;
  }

  #filter-form .input-group {
    min-width: auto;
    max-width: 100%;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .cart-item img {
    width: 80px;
    height: 80px;
  }

  .cart-item-actions {
    width: 100%;
    justify-content: space-between;
  }

  .cart-footer {
    flex-direction: column;
    gap: 1rem;
  }

  .product-card-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn, .btn-detail {
    width: 100%;
    font-size: 0.95rem;
    max-width: none;
  }

  .toast {
    bottom: 15px;
    right: 15px;
    width: 90%;
    max-width: 300px;
  }

  /* Garantir visibilidade do botão flutuante do carrinho em mobile */
  #floating-cart-btn {
    display: flex !important;
    visibility: visible !important;
    position: fixed !important;
    width: 70px;
    height: 50px;
    padding: 0.8rem;
    bottom: 25px;
    right: 20px;
    top: auto;
    font-size: 0.9rem;
    opacity: 1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1500;
    background: linear-gradient(to right, #BC9A6A, #A68A5C); /* Reforçar fundo definido em styles.css */
  }

  #floating-cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .product-card {
    max-width: 100%;
    min-height: 320px;
  }

  .product-card img {
    max-height: 160px;
  }

  .modal-content img {
    max-height: 300px;
  }

  .product-card-actions {
    flex-direction: row;
    gap: 0.5rem;
  }

  .btn, .btn-detail {
    max-width: 140px;
  }
}

@media (min-width: 1025px) {
  .product-card {
    max-width: 300px;
    min-height: 350px;
  }

  .product-card img {
    max-height: 180px;
  }

  .modal-content img {
    max-height: 350px;
  }

  .product-card-actions {
    flex-direction: row;
    gap: 0.75rem;
  }

  .btn, .btn-detail {
    max-width: 140px;
  }
}