/**
 * Homepage — Trending Destinations (carousel)
 */

body.fm-page-home .fm-trending {
  padding: 3rem 0 3.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

body.fm-page-home .fm-trending__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

body.fm-page-home .fm-trending__eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(21, 101, 192, 0.1);
  color: #1565c0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.fm-page-home .fm-trending__title {
  margin: 0;
  font-size: clamp(1.65rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.15;
}

body.fm-page-home .fm-trending__sub {
  margin: 0.45rem 0 0;
  max-width: 34rem;
  font-size: 0.98rem;
  color: #64748b;
  line-height: 1.5;
}

body.fm-page-home .fm-trending__all {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1565c0;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

body.fm-page-home .fm-trending__all:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

body.fm-page-home .fm-trending__slider {
  position: relative;
}

body.fm-page-home .fm-trending__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.35rem 0 1rem;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.fm-page-home .fm-trending__track::-webkit-scrollbar {
  display: none;
}

body.fm-page-home .fm-trending__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(calc(-50% - 0.5rem));
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1565c0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.2s;
}

body.fm-page-home .fm-trending__nav:hover:not(:disabled) {
  background: #eff6ff;
  transform: translateY(calc(-50% - 0.5rem)) scale(1.04);
}

body.fm-page-home .fm-trending__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

body.fm-page-home .fm-trending__nav--prev { left: -0.75rem; }
body.fm-page-home .fm-trending__nav--next { right: -0.75rem; }

body.fm-page-home .fm-trending-card {
  position: relative;
  flex: 0 0 calc(78% - 0.5rem);
  max-width: 17.5rem;
  min-height: 19.5rem;
  display: block;
  overflow: hidden;
  border-radius: 1.15rem;
  text-decoration: none;
  color: #fff;
  scroll-snap-align: start;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  isolation: isolate;
}

body.fm-page-home .fm-trending-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.08),
    0 16px 40px rgba(15, 23, 42, 0.14);
}

body.fm-page-home .fm-trending-card__media {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
}

body.fm-page-home .fm-trending-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

body.fm-page-home .fm-trending-card:hover .fm-trending-card__media img {
  transform: scale(1.07);
}

body.fm-page-home .fm-trending-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.06) 0%,
    rgba(15, 23, 42, 0.02) 40%,
    rgba(15, 23, 42, 0.78) 100%
  );
  pointer-events: none;
}

body.fm-page-home .fm-trending-card__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

body.fm-page-home .fm-trending-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1rem 0.95rem 0.95rem;
}

body.fm-page-home .fm-trending-card__name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

body.fm-page-home .fm-trending-card__price {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}

body.fm-page-home .fm-trending-card__price strong {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}

body.fm-page-home .fm-trending-card__arrow {
  position: absolute;
  right: 0.75rem;
  bottom: 0.85rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 1.05rem !important;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.25s, background 0.25s;
}

body.fm-page-home .fm-trending-card:hover .fm-trending-card__arrow {
  opacity: 1;
  transform: translateX(0);
  background: rgba(255, 255, 255, 0.28);
}

@media (min-width: 640px) {
  body.fm-page-home .fm-trending-card {
    flex: 0 0 calc(44% - 0.5rem);
    max-width: none;
    min-height: 21rem;
  }
}

@media (min-width: 1024px) {
  body.fm-page-home .fm-trending {
    padding: 3.5rem 0 4rem;
  }

  body.fm-page-home .fm-trending-card {
    flex: 0 0 calc(25% - 0.75rem);
    min-height: 22rem;
  }

  body.fm-page-home .fm-trending-card__arrow {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 1023px) {
  body.fm-page-home .fm-trending__nav {
    display: none;
  }

  body.fm-page-home .fm-trending__track {
    margin-right: calc(-1 * var(--fm-homepage-gutter));
    padding-right: var(--fm-homepage-gutter);
  }
}

@media (max-width: 639px) {
  body.fm-page-home .fm-trending {
    padding: 1.25rem 0 3rem;
  }

  body.fm-page-home .fm-trending__head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  body.fm-page-home .fm-trending__all {
    display: none;
  }
}
