:root {
  --kkb-ih-accent: #009dcc;
  --kkb-ih-heading: #111111;
  --kkb-ih-muted: #66727a;
  --kkb-ih-card-bg: #ffffff;
  --kkb-ih-page-bg: #f7fbfd;
  --kkb-ih-title-size: 52px;
  --kkb-ih-intro-size: 18px;
  --kkb-ih-name-size: 24px;
  --kkb-ih-body-size: 17px;
  --kkb-ih-columns: 5;
  --kkb-ih-radius: 14px;
}

.kkb-ingredient-definition,
.kkb-ih-alias-anchor {
  scroll-margin-top: 130px;
}

.kkb-ingredient-hub-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.kkb-ingredient-hub-link:hover,
.kkb-ingredient-hub-link:focus-visible {
  color: var(--kkb-ih-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kkb-ingredient-definition.kkb-ingredient-target-active,
.kkb-ingredient-definition:target {
  border-color: var(--kkb-ih-accent);
  box-shadow: 0 0 0 3px rgba(0,157,204,.16), 0 15px 34px rgba(25,45,58,.12);
}

/* Kumkang-owned Ingredients page */
.kkb-ingredient-hub-page {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 0 44px;
  box-sizing: border-box;
  background: #fff;
}

body .kkb-ingredient-hub-page .kkb-ingredients-directory {
  float: none;
  clear: both;
}

.kkb-ingredients-directory {
  width: calc(100% - 48px);
  max-width: 1760px;
  margin: 0 auto;
  padding: 28px 30px 34px;
  border-radius: calc(var(--kkb-ih-radius) + 6px);
  background: var(--kkb-ih-page-bg);
  box-sizing: border-box;
  color: #1a1f22;
}

.kkb-ingredients-directory__controls {
  position: relative;
  z-index: 40;
  margin: -28px -30px 24px;
  padding: 28px 30px 0;
  border-radius: calc(var(--kkb-ih-radius) + 6px) calc(var(--kkb-ih-radius) + 6px) 0 0;
  background: var(--kkb-ih-page-bg);
}

.kkb-ingredients-directory--sticky .kkb-ingredients-directory__controls {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: var(--kkb-ih-sticky-offset, 0px) !important;
  z-index: 999 !important;
  box-shadow: 0 12px 24px rgba(21, 56, 72, .10);
  isolation: isolate;
}

.kkb-ingredients-directory--sticky .kkb-ingredients-directory__controls::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: rgba(15,48,63,.08);
}

.kkb-ingredients-directory__hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(320px,520px);
  gap: 32px;
  align-items: end;
  padding: 0 0 24px;
  border-bottom: 1px solid rgba(15,48,63,.10);
}

.kkb-ingredients-directory__title {
  margin: 0 0 10px !important;
  color: var(--kkb-ih-heading) !important;
  font-size: var(--kkb-ih-title-size) !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em;
}

.kkb-ingredients-directory__intro {
  max-width: 760px;
  margin: 0 !important;
  color: var(--kkb-ih-muted) !important;
  font-size: var(--kkb-ih-intro-size) !important;
  line-height: 1.65 !important;
}

.kkb-ingredients-directory__search {
  position: relative;
  margin: 0;
}

.kkb-ingredients-directory__search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--kkb-ih-accent);
  font-size: 21px;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.kkb-ingredients-directory__search input[type="search"] {
  display: block;
  width: 100% !important;
  min-height: 50px;
  margin: 0 !important;
  padding: 11px 16px 11px 46px !important;
  border: 1px solid rgba(15,48,63,.14) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #1a1f22 !important;
  font-size: 15px !important;
  box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(30,80,100,.05);
}

.kkb-ingredients-directory__search input[type="search"]:focus {
  border-color: var(--kkb-ih-accent) !important;
  outline: 3px solid rgba(0,157,204,.13) !important;
  outline-offset: 1px;
}

.kkb-ingredients-directory__az {
  margin: 18px 0 0;
  padding-bottom: 22px;
}

.kkb-ingredients-directory__az-label {
  display: block;
  margin: 0 0 9px;
  color: var(--kkb-ih-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kkb-ingredients-directory__az-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.kkb-ingredients-directory__az button,
.kkb-ingredients-directory__az span[aria-disabled="true"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  margin: 0 !important;
  padding: 0 10px !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15,48,63,.10) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--kkb-ih-heading) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  box-sizing: border-box;
  box-shadow: none !important;
  cursor: pointer;
}

.kkb-ingredients-directory__az button:first-child {
  min-width: 48px;
}

.kkb-ingredients-directory__az span[aria-disabled="true"] {
  opacity: .28;
  cursor: default;
}

.kkb-ingredients-directory__az button:hover,
.kkb-ingredients-directory__az button:focus-visible,
.kkb-ingredients-directory__az button.is-active {
  border-color: var(--kkb-ih-accent) !important;
  background: var(--kkb-ih-accent) !important;
  color: #fff !important;
}

.kkb-ingredients-directory__grid {
  display: grid !important;
  grid-template-columns: repeat(var(--kkb-ih-columns), minmax(0,1fr)) !important;
  grid-auto-rows: 1fr !important;
  gap: 16px !important;
  align-items: stretch !important;
  width: 100%;
}

.kkb-ingredient-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 18px 17px;
  overflow: hidden;
  border: 1px solid rgba(15,48,63,.09);
  border-radius: var(--kkb-ih-radius);
  background: var(--kkb-ih-card-bg);
  box-sizing: border-box;
  box-shadow: 0 8px 22px rgba(24,70,91,.055);
}

.kkb-ingredient-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--kkb-ih-accent);
  opacity: .78;
}

.kkb-ingredient-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.kkb-ingredient-card h2 {
  margin: 0 !important;
  color: var(--kkb-ih-heading) !important;
  font-size: var(--kkb-ih-name-size) !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em;
}

.kkb-ingredient-card__anchor {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--kkb-ih-muted);
  text-decoration: none;
  font-size: 12px;
  opacity: .45;
}

.kkb-ingredient-card__anchor:hover,
.kkb-ingredient-card__anchor:focus-visible {
  background: rgba(0,157,204,.08);
  color: var(--kkb-ih-accent);
  opacity: 1;
}

.kkb-ingredient-card__aliases {
  margin: 5px 0 0 !important;
  color: var(--kkb-ih-muted) !important;
  font-size: max(13px, calc(var(--kkb-ih-body-size) - 3px)) !important;
  line-height: 1.4 !important;
}

.kkb-ingredient-card__aliases span {
  font-weight: 700;
}

.kkb-ingredient-card__label {
  display: block;
  margin-bottom: 7px;
  color: var(--kkb-ih-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.kkb-ingredient-card__best-for,
.kkb-ingredient-card__what {
  margin-top: 14px;
}

.kkb-ingredient-card__products {
  margin-top: auto;
  padding-top: 14px;
}

.kkb-ingredient-card__pills,
.kkb-ingredient-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kkb-ingredient-card__pills span {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid rgba(0,157,204,.18);
  border-radius: 999px;
  background: rgba(0,157,204,.05);
  color: #274b5b;
  font-size: max(12px, calc(var(--kkb-ih-body-size) - 3px));
  line-height: 1.2;
}

.kkb-ingredient-card__description,
.kkb-ingredient-card__description p {
  margin: 0 !important;
  color: #293136 !important;
  font-size: var(--kkb-ih-body-size) !important;
  line-height: 1.58 !important;
}

.kkb-ingredient-card__description p + p {
  margin-top: .55em !important;
}

.kkb-ingredient-card__tags {
  margin-top: 13px;
}

.kkb-ingredient-card__tags span {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 7px;
  background: #eef5f8;
  color: #365969;
  font-size: max(12px, calc(var(--kkb-ih-body-size) - 3px));
  font-weight: 650;
  line-height: 1.2;
}

/* Related product design deliberately kept simple until the final product-card design is chosen. */
.kkb-ingredient-card__product-list {
  display: grid;
  gap: 6px;
}

.kkb-ingredient-card__product {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border: 1px solid rgba(15,48,63,.08);
  border-radius: 9px;
  background: #fff;
  color: var(--kkb-ih-heading);
  text-decoration: none;
  box-sizing: border-box;
}

.kkb-ingredient-card__product:hover,
.kkb-ingredient-card__product:focus-visible {
  border-color: rgba(0,157,204,.45);
  color: var(--kkb-ih-accent);
}

.kkb-ingredient-card__product img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 7px;
  object-fit: cover;
  background: #f5f7f8;
}

.kkb-ingredient-card__product span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: max(12px, calc(var(--kkb-ih-body-size) - 3px));
  font-weight: 650;
  line-height: 1.25;
}

.kkb-ingredients-directory__empty {
  margin: 18px 0 0;
  padding: 16px 18px;
  border-radius: var(--kkb-ih-radius);
  background: #fff;
  color: var(--kkb-ih-muted);
}

.kkb-brand-ingredients__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.kkb-ingredient-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(0,157,204,.3);
  border-radius: 999px;
  text-decoration: none;
  line-height: 1.2;
}

.kkb-ingredient-chip:hover,
.kkb-ingredient-chip:focus-visible {
  border-color: var(--kkb-ih-accent);
  color: var(--kkb-ih-accent);
}

.kkb-ih-alias-anchor {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.kkb-ingredients-directory [hidden] {
  display: none !important;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

@media (max-width: 1280px) {
  .kkb-ingredients-directory__grid {
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  }
}

@media (max-width: 920px) {
  .kkb-ingredient-hub-page {
    padding-top: 20px;
  }

  .kkb-ingredients-directory {
    width: calc(100% - 28px);
    padding: 24px 20px 28px;
  }

  .kkb-ingredients-directory__hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 700px) {
  .kkb-ingredients-directory__controls {
    margin: -20px -16px 18px;
    padding: 20px 16px 0;
  }


  .kkb-ingredient-definition,
  .kkb-ih-alias-anchor {
    scroll-margin-top: 100px;
  }

  .kkb-ingredient-hub-page {
    padding: 12px 0 24px;
  }

  .kkb-ingredients-directory {
    width: calc(100% - 14px);
    padding: 17px 10px 22px;
    border-radius: 14px;
  }

  .kkb-ingredients-directory__title {
    font-size: max(32px, calc(var(--kkb-ih-title-size) - 14px)) !important;
  }

  .kkb-ingredients-directory__intro {
    font-size: max(14px, calc(var(--kkb-ih-intro-size) - 2px)) !important;
  }

  .kkb-ingredients-directory__az {
    margin: 15px 0 18px;
  }

  .kkb-ingredients-directory__az-links {
    gap: 5px;
  }

  .kkb-ingredients-directory__az button,
  .kkb-ingredients-directory__az span[aria-disabled="true"] {
    min-width: 31px;
    height: 31px;
    padding: 0 8px !important;
    font-size: 12px !important;
  }

  .kkb-ingredients-directory__grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 9px !important;
  }

  .kkb-ingredient-card {
    padding: 13px 11px;
    border-radius: 10px;
  }

  .kkb-ingredient-card h2 {
    font-size: max(17px, calc(var(--kkb-ih-name-size) - 5px)) !important;
  }

  .kkb-ingredient-card__description,
  .kkb-ingredient-card__description p {
    font-size: max(13px, calc(var(--kkb-ih-body-size) - 2px)) !important;
    line-height: 1.48 !important;
  }

  .kkb-ingredient-card__anchor {
    display: none;
  }

  .kkb-ingredient-card__product img {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
}


/* v1.4.9 — sticky controls, skin filtering and equal-height grid. */
.kkb-ingredient-hub-page,
.kkb-ingredients-directory {
  overflow: visible !important;
}

.kkb-ingredients-directory__tools {
  display: grid;
  grid-template-columns: minmax(280px,1fr) minmax(210px,280px);
  gap: 12px;
  align-items: end;
}

.kkb-ingredients-directory__skin-filter {
  display: grid;
  gap: 5px;
}

.kkb-ingredients-directory__skin-filter label {
  color: var(--kkb-ih-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.kkb-ingredients-directory__skin-filter select {
  display: block;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 10px 38px 10px 14px;
  border: 1px solid rgba(15,48,63,.14);
  border-radius: 999px;
  background: #fff;
  color: #1a1f22;
  font-size: 14px;
  box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(30,80,100,.05);
}

.kkb-ingredients-directory__skin-filter select:focus {
  border-color: var(--kkb-ih-accent);
  outline: 3px solid rgba(0,157,204,.13);
  outline-offset: 1px;
}

@media (max-width: 920px) {
  .kkb-ingredients-directory__tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .kkb-ingredients-directory__skin-filter select {
    min-height: 44px;
  }
}
