/* Palette mirrors packages/widget/src/styles.ts so the shop feels like the
   same product as the SkinCareBot widget. */
:root {
  --scw-primary: #6f8f6b;
  --scw-primary-hover: #5f7d5c;
  --scw-primary-contrast: #ffffff;
  --scw-accent: #cf8f6d;
  --scw-bg: #ffffff;
  --scw-surface: #f6f4ef;
  --scw-border: #e4e0d6;
  --scw-text: #2c2a24;
  --scw-text-muted: #726d61;
  --scw-radius: 16px;
  --scw-shadow: 0 1px 2px rgba(44, 42, 36, 0.04), 0 8px 24px rgba(44, 42, 36, 0.06);
  --scw-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--scw-font);
  color: var(--scw-text);
  background: var(--scw-bg);
  line-height: 1.45;
}

/* Links default to the site green instead of the browser blue; class rules below override this. */
a {
  color: var(--scw-primary);
}

/* Header */
.scw-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--scw-bg);
  border-bottom: 1px solid var(--scw-border);
}
.scw-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.scw-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 18px;
  color: var(--scw-text);
  text-decoration: none;
  white-space: nowrap;
}
.scw-logo-mark {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}
.scw-logo-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}
.scw-logo-slogan {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--scw-text-muted);
  white-space: nowrap;
}
.scw-logo-text span {
  color: var(--scw-primary);
}
.scw-search {
  flex: 1;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}
.scw-search-icon {
  position: absolute;
  left: 12px;
  color: var(--scw-text-muted);
  pointer-events: none;
}
.scw-search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 10px;
  border: 1px solid var(--scw-border);
  background: var(--scw-surface);
  font-size: 14px;
  color: var(--scw-text);
  font-family: var(--scw-font);
}
.scw-search input:focus {
  outline: 2px solid var(--scw-primary);
  outline-offset: -1px;
  background: var(--scw-bg);
}

/* Shell */
.scw-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}

/* Sidebar */
.scw-sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.scw-filter-group h2,
.scw-filter-group h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--scw-text-muted);
}
.scw-chip-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scw-chip {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--scw-text);
  font-size: 13.5px;
  cursor: pointer;
  font-family: var(--scw-font);
}
.scw-chip:hover {
  background: var(--scw-surface);
}
.scw-chip[data-active="true"] {
  background: var(--scw-primary);
  color: var(--scw-primary-contrast);
  font-weight: 600;
}
.scw-chip .scw-count {
  float: right;
  color: inherit;
  opacity: 0.65;
  font-weight: 400;
}

.scw-check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}
.scw-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}
.scw-static-brand-link {
  color: var(--scw-text);
  text-decoration: none;
}
.scw-check-item input {
  accent-color: var(--scw-primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.scw-check-item .scw-count {
  margin-left: auto;
  color: var(--scw-text-muted);
  font-size: 12px;
}

.scw-clear-btn {
  align-self: flex-start;
  border: 1px solid var(--scw-border);
  background: var(--scw-bg);
  color: var(--scw-text-muted);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--scw-font);
}
.scw-clear-btn:hover {
  border-color: var(--scw-primary);
  color: var(--scw-primary);
}

/* Main */
.scw-main {
  min-width: 0;
}
.scw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.scw-result-count {
  margin-right: auto;
  font-size: 13.5px;
  color: var(--scw-text-muted);
}
.scw-select {
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--scw-border);
  background: var(--scw-bg);
  font-size: 13px;
  color: var(--scw-text);
  font-family: var(--scw-font);
}

