/*
  SN_HOME_GRID_CRITICAL_HEAD_V2

  Geometria crítica da Home antes do primeiro paint.
  A cópia final permanece no fim do content para
  preservar a cascata visual histórica.
*/

/* SN_HOME_RESPONSIVE_LAYERS_24_V1 */

  /*
    HOME — camadas responsivas finais.

    Celular:        1 coluna
    Tablet menor:   2 colunas
    Tablet grande:  3 colunas
    Desktop médio:  4 colunas
    Desktop largo:  4 colunas
  */


  /* ======================================================
     CELULAR
     até 767px
     ====================================================== */
  @media (max-width: 767px) {
    #home-listings
    .sn-home-cards-grid {
      display: grid !important;

      grid-template-columns:
        minmax(0, 1fr) !important;

      width: 100% !important;
      min-width: 0 !important;
    }
  }


  /* ======================================================
     TABLET MENOR
     768px até 1023px
     ====================================================== */
  @media (min-width: 768px) and (max-width: 1023px) {
    #home-listings
    .sn-home-cards-grid {
      display: grid !important;

      grid-template-columns:
        repeat(2, minmax(0, 1fr)) !important;

      width: 100% !important;
      min-width: 0 !important;
    }
  }


  /* ======================================================
     TABLET GRANDE / NEST HUB MAX
     1024px até 1365px
     ====================================================== */
  @media (min-width: 1024px) and (max-width: 1365px) {
    #home-listings
    .sn-home-cards-grid {
      display: grid !important;

      grid-template-columns:
        repeat(3, minmax(0, 1fr)) !important;

      width: 100% !important;
      min-width: 0 !important;
      max-width: none !important;
    }
  }


  /* ======================================================
     DESKTOP MÉDIO
     1366px até 1599px
     ====================================================== */
  @media (min-width: 1366px) and (max-width: 1599px) {
    #home-listings
    .sn-home-cards-grid {
      display: grid !important;

      grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

      width: 99vw !important;
      min-width: 0 !important;
      max-width: 99vw !important;

      margin-left: calc(50% - 49.5vw) !important;
      margin-right: calc(50% - 49.5vw) !important;
    }
  }


  /* ======================================================
     DESKTOP LARGO
     1600px ou mais
     ====================================================== */
  @media (min-width: 1600px) {
    #home-listings
    .sn-home-cards-grid {
      display: grid !important;

      grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

      width: 99vw !important;
      min-width: 0 !important;
      max-width: 99vw !important;

      margin-left: calc(50% - 49.5vw) !important;
      margin-right: calc(50% - 49.5vw) !important;
    }
  }


  /* Espaçamento compacto em todas as faixas. */
  #home-listings
  .sn-home-cards-grid {
    column-gap: 3px !important;
    row-gap: 5px !important;
  }

  #home-listings
  .sn-home-cards-grid
  > article.sn-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;
    box-sizing: border-box !important;
  }
