.ojcc {
  --ojcc-ink: #211b18;
  --ojcc-muted: #776e68;
  --ojcc-line: #ded8d2;
  --ojcc-surface: #f3f0ec;
  --ojcc-button: #2a2522;
  --ojcc-button-hover: #4a3f38;
  --ojcc-gap: clamp(0.875rem, 1.5vw, 1.375rem);
  --ojcc-visible: 4;
  margin: clamp(2rem, 4vw, 4rem) 0 clamp(1.5rem, 3vw, 3rem);
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(1.75rem, 3vw, 2.75rem);
  border-block: 1px solid var(--ojcc-line);
  color: var(--ojcc-ink);
}

.ojcc[data-columns="2"] { --ojcc-visible: 2; }
.ojcc[data-columns="3"] { --ojcc-visible: 3; }
.ojcc[data-columns="5"] { --ojcc-visible: 5; }
.ojcc[data-columns="6"] { --ojcc-visible: 6; }

.ojcc *,
.ojcc *::before,
.ojcc *::after {
  box-sizing: border-box;
}

.ojcc__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(1.25rem, 2vw, 1.75rem);
}

.ojcc__heading {
  max-width: 42rem;
}

.ojcc__title {
  margin: 0;
  color: var(--ojcc-ink);
  font-size: clamp(1.625rem, 2.25vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.ojcc__lead {
  max-width: 54ch;
  margin: 0.5rem 0 0;
  color: var(--ojcc-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.ojcc__nav {
  display: none;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.ojcc--enhanced .ojcc__nav {
  display: flex;
}

.ojcc__nav-button {
  display: grid;
  width: 2.625rem;
  height: 2.625rem;
  min-width: 2.625rem;
  min-height: 2.625rem;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid var(--ojcc-line);
  border-radius: 50%;
  background: transparent;
  color: var(--ojcc-ink);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.ojcc__nav-button svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.ojcc__nav-button:hover:not(:disabled) {
  border-color: var(--ojcc-ink);
  background: var(--ojcc-ink);
  color: #fff;
}

.ojcc__nav-button:active:not(:disabled) {
  transform: scale(0.96);
}

.ojcc__nav-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.ojcc__nav-button:focus-visible,
.ojcc__rail:focus-visible,
.ojcc a:focus-visible,
.ojcc button:focus-visible,
.ojcc input:focus-visible {
  outline: 2px solid var(--ojcc-ink);
  outline-offset: 3px;
}

.ojcc__rail {
  display: grid;
  grid-auto-columns: calc((100% - (var(--ojcc-visible) - 1) * var(--ojcc-gap)) / var(--ojcc-visible));
  grid-auto-flow: column;
  gap: var(--ojcc-gap);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 0.125rem 0.375rem;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.ojcc__rail::-webkit-scrollbar {
  display: none;
}

.ojcc__product {
  display: flex;
  min-width: 0;
  flex-direction: column;
  scroll-snap-align: start;
}

.ojcc__image-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 0.25rem;
  background: var(--ojcc-surface);
}

.ojcc__image {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ojcc__image-link:hover .ojcc__image {
  transform: scale(1.025);
}

.ojcc__details {
  padding: 0.875rem 0.125rem 0;
}

.ojcc__name {
  min-height: 2.7em;
  margin: 0;
  overflow: hidden;
  color: var(--ojcc-ink);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ojcc__name a {
  color: inherit;
  text-decoration: none;
}

.ojcc__name a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.ojcc__price {
  margin-top: 0.375rem;
  color: var(--ojcc-ink);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.4;
}

.ojcc__price del {
  margin-right: 0.3em;
  color: var(--ojcc-muted);
  font-weight: 400;
  opacity: 0.7;
}

.ojcc__price ins {
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.ojcc__purchase {
  margin-top: auto;
  padding-top: 0.875rem;
}

.ojcc__form {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0;
}

.ojcc .quantity.buttons_added {
  display: grid;
  width: 6.75rem;
  min-width: 6.75rem;
  height: 2.625rem;
  grid-template-columns: 2rem 2.75rem 2rem;
  align-items: stretch;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ojcc-line);
  border-radius: 0.25rem;
  background: transparent;
}

.ojcc .quantity.buttons_added > input[type="button"] {
  width: 2rem;
  min-width: 2rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ojcc-ink);
  font-size: 1rem;
  line-height: 1;
  transition: background-color 160ms ease;
}

.ojcc .quantity.buttons_added > input[type="button"]:hover {
  background: var(--ojcc-surface);
}

.ojcc .quantity.buttons_added > input[type="number"] {
  width: 2.75rem;
  min-width: 2.75rem;
  max-width: 2.75rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: var(--ojcc-ink);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.ojcc .quantity.buttons_added > input[type="number"]::-webkit-inner-spin-button,
.ojcc .quantity.buttons_added > input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.ojcc .quantity.buttons_added > label.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ojcc .ojcc__button.button {
  display: inline-flex;
  min-width: 0;
  min-height: 2.625rem;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--ojcc-button);
  border-radius: 0.25rem;
  background: var(--ojcc-button);
  box-shadow: none;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.ojcc .ojcc__button.button:hover {
  border-color: var(--ojcc-button-hover);
  background: var(--ojcc-button-hover);
  color: #fff;
}

.ojcc .ojcc__button.button:active {
  transform: translateY(1px);
}

.ojcc .ojcc__button.button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.ojcc__button-icon {
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 400;
  line-height: 0.8;
}

.ojcc__button.is-loading .ojcc__button-icon {
  width: 0.875rem;
  height: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  font-size: 0;
  animation: ojcc-spin 700ms linear infinite;
}

.ojcc .ojcc__button--choose.button {
  width: 100%;
}

@keyframes ojcc-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 64rem) {
  .ojcc {
    --ojcc-visible: 2.25;
  }
}

@media (max-width: 40rem) {
  .ojcc {
    --ojcc-visible: 1.4;
    margin-top: 2rem;
    padding-block: 1.5rem 1.75rem;
  }

  .ojcc__header {
    align-items: flex-start;
    gap: 1rem;
  }

  .ojcc__title {
    font-size: 1.5rem;
  }

  .ojcc__lead {
    margin-top: 0.375rem;
    font-size: 0.875rem;
  }

  .ojcc--enhanced .ojcc__nav {
    display: none;
  }

  .ojcc__rail {
    margin-right: calc(clamp(1rem, 4vw, 1.5rem) * -1);
    padding-right: clamp(1rem, 4vw, 1.5rem);
  }
}

@media (max-width: 24rem) {
  .ojcc {
    --ojcc-visible: 1.2;
  }

  .ojcc__form {
    flex-wrap: wrap;
  }

  .ojcc .quantity.buttons_added,
  .ojcc .ojcc__button.button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ojcc *,
  .ojcc *::before,
  .ojcc *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