.scw-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.scw-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--scw-surface);
  border: 1px solid var(--scw-border);
  border-radius: 999px;
  padding: 5px 6px 5px 12px;
  font-size: 12.5px;
  color: var(--scw-text);
}
.scw-active-filter button {
  border: none;
  background: var(--scw-border);
  color: var(--scw-text);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Grid */
.scw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.scw-card {
  background: var(--scw-bg);
  border: 1px solid var(--scw-border);
  border-radius: var(--scw-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.scw-card:hover {
  box-shadow: var(--scw-shadow);
  transform: translateY(-2px);
}
.scw-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: var(--scw-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--scw-text-muted);
  font-size: 12px;
}
.scw-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.scw-card-brand {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--scw-accent);
}
/* Popup-only: the brand name as a link to the shop filtered to that brand
   (the plain .scw-card-brand div above still renders when the brand's
   region is disabled). */
a.scw-brand-link {
  width: fit-content;
  text-decoration: none;
  cursor: pointer;
}
a.scw-brand-link span {
  display: inline-block;
  transition: transform 0.15s ease;
}
a.scw-brand-link:hover,
a.scw-brand-link:focus-visible {
  text-decoration: underline;
}
a.scw-brand-link:hover span,
a.scw-brand-link:focus-visible span {
  transform: translateX(2px);
}
a.scw-brand-link:focus-visible {
  outline: 2px solid var(--scw-accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.scw-card-name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--scw-text);
  margin: 0;
}

/* Image + brand + name: one button opening the detail popup. */
.scw-card-open {
  all: unset;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  border-radius: 10px;
}
.scw-card-open:focus-visible {
  outline: 2px solid var(--scw-primary);
  outline-offset: 4px;
}
.scw-card-open .scw-card-image img {
  transition: transform 0.25s ease;
}
.scw-card-open:hover .scw-card-image img {
  transform: scale(1.04);
}
.scw-card-open:hover .scw-card-name {
  color: var(--scw-primary);
}
.scw-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scw-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--scw-surface);
  color: var(--scw-text-muted);
  border: 1px solid var(--scw-border);
  text-transform: capitalize;
}
.scw-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
}
.scw-price-tier {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--scw-primary);
  text-transform: capitalize;
}
.scw-card-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--scw-primary-contrast);
  background: var(--scw-primary);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  text-decoration: none;
}
.scw-card-link:hover {
  background: var(--scw-primary-hover);
}
.scw-card-link:focus-visible {
  outline: 2px solid var(--scw-primary);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Product detail popup (<dialog id="product-modal">)                  */
/* ------------------------------------------------------------------ */
html:has(.scw-modal[open]) {
  overflow: hidden; /* no background scroll behind the popup */
}
.scw-modal {
  padding: 0;
  border: none;
  border-radius: 20px;
  width: min(880px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  background: var(--scw-bg);
  color: var(--scw-text);
  box-shadow: 0 24px 64px rgba(44, 42, 36, 0.28);
  overflow: hidden;
}
.scw-modal::backdrop {
  background: rgba(44, 42, 36, 0.45);
  backdrop-filter: blur(2px);
}
.scw-modal[open] {
  animation: scw-modal-in 0.18s ease-out;
}
@keyframes scw-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.scw-modal-inner {
  position: relative;
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.scw-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--scw-border);
  background: var(--scw-bg);
  color: var(--scw-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.scw-modal-close:hover {
  background: var(--scw-surface);
}
.scw-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
.scw-modal-media {
  background: var(--scw-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  min-height: 100%;
}
.scw-modal-media {
  flex-direction: column;
  gap: 10px;
}
.scw-photo-credit {
  margin: 0;
  font-size: 11px;
  color: var(--scw-text-muted);
  text-align: center;
}
.scw-photo-credit a {
  color: inherit;
}
.scw-footer {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 18px 24px 96px;
  border-top: 1px solid var(--scw-border);
  font-size: 12px;
  color: var(--scw-text-muted);
}
.scw-footer p {
  margin: 0;
}
.scw-footer a {
  color: inherit;
}
.scw-modal-media img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  border-radius: 12px;
}
.scw-modal-body {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.scw-modal-name {
  font-size: 22px;
  line-height: 1.25;
  margin: 4px 40px 6px 0;
}
.scw-modal-sub {
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: var(--scw-text-muted);
}
.scw-modal-description {
  margin: 0;
  font-size: 14.5px;
}
.scw-modal-section h3,
.scw-buy h3 {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--scw-text-muted);
}
.scw-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scw-ingredient {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--scw-primary) 12%, transparent);
  color: var(--scw-primary-hover);
  font-weight: 600;
}

/* Where to buy */
.scw-buy {
  border-top: 1px solid var(--scw-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scw-buy-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--scw-primary);
  color: var(--scw-primary-contrast);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.scw-buy-primary:hover {
  background: var(--scw-primary-hover);
}
.scw-buy-primary-price {
  font-size: 16px;
}
.scw-buy-hint {
  margin: -2px 0 0;
  font-size: 12px;
  color: var(--scw-primary);
  font-weight: 600;
}
.scw-buy-more-label {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--scw-text-muted);
}
.scw-buy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--scw-border);
  border-radius: 12px;
  overflow: hidden;
}
.scw-buy-list li + li {
  border-top: 1px solid var(--scw-border);
}
.scw-buy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--scw-text);
  text-decoration: none;
  font-size: 14px;
}
.scw-buy-row:hover {
  background: var(--scw-surface);
}
.scw-buy-row-store {
  flex: 1;
  font-weight: 600;
}
.scw-buy-row-price {
  font-weight: 700;
}
.scw-buy-row-search {
  font-size: 12.5px;
  color: var(--scw-text-muted);
}
.scw-buy-row-arrow {
  color: var(--scw-text-muted);
}
.scw-buy-primary:focus-visible,
.scw-buy-row:focus-visible,
.scw-modal-close:focus-visible {
  outline: 2px solid var(--scw-accent);
  outline-offset: 2px;
}
.scw-buy-empty,
.scw-disclosure {
  margin: 0;
  font-size: 11.5px;
  color: var(--scw-text-muted);
}

