/*
 * Editorial recommendation results, shared by all Version 1 matchers.
 * Product research, eligibility, and ranking remain unchanged.
 */
:root {
  --editorial-rose: #161616;
  --editorial-rose-dark: #0a0a0a;
  --editorial-blush: #f1f1f1;
  --editorial-line: #d9d9d9;
  --editorial-ink: #181818;
}
body:has(.editorial-results) {
  background: #f7f7f7;
}
body:has(.editorial-results) .page-shell {
  width: min(100% - 28px, 1480px);
}
body:has(.editorial-results) #matcher-app {
  min-width: 0;
}
body:has(.editorial-results) .matcher-page-layout {
  min-width: 0;
}
@media (max-width: 1099px) {
  .matcher-page-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
.matcher-category-nav, #matcher-app {
  min-width: 0;
}
body:has(.editorial-results) .matcher-category-nav {
  border-color: var(--editorial-line);
}
body:has(.editorial-results) #matcher-app.panel {
  border-color: var(--editorial-line);
  box-shadow: 0 10px 40px rgb(48 48 48 / 3%);
}
body:has(.editorial-results) #matcher-app > h1,
body:has(.editorial-results) .results-heading h2,
.editorial-results .section-heading-row h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}
body:has(.editorial-results) #matcher-app > h1 {
  font-size: clamp(2.6rem, 5vw, 4.3rem);
}
.editorial-results {
  --accent: var(--editorial-rose);
  --accent-dark: var(--editorial-rose-dark);
  --accent-soft: var(--editorial-blush);
  border-top-color: var(--editorial-line);
}
.editorial-results .results-browser {
  grid-template-columns: minmax(0,1fr);
  gap: 22px;
  margin-top: 22px;
}
.editorial-results .results-browser-main,
.editorial-results .top-picks-section,
.editorial-results .all-products-section {
  min-width: 0;
}
.editorial-results .top-picks-grid,
.editorial-results .product-list {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 14px;
}
.editorial-results .section-heading-row {
  margin-top: 26px;
}
.editorial-results .section-heading-row h2 {
  color: var(--editorial-ink);
}
.editorial-results .section-count {
  color: #606060;
}
.editorial-results .all-products-section {
  border-top-color: var(--editorial-line);
  margin-top: 32px;
}
.editorial-results .browse-controls {
  padding: 14px 0;
  border-top: 1px solid var(--editorial-line);
}
.editorial-results .browse-field select {
  border-color: var(--editorial-line);
}
.editorial-results .editorial-result-card {
  display: grid;
  grid-template-columns: 110px minmax(0,1fr);
  grid-template-areas: "picture info" "picture actions";
  align-items: start;
  gap: 9px 16px;
  min-width: 0;
  width: 100%;
  height: auto;
  padding: 15px;
  border: 1px solid var(--editorial-line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 5px 22px rgb(47 47 47 / 4%);
  cursor: default;
}
.editorial-results .editorial-result-card.selected-product-card,
.editorial-results .top-picks-grid .editorial-result-card:first-child {
  border-color: var(--editorial-rose);
  box-shadow: 0 0 0 1px #e6e6e6, 0 6px 26px rgb(56 56 56 / 7%);
}
.editorial-results .editorial-result-card .editorial-card-media {
  grid-area: picture;
  position: relative;
  min-width: 0;
  align-self: stretch;
}
.editorial-results .editorial-card-image {
  display: grid;
  min-height: 135px;
  height: 100%;
  place-items: center;
  padding: 9px;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(135deg,#f5f5f5,#eaeaea);
}
.editorial-results .editorial-card-image img {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: contain;
}
.editorial-image-fallback {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  padding: 12px 2px;
  color: #626262;
  font-size: .74rem;
  line-height: 1.2;
  text-align: center;
}
.editorial-bottle-shape {
  position: relative;
  display: block;
  width: 42px;
  height: 67px;
  margin-top: 12px;
  border: 2px solid #b9b9b9;
  border-radius: 9px 9px 12px 12px;
  background: #f8f8f8;
  box-shadow: inset 0 -23px 0 #dfdfdf;
}
.editorial-bottle-shape::before {
  content:"";
  position:absolute;
  width:26px;
  height:10px;
  left:6px;
  top:-12px;
  border:2px solid #b9b9b9;
  border-radius:3px 3px 0 0;
  background:#c8c8c8;
}
.editorial-results .editorial-card-ribbon {
  position: absolute;
  z-index: 1;
  top: -15px;
  left: -15px;
  max-width: 100px;
  margin: 0;
  padding: 6px 8px;
  color:#fff;
  background:var(--editorial-rose);
  border-radius: 14px 0 12px 0;
  font-size:.68rem;
  letter-spacing:.02em;
  text-align:center;
}
.editorial-results .editorial-result-card .product-card-main {
  grid-area: info;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.editorial-results .editorial-result-card .product-brand {
  order: -1;
  margin: 0 0 4px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--editorial-rose-dark);
}
.editorial-results .editorial-result-card .product-card-main h3 {
  margin:0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.12rem, 2vw, 1.38rem);
  line-height:1.24;
  overflow-wrap:anywhere;
  color:var(--editorial-ink);
}
.editorial-results .editorial-card-teaser {
  order:1;
  margin:9px 0 0;
  color:#595959;
  font-size:.86rem;
  line-height:1.45;
}
.editorial-results .editorial-result-card .match-explanation,
.editorial-results .editorial-result-card .signal-section,
.editorial-results .editorial-result-card .retailer-line {
  /* The reason and complete evidence remain in the DOM for the original
     matcher, and appear to visitors in the expanded At a glance panel. */
  display:none;
}
.editorial-results .editorial-result-card .product-card-actions {
  grid-area:actions;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.editorial-results .editorial-result-card .view-details-button {
  border-color:var(--editorial-rose);
  border-radius:9px;
  background:var(--editorial-rose);
  color:white;
  font-weight:700;
}
.editorial-results .editorial-result-card .view-details-button:hover,
.editorial-results .editorial-result-card .view-details-button:focus-visible {
  background:var(--editorial-rose-dark);
  color:white;
}
.editorial-results .editorial-result-card .product-card-actions a {
  border-color:var(--editorial-line);
  color:var(--editorial-rose-dark);
  font-size:.8rem;
  overflow-wrap:anywhere;
}
.editorial-results .editorial-result-card .view-details-button:focus-visible,
.editorial-detail-close:focus-visible {
  outline:3px solid #151515;
  outline-offset:3px;
}
.editorial-results .product-detail-panel {
  min-width:0;
  border:1px solid var(--editorial-line);
  border-radius:20px;
  background:#fff;
  box-shadow:0 10px 30px rgb(56 56 56 / 5%);
}
.editorial-detail-hero {
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  gap:14px;
  align-items:center;
}
.editorial-detail-hero .product-image-wrap,
.editorial-detail-hero .product-image-placeholder {
  min-height:142px;
  margin:0;
  padding:9px;
  border-radius:12px;
  background:linear-gradient(135deg,#f5f5f5,#e9e9e9);
}
.editorial-detail-hero .product-image-placeholder {
  padding:12px;
}
.editorial-detail-hero .product-image-placeholder small {
  font-size:.76rem;
}
.editorial-detail-hero .product-image-wrap img {max-height:160px;}
.editorial-detail-hero-copy {
  min-width:0;
}
.editorial-detail-hero-copy h2 {
  margin:4px 0 0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(1.24rem,2vw,1.6rem);
  overflow-wrap:anywhere;
}
.editorial-detail-hero-copy .product-brand {
  margin:5px 0 0;
  color:#606060;
  font-size:.82rem;
}
.editorial-detail-kicker {
  display:inline-block;
  padding:5px 9px;
  background:var(--editorial-rose);
  border-radius:7px;
  color:white;
  font-size:.71rem;
  font-weight:700;
  text-transform:uppercase;
}
.editorial-detail-price {
  margin:12px 0 0;
  color:var(--editorial-ink);
  font-weight:700;
  font-size:.9rem;
}
.editorial-price-date {
  display:block;
  margin-top:3px;
  color:#595959;
}
.editorial-glance-box {
  margin-top:20px;
  padding:20px;
  border-radius:16px;
  background:var(--editorial-blush);
}
.editorial-glance-heading {
  margin:0 0 12px;
  color:var(--editorial-rose-dark);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.9rem;
}
.editorial-glance-facts {
  display:grid;
  gap:9px;
  margin:0;
  padding:0;
  list-style:none;
}
.editorial-glance-facts li {
  position:relative;
  padding-left:19px;
  color:#393939;
  font-size:.88rem;
  line-height:1.45;
}
.editorial-glance-facts li::before {
  content:"✓";
  position:absolute;
  left:0;
  top:0;
  color:var(--editorial-rose);
  font-weight:800;
}
.editorial-glance-why {
  margin-top:17px;
  padding-top:14px;
  border-top:1px solid #d3d3d3;
}
.editorial-glance-why h4 {
  margin:0 0 7px;
  color:var(--editorial-rose-dark);
  font-size:.88rem;
}
.editorial-glance-why p {
  margin:0;
  color:#383838;
  font-size:.89rem;
  line-height:1.55;
}
.editorial-detail-extras > .detail-subheading {
  margin-top:22px;
  color:var(--editorial-rose-dark);
}
.editorial-detail-extras .detail-source-link {
  display:inline-block;
}
.editorial-detail-close {
  display:none;
  margin:0 0 15px auto;
  padding:8px 12px;
  border:1px solid var(--editorial-line);
  border-radius:9px;
  background:var(--editorial-blush);
  color:var(--editorial-rose-dark);
  font-weight:700;
  cursor:pointer;
}
@media (min-width:900px) {
  .editorial-results .results-browser {
    grid-template-columns:minmax(0,1.65fr) minmax(310px,1fr);
    align-items:start;
    gap:22px;
  }
  .editorial-results .product-detail-panel {
    position:sticky;
    top:22px;
    max-height:calc(100vh - 44px);
    overflow:auto;
  }
}
@media (max-width:899px) {
  .editorial-results .product-detail-panel {
    display:none;
    position:fixed;
    z-index:1000;
    inset:0;
    width:100%;
    height:100dvh;
    max-height:none;
    padding:20px;
    border-radius:0;
    overflow:auto;
    overscroll-behavior:contain;
  }
  .editorial-results .product-detail-panel.editorial-mobile-open {
    display:block;
  }
  .editorial-detail-close {display:block;}
  body.editorial-drawer-open {overflow:hidden;}
}
@media (min-width:520px) and (max-width:899px) {
  .editorial-results .editorial-result-card {
    grid-template-columns:140px minmax(0,1fr);
    gap:12px 20px;
  }
}
@media (max-width:360px) {
  .editorial-results .editorial-result-card {
    grid-template-columns:86px minmax(0,1fr);
    padding:11px;
    gap:8px 10px;
  }
  .editorial-results .editorial-card-image {min-height:115px;}
  .editorial-results .editorial-card-teaser {font-size:.78rem;}
  .editorial-results .editorial-result-card .product-card-main h3 {font-size:1.04rem;}
  .editorial-results .editorial-result-card .product-card-actions a {font-size:.72rem;}
}
@media (prefers-reduced-motion:reduce) {
  .editorial-results .editorial-result-card {transition:none;}
}


/* Verified price snapshots: keep commerce visually separate from matching evidence. */
.editorial-results .editorial-card-price {
  order: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: baseline;
  margin: 11px 0 0;
  color: #4a4a4a;
  font-size: .86rem;
  line-height: 1.35;
}
.editorial-results .editorial-card-price strong {
  color: var(--editorial-ink);
  font-size: 1.13rem;
  letter-spacing: -.01em;
}
.editorial-results .editorial-card-price-date,
.editorial-results .editorial-card-stock {
  order: 3;
  display: block;
  margin-top: 3px;
  color: #595959;
  font-size: .75rem;
  line-height: 1.35;
}
.editorial-results .editorial-card-stock {
  order: 4;
}
.editorial-results .editorial-merchant-link {
  border-color: var(--editorial-line);
  color: var(--editorial-rose-dark);
  text-decoration: none;
}
.editorial-results .editorial-detail-store {
  display: block;
  margin-top: 4px;
  color: #575757;
  font-size: .8rem;
}
.editorial-results .editorial-detail-merchant {
  display: inline-block;
  margin-top: 12px;
  border-color: var(--editorial-rose);
  color: var(--editorial-rose-dark);
  text-decoration: none;
}
.editorial-results .editorial-detail-merchant:focus-visible,
.editorial-results .editorial-merchant-link:focus-visible {
  outline: 3px solid #151515;
  outline-offset: 3px;
}
@media (max-width: 520px) {
  .editorial-results .editorial-result-card .product-card-actions {
    gap: 6px;
  }
  .editorial-results .editorial-merchant-link,
  .editorial-results .editorial-result-card .view-details-button {
    font-size: .75rem;
    line-height: 1.3;
    padding: 8px 9px;
  }
}


/* Shampoo-specific research descriptors: presence flags, not 1–5 ratings.
   The other product categories retain their own established card markup. */
.editorial-results .editorial-result-card:has(.editorial-shampoo-features) {
  grid-template-areas:
    "picture info"
    "features features"
    "actions actions";
  align-items: start;
}
.editorial-results .editorial-shampoo-features {
  grid-area: features;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--editorial-line);
  border-radius: 12px;
  background: #fafafa;
}
.editorial-results .editorial-shampoo-heading {
  margin: 0 0 10px;
  color: var(--editorial-rose-dark);
  font-size: .86rem;
  font-weight: 800;
}
.editorial-results .editorial-shampoo-facts {
  display: grid;
  gap: 7px;
  margin: 0;
}
.editorial-results .editorial-shampoo-fact {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: baseline;
  padding: 0 0 7px;
  border-bottom: 1px solid #e5e5e5;
  font-size: .79rem;
  line-height: 1.42;
}
.editorial-results .editorial-shampoo-fact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.editorial-results .editorial-shampoo-fact dt {
  color: #595959;
  font-weight: 600;
}
.editorial-results .editorial-shampoo-fact dd {
  margin: 0;
  color: #262626;
  font-weight: 750;
}
.editorial-results .editorial-shampoo-help {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e0e0e0;
  color: #505050;
  font-size: .78rem;
}
.editorial-results .editorial-shampoo-help summary {
  width: fit-content;
  color: var(--editorial-rose-dark);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.editorial-results .editorial-shampoo-help summary:focus-visible {
  outline: 3px solid #151515;
  outline-offset: 3px;
}
.editorial-results .editorial-shampoo-help p {
  margin: 8px 0 0;
  line-height: 1.5;
}
@media (min-width: 1220px) {
  .editorial-results .editorial-result-card:has(.editorial-shampoo-features) {
    grid-template-columns: 100px minmax(0, 1fr) minmax(182px, .85fr);
    grid-template-areas:
      "picture info features"
      "picture actions features";
    gap: 11px 13px;
  }
  .editorial-results .editorial-shampoo-features {
    align-self: stretch;
  }
  .editorial-results .editorial-shampoo-fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}
@media (max-width: 420px) {
  .editorial-results .editorial-shampoo-features {
    padding: 11px;
  }
  .editorial-results .editorial-shampoo-fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}


/* Action 3: structured, evidence-led matching explanations.
   Kept inside the selected product's At a glance panel; cards stay concise. */
.editorial-match-row {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: rgba(255,255,255,.75);
}
.editorial-match-row h5 {
  margin: 0 0 6px;
  font-size: .88rem;
  line-height: 1.35;
  font-weight: 700;
  color: #202020;
}
.editorial-match-row ul {
  margin: 0;
  padding-left: 18px;
}
.editorial-match-row li {
  margin: 5px 0;
  font-size: .87rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.editorial-match-goal { border-left: 4px solid #252525; }
.editorial-match-evidence { border-left: 4px solid #4d6d5a; }
.editorial-match-tradeoffs { border-left: 4px solid #9c752d; }
.editorial-match-limitation {
  margin: 12px 0 !important;
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
}
.editorial-match-terms,
.editorial-match-full {
  margin: 13px 0 0;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 12px;
}
.editorial-match-terms summary,
.editorial-match-full summary {
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
  color: #202020;
}
.editorial-match-term { margin-top: 10px; }
.editorial-match-term strong { font-size: .88rem; }
.editorial-match-term p { margin: 4px 0 0 !important; }
.editorial-match-full p { margin-top: 9px !important; }
.editorial-glance-why .editorial-match-disclaimer {
  margin-top: 13px;
  color: #535353;
  font-size: .82rem;
}
.editorial-match-terms summary:focus-visible,
.editorial-match-full summary:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}
@media (max-width: 420px) {
  .editorial-glance-box { padding: 13px; }
  .editorial-match-row { padding: 10px 12px; }
}

/* Any non-interactive area of a product result opens its full page.
   Explicit actions still behave normally: View details -> narrow panel;
   Compare/retailer/source links and optional explanations are separate. */
.editorial-results .editorial-result-card.product-card-opens-page,
.editorial-results .product-list-card.product-card-opens-page {
  cursor: pointer;
}
.editorial-results .product-card-page-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.editorial-results .product-card-page-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.editorial-results .product-card-page-link:focus-visible {
  outline: 3px solid #087e88;
  outline-offset: 4px;
  border-radius: 2px;
}


/* Matcher results: product discovery first, commerce only on product.html.
   Keep the original external links in the DOM for comparison snapshots, but
   do not display product-source, retailer, price or stock controls here. */
.editorial-results .editorial-result-card .product-card-actions > a,
.editorial-results .editorial-result-card .editorial-card-price,
.editorial-results .editorial-result-card .editorial-card-price-date,
.editorial-results .editorial-result-card .editorial-card-stock,
.editorial-results .product-detail-panel .editorial-detail-price,
.editorial-results .product-detail-panel .editorial-price-date,
.editorial-results .product-detail-panel .editorial-detail-store,
.editorial-results .product-detail-panel .editorial-detail-merchant,
.editorial-results .product-detail-panel .detail-source-link {
  display: none !important;
}
