/* Ajustes globais para telas pequenas. Carregado após os estilos de página. */
@media (max-width: 520px) {
  .container {
    width: calc(100% - 1rem);
  }

  .topbar {
    min-height: 4rem;
  }

  .nav {
    gap: 0.5rem;
    padding-block: 0.65rem;
  }

  .brand {
    gap: 0.45rem;
    flex-basis: 12rem;
  }

  .brand-logo {
    width: 2.75rem;
    height: 2.75rem;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-subtitle {
    font-size: 0.38rem;
    letter-spacing: 0.28em;
  }

  input,
  select,
  textarea,
  button {
    font-size: 1rem;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select {
    min-height: 2.75rem;
  }

  .topbar-search {
    margin-top: 0.35rem;
  }

  .product-card .slider-slide {
    padding: 0.5rem;
  }

  .product-card .slider-slide img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .product-card__link h3 {
    min-height: auto;
    max-height: none;
    -webkit-line-clamp: 4;
    line-clamp: 2;
  }

  .product-page {
    padding-top: 0.75rem;
  }

  .product-detail {
    padding: 1.1rem 0.9rem;
  }

  .product-detail__qty {
    align-items: stretch;
    flex-direction: column;
  }

  .product-detail__subtotal {
    width: 100%;
  }

  .cart-page {
    padding-bottom: 6.5rem;
  }

  .form-grid--schedule {
    grid-template-columns: 1fr;
  }

  .coupon-box {
    gap: 0.3rem;
    padding: 0.65rem 0;
  }

  .coupon-box__controls {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem;
  }

  .coupon-box__controls button {
    min-height: 2.5rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.84rem;
  }

  .coupon-box__status {
    min-height: 0;
    line-height: 1.3;
  }

  .coupon-box__status:empty {
    display: none;
  }

  .site-footer {
    padding: 2rem 0 1rem;
  }

  .site-footer__content,
  .site-footer__bottom {
    width: calc(100% - 1.5rem);
  }

  .site-footer__brand-name {
    font-size: 2rem;
  }

  .site-footer__brand p {
    margin-top: 0.75rem;
  }

  .site-footer__contact-card {
    width: 100%;
    padding: 1rem;
  }

  .site-footer__institutional-item {
    padding: 0;
  }

  .site-footer__bottom {
    margin-top: 1.25rem;
    padding-top: 1rem;
  }
  body .add-toast {
    top: 0.65rem;
    width: calc(100% - 1rem);
  }
}

/* Carrinho: cabeçalho compacto no mobile. */
@media (max-width: 900px) {
  .cart-page .cart-header {
    margin-bottom: 0.85rem;
    padding: 0.9rem 1rem 1rem;
  }

  .cart-page .cart-header h1 {
    font-size: 1.55rem;
    margin-bottom: 0.25rem;
  }

  .cart-page .cart-header p {
    font-size: 0.88rem;
    line-height: 1.35;
  }
}