/* Phones: bottom sheet; "where to buy" moves up under the name so it's
   visible without scrolling past the description. */
@media (max-width: 640px) {
  .scw-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }
  .scw-modal[open] {
    animation-name: scw-sheet-in;
  }
  @keyframes scw-sheet-in {
    from { transform: translateY(40px); opacity: 0.6; }
    to { transform: none; opacity: 1; }
  }
  .scw-modal-grid {
    grid-template-columns: 1fr;
  }
  .scw-modal-media {
    padding: 20px;
  }
  .scw-modal-media img {
    max-height: 240px;
    width: auto;
  }
  .scw-modal-body {
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  }
  .scw-buy {
    order: -1;
    border-top: none;
    padding-top: 0;
  }
  .scw-modal-heading {
    order: -2;
  }
}

.scw-empty, .scw-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--scw-text-muted);
  font-size: 14px;
}
.scw-empty[hidden], .scw-loading[hidden] {
  display: none;
}

.scw-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}
.scw-page-btn {
  border: 1px solid var(--scw-border);
  background: var(--scw-bg);
  color: var(--scw-text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--scw-font);
}
.scw-page-gap {
  align-self: center;
  padding: 0 2px;
  color: var(--scw-text-muted);
}
.scw-page-btn[data-active="true"] {
  background: var(--scw-primary);
  border-color: var(--scw-primary);
  color: var(--scw-primary-contrast);
}
.scw-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
/* Phones: keep the pager on one line (< 1 … 5 6 7 … 20 > fits in 343px). */
@media (max-width: 480px) {
  .scw-pagination { flex-wrap: nowrap; gap: 4px; }
  .scw-page-btn { padding: 6px 9px; min-width: 32px; }
}

/* SkinCareBot widget launcher */
.scb-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--scw-primary);
  color: var(--scw-primary-contrast);
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--scw-font);
  cursor: pointer;
  box-shadow: var(--scw-shadow);
}
.scb-launcher:hover {
  background: var(--scw-primary-hover);
}

