.cs-categories {
  --cs-cat-ink: #1a1510;
  --cs-cat-muted: #70655b;
  --cs-cat-accent: #74553a;
  --cs-cat-bg: #eee5d8;
  --cs-cat-surface: #fffaf3;
  --cs-cat-border: rgba(87, 63, 42, 0.16);
  position: relative;
  overflow: hidden;
  padding: 104px 0;
  background:
    radial-gradient(circle at 9% 11%, rgba(255, 255, 255, 0.28), transparent 29%),
    #eee5d8;
  color: var(--cs-cat-ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.cs-categories__inner {
  width: min(1312px, calc(100% - 112px));
  margin: 0 auto;
}

.cs-categories__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 46px;
}

.cs-categories__header h2 {
  margin: 0;
  color: var(--cs-cat-ink);
  font: 560 clamp(36px, 2.65vw, 40px) / 1.08 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: -0.045em;
}

.cs-categories__header p {
  margin: 13px 0 0;
  color: var(--cs-cat-muted);
  font: 440 15px / 1.55 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: -0.015em;
}

.cs-categories__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--cs-cat-ink);
  font: 610 13px / 1 "Plus Jakarta Sans", system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: color 190ms ease;
}

.cs-categories__all span {
  transition: transform 190ms ease;
}

.cs-categories__all:hover {
  color: var(--cs-cat-accent);
}

.cs-categories__all:hover span {
  transform: translateX(4px);
}

.cs-categories__all:focus-visible {
  outline: 2px solid var(--cs-cat-accent);
  outline-offset: 4px;
}

.cs-categories__quick {
  display: none;
}

.cs-categories__featured,
.cs-categories__supporting {
  display: grid;
  gap: 20px;
}

.cs-categories__featured {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cs-categories__supporting {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.cs-category-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--cs-cat-border);
  background: var(--cs-cat-surface);
  color: var(--cs-cat-ink);
  text-decoration: none;
  -webkit-user-drag: none;
  transition:
    border-color 200ms ease,
    background-color 90ms ease;
}

.cs-category-card--featured {
  grid-template-rows: 292px 126px;
  min-height: 418px;
  border-radius: 16px;
}

.cs-category-card--support {
  grid-template-rows: 240px 128px;
  min-height: 368px;
  border-radius: 14px;
}

.cs-category-card:hover {
  border-color: rgba(69, 48, 31, 0.4);
}

.cs-category-card:focus-visible {
  z-index: 2;
  outline: 2px solid #684a31;
  outline-offset: 3px;
  border-color: rgba(69, 48, 31, 0.48);
}

.cs-category-card:active {
  background: #f4ecdf;
  transition-duration: 80ms;
}

.cs-category-card__media {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #e6dacb;
}

.cs-category-card__media picture {
  display: contents;
}

.cs-category-card__fallback {
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255, 253, 249, 0.52), transparent 48%),
    linear-gradient(135deg, #e5dacb, #f3eade 55%, #ddd0bf);
}

