.collection-you-may-also-like-section {
  --ymay-gap: 20px;
  --ymay-accent: 53, 81, 61;
  --ymay-progress-height: 3px;
  --ymay-progress: 0.2;
}

.collection-you-may-also-like {
  position: relative;
}

.collection-you-may-also-like__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-block-end: 24px;
  padding-inline-end: 104px;
}

.collection-you-may-also-like__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 46rem;
}

.collection-you-may-also-like__heading {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 700;
  line-height: 1.15;
}

.collection-you-may-also-like__description {
  max-width: 46ch;
  color: #767984;
  font-size: 16px;
  line-height: 1.5;
}

.collection-you-may-also-like__description :where(p) {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Mobile-only arrows / progress — desktop uses carousel arrows in header */
.collection-you-may-also-like__arrows {
  display: none;
}

.collection-you-may-also-like__progress {
  display: none;
}

.collection-you-may-also-like__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgb(var(--color-text) / 0.35);
  border-radius: 50%;
  background: #fff;
  color: rgb(var(--color-text));
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.collection-you-may-also-like__arrow:not([disabled]):hover {
  border-color: #111;
  background: #111;
  color: #fff;
}

.collection-you-may-also-like__arrow[disabled] {
  opacity: 0.35;
  cursor: default;
}

.collection-you-may-also-like__carousel {
  position: relative;
}

.collection-you-may-also-like__carousel .product-list__track.card-grid {
  --column-gap: var(--ymay-gap);
  --row-gap: var(--ymay-gap);
}

/* Pull carousel arrows into the header top-right — match homepage module arrows */
@media (min-width: 960px) {
  .collection-you-may-also-like__carousel .product-list__theme-carousel > div:has(.carousel-indicator__arrows) {
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    justify-content: flex-end;
  }

  .collection-you-may-also-like__carousel .carousel-indicator__arrows {
    position: absolute;
    inset-block-start: -72px;
    inset-inline-end: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto;
    margin-block-start: 0;
    visibility: visible;
  }

  .collection-you-may-also-like__carousel .carousel-indicator__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    opacity: 1;
    border: 1px solid rgb(var(--color-text) / 0.35);
    border-radius: 50%;
    background: #fff;
    color: rgb(var(--color-text));
    box-shadow: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  }

  .collection-you-may-also-like__carousel .carousel-indicator__arrow::before,
  .collection-you-may-also-like__carousel .carousel-indicator__arrow::after {
    content: none;
  }

  .collection-you-may-also-like__carousel .carousel-indicator__arrow:not([disabled]):hover {
    opacity: 1;
    border-color: #111;
    background: #111;
    color: #fff;
  }

  .collection-you-may-also-like__carousel .carousel-indicator__arrow[disabled] {
    opacity: 0.35;
    cursor: default;
  }
}

@media (max-width: 959px) {
  .collection-you-may-also-like {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .collection-you-may-also-like__header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-block-end: 0;
    padding-inline-end: 0;
  }

  .collection-you-may-also-like__intro {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .collection-you-may-also-like__heading {
    font-size: 22px;
  }

  .collection-you-may-also-like__description {
    max-width: none;
    font-size: 14px;
  }

  /* Row 3: arrows, right-aligned */
  .collection-you-may-also-like__arrows {
    display: flex;
    align-self: flex-end;
    align-items: center;
    gap: 10px;
  }

  /* Keep carousel inside page width — no side peek */
  .collection-you-may-also-like__carousel {
    overflow: hidden;
  }

  .collection-you-may-also-like__carousel .mobile\:product-list__theme-carousel .product-list__track,
  .collection-you-may-also-like__carousel .product-list__track.card-grid {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
    scroll-padding-inline: 0;
    --mobile-columns: 2;
    --mobile-gap-columns: 2;
    --mobile-columns-alt: 2;
    --mobile-gap-columns-alt: 2;
    --column-gap: var(--ymay-gap);
    --row-gap: var(--ymay-gap);
    --column-width: calc((100% - var(--column-gap) * (2 - 1)) / 2);
  }

  .collection-you-may-also-like__progress {
    display: block;
    position: relative;
    width: 100%;
    height: var(--ymay-progress-height);
    margin-block-start: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: transparent;
  }

  .collection-you-may-also-like__progress-track,
  .collection-you-may-also-like__progress-bar {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    display: block;
    border-radius: inherit;
  }

  .collection-you-may-also-like__progress-track {
    inset-inline-end: 0;
    background-color: rgb(var(--color-text) / 0.18);
  }

  .collection-you-may-also-like__progress-bar {
    width: calc(var(--ymay-progress, 0.2) * 100%);
    max-width: 100%;
    background-color: rgb(var(--ymay-accent));
    transition: width 0.2s ease-out;
  }
}
