/**
 * Section: The Range
 * Ported from .docs/mockup/css/sections.css lines 1049–1249 (THE RANGE
 * block) plus its rules in the shared 560px responsive block. Tokens only —
 * no hardcoded colours or sizes, except #fff below which the mockup uses
 * verbatim here (and throughout sections.css) for text on a solid colour
 * background — there is no exact token for pure white, --off-white is
 * #FAFAF7.
 */

.range {
  padding-block: var(--section-space-m);
  padding-inline: var(--space-gutter);
  background: var(--off-white);
}

/* Heading row with slider controls */
.range-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-m);
  margin-bottom: var(--space-xl);
}

.range-head .section-head {
  margin-bottom: 0;
}

.range-controls {
  display: flex;
  gap: var(--space-2xs);
  flex-shrink: 0;
}

.range-arrow {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--deep-ocean);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast),
              border-color var(--duration-fast), opacity var(--duration-fast);
}

.range-arrow:hover {
  background: var(--deep-ocean);
  border-color: var(--deep-ocean);
  color: var(--white);
}

.range-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.range-arrow .material-symbols-outlined {
  font-size: 22px;
}

/* Horizontal slider — ~3 cards visible with the next one peeking */
.range-slider {
  display: flex;
  gap: var(--space-s);
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.range-slider::-webkit-scrollbar {
  display: none;
}

.range-card {
  flex: 0 0 clamp(258px, 32%, 400px);
  display: flex;
  flex-direction: column;
  background: var(--pebble);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal),
              border-color var(--duration-normal);
}

.range-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--coastal-blue);
}

/* Per-card image placeholder — 4:3 */
.range-thumb {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--coastal-soft);
  overflow: hidden;
}

.range-thumb > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.range-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: var(--space-m);
  flex: 1;
}

.range-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.range-space {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--graphite);
  line-height: 1.3;
}

.range-card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--deep-ocean);
}

.range-desc {
  font-size: var(--text-small);
  color: var(--graphite);
  line-height: 1.5;
  flex: 1;
}

.range-foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin-top: auto;
  padding-top: var(--space-s);
  border-top: 1px solid var(--hairline);
}

.range-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 19px;
  color: var(--charcoal);
}

.range-dash {
  margin: 0 3px;
  color: var(--graphite);
  font-weight: 500;
}

.range-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--terracotta);
  transition: gap var(--duration-fast) var(--ease-out),
              color var(--duration-fast);
}

.range-link .material-symbols-outlined {
  font-size: 16px;
}

.range-card:hover .range-link {
  gap: 8px;
  color: var(--terracotta-hover);
}


/* === RESPONSIVE === */
@media (max-width: 560px) {
  .range-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-s);
  }

  .range-card {
    flex-basis: 78%;
  }
}
