/* JOY Model Renkleri — product detail only.
   Contain the slider inside its grid cell, regardless of color count. */
/* Grid tracks must have a zero minimum; slider content must not set
   either column's min-content width. No gallery image rules are changed. */
.single-product .joy-single-product__gallery,
.single-product .joy-single-product__summary { min-width: 0; }
@media (min-width: 901px) {
  .single-product .joy-single-product__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  }
}
@media (max-width: 900px) {
  .single-product .joy-single-product__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.single-product .joy-model-colors {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 18px 0 22px;
}
.single-product .joy-model-colors__heading {
  margin: 0 0 12px;
  color: #111;
  font-size: 15px;
  font-weight: 600;
}
.single-product .joy-model-colors__rail {
  --joy-color-gap: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
/* Deliberately compact, like the supplied BayiJoy reference: exactly four
   whole 90 x 120 cards on desktop, with no fragment of the fifth card. */
.single-product .joy-model-colors__list {
  display: flex;
  flex: 0 1 384px; /* 4 * 90px + 3 * 8px */
  width: 384px;
  max-width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  gap: var(--joy-color-gap);
  box-sizing: border-box;
  padding: 2px 0 3px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.single-product .joy-model-colors__list::-webkit-scrollbar { display: none; }
.single-product .joy-model-colors__choice {
  position: relative;
  display: block;
  box-sizing: border-box;
  flex: 0 0 calc((100% - 3 * var(--joy-color-gap)) / 4);
  width: calc((100% - 3 * var(--joy-color-gap)) / 4);
  min-width: 0;
  aspect-ratio: 3 / 4;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e6eb;
  border-radius: 3px;
  overflow: hidden;
  background: #f8f8f8;
  color: #171717;
  cursor: pointer;
  scroll-snap-align: start;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.single-product .joy-model-colors__choice picture {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.single-product .joy-model-colors__choice img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
}
/* Names remain in title/aria-label but do not take layout space. */
.single-product .joy-model-colors__choice span { display: none; }
.single-product .joy-model-colors__choice.is-selected {
  border-color: #111;
  box-shadow: inset 0 0 0 1px #111;
}
.single-product .joy-model-colors__choice:hover { border-color: #555; }
.single-product .joy-model-colors__choice:focus-visible {
  outline: 2px solid #99602c;
  outline-offset: 2px;
}
.single-product .joy-model-colors.is-loading .joy-model-colors__choice { cursor: progress; }
.single-product .joy-model-colors__notice {
  margin: 2px 0 0;
  min-height: 0;
  color: #70645c;
  font-size: 12px;
}
.single-product .joy-model-colors__notice:empty { display: none; }
.single-product .joy-model-colors__arrow {
  display: inline-flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #99602c;
  cursor: pointer;
  font-size: 29px;
  line-height: 1;
}
.single-product .joy-model-colors__arrow:hover:not(:disabled) { background: #f5f1eb; }
.single-product .joy-model-colors__arrow:disabled { opacity: .28; cursor: default; }
.single-product .joy-model-colors__arrow:focus-visible {
  outline: 2px solid #99602c;
  outline-offset: 2px;
}
/* Existing mobile layout: swipeable single row, no page-wide overflow. */
@media (max-width: 900px) {
  .single-product .joy-model-colors__rail { --joy-color-gap: 8px; gap: 4px; }
  .single-product .joy-model-colors__list {
    flex: 1 1 0;
    width: 0;
    max-width: 100%;
  }
  .single-product .joy-model-colors__choice {
    flex: 0 0 80px;
    width: 80px;
    aspect-ratio: 3 / 4;
  }
  /* Preserve the previous mobile thumbnail cropping behavior. */
  .single-product .joy-model-colors__choice img { object-fit: contain; }
  .single-product .joy-model-colors__arrow { flex-basis: 20px; width: 20px; font-size: 26px; }
}
