/**
 * @file
 * AAG Collections Slider — scoped with .aag-layout.
 * CSS scroll-snap based (no Swiper dependency). JS enhances with prev/next.
 */

.aag-layout .collections-slider {
  width: 100%;
  padding: 2rem 0;
}

.aag-layout .collections-slider__header {
  border-top: 1px solid var(--gray);
  padding-top: 1rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.aag-layout .collections-slider__header h2 {
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
}

.aag-layout .collections-slider__nav {
  display: flex;
  gap: 0.5rem;
}

.aag-layout .collections-slider__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: transparent;
  border: 1px solid var(--black);
  cursor: pointer;
  color: var(--black);
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.aag-layout .collections-slider__nav-btn:hover {
  background-color: var(--black);
  color: var(--white);
}

.aag-layout .collections-slider__nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.aag-layout .collections-slider__nav-btn svg {
  width: 20px;
  height: 20px;
}

.aag-layout .collections-slider__wrapper {
  width: 100%;
  overflow: hidden;
}

.aag-layout .collections-slider__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
  scrollbar-width: none;
}

.aag-layout .collections-slider__track::-webkit-scrollbar {
  display: none;
}

.aag-layout .collections-slider-item {
  flex: 0 0 80%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.aag-layout .collections-slider-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.aag-layout .collections-slider-item__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  max-height: 400px;
}

.aag-layout .collections-slider-item__image img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease-in-out;
}

.aag-layout .collections-slider-item:hover .collections-slider-item__image img {
  transform: scale(1.03);
}

.aag-layout .collections-slider-item__info {
  padding: 1.25rem 0.5rem;
  text-align: center;
}

.aag-layout .collections-slider-item__info h3 {
  font-family: var(--header-font-family);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 0.25rem 0;
  color: var(--black);
  line-height: 1.3;
}

.aag-layout .collections-slider-item__year {
  font-family: var(--body-font-family);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--black);
}

@media (min-width: 600px) {
  .aag-layout .collections-slider__header h2 {
    font-size: 1.75rem;
  }

  .aag-layout .collections-slider-item__info h3 {
    font-size: 1rem;
  }

  .aag-layout .collections-slider-item__year {
    font-size: 0.9375rem;
  }
}

@media (min-width: 900px) {
  .aag-layout .collections-slider__wrapper {
    padding: 2rem 0 3rem;
  }

  .aag-layout .collections-slider__track {
    gap: 2.5rem;
  }

  .aag-layout .collections-slider-item {
    flex: 0 0 calc(33.333% - 1.667rem);
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform: scale(0.85);
    transform-origin: center bottom;
    opacity: 0.7;
  }

  .aag-layout .collections-slider-item--active,
  .aag-layout .collections-slider-item.is-active {
    transform: scale(1);
    opacity: 1;
    z-index: 2;
  }

  .aag-layout .collections-slider-item__image {
    max-height: 400px;
    transition: max-height 0.4s ease;
  }

  .aag-layout .collections-slider-item--active .collections-slider-item__image,
  .aag-layout .collections-slider-item.is-active .collections-slider-item__image {
    max-height: 480px;
  }
}

@media (min-width: 1200px) {
  .aag-layout .collections-slider-item__info h3 {
    font-size: 1.0625rem;
  }

  .aag-layout .collections-slider-item__year {
    font-size: 1rem;
  }
}