.scb-panel {
  position: fixed;
  right: 24px;
  bottom: 90px;
  z-index: 20;
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--scw-bg);
  border: 1px solid var(--scw-border);
  border-radius: var(--scw-radius);
  box-shadow: var(--scw-shadow);
}
.scb-panel[hidden] {
  display: none;
}
.scb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid var(--scw-border);
}
.scb-panel-close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--scw-text-muted);
  cursor: pointer;
  padding: 2px 6px;
}
.scb-panel-close:hover {
  color: var(--scw-text);
}
#skincarebot-root {
  padding: 14px;
}
/* Phones: the count on its own line, sort and page size side by side below it. */
@media (max-width: 480px) {
  .scw-result-count {
    flex-basis: 100%;
  }
}
/* Phones: pin the panel to both screen edges and size it to the visible
   height (dvh excludes the browser's address bar). */
@media (max-width: 480px) {
  .scb-launcher {
    right: 16px;
    bottom: 16px;
  }
  .scb-panel {
    left: 8px;
    right: 8px;
    bottom: 76px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
  }
}

@media (max-width: 820px) {
  .scw-shell {
    grid-template-columns: 1fr;
  }
  /* One group under another, folded ones too, each the full width. */
  .scw-sidebar {
    position: static;
    flex-direction: column;
    gap: 16px;
  }
  .scw-filter-group {
    width: 100%;
  }
  .scw-search {
    max-width: none;
  }
  .scw-header-inner {
    flex-wrap: wrap;
  }
}

/* ------------------------------------------------------------------ */
/* Static pages (product/brand/category/legal) -- build/ generator     */
/* ------------------------------------------------------------------ */

/* .scw-shell is a 2-column grid (sidebar + main) for the home page only;
   every other generated page reuses .scw-shell for its max-width/padding
   but isn't a sidebar layout, so this overrides it to a single column. */
.scw-static-main {
  display: block;
}

.scw-skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 1000;
  padding: 8px 12px;
  background: #fff;
  color: #111;
  border: 2px solid #111;
  border-radius: 6px;
}

.scw-skip-link:focus {
  top: 8px;
}

.scw-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


.scw-header-simple .scw-header-inner {
  justify-content: space-between;
}
.scw-all-products-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--scw-primary);
  text-decoration: none;
}
.scw-all-products-link:hover {
  text-decoration: underline;
}

.scw-breadcrumbs {
  margin-bottom: 18px;
}
.scw-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
  font-size: 13px;
  color: var(--scw-text-muted);
}
.scw-breadcrumbs a {
  color: var(--scw-text-muted);
  text-decoration: none;
}
.scw-breadcrumbs a:hover {
  color: var(--scw-primary);
  text-decoration: underline;
}
.scw-breadcrumbs li[aria-current="page"] {
  color: var(--scw-text);
  font-weight: 600;
}
.scw-crumb-sep {
  opacity: 0.5;
}

.scw-listing-intro {
  margin-bottom: 22px;
  max-width: 68ch;
}
.scw-listing-intro h1 {
  margin: 0 0 8px;
  font-size: 26px;
}
.scw-listing-intro p {
  margin: 0;
  color: var(--scw-text-muted);
}

.scw-listing-about {
  margin-top: 32px;
  max-width: 68ch;
}
.scw-listing-about h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.scw-listing-about p {
  margin: 0 0 8px;
  color: var(--scw-text-muted);
}

.scw-index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 20px;
}
.scw-index-list a {
  color: var(--scw-primary);
  text-decoration: none;
  font-weight: 600;
}
.scw-index-list a:hover {
  text-decoration: underline;
}

/* Product page: reuses the popup's own .scw-modal-media/.scw-modal-body
   layout classes (see .scw-modal-grid below) so the static page and the
   in-place popup never visually diverge. */
.scw-product-page {
  display: grid;
  grid-template-columns: minmax(0, 380px) 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}
/* .scw-modal-media's min-height:100% (sized for the short popup) would
   otherwise stretch it to match this page's much taller text column --
   align-items:start alone doesn't stop that, since the grid row itself is
   still sized to the tallest cell. Let it size to its own content. */
.scw-product-page .scw-modal-media {
  min-height: auto;
  border-radius: 12px;
}
@media (max-width: 720px) {
  .scw-product-page {
    grid-template-columns: 1fr;
  }
}

