/* Página representantes */

.representatives-hero {
  min-height: 420px;
  background-image:
    linear-gradient(
      90deg,
      #050505 0%,
      #050505 35%,
      rgba(5, 5, 5, 0.75) 58%,
      rgba(5, 5, 5, 0.25) 100%
    ),
    url("img/HeroRepre.png");
  background-size: cover;
  background-position: center right;
  color: #fff;
  display: flex;
  align-items: center;
}

.representatives-hero-text {
  max-width: 560px;
}

.representatives-hero-text h1 {
  font-size: 54px;
  line-height: 1.08;
  margin: 16px 0 22px;
}

.representatives-hero-text h1 strong {
  display: block;
  color: #e30613;
}

.representatives-hero-text p {
  font-size: 18px;
  line-height: 1.7;
  max-width: 460px;
}

/* Conteúdo */

.representatives-page {
  background: #fff;
  padding: 42px 0 64px;
}

.representatives-page-content {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
}

/* Filtro lateral */

.representatives-filter {
  border-right: 1px solid #e5e5e5;
  padding-right: 28px;
}

.representatives-filter h2 {
  color: #e30613;
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.filter-all {
  width: 100%;
  height: 58px;
  border: none;
  border-radius: 4px;
  background: #050505;
  color: #fff;
  padding: 0 18px;
  margin-bottom: 28px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font: inherit;
  font-weight: bold;
  text-transform: uppercase;
}

.filter-all small {
  color: #e30613;
  font-size: 14px;
  font-weight: bold;
}

.filter-group h3 {
  color: #111;
  font-size: 15px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}

.state-list {
  display: flex;
  flex-direction: column;
}

.state-item {
  font-weight: 700;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  background: transparent;
  padding: 13px 0;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;

  color: #555;
  font: inherit;
  font-size: 14px;
  text-align: left;
}

.state-item:hover,
.state-item.active {
  color: #e30613;
}

/* Resultado */

.representatives-results {
  min-width: 0;
}

.representatives-results-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.representatives-results-top p {
  color: #555;
  font-size: 16px;
}

.representatives-results-top p strong {
  color: #e30613;
  font-size: 24px;
}

.representatives-order {
  display: flex;
  align-items: center;
  gap: 12px;
}

.representatives-order span {
  color: #111;
  font-size: 14px;
  font-weight: bold;
}

.representatives-order select {
  border: none;
  background: transparent;
  color: #111;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

/* Cards */

.representatives-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.representative-store-card {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 26px 24px;
  min-height: 210px;
  background: #fff;
  box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
}

.representative-store-card h3 {
  color: #111;
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.representative-store-card .city {
  font-weight: 700;
  color: #111;
  font-size: 14px;
  margin-bottom: 22px;
}

.representative-store-card .description {
  color: #333;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.representative-phones {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.representative-phones a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
}

.representative-phones a i {
  font-size: 18px;
}

.representative-phones .phone-link {
  color: #333;
}

.representative-phones .whatsapp-link {
  color: #128c45;
}

.representative-phones a:hover {
  text-decoration: underline;
}

.representative-store-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.representative-store-card h3 i {
  color: #e30613;
  font-size: 30px;
  flex-shrink: 0;
}

.states-toggle {
  display: none;
}

/* Tablet */

@media (max-width: 900px) {
  .representatives-hero {
    min-height: 360px;
  }

  .representatives-hero-text h1 {
    font-size: 44px;
  }

  .representatives-page-content {
    grid-template-columns: 200px 1fr;
    gap: 30px;
  }

  .representatives-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Celular */

@media (max-width: 650px) {
  .representatives-hero {
    min-height: 330px;
    padding: 42px 0;

    background-position: 65% center;
    background-image:
      linear-gradient(
        90deg,
        #050505 0%,
        rgba(5, 5, 5, 0.9) 55%,
        rgba(5, 5, 5, 0.35) 100%
      ),
      url("img/HeroRepre.png");
  }

  .representatives-hero-text h1 {
    font-size: 36px;
    margin: 12px 0 18px;
  }

  .representatives-hero-text p {
    font-size: 15px;
  }

  .representatives-page {
    padding: 34px 0 46px;
  }

  .representatives-page-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Filtros */

  .representatives-filter {
    padding-right: 0;
    border-right: none;
  }

  .filter-all {
    height: 54px;
    margin-bottom: 20px;
  }

  .filter-group h3 {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  /* Botão para abrir os estados */

  .states-toggle {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;

    background: #fff;
    color: #111;

    border: 1px solid #ddd;
    border-radius: 4px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    font: inherit;
    font-weight: bold;
    cursor: pointer;
  }

  .states-toggle i {
    color: #e30613;
    font-size: 16px;

    transition: transform 0.25s ease;
  }

  .states-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
  }

  /* Lista fechada */

  .state-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;

    max-height: 0;
    margin-top: 0;
    overflow: hidden;

    opacity: 0;
    visibility: hidden;

    transition:
      max-height 0.3s ease,
      margin-top 0.3s ease,
      opacity 0.25s ease;
  }

  /* Lista aberta */

  .state-list.open {
    max-height: 380px;
    margin-top: 12px;
    padding-right: 4px;

    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }

  /* Botões dos estados */

  .state-item {
    width: 100%;
    min-height: 54px;
    padding: 10px 12px;

    background: #fff;
    color: #333;

    border: 1px solid #e2e2e2;
    border-radius: 4px;

    gap: 8px;

    transition:
      border-color 0.2s ease,
      color 0.2s ease,
      background-color 0.2s ease;
  }

  .state-item span {
    line-height: 1.3;
  }

  .state-item small {
    min-width: 24px;
    height: 24px;

    background: #f1f1f1;
    color: #555;
    border-radius: 50%;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
    font-size: 11px;
    font-weight: bold;
  }

  .state-item:hover {
    color: #e30613;
    border-color: #e30613;
  }

  .state-item.active {
    background: #111;
    color: #fff;
    border-color: #111;
  }

  .state-item.active small {
    background: #e30613;
    color: #fff;
  }

  /* Resultado e ordenação */

  .representatives-results-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .representatives-order {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;

    border: 1px solid #ddd;
    border-radius: 4px;

    justify-content: space-between;
  }

  .representatives-order select {
    flex: 1;
    text-align: right;
  }

  /* Cards */

  .representatives-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .representative-store-card {
    min-height: auto;
    padding: 22px 20px;
  }

  .representative-store-card h3 {
    font-size: 17px;
  }

  .representative-store-card h3 i {
    font-size: 26px;
  }

  .representative-store-card .description {
    margin-bottom: 22px;
  }

  .representative-phones a {
    min-height: 34px;
  }
}