@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css");

/* Natural ingredient hero: page-scoped classes only. */
.natural-ingredient-hero {
  --natural-ingredient-green: #315b47;
  --natural-ingredient-green-dark: #244938;
  --natural-ingredient-green-soft: #789276;
  --natural-ingredient-text: #30483b;
  --natural-ingredient-muted: #665f56;
  --natural-ingredient-line: rgba(73, 88, 74, 0.22);
  --natural-ingredient-white: #ffffff;

  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 620px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #faf7ee;
  background-image:
    linear-gradient(
      90deg,
      rgba(250, 247, 238, 0.96) 0%,
      rgba(250, 247, 238, 0.88) 38%,
      rgba(250, 247, 238, 0.18) 66%,
      rgba(250, 247, 238, 0) 100%
    ),
    url("../images/natural-mask-pc_result.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.natural-ingredient-content {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 72px 60px 64px;
}

.natural-ingredient-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  color: var(--natural-ingredient-green-soft);
  font-family: Arial, "Noto Sans Thai", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.natural-ingredient-title {
  max-width: 600px;
  margin: 0;
  color: var(--natural-ingredient-text);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  font-size: clamp(42px, 4vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.natural-ingredient-title span {
  display: block;
  margin-top: 2px;
  color: var(--natural-ingredient-green-soft);
}

.natural-ingredient-description {
  max-width: 570px;
  margin: 24px 0 30px;
  color: var(--natural-ingredient-muted);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
}

.natural-ingredient-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 42px;
}

.natural-ingredient-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.natural-ingredient-button i {
  font-size: 15px;
}

.natural-ingredient-button-primary {
  color: var(--natural-ingredient-white);
  background: var(--natural-ingredient-green);
  box-shadow: 0 8px 24px rgba(49, 91, 71, 0.18);
}

.natural-ingredient-button-secondary {
  border: 1px solid rgba(49, 91, 71, 0.55);
  color: var(--natural-ingredient-green);
  background: rgba(255, 255, 255, 0.72);
}

.natural-ingredient-button:hover {
  transform: translateY(-2px);
}

.natural-ingredient-button-primary:hover {
  background: var(--natural-ingredient-green-dark);
  box-shadow: 0 12px 30px rgba(49, 91, 71, 0.24);
}

.natural-ingredient-button-secondary:hover {
  background: rgba(255, 255, 255, 0.92);
}

.natural-ingredient-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  max-width: 650px;
  border-top: 1px solid var(--natural-ingredient-line);
}

.natural-ingredient-feature {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 72px;
  padding: 18px 18px 8px 0;
  border-right: 1px solid var(--natural-ingredient-line);
}

.natural-ingredient-feature:not(:first-child) {
  padding-left: 18px;
}

.natural-ingredient-feature:last-child {
  border-right: 0;
}

.natural-ingredient-feature > i {
  flex: 0 0 auto;
  margin-right: 10px;
  color: var(--natural-ingredient-green-soft);
  font-size: 23px;
}

.natural-ingredient-feature div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.natural-ingredient-feature strong {
  color: var(--natural-ingredient-text);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.natural-ingredient-feature span {
  color: var(--natural-ingredient-muted);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 1000px) {
  .natural-ingredient-hero {
    min-height: 580px;
    background-position: 58% center;
  }

  .natural-ingredient-content {
    padding: 64px 40px 56px;
  }

  .natural-ingredient-title {
    max-width: 520px;
    font-size: clamp(38px, 5vw, 52px);
  }

  .natural-ingredient-description {
    max-width: 500px;
    font-size: 16px;
  }

  .natural-ingredient-features {
    max-width: 590px;
  }
}

@media (max-width: 767px) {
  .natural-ingredient-hero {
    display: block;
    min-height: auto;
    aspect-ratio: auto;
    background-image:
      linear-gradient(
        180deg,
        rgba(250, 247, 238, 0) 0%,
        rgba(250, 247, 238, 0.04) 42%,
        rgba(250, 247, 238, 0.96) 54%,
        rgba(250, 247, 238, 1) 64%
      ),
      url("../images/natural-mask-mobile_result.webp");
    background-position: center top, center top;
    background-size: 100% 100%, 100% auto;
    background-repeat: no-repeat;
  }

  .natural-ingredient-content {
    width: 100%;
    padding: 390px 20px 34px;
  }

  .natural-ingredient-eyebrow {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 12px;
    font-size: 10px;
    letter-spacing: 0.19em;
  }

  .natural-ingredient-title {
    max-width: 100%;
    text-align: center;
    font-size: clamp(31px, 8.5vw, 40px);
    line-height: 1.18;
    letter-spacing: -0.02em;
  }

  .natural-ingredient-title span {
    margin-top: 3px;
  }

  .natural-ingredient-description {
    max-width: 100%;
    margin: 17px auto 24px;
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
  }

  .natural-ingredient-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-bottom: 30px;
  }

  .natural-ingredient-button {
    width: 100%;
    min-height: 50px;
    padding: 0 20px;
    font-size: 14px;
  }

  .natural-ingredient-features {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--natural-ingredient-line);
  }

  .natural-ingredient-feature {
    min-height: 72px;
    padding: 14px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--natural-ingredient-line);
  }

  .natural-ingredient-feature:nth-child(odd) {
    border-right: 1px solid var(--natural-ingredient-line);
  }

  .natural-ingredient-feature:nth-child(3),
  .natural-ingredient-feature:nth-child(4) {
    border-bottom: 0;
  }

  .natural-ingredient-feature:not(:first-child) {
    padding-left: 10px;
  }

  .natural-ingredient-feature > i {
    margin-right: 8px;
    font-size: 19px;
  }

  .natural-ingredient-feature strong {
    font-size: 10px;
  }

  .natural-ingredient-feature span {
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .natural-ingredient-content {
    padding: 350px 16px 28px;
  }

  .natural-ingredient-title {
    font-size: 29px;
  }

  .natural-ingredient-description {
    font-size: 13px;
  }

  .natural-ingredient-button {
    min-height: 48px;
    font-size: 13px;
  }

  .natural-ingredient-feature,
  .natural-ingredient-feature:not(:first-child) {
    padding-left: 7px;
    padding-right: 7px;
  }

  .natural-ingredient-feature > i {
    margin-right: 6px;
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .natural-ingredient-button {
    transition: none;
  }
}

.natural-ingredient-button:focus-visible {
  outline: 3px solid rgba(49, 91, 71, 0.35);
  outline-offset: 3px;
}

/* Natural ingredients landing page sections. */
.ni-page {
  --ni-ink: var(--navy, #0a1f44);
  --ni-muted: #5b6b82;
  --ni-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.55) 0%, rgba(248, 242, 234, 0.28) 100%);
  color: var(--ni-ink);
}

.natural-ingredient-home-section {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.natural-ingredient-home-section-recipes {
  background: rgba(255, 255, 255, 0.28);
}

.natural-ingredient-home-heading {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
}

.natural-ingredient-home-heading h2 {
  margin: 0.2rem 0 0.55rem;
  color: var(--ni-ink);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.natural-ingredient-home-heading > p:last-child {
  margin: 0;
  color: var(--ni-muted);
  line-height: 1.65;
}

.natural-ingredient-home-action {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.ni-archive-header {
  display: block !important;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2rem;
  text-align: center;
}

.ni-archive-header > div {
  width: 100%;
}

.ni-archive-header__title {
  margin: 0.2rem 0 0.8rem;
  color: var(--ni-ink);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.ni-archive-header__action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.58rem 1rem;
  border: 1px solid #315b47;
  border-radius: 999px;
  background: #f4f8f5;
  color: #315b47;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.ni-archive-header__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin: 0;
}

.ni-archive-footer-nav {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(49, 91, 71, 0.14);
}

.ni-archive-header__action .fa-circle-arrow-right,
.ni-archive-header__action .fa-circle-arrow-left,
.ni-folder-nav-link .fa-circle-arrow-right,
.ni-folder-nav-link .fa-circle-arrow-left,
.ni-pager__btn .fa-circle-arrow-right,
.ni-pager__btn .fa-circle-arrow-left,
.natural-ingredient-button .fa-circle-arrow-right,
.ni-crosslink-promo__cta .fa-circle-arrow-right {
  font-size: 0.82em;
  opacity: 0.78;
}

.ni-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.35rem 0 0.5rem;
}

.ni-pager__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(10, 31, 68, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ni-ink);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.ni-pager__btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.ni-pager__status {
  color: var(--ni-muted);
  font-size: 0.86rem;
}

.ni-crosslink-promo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  min-height: 18rem;
  margin: 0 0 1.35rem;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.35rem, 5vw, 3.5rem);
  border: 1px solid rgba(49, 91, 71, 0.42);
  border-radius: 16px;
  background: linear-gradient(135deg, #315b47, #183629);
  color: #fff;
  box-shadow: 0 12px 28px rgba(26, 59, 43, 0.16);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ni-crosslink-promo::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(18, 51, 36, 0.94), rgba(31, 73, 53, 0.68) 70%, rgba(20, 49, 36, 0.55));
}

.ni-crosslink-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(26, 59, 43, 0.24);
}

.ni-crosslink-promo__bg {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}

.ni-crosslink-promo__kicker,
.ni-crosslink-promo__title,
.ni-crosslink-promo__lead {
  display: block;
}

.ni-crosslink-promo__kicker {
  margin-bottom: 0.35rem;
  color: #cde3d5;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ni-crosslink-promo__title {
  margin-bottom: 0.4rem;
  color: #fff;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.ni-crosslink-promo__lead {
  max-width: 40rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ni-crosslink-promo__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: #315b47;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 750;
}

.ni-filter-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(49, 91, 71, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ni-ink);
  text-align: left;
  cursor: pointer;
}

.ni-filter-toggle__label {
  font-size: 0.92rem;
  font-weight: 700;
}

.ni-filter-toggle__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #315b47;
  white-space: nowrap;
}

.ni-filter-toggle__hint {
  font-size: 0.8rem;
  font-weight: 650;
}

.ni-filter-toggle__icon {
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.ni-filter.is-open .ni-filter-toggle__icon,
.ni-recipes-filter.is-open .ni-filter-toggle__icon {
  transform: rotate(180deg);
}

.ni-thumb-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
}

.ni-thumb-card {
  overflow: hidden;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-bottom: 0.8rem;
  border: 1px solid rgba(49, 91, 71, 0.12);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  box-shadow: 0 8px 22px rgba(41, 61, 51, 0.07);
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ni-thumb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 28px rgba(41, 61, 51, 0.12);
}

.ni-thumb-card__media {
  overflow: hidden;
  display: block;
  width: 100%;
  margin-bottom: 0.7rem;
  aspect-ratio: 1 / 1;
  background: #edf1ee;
}

.ni-thumb-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ni-thumb-card__thai,
.ni-thumb-card__english {
  overflow: hidden;
  padding-right: 0.45rem;
  padding-left: 0.45rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ni-thumb-card__thai {
  color: #2f483b;
  font-size: 0.88rem;
  font-weight: 700;
}

.ni-thumb-card__english {
  margin-top: 0.14rem;
  color: var(--ni-muted);
  font-size: 0.72rem;
}

/* Cover-led recipe cards — shared by recipe archive and home section */
.ni-recipe-grid.ni-recipe-grid--cover {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.ni-recipe-card.ni-recipe-card--cover {
  overflow: hidden;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(49, 91, 71, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(41, 61, 51, 0.08);
  backdrop-filter: none;
}

.ni-recipe-card.ni-recipe-card--cover:hover {
  border-color: rgba(49, 91, 71, 0.3);
  box-shadow: 0 18px 42px rgba(41, 61, 51, 0.14);
}

.ni-recipe-card--cover .ni-recipe-card__mark,
.ni-recipe-card--cover .ni-recipe-card__mark.ni-recipe-card__mark--cover {
  flex: none;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.ni-recipe-card--cover .ni-recipe-card__hook {
  right: 0.8rem;
  bottom: 0.75rem;
  left: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
}

.ni-recipe-card--cover .ni-recipe-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.95rem 1rem 1rem;
}

.ni-recipe-card--cover .ni-recipe-card__teaser {
  margin-bottom: 0;
}

.ni-folder-nav-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.05rem !important;
  border: 1px solid #315b47 !important;
  border-radius: 999px !important;
  background: #f4f8f5 !important;
  color: #315b47 !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.button-primary.ni-folder-nav-link {
  background: #315b47 !important;
  color: #fff !important;
}

.ni-folder-nav-link:hover {
  transform: translateY(-1px);
  background: #284c3b !important;
  color: #fff !important;
}

.natural-ingredient-home-empty {
  padding: 2rem 1rem;
  text-align: center;
}

.ni-glass,
.ni-mag-card,
.ni-recipe-card {
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: var(--ni-glass);
  box-shadow: 0 12px 30px rgba(61, 42, 31, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.ni-glass {
  border-radius: 14px;
}

.ni-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.35rem;
}

.ni-mag-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
}

.ni-mag-media {
  position: relative;
  display: block;
  height: 210px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(10, 31, 68, 0.08);
}

.ni-mag-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ni-mag-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(10, 31, 68, 0.35), transparent);
}