.scw-full-ingredients {
  margin: 18px 0;
  border: 1px solid var(--scw-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.scw-full-ingredients summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
}
.scw-full-ingredients-text {
  margin: 10px 0 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--scw-text-muted);
}
.scw-attribution {
  margin: 0;
  font-size: 12px;
}
.scw-attribution a {
  color: var(--scw-text-muted);
}

.scw-not-medical-advice {
  margin-top: 18px;
  font-size: 12px;
  color: var(--scw-text-muted);
  font-style: italic;
}

.scw-related {
  margin: 36px 0;
}
.scw-related h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

.scw-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 10px;
}
.scw-footer-nav a {
  color: var(--scw-text-muted);
  font-size: 13px;
}

/* Legal pages */
.scw-legal {
  max-width: 68ch;
}
.scw-legal h1 {
  font-size: 26px;
  margin: 0 0 18px;
}
.scw-legal h2 {
  font-size: 16px;
  margin: 26px 0 8px;
}
.scw-legal p {
  color: var(--scw-text);
  line-height: 1.65;
}

@media (max-width: 480px) {
  .scw-index-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Guides (build/pages/guides.mjs) ---- */
.scw-header-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.scw-nav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--scw-text);
  text-decoration: none;
  white-space: nowrap;
}
.scw-nav-link:hover {
  color: var(--scw-primary);
}
@media (max-width: 480px) {
  .scw-header-links {
    gap: 14px;
  }
  .scw-header-simple .scw-header-inner {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}
.scw-guides-index h1,
.scw-guide h1 {
  margin: 0 0 8px;
  line-height: 1.2;
}
.scw-guides-intro,
.scw-guide-meta {
  color: var(--scw-text-muted);
  margin: 0 0 20px;
}
.scw-guide-list {
  display: grid;
  gap: 14px;
}
.scw-guide-card {
  border: 1px solid var(--scw-border);
  border-radius: var(--scw-radius);
  padding: 16px 18px;
  background: var(--scw-bg);
}
.scw-guide-card-title {
  font-size: 18px;
  margin: 0 0 6px;
}
.scw-guide-card-title a {
  color: var(--scw-text);
  text-decoration: none;
}
.scw-guide-card-title a:hover {
  color: var(--scw-primary);
}
.scw-guide-card-desc {
  margin: 0 0 6px;
  color: var(--scw-text);
  line-height: 1.55;
}
.scw-guide-card-meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--scw-text-muted);
}
.scw-home-guides {
  margin-top: 36px;
}
.scw-home-guides-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.scw-home-guides-head h2 {
  margin: 0;
  font-size: 20px;
}
.scw-guide {
  max-width: 760px;
}
.scw-guide-body {
  line-height: 1.7;
}
.scw-guide-body h2 {
  margin: 30px 0 10px;
  font-size: 22px;
}
.scw-guide-body h3 {
  margin: 22px 0 8px;
  font-size: 18px;
}
.scw-guide-body p,
.scw-guide-body li {
  color: var(--scw-text);
}
.scw-guide-body a,
.scw-featured-guide-list a,
.scw-home-guides-head a {
  color: var(--scw-primary);
}
.scw-guide-body blockquote {
  margin: 16px 0;
  padding: 4px 16px;
  border-left: 3px solid var(--scw-border);
  color: var(--scw-text-muted);
}
.scw-guide-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 14.5px;
}
.scw-guide-body th,
.scw-guide-body td {
  border: 1px solid var(--scw-border);
  padding: 8px 10px;
  text-align: left;
}
.scw-guide-body th {
  background: var(--scw-surface);
}
.scw-guide-products,
.scw-faq {
  margin-top: 36px;
}
.scw-faq-item {
  border-top: 1px solid var(--scw-border);
  padding: 12px 0;
}
.scw-faq-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.scw-faq-item p {
  margin: 0;
  line-height: 1.6;
}
.scw-featured-guide-list {
  padding-left: 18px;
  line-height: 1.7;
}
.scw-featured-guide-desc {
  color: var(--scw-text-muted);
}

