/* ============================================================
   Packagly — materials-finishes.css  (split from style.css)
   Depends on: common.css (variables, reset, icon helpers)
   Responsive @media rules live in responsive.css
   ============================================================ */

/* ============================================================
   MATERIALS & FINISHES — infinite (CSS-only) scroller
   ============================================================ */
.finishes-section {
  background: #ffffff;
  padding: 64px 0;
}
.finishes-overline {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #14241b;
  margin-bottom: 24px;
}
.finishes-overline .accent {
  color: var(--green);
}

/* row: scroller (left) + explore button (right) */
.finishes-row {
  display: flex;
  align-items: stretch;
  gap: 18px;
}

/* viewport — clips the track + fades the edges */
.finishes-marquee {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 28px,
    #000 calc(100% - 28px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 28px,
    #000 calc(100% - 28px),
    transparent 100%
  );
}

/* track holds 2 identical sets; -50% == exactly one set => seamless */
.finishes-track {
  display: flex;
  width: max-content;
  animation: finishes-scroll 40s linear infinite;
  will-change: transform;
}
/* pause on hover */
.finishes-marquee:hover .finishes-track {
  animation-play-state: paused;
}

@keyframes finishes-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* each finish card — spacing via margin (NOT gap) so the
   -50% loop point lands perfectly with no jump/whitespace */
.finish-card {
  flex: 0 0 auto;
  width: 184px;
  margin-right: 16px;
  text-align: center;
  color: #14241b;
}
.finish-thumb {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #f4f6f4;
  border: 1px solid #e7ebe7;
  aspect-ratio: 4 / 3;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.finish-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.finish-card:hover .finish-thumb {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: 0 12px 26px rgba(20, 36, 27, 0.14);
}
.finish-name {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #14241b;
}
.finish-card:hover .finish-name {
  color: var(--green);
}

/* 7th box — explore button */
.finishes-explore {
  flex: 0 0 196px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 22px;
  border-radius: 14px;
  background: var(--green);
  color: #06160d;
  /* keep it aligned to the thumbnails (label sits below them) */
  align-self: flex-start;
  aspect-ratio: 4 / 3;
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}
.finishes-explore:hover {
  filter: brightness(1.06);
  transform: translateY(-4px);
  color: #06160d;
}
.finishes-explore-text {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.finishes-explore-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}
.finishes-explore-ico img {
  width: 18px;
  height: 18px;
  /* arrow -> white */
  filter: brightness(0) invert(1);
  transition: transform 0.2s ease;
}
.finishes-explore:hover .finishes-explore-ico img {
  transform: translateX(3px);
}

/* respect reduced-motion */

/* responsive */