.ni-mag-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 1.15rem 1.2rem 1.3rem;
}

.ni-mag-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--lp-accent, #0f766e);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ni-mag-title {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.3;
}

.ni-mag-title a {
  color: var(--ni-ink);
  text-decoration: none;
}

.ni-mag-rule {
  width: 2.4rem;
  height: 2px;
  margin: 0.7rem 0 0.85rem;
  background: linear-gradient(90deg, var(--lp-accent, #0f766e), transparent);
}

.ni-mag-excerpt {
  display: -webkit-box;
  margin: 0 0 1rem;
  overflow: hidden;
  color: var(--ni-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ni-mag-link {
  align-self: flex-start;
  margin-top: auto;
  border-bottom: 1px solid rgba(10, 31, 68, 0.25);
  color: var(--ni-ink);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.ni-recipe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.ni-recipe-card {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border-radius: 1.15rem;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ni-recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(61, 42, 31, 0.12);
}

.ni-recipe-card__mark {
  position: relative;
  overflow: hidden;
  display: flex;
  flex: 0 0 4.25rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(160deg, #8b7355, #5c4a36);
}

.ni-recipe-card__mark.ni-recipe-card__mark--cover {
  align-items: stretch;
  justify-content: flex-start;
  flex-basis: 10rem;
  width: 10rem;
  min-height: 8.4rem;
  background: #1f2937;
}

.ni-recipe-card__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ni-recipe-card__mark--cover::after {
  position: absolute;
  inset: 34% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(12, 25, 20, 0.78));
  pointer-events: none;
}

.ni-recipe-card--tone-1 .ni-recipe-card__mark {
  background: linear-gradient(160deg, #6d7b63, #3f4a3a);
}

.ni-recipe-card--tone-2 .ni-recipe-card__mark {
  background: linear-gradient(160deg, #7a6b8a, #4a3f58);
}

.ni-recipe-card--tone-3 .ni-recipe-card__mark {
  background: linear-gradient(160deg, #6e858f, #3d5158);
}

.ni-recipe-card--tone-4 .ni-recipe-card__mark {
  background: linear-gradient(160deg, #9a6b4f, #5e3f2d);
}

.ni-recipe-card__num {
  position: absolute;
  z-index: 2;
  top: 0.4rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.ni-recipe-card__num .fa-flask {
  font-size: 0.72rem;
  opacity: 0.82;
}

.ni-recipe-card__num-value {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  line-height: 1;
}

.ni-recipe-card--cover .ni-recipe-card__num {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.58);
}

.ni-recipe-card--cover .ni-recipe-card__num .fa-flask {
  font-size: 0.9rem;
}

.ni-recipe-card--cover .ni-recipe-card__num-value {
  font-size: clamp(2.8rem, 5vw, 3.6rem);
}

.ni-recipe-card__glyph {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.ni-recipe-card__hook {
  position: absolute;
  z-index: 1;
  right: 0.6rem;
  bottom: 0.55rem;
  left: 0.6rem;
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
  line-clamp: 3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ni-recipe-card__body {
  flex: 1;
  min-width: 0;
}

.ni-recipe-card__meta {
  margin-bottom: 0.45rem;
}

.ni-recipe-pill {
  display: inline-block;
  padding: 0.28em 0.65em;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.ni-recipe-pill--ok {
  color: #1f6b3a;
  background: rgba(46, 160, 90, 0.14);
}

.ni-recipe-pill--warn {
  color: #9a3412;
  background: rgba(234, 88, 12, 0.14);
}

.ni-recipe-card__title {
  margin: 0 0 0.25rem;
  color: var(--ni-ink);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
}

.ni-recipe-card__sub {
  margin: 0 0 0.55rem;
  color: var(--ni-muted);
  font-size: 0.82rem;
}

.ni-recipe-card__teaser {
  display: -webkit-box;
  margin: 0 0 0.7rem;
  overflow: hidden;
  color: rgba(26, 36, 51, 0.72);
  font-size: 0.86rem;
  line-height: 1.5;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ni-recipe-card__cta {
  color: #a67c2d;
  font-size: 0.82rem;
  font-weight: 700;
}

@media (min-width: 720px) {
  .ni-recipe-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .ni-thumb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ni-recipe-grid.ni-recipe-grid--cover {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .ni-archive-header__actions {
    flex-wrap: nowrap;
    gap: 0.25rem;
    width: 100%;
  }

  .ni-archive-header__action {
    flex: 1 1 0;
    min-width: 0;
    min-height: 38px;
    gap: 0.22rem;
    padding: 0.45rem 0.3rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .ni-recipe-card__mark.ni-recipe-card__mark--cover {
    flex-basis: 8.4rem;
    width: 8.4rem;
    min-height: 7.1rem;
  }

  .natural-ingredient-home-section {
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }

  .ni-thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .ni-thumb-grid--mobile-6 > .ni-thumb-card:nth-child(n + 7) {
    display: none;
  }

  .ni-thumb-card__thai {
    font-size: 0.82rem;
  }

  .ni-recipe-grid.ni-recipe-grid--cover {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .ni-recipe-card.ni-recipe-card--cover {
    flex-direction: row;
    min-height: 10.25rem;
  }

  .ni-recipe-card--cover .ni-recipe-card__mark,
  .ni-recipe-card--cover .ni-recipe-card__mark.ni-recipe-card__mark--cover {
    align-self: stretch;
    flex: 0 0 42%;
    width: 42%;
    min-height: 10.25rem;
    aspect-ratio: auto;
  }

  .ni-recipe-card--cover .ni-recipe-card__body {
    justify-content: center;
    padding: 0.75rem 0.8rem;
  }

  .ni-recipe-card--cover .ni-recipe-card__hook {
    right: 0.55rem;
    bottom: 0.5rem;
    left: 0.55rem;
    font-size: 0.68rem;
    -webkit-line-clamp: 3;
  }

  .ni-recipe-card--cover .ni-recipe-card__sub {
    font-size: 0.74rem;
  }

  .ni-recipe-card--cover .ni-recipe-card__teaser {
    display: -webkit-box;
    margin: 0;
    font-size: 0.73rem;
    line-height: 1.5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
  }

  .ni-catalog-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .ni-mag-card {
    flex-direction: row;
    align-items: stretch;
    border-radius: 12px;
  }

  .ni-mag-media {
    width: 30%;
    max-width: 7.25rem;
    height: auto;
    min-height: 6.5rem;
  }

  .ni-mag-body {
    justify-content: center;
    padding: 0.75rem 0.85rem 0.8rem;
  }

  .ni-mag-title {
    font-size: 0.98rem;
  }

  .ni-mag-excerpt {
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    line-clamp: 2;
    -webkit-line-clamp: 2;
  }
}

/* Recipe builder ingredient picker */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ni-ingredient-picker__hint {
  margin: -0.35rem 0 0.85rem;
}

.ni-form-section--divided {
  padding-top: 1.1rem;
  border-top: 1px solid rgba(10, 31, 68, 0.09);
}

.ni-form-section__number {
  color: #315b47;
}

.ni-required {
  margin-left: 0.25rem;
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 700;
}

.ni-label__hint {
  margin-left: 0.3rem;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
}

.ni-ingredient-picker__label {
  margin-bottom: 0.75rem;
}

.ni-selected-panel {
  margin-bottom: 1rem;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
}

.ni-selected-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  color: #374151;
  font-size: 0.92rem;
  font-weight: 600;
}

.ni-selected-panel__sub {
  color: #6b7280;
  font-weight: 500;
}

.ni-selected-panel__count {
  color: #9ca3af;
  font-size: 0.95rem;
  font-weight: 600;
}

.ni-selected-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.ni-selected-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eef0f2;
}

.ni-recipe-readiness {
  margin: 0 auto 0 0;
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.4;
}

.ni-recipe-readiness.is-ready {
  color: #315b47;
  font-weight: 650;
}

.ni-slot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 64px;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
}

.ni-slot--filled {
  align-items: center;
}

.ni-slot--empty {
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  border-style: dashed;
  border-color: #d1d5db;
  background: #fafafa;
  color: #9ca3af;
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.ni-slot--empty:hover {
  border-color: #315b47;
  color: #315b47;
  background: rgba(49, 91, 71, 0.04);
}

.ni-slot__img {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
}

.ni-slot__img--empty {
  display: inline-block;
}

.ni-slot__text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
  flex: 1 1 auto;
}

.ni-slot__th {
  color: #1f2937;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ni-slot__en {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ni-slot__remove {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.ni-slot__remove:hover {
  color: #315b47;
  background: rgba(49, 91, 71, 0.08);
}

.ni-slot__plus {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
}

.ni-slot__empty-label {
  font-size: 0.78rem;
  font-weight: 500;
}

.ni-ingredient-search {
  position: relative;
  margin-bottom: 0.95rem;
}

.ni-ingredient-search[hidden] {
  display: none !important;
}

.ni-ingredient-search > .fa-magnifying-glass {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.95rem;
  pointer-events: none;
}

.ni-ingredient-search__input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.75rem 1rem 0.75rem 2.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  font-family: "Noto Sans Thai", Sarabun, Tahoma, sans-serif;
  font-size: 0.95rem;
  outline: none;
}

.ni-ingredient-search__input::placeholder {
  color: #9ca3af;
}

.ni-ingredient-search__input:focus {
  border-color: rgba(49, 91, 71, 0.45);
  box-shadow: 0 0 0 3px rgba(49, 91, 71, 0.1);
}

.ni-category-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
  padding: 0.1rem 0 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.ni-category-tile {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 6.4rem;
  min-height: 5.4rem;
  padding: 0.7rem 0.45rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ni-category-tile i {
  color: #315b47;
  font-size: 1.25rem;
  line-height: 1;
}

.ni-category-tile__label {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ni-category-tile__mark {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #315b47;
  box-shadow: 0 0 0 2px #fff;
}

.ni-category-tile__mark[hidden] {
  display: none;
}

.ni-category-tile.is-active {
  border-color: rgba(49, 91, 71, 0.45);
  background: rgba(49, 91, 71, 0.1);
  color: #315b47;
}

.ni-category-tile:hover {
  border-color: rgba(49, 91, 71, 0.35);
}

.ni-category-tile.has-selected:not(.is-active) {
  border-color: rgba(49, 91, 71, 0.22);
}

.ni-ingredient-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.85rem;
}

.ni-sort-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.ni-sort-control__select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 36px;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #4b5563;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.ni-sort-control > .fa-chevron-down {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.7rem;
  pointer-events: none;
}

.ni-ingredient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
}

.ni-ing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.7rem 0.45rem 0.75rem;
  border: 1px solid rgba(10, 31, 68, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ni-ing-card[hidden],
.ni-ing-card.is-filtered-out {
  display: none !important;
}

.ni-ing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(49, 91, 71, 0.35);
  box-shadow: 0 10px 22px rgba(61, 42, 31, 0.08);
}

.ni-ing-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ni-ing-card__media {
  display: block;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(10, 31, 68, 0.06);
}

.ni-ing-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ni-ing-card__name {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.4em;
  color: #30483b;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.3;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ni-ing-card__en {
  display: block;
  overflow: hidden;
  max-width: 100%;
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ni-ing-card__order {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  display: inline-flex;
  width: 1.45rem;
  height: 1.45rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #315b47;
  color: #fff;
  box-shadow: 0 2px 6px rgba(49, 91, 71, 0.25);
  font-size: 0.76rem;
  font-weight: 800;
}

.ni-ing-card__order[hidden] {
  display: none;
}

.ni-ing-card.is-selected {
  border-color: rgba(49, 91, 71, 0.55);
  background: rgba(49, 91, 71, 0.08);
  box-shadow: inset 0 0 0 1px rgba(49, 91, 71, 0.18);
}

.ni-ingredient-empty {
  margin: 0.75rem 0 0;
  text-align: center;
  color: var(--ni-muted, #5b6b82);
  font-size: 0.9rem;
}

.ni-result-cover {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0 0 1.1rem;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #e8eee9;
}

.ni-result-cover::after {
  position: absolute;
  inset: 45% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(16, 36, 27, 0.8));
  pointer-events: none;
}

.ni-result-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ni-result-cover figcaption {
  position: absolute;
  z-index: 1;
  right: clamp(0.9rem, 3vw, 1.5rem);
  bottom: clamp(0.8rem, 3vw, 1.35rem);
  left: clamp(0.9rem, 3vw, 1.5rem);
  max-width: 720px;
  color: #fff;
  font-size: clamp(1rem, 2.3vw, 1.5rem);
  font-weight: 750;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.ni-result-cover__num {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.58);
  pointer-events: none;
}

.ni-result-cover__num .fa-flask {
  font-size: 0.9rem;
  opacity: 0.82;
}

.ni-result-cover__num span {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 750;
  letter-spacing: 0.03em;
  line-height: 1;
}

.ni-picker-dialog {
  width: min(90vw, 390px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #1f2937;
}

.ni-picker-dialog::backdrop {
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(3px);
}

.ni-picker-dialog__content {
  position: relative;
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(17, 24, 39, 0.2);
  text-align: center;
}

.ni-picker-dialog__close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  font-size: 1.25rem;
  cursor: pointer;
}

.ni-picker-dialog__icon {
  margin-bottom: 0.65rem;
  color: #315b47;
  font-size: 1.65rem;
}

.ni-picker-dialog__title {
  margin: 0 0 0.4rem;
  color: #1f2937;
  font-size: 1.08rem;
}

.ni-picker-dialog__text {
  margin: 0 0 1rem;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.55;
}

.ni-picker-dialog__button {
  min-height: 38px;
  padding: 0.45rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #315b47;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

@media (min-width: 981px) {
  .ni-ingredient-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ni-selected-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .ni-selected-panel {
    padding: 0.85rem 0.85rem 0.95rem;
  }

  .ni-selected-panel__head {
    font-size: 0.84rem;
  }

  .ni-slot {
    min-height: 58px;
    padding: 0.45rem 0.5rem;
  }

  .ni-slot--filled {
    padding-right: 0.5rem;
  }

  .ni-slot__img {
    width: 38px;
    height: 38px;
  }

  .ni-slot__th {
    font-size: 0.8rem;
  }

  .ni-category-tile {
    width: auto;
    min-width: 0;
    min-height: 4.7rem;
    padding: 0.55rem 0.25rem;
  }

  .ni-category-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    overflow: visible;
    padding-bottom: 0.2rem;
  }

  .ni-category-tile__label {
    font-size: 0.64rem;
  }

  .ni-category-tile__mark {
    top: 0.3rem;
    right: 0.3rem;
  }

  .ni-selected-action {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .ni-selected-action .ni-analyze-btn {
    align-self: stretch;
    justify-content: center;
  }

  .ni-ingredient-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .ni-ing-card__media {
    width: 64px;
    height: 64px;
  }
}