@media (max-width: 480px) {
  .scw-header-links {
    gap: 12px;
  }
}

/* Author/reviewer page (/about/nina/) */
.scw-author-role { margin: -0.25rem 0 1rem; color: var(--scw-text-muted); }
.scw-author-photo { display: block; width: 160px; height: 160px; border-radius: 50%; object-fit: cover; margin: 0 0 1rem; }

/* Comparison guides: direct answer + top-picks table */
.scw-guide-answer {
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 4px solid var(--scw-primary);
  background: var(--scw-surface);
}
.scw-compare-section h2 { margin: 24px 0 10px; }
.scw-compare-wrap { overflow-x: auto; }
.scw-compare { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
.scw-compare th,
.scw-compare td { border: 1px solid var(--scw-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.scw-compare thead th { background: var(--scw-surface); }
.scw-compare-partial { color: var(--scw-text-muted); font-size: 13px; }
.scw-compare-pick { display: flex; align-items: center; gap: 10px; }
.scw-compare-thumb { flex: none; width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--scw-border); }
.scw-compare-note { color: var(--scw-text-muted); font-size: 14px; margin: 8px 0 24px; }

/* /set/ (gift set page) */
.scw-gift-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 18px;
}
.scw-gift-head h1 {
  margin: 0 0 4px;
}
.scw-gift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.scw-gift-actions .scw-clear-btn {
  text-decoration: none;
  display: inline-block;
}
.scw-gift-actions [hidden] {
  display: none;
}

/* /set/ "Buy this set" block */
.scw-buy-set {
  border: 1px solid var(--scw-border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: var(--scw-surface, #fff);
}
.scw-buy-set h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.scw-buy-set-btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--scw-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.scw-buy-set-btn:hover {
  background: var(--scw-primary-hover, var(--scw-primary));
}
.scw-buy-set-note {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--scw-text-muted);
}
.scw-buy-set-store {
  margin-top: 12px;
}
.scw-buy-set-store summary {
  cursor: pointer;
  font-weight: 600;
}
.scw-buy-set-store ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.scw-buy-set-store li {
  margin: 4px 0;
}
.scw-buy-set-price {
  color: var(--scw-text-muted);
}
.scw-buy-set .scw-disclosure {
  margin: 14px 0 0;
}

/* Ingredient and concern pages (/ingredients/, /concerns/) and the chips that link to them */
a.scw-ingredient-link,
a.scw-tag-link {
  text-decoration: none;
}
a.scw-ingredient-link:hover,
a.scw-tag-link:hover {
  text-decoration: underline;
}
.scw-hub-intro {
  max-width: 72ch;
}
.scw-hub-count {
  font-size: 0.6em;
  font-weight: 600;
  color: var(--scw-text-muted);
  white-space: nowrap;
}
.scw-hub-intro-text p {
  margin: 0 0 10px;
  color: var(--scw-text);
}
.scw-hub-note {
  font-size: 13px;
  color: var(--scw-text-muted);
}
.scw-hub-group {
  margin-top: 28px;
}
.scw-hub-group h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
.scw-hub-group-count {
  font-weight: 500;
  color: var(--scw-text-muted);
  font-size: 0.85em;
}

/* Home: "Start here" (one editorial pick per routine step): its own full-width section before the shop layout */
.scw-start-here {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 0;
}
.scw-start-here[hidden] {
  display: none;
}
.scw-start-here h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.scw-start-here-intro {
  margin: 0 0 12px;
  color: var(--scw-text-muted);
}
.scw-start-here-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.scw-start-here-row > .scw-card {
  flex: 0 0 min(70vw, 230px);
  scroll-snap-align: start;
}
.scw-start-here-link {
  margin: 8px 0 0;
}
@media (min-width: 1100px) {
  .scw-start-here-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: visible;
  }
  .scw-start-here-row > .scw-card {
    flex: none;
  }
}

/* Mobile filters toggle: the toggle only exists in the one-column layout, and the sidebar collapses only when
   JS is on (the layout script adds .scw-js to <html>), so without JS every filter and brand link stays visible. */
.scw-filters-toggle {
  display: none;
}
@media (max-width: 820px) {
  .scw-js .scw-filters-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid var(--scw-border);
    border-radius: 10px;
    background: var(--scw-surface, #fff);
    color: var(--scw-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }
  .scw-js .scw-filters-toggle::after {
    content: '+';
    margin-left: auto;
    font-size: 18px;
  }
  .scw-js .scw-filters-toggle[aria-expanded='true']::after {
    content: '\2212';
  }
  .scw-js .scw-sidebar {
    display: none;
  }
  .scw-js .scw-sidebar.is-open {
    display: flex;
    flex-direction: column;
  }
}

/* ---- Header "Shop by" menu (build/layout.mjs renderMainNav, app.js initShopMenu) ---- */
/* The panel is positioned against the sticky .scw-header, so it spans the full window width. */
.scw-mainnav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.scw-shopby {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--scw-text);
  background: var(--scw-bg);
  border: 1px solid var(--scw-border);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.scw-shopby:hover,
.scw-shopby[aria-expanded='true'] {
  border-color: var(--scw-primary);
  color: var(--scw-primary);
}
.scw-shopby-menu-icon {
  display: none;
}
.scw-shopby-chevron {
  transition: transform 0.15s ease;
}
.scw-shopby[aria-expanded='true'] .scw-shopby-chevron {
  transform: rotate(180deg);
}
.scw-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 20;
  background: var(--scw-bg);
  border-top: 1px solid var(--scw-border);
  border-bottom: 1px solid var(--scw-border);
  box-shadow: var(--scw-shadow);
}
.scw-js .scw-mega:not(.is-open) {
  display: none;
}
.scw-mega-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(190px, 230px);
  gap: 24px;
}
.scw-mega-col summary {
  list-style: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--scw-text-muted);
  margin-bottom: 8px;
  cursor: default;
}
.scw-mega-col summary::-webkit-details-marker {
  display: none;
}
.scw-mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.scw-mega-col a {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--scw-text);
  text-decoration: none;
}
.scw-mega-col a:hover {
  color: var(--scw-primary);
}
.scw-mega-col a.scw-mega-all {
  color: var(--scw-primary);
  font-weight: 600;
}
.scw-mega-help {
  background: var(--scw-surface);
  border-radius: 12px;
  padding: 16px;
  align-self: start;
}
.scw-mega-help-title {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 14px;
}
.scw-mega-help-text {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--scw-text-muted);
  line-height: 1.45;
}
.scw-mega-bot {
  display: block;
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--scw-primary-contrast);
  background: var(--scw-primary);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.scw-mega-bot:hover {
  background: var(--scw-primary-hover);
}
.scw-mega-guide {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--scw-primary);
  text-decoration: none;
}
@media (max-width: 820px) {
  .scw-shopby-menu-icon {
    display: block;
  }
  .scw-shopby-chevron {
    display: none;
  }
  .scw-mega {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .scw-mega-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 4px 16px 16px;
  }
  .scw-mega-col {
    border-bottom: 1px solid var(--scw-border);
  }
  .scw-mega-col summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    margin: 0;
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--scw-text);
    cursor: pointer;
  }
  .scw-mega-col summary::after {
    content: '+';
    font-size: 18px;
    color: var(--scw-text-muted);
  }
  .scw-mega-col[open] summary::after {
    content: '\2212';
  }
  .scw-mega-col ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 14px;
  }
  .scw-mega-col a {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--scw-border);
    border-radius: 999px;
  }
  .scw-mega-help {
    margin-top: 14px;
  }
  /* The floating bot launcher would cover the open menu; the menu has its own "Find my product". */
  .scw-menu-open .scb-launcher {
    display: none;
  }
}

