/* ─── Lifestyle gallery: endless film strip (shared) ─── */
.cherry-gallery-section {
  padding: var(--space-xl, 80px) 0;
  background: var(--color-bg);
}

.cherry-gallery-section .section-divider {
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  margin: 0 auto var(--space-lg, 48px);
  opacity: 0.6;
}

.cherry-gallery-heading {
  font-family: var(--font-brand, var(--font-sans, system-ui, sans-serif));
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.15;
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-md, 24px);
  color: var(--color-text);
}

.cherry-gallery {
  position: relative;
  max-width: min(960px, 100%);
  margin: 0 auto;
}

.cherry-gallery__viewport {
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.cherry-gallery__viewport.is-dragging {
  cursor: grabbing;
}

.cherry-gallery__film {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: max-content;
  gap: var(--cherry-gallery-gap, 10px);
  padding: 14px 0;
  will-change: transform;
}

.cherry-gallery__cell {
  flex: 0 0 auto;
  width: var(--cherry-gallery-cell, clamp(72px, 16vw, 128px));
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.cherry-gallery__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

/* Cap vertical space; thumb height follows cell width × aspect-ratio */
.cherry-gallery--film .cherry-gallery__viewport {
  max-height: min(38vh, 340px);
}

/* Desktop / tablet: ~20% larger film than base */
@media (min-width: 641px) {
  .cherry-gallery--film {
    --cherry-gallery-cell: clamp(86px, 19.2vw, 154px);
    --cherry-gallery-gap: 12px;
  }

  .cherry-gallery--film .cherry-gallery__viewport {
    max-height: min(46vh, 408px);
  }

  .cherry-gallery--film .cherry-gallery__film {
    padding: 17px 0;
  }
}

/* Phones: double film height vs default mobile sizing */
@media (max-width: 640px) {
  .cherry-gallery--film {
    --cherry-gallery-cell: clamp(144px, 32vw, 256px);
  }

  .cherry-gallery--film .cherry-gallery__viewport {
    max-height: min(76vh, 680px);
  }

  .cherry-gallery__film {
    padding: 18px 0;
  }
}

.cherry-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cherry-gallery__nav:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text);
}

.cherry-gallery__nav:focus-visible {
  outline: 2px solid rgba(241, 23, 64, 0.55);
  outline-offset: 2px;
}

.cherry-gallery__nav--prev {
  left: 8px;
}

.cherry-gallery__nav--next {
  right: 8px;
}

@media (max-width: 520px) {
  .cherry-gallery__nav--prev {
    left: 4px;
  }

  .cherry-gallery__nav--next {
    right: 4px;
  }
}

.cherry-gallery__nav svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.cherry-gallery__hint {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted, rgba(255, 255, 255, 0.45));
  margin-top: var(--space-sm, 16px);
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .cherry-gallery__hint {
    font-size: 12px;
  }
}
