/* ============================================================
   Nestbay Property Carousel — [nestbay_property_carousel]
   Depends on: property-archive.css (card styles, --nb-* tokens)
   ============================================================ */

.nb-carousel {
  /* Same design tokens as .nb-property-archive (card styles depend on these) */
  --nb-lime: #AECF45;
  --nb-lime-dark: #8FB32E;
  --nb-lime-light: #E8F5C8;
  --nb-lime-bg: #F5FFD9;

  --nb-ink: #1a1a1a;
  --nb-ink-2: #555;
  --nb-ink-3: #888;
  --nb-line: #e5e5e5;
  --nb-bg: #f6f6f6;
  --nb-surface: #fff;

  --nb-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --nb-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --nb-shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --nb-radius: 14px;
  --nb-radius-sm: 8px;
  --nb-radius-full: 9999px;

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  color: var(--nb-ink);
  -webkit-font-smoothing: antialiased;

  --nb-car-gap: 22px;
  --nb-car-pad: 8px;
  position: relative;
}

/* ── Viewport + arrows ─────────────────────────────── */
.nb-carousel__viewport {
    position: relative;
}

.nb-carousel__track {
    display: flex;
    gap: var(--nb-car-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: var(--nb-car-pad) 0 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    outline: none;
}
.nb-carousel__track::-webkit-scrollbar { display: none; }

.nb-carousel__slide {
    flex: 0 0 calc((100% - (var(--nb-car-gap) * 2)) / 3);
    scroll-snap-align: start;
    min-width: 0;
    display: flex;
}
.nb-carousel--4 .nb-carousel__slide {
    flex-basis: calc((100% - (var(--nb-car-gap) * 3)) / 4);
}

/* ── Equal-height cards ────────────────────────────── */
.nb-carousel__slide .nb-archive-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.nb-carousel__slide .nb-archive-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.nb-carousel__slide .nb-archive-card__footer {
    margin-top: auto;
}

/* ── Arrows ────────────────────────────────────────── */
.nb-carousel__arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(26, 26, 26, .10);
    background: #fff;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(26, 26, 26, .12);
    transition: background .18s ease, color .18s ease, opacity .18s ease, transform .18s ease;
    -webkit-appearance: none;
    appearance: none;
}
.nb-carousel__arrow svg {
    width: 20px;
    height: 20px;
}
.nb-carousel__arrow:hover:not(:disabled) {
    background: var(--nb-lime, #AECF45);
    border-color: var(--nb-lime, #AECF45);
    color: #1a1a1a;
    transform: translateY(-50%) scale(1.06);
}
.nb-carousel__arrow:disabled {
    opacity: .32;
    cursor: default;
    pointer-events: none;
}
.nb-carousel__arrow--prev { left: -22px; }
.nb-carousel__arrow--next { right: -22px; }

/* ── Empty state ───────────────────────────────────── */
.nb-carousel__empty {
    padding: 28px 4px;
    color: rgba(26, 26, 26, .55);
    font-size: 15px;
}

/* ── Responsive: 4 → 3 → 2 → 1 ─────────────────────── */
@media (max-width: 1080px) {
    .nb-carousel__slide,
    .nb-carousel--4 .nb-carousel__slide {
        flex-basis: calc((100% - var(--nb-car-gap)) / 2);
    }
    .nb-carousel__arrow--prev { left: -12px; }
    .nb-carousel__arrow--next { right: -12px; }
}

@media (max-width: 560px) {
    .nb-carousel__slide,
    .nb-carousel--4 .nb-carousel__slide {
        flex-basis: 100%;
    }
    .nb-carousel__arrow {
        width: 38px;
        height: 38px;
    }
    .nb-carousel__arrow--prev { left: -8px; }
    .nb-carousel__arrow--next { right: -8px; }
}

/* ── Reduced motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .nb-carousel__track {
        scroll-behavior: auto;
    }
    .nb-carousel__arrow {
        transition: none;
    }
}