/* Ingredient / concern pages: the shop view with a short heading */
.scw-hub-head {
  margin-bottom: 14px;
}
.scw-hub-head[hidden] {
  display: none;
}
.scw-hub-head .scw-breadcrumbs {
  margin: 0 0 8px;
  padding: 0;
}
.scw-hub-head h1 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.2;
}
.scw-hub-line {
  margin: 0 0 4px;
  color: var(--scw-text-muted);
}
.scw-hub-guide-link {
  margin: 0 0 4px;
  font-size: 14.5px;
}
.scw-hub-guides {
  margin-top: 32px;
}
.scw-hub-guides h2 {
  margin: 0 0 6px;
}
.scw-guide-shop {
  margin: 0 0 18px;
}
.scw-guide-shop-btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--scw-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.scw-guide-shop-btn:hover {
  background: var(--scw-primary-hover, var(--scw-primary));
}

/* Hair & scalp and Devices (2026-10-15): group headings in the category filter, a heading inside a product grid
   (ingredient pages list hair products after the skincare ones), and the /hair/ and /devices/ pages. */
.scw-chip-group {
  display: block;
  margin: 10px 10px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--scw-text-muted);
}
.scw-chip-group:first-child {
  margin-top: 2px;
}
.scw-grid-heading {
  grid-column: 1 / -1;
  margin: 16px 0 0;
  font-size: 18px;
}
.scw-group-intro {
  margin-top: 8px;
  margin-bottom: 24px;
}
.scw-group-section {
  margin-top: 28px;
}
.scw-group-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