.cs-category-card--cleanser .cs-category-card__fallback {
  background: linear-gradient(145deg, #f4f4ed, #e8eee6);
}

.cs-category-card--toner .cs-category-card__fallback {
  background: linear-gradient(145deg, #fff9d4, #fff1a8);
}

.cs-category-card--moisturizer .cs-category-card__fallback {
  background: linear-gradient(145deg, #fff3bd, #f7dc70);
}

.cs-category-card--mask .cs-category-card__fallback {
  background: linear-gradient(145deg, #fff4f5, #f2cfd4);
}

.cs-category-card__poster {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  -webkit-user-drag: none;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cs-category-card__media.is-loaded .cs-category-card__poster {
  opacity: 1;
}

.cs-category-card__media.is-error .cs-category-card__poster {
  display: none;
}

.cs-category-card--sunscreen .cs-category-card__poster {
  object-position: center 50%;
}

.cs-category-card--serum .cs-category-card__poster {
  object-fit: cover;
  object-position: center 28%;
}

.cs-category-card--cleanser .cs-category-card__poster {
  object-position: center 50%;
}

.cs-category-card--toner .cs-category-card__poster {
  object-position: center 48%;
}

.cs-category-card--moisturizer .cs-category-card__poster {
  object-position: center 44%;
}

.cs-category-card--mask .cs-category-card__poster {
  object-position: center 50%;
}

.cs-category-card:hover .cs-category-card__poster {
  transform: scale(1.015);
}

.cs-category-card:active .cs-category-card__poster {
  transform: scale(1);
}

.cs-category-card__body {
  position: relative;
  z-index: 3;
  display: grid;
  align-content: start;
  min-width: 0;
  background: rgba(255, 250, 243, 0.98);
}

.cs-category-card--featured .cs-category-card__body {
  padding: 17px 22px 16px;
}

.cs-category-card--support .cs-category-card__body {
  padding: 18px 18px 16px;
}

.cs-category-card__label {
  color: var(--cs-cat-accent);
  font: 720 9px / 1 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: 0.15em;
}

.cs-category-card__title {
  display: block;
  color: var(--cs-cat-ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 610;
  letter-spacing: -0.035em;
}

.cs-category-card--featured .cs-category-card__title {
  margin-top: 8px;
  font-size: 23px;
  line-height: 1.14;
}

.cs-category-card--support .cs-category-card__title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cs-category-card__copy {
  display: -webkit-box;
  overflow: hidden;
  color: var(--cs-cat-muted);
  font: 440 14px / 1.45 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: -0.012em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cs-category-card--featured .cs-category-card__copy {
  margin-top: 6px;
}

.cs-category-card--support .cs-category-card__copy {
  min-height: 36px;
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.42;
}

.cs-category-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 9px;
  color: #4c3d31;
  font: 630 13px / 1 "Plus Jakarta Sans", system-ui, sans-serif;
}

.cs-category-card__cta i {
  font-style: normal;
  transition: transform 190ms ease;
}

.cs-category-card__cta-mobile {
  display: none;
}

.cs-category-card:hover .cs-category-card__cta i,
.cs-category-card:focus-visible .cs-category-card__cta i {
  transform: translateX(4px);
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .cs-categories {
    padding: 100px 0;
  }

  .cs-categories__inner {
    width: calc(100% - 80px);
  }

  .cs-categories__supporting {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-category-card--support {
    grid-template-rows: 252px 126px;
    min-height: 378px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .cs-categories {
    padding: 96px 0;
  }

  .cs-categories__inner {
    width: calc(100% - 80px);
  }

  .cs-categories__header {
    align-items: flex-start;
  }

  .cs-categories__featured,
  .cs-categories__supporting {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-category-card--featured {
    grid-column: 1 / -1;
    grid-template-rows: 300px 126px;
    min-height: 426px;
  }

  .cs-category-card--support {
    grid-template-rows: 230px 128px;
    min-height: 358px;
  }
}

@media (max-width: 767px) {
  .cs-categories {
    padding: 64px 0 68px;
  }

  .cs-categories__inner {
    width: calc(100% - 32px);
  }

  .cs-categories__header {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
  }

  .cs-categories__header h2 {
    max-width: 10.25em;
    font-size: clamp(28px, 7.8vw, 32px);
    line-height: 1.1;
    letter-spacing: -0.04em;
  }

  .cs-categories__header p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
  }

  .cs-categories__all {
    width: fit-content;
    min-height: 44px;
    font-size: 13px;
  }

  .cs-categories__quick {
    display: block;
    width: 100%;
    margin: -2px 0 26px;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 3px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cs-categories__quick::-webkit-scrollbar {
    display: none;
  }

  .cs-categories__quick-list {
    display: flex;
    width: max-content;
    margin: 0;
    padding: 3px 3px 7px;
    gap: 9px;
    list-style: none;
  }

  .cs-categories__quick-list li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .cs-categories__quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid rgba(87, 63, 42, 0.19);
    border-radius: 999px;
    background: #fffaf3;
    color: var(--cs-cat-ink);
    font: 610 13px / 1 "Plus Jakarta Sans", system-ui, sans-serif;
    text-decoration: none;
    white-space: nowrap;
    transition:
      border-color 180ms ease,
      background-color 90ms ease;
  }

  .cs-categories__quick-link:focus-visible {
    outline: 2px solid #684a31;
    outline-offset: 1px;
    border-color: rgba(69, 48, 31, 0.48);
  }

  .cs-categories__quick-link:active {
    border-color: rgba(69, 48, 31, 0.36);
    background: #f2e8dc;
    transition-duration: 80ms;
  }

  .cs-categories__featured {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cs-categories__supporting {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 3.3vw, 14px);
    margin-top: 26px;
  }

  .cs-category-card--featured {
    grid-template-rows: clamp(218px, 64vw, 270px) minmax(150px, auto);
    min-height: 380px;
    border-radius: 15px;
  }

  .cs-category-card--support {
    grid-template-rows: clamp(160px, 43vw, 184px) minmax(136px, auto);
    min-height: 304px;
    border-radius: 13px;
  }

  .cs-category-card--featured .cs-category-card__body {
    padding: 17px 18px 16px;
  }

  .cs-category-card--support .cs-category-card__body {
    padding: 14px 13px 13px;
  }

  .cs-category-card__label {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .cs-category-card--featured .cs-category-card__title {
    margin-top: 8px;
    font-size: clamp(22px, 6.1vw, 25px);
  }

  .cs-category-card--featured .cs-category-card__copy {
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.42;
  }

  .cs-category-card--featured .cs-category-card__cta {
    margin-top: 10px;
    font-size: 13.5px;
  }

  .cs-category-card--support .cs-category-card__title {
    font-size: clamp(16px, 4.35vw, 18px);
    line-height: 1.2;
  }

  .cs-category-card--support .cs-category-card__copy {
    display: -webkit-box;
    min-height: 0;
    margin-top: 6px;
    font-size: clamp(12.5px, 3.3vw, 13.5px);
    line-height: 1.38;
    -webkit-line-clamp: 3;
  }

  .cs-category-card--support .cs-category-card__cta {
    min-width: 0;
    min-height: 24px;
    margin-top: 8px;
    gap: 5px;
    font-size: 13px;
  }

  .cs-category-card--support .cs-category-card__cta .cs-category-card__cta-full {
    display: none;
  }

  .cs-category-card--support .cs-category-card__cta .cs-category-card__cta-mobile {
    position: static;
    display: inline;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: nowrap;
  }

  .cs-category-card--support .cs-category-card__cta i {
    font-size: 14px;
  }

  .cs-category-card:hover .cs-category-card__poster,
  .cs-category-card:hover .cs-category-card__cta i {
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) and (max-width: 767px) {
  .cs-categories__quick-link:hover {
    border-color: rgba(69, 48, 31, 0.38);
  }
}

@media (max-width: 340px) {
  .cs-categories__supporting {
    gap: 12px;
  }

  .cs-category-card--support {
    grid-template-rows: 156px minmax(148px, auto);
    min-height: 304px;
  }
}

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

  .cs-category-card:hover .cs-category-card__poster,
  .cs-category-card:hover .cs-category-card__cta i,
  .cs-categories__all:hover span {
    transform: none;
  }
}
