/* =========================================================
   CATEGORIAS ABRIGOS — CARROSSEL RESPONSIVO
   ========================================================= */

.abrigos-category-cards {
  --cards-visible: 8;
  --cards-gap: 14px;

  width: 100%;
  padding: 30px 0;
  overflow: hidden;
  background: #f4f6f3;
}

.abrigos-category-container {
  position: relative;
  width: calc(100% - 30px);
  max-width: 1900px;
  margin: 0 auto;
}

.abrigos-category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}

.abrigos-category-title {
  margin: 0;
  color: #1f1f1f;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.abrigos-category-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.abrigos-category-arrow {
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #347331;
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.abrigos-category-arrow:hover:not(:disabled) {
  background: #245821;
  transform: scale(1.05);
}

.abrigos-category-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.abrigos-category-track {
  display: flex;
  gap: var(--cards-gap);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.abrigos-category-track::-webkit-scrollbar {
  display: none;
}

.abrigos-category-card {
  position: relative;
  display: block;
  flex: 0 0 calc(
    (100% - ((var(--cards-visible) - 1) * var(--cards-gap)))
    / var(--cards-visible)
  );
  width: calc(
    (100% - ((var(--cards-visible) - 1) * var(--cards-gap)))
    / var(--cards-visible)
  );
  min-width: 0;
  height: 245px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.12);
  color: #fff;
  text-decoration: none;
  scroll-snap-align: start;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.abrigos-category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 11px 26px rgba(0, 0, 0, 0.2);
  color: #fff;
  text-decoration: none;
}

.abrigos-category-image {
  position: absolute;
  inset: 0;
  display: block;
}

.abrigos-category-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.abrigos-category-card:hover .abrigos-category-image img {
  transform: scale(1.07);
}

.abrigos-category-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 13px 15px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.28) 58%,
    rgba(0, 0, 0, 0.03) 100%
  );
}

.abrigos-category-name {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
}

.abrigos-category-button {
  display: inline-block;
  align-self: flex-start;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  background: rgba(47, 111, 45, 0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* 7 cartões completos */
@media (min-width: 1500px) and (max-width: 1699px) {
  .abrigos-category-cards {
    --cards-visible: 7;
  }
}

/* 6 cartões completos */
@media (min-width: 1100px) and (max-width: 1499px) {
  .abrigos-category-cards {
    --cards-visible: 6;
  }
}

/* 4 cartões completos */
@media (min-width: 768px) and (max-width: 1099px) {
  .abrigos-category-cards {
    --cards-visible: 4;
    --cards-gap: 12px;
  }

  .abrigos-category-card {
    height: 230px;
  }
}

/* 2 cartões completos */
@media (max-width: 767px) {
  .abrigos-category-cards {
    --cards-visible: 2;
    --cards-gap: 8px;
    padding: 20px 0;
  }

  .abrigos-category-container {
    width: calc(100% - 16px);
  }

  .abrigos-category-heading {
    margin-bottom: 14px;
  }

  .abrigos-category-title {
    font-size: 21px;
  }

  .abrigos-category-arrow {
    width: 36px;
    height: 36px;
    font-size: 21px;
  }

  .abrigos-category-card {
    height: 195px;
    border-radius: 7px;
  }

  .abrigos-category-overlay {
    padding: 12px 9px;
  }

  .abrigos-category-name {
    margin-bottom: 8px;
    font-size: 14px;
  }

  .abrigos-category-button {
    padding: 7px 10px;
    font-size: 11px;
  }
}