/* Filter groups fold with their heading (app.js initFilterGroups); without JS every group stays open. */
.scw-group-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.scw-js .scw-group-toggle::after {
  content: '\2212';
  margin-left: auto;
  font-size: 18px;
  font-weight: 400;
}
.scw-js .scw-group-toggle[aria-expanded='false']::after {
  content: '+';
}
.scw-js .scw-filter-group.is-folded > div {
  display: none;
}
/* Brand, concern and ingredient options are toggle chips like the Category list. */
.scw-check-list .scw-chip {
  flex: none;
}
.scw-check-list {
  gap: 4px;
}
/* Desktop: the sticky sidebar scrolls on its own when the open groups are taller than the window. */
@media (min-width: 821px) {
  .scw-sidebar {
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding-right: 4px;
  }
}

/* Popup: Where to buy sits right under the name, so it gets a line below instead of above. */
.scw-modal .scw-buy {
  border-top: none;
  padding-top: 0;
  border-bottom: 1px solid var(--scw-border);
  padding-bottom: 16px;
}

/* Popup: the long parts copied from the product page (note, full ingredient list) open on click. */
.scw-modal-more {
  border: 1px solid var(--scw-border);
  border-radius: 10px;
}
.scw-modal-more summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--scw-text-muted);
}
.scw-modal-more[open] summary {
  border-bottom: 1px solid var(--scw-border);
}
.scw-modal-more > .scw-modal-section {
  margin: 0;
  padding: 12px 14px;
  border: none;
}
.scw-modal .scw-product-note p {
  margin: 0 0 10px;
  font-size: 14.5px;
}
/* Popup: a short commission note sits under the store buttons, the full statements at the very end. */
.scw-disclosure-full {
  border-top: 1px solid var(--scw-border);
  padding-top: 12px;
}

/* Popup on wider screens: the photo stays at the top of its column while the details scroll.
   The beige column background moves to the grid (0.9fr of 2fr = 45%) so it still runs the full height. */
@media (min-width: 641px) {
  .scw-modal .scw-modal-grid {
    background: linear-gradient(to right, var(--scw-surface) 45%, transparent 45%);
  }
  .scw-modal .scw-modal-media {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 0;
    background: none;
  }
}

/* The popup while the catalog is still loading (openProductByKey() in app.js). */
.scw-modal .scw-modal-loading {
  grid-column: 1 / -1;
  margin: 0;
  padding: 64px 24px;
  text-align: center;
  color: var(--scw-text-muted);
  background: var(--scw-bg, transparent);
}
