/* ==========================================================================
   Dryz Stain Solver — brand-themed, game-style UI
   Palette pulled from assets/appcss/style.css
   ========================================================================== */
:root {
  --dz-gradient: linear-gradient(135deg, #1877F2, #5C5CFF);
  --dz-blue: #318AF2;
  --dz-indigo: #5C5CFF;
  --dz-violet: #7158e2;
  --dz-bg: #EBEEF2;
  --dz-surface: #FFFFFF;
  --dz-ink: #2f3542;
  --dz-gray: #828282;
  --dz-soft: #f2f2f6;
  --dz-line: #e4e8ef;
  --dz-success: #44922f;
  --dz-warning: #FFA800;
  --dz-danger: #ea2d2d;
  --dz-radius: 15px;
  --dz-radius-sm: 10px;
  --dz-shadow: 0 4px 15px rgba(0, 0, 0, .05);
  --dz-shadow-lift: 0 10px 30px rgba(49, 138, 242, .18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
  color: var(--dz-ink);
  background: var(--dz-bg);
  line-height: 1.6;
  letter-spacing: .3px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Sora', 'Inter', sans-serif; color: var(--dz-ink); }
a { color: var(--dz-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---- Header ---- */
.sg-header { background: var(--dz-surface); box-shadow: var(--dz-shadow); position: sticky; top: 0; z-index: 100; }
.sg-header-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 12px 20px; }
.sg-logo { height: 38px; width: auto; }
.sg-nav { display: flex; gap: 22px; margin-left: 12px; flex: 1; }
.sg-nav a { color: var(--dz-ink); font-weight: 500; font-size: 15px; }
.sg-nav a:hover { color: var(--dz-blue); text-decoration: none; }

/* ---- CTA buttons (Dryz gradient) ---- */
.sg-cta-btn {
  display: inline-block;
  background-image: var(--dz-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  text-align: center;
}
.sg-cta-btn:hover { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: var(--dz-shadow-lift); }
.sg-cta-btn--light { background-image: none; background: #fff; color: var(--dz-blue); }
.sg-cta-btn--light:hover { color: var(--dz-blue); }

/* ---- Layout ---- */
.sg-main { max-width: 1140px; margin: 0 auto; padding: 24px 20px 60px; }
.sg-section-title { font-size: 26px; margin: 40px 0 20px; }
.sg-panel { background: var(--dz-surface); border-radius: var(--dz-radius); box-shadow: var(--dz-shadow); padding: 24px; margin-bottom: 20px; }
.sg-panel h2 { font-size: 20px; margin: 0 0 14px; }

/* ---- Hero ---- */
.sg-hero { text-align: center; padding: 44px 16px 8px; }
.sg-hero-badge { display: inline-block; background: rgba(113, 88, 226, .12); color: var(--dz-violet); font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }
.sg-hero-title { font-size: 40px; line-height: 1.15; margin: 16px auto 12px; max-width: 720px; font-weight: 800; }
.sg-hero-sub { font-size: 17px; color: var(--dz-gray); max-width: 620px; margin: 0 auto; }

/* ==========================================================================
   The Solver (game-style picker)
   ========================================================================== */
.sg-solver { background: var(--dz-surface); border-radius: var(--dz-radius); box-shadow: var(--dz-shadow); padding: 28px; margin-top: 26px; }

.sg-progress { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px; }
.sg-progress-step { font-size: 13px; font-weight: 600; color: var(--dz-gray); background: var(--dz-soft); padding: 6px 14px; border-radius: 999px; transition: all .2s ease; }
.sg-progress-step.is-active { color: #fff; background-image: var(--dz-gradient); }
.sg-progress-step.is-done { color: var(--dz-success); background: rgba(68, 146, 47, .12); }
.sg-progress-line { width: 26px; height: 2px; background: var(--dz-line); }

.sg-quest-title { text-align: center; font-size: 22px; margin: 6px 0 18px; }

.sg-tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; margin-bottom: 26px; }

.sg-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--dz-surface);
  border: 2px solid var(--dz-line);
  border-radius: var(--dz-radius);
  padding: 18px 12px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  text-align: center;
  color: var(--dz-ink);
  font-weight: 600;
  font-size: 15px;
}
.sg-tile:hover { text-decoration: none; color: var(--dz-ink); transform: translateY(-4px); border-color: var(--dz-violet); box-shadow: 0 10px 24px rgba(113, 88, 226, .18); }
.sg-tile img { height: 52px; width: 52px; transition: transform .16s ease; }
.sg-tile:hover img { transform: scale(1.08); }
.sg-tile.is-selected { border-color: transparent; background-image: var(--dz-gradient); color: #fff; box-shadow: var(--dz-shadow-lift); }
/* Keep the full-colour glyph readable when selected: sit it on a white rounded badge
   instead of flattening it to a white silhouette. */
.sg-tile.is-selected img { background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.sg-tile-cat { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; opacity: .7; }

/* Refiners: freshness meter */
.sg-refiners { border-top: 1px dashed var(--dz-line); padding-top: 18px; margin-bottom: 10px; }
.sg-refiner-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.sg-freshness { display: inline-flex; background: var(--dz-soft); border-radius: 999px; padding: 4px; gap: 4px; }
.sg-fresh-opt { border: none; background: transparent; font-weight: 600; font-size: 14px; color: var(--dz-gray); padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all .2s ease; }
.sg-fresh-opt.is-selected { background: #fff; box-shadow: var(--dz-shadow); color: var(--dz-ink); }
.sg-fresh-bar { height: 8px; border-radius: 999px; background: var(--dz-line); margin-top: 14px; overflow: hidden; max-width: 360px; }
.sg-fresh-fill { display: block; height: 100%; border-radius: 999px; transition: width .3s ease, background .3s ease; }
.sg-fresh-fill[data-age="fresh"] { width: 33%; background: var(--dz-success); }
.sg-fresh-fill[data-age="set"] { width: 66%; background: var(--dz-warning); }
.sg-fresh-fill[data-age="heatSet"] { width: 100%; background: var(--dz-danger); }

.sg-solve-btn {
  display: block; width: 100%; text-align: center;
  background-image: var(--dz-gradient); color: #fff; font-weight: 700; font-size: 18px;
  padding: 16px; border-radius: var(--dz-radius); margin-top: 22px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.sg-solve-btn:hover { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: var(--dz-shadow-lift); }
.sg-solve-btn.is-disabled { background-image: none; background: #c7cdd6; cursor: not-allowed; pointer-events: none; }
.sg-solve-hint { text-align: center; font-size: 13px; color: var(--dz-gray); margin: 12px 0 0; }

/* ==========================================================================
   Directory grid (hub + stain landing)
   ========================================================================== */
.sg-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.sg-dir-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--dz-surface); border-radius: var(--dz-radius); box-shadow: var(--dz-shadow);
  padding: 16px 18px; color: var(--dz-ink); font-weight: 600;
  transition: transform .16s ease, box-shadow .16s ease;
}
.sg-dir-card:hover { text-decoration: none; color: var(--dz-ink); transform: translateY(-3px); box-shadow: var(--dz-shadow-lift); }
.sg-dir-card img { height: 40px; width: 40px; }
.sg-dir-card small { display: block; font-weight: 500; color: var(--dz-gray); font-size: 12px; }

/* ==========================================================================
   Combo page
   ========================================================================== */
.sg-breadcrumb { font-size: 13px; color: var(--dz-gray); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sg-breadcrumb a { color: var(--dz-gray); }
.sg-breadcrumb a:hover { color: var(--dz-blue); }
.sg-breadcrumb-current { color: var(--dz-ink); font-weight: 600; }

.sg-combo-head { text-align: center; margin-bottom: 22px; }
.sg-combo-icons { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.sg-combo-plus { font-size: 24px; color: var(--dz-gray); font-weight: 700; }
.sg-combo-title { font-size: 32px; line-height: 1.2; margin: 6px auto 12px; max-width: 760px; font-weight: 800; }
.sg-combo-meta { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--dz-gray); }
.sg-reviewed a { font-weight: 600; }

.sg-difficulty { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding: 5px 12px; border-radius: 999px; }
.sg-difficulty--easy { background: rgba(68, 146, 47, .14); color: var(--dz-success); }
.sg-difficulty--moderate { background: rgba(255, 168, 0, .16); color: #b87700; }
.sg-difficulty--hard { background: rgba(234, 45, 45, .12); color: var(--dz-danger); }
.sg-difficulty--pro-only { background-image: var(--dz-gradient); color: #fff; }

/* Banners / safety */
.sg-banner { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--dz-radius); padding: 16px 18px; margin-bottom: 20px; font-size: 15px; }
.sg-banner strong { display: block; margin-bottom: 2px; }
.sg-banner--act { background: rgba(255, 168, 0, .12); border-left: 4px solid var(--dz-warning); }
.sg-banner--safe { background: rgba(49, 138, 242, .08); border-left: 4px solid var(--dz-blue); }
.sg-banner--pro { background-image: var(--dz-gradient); color: #fff; }
.sg-banner--pro a { color: #fff; text-decoration: underline; }

.sg-combo-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }

/* Products */
.sg-product-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sg-product-list li { background: var(--dz-soft); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 500; }

/* Steps */
.sg-steps-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.sg-age-tabs { display: inline-flex; background: var(--dz-soft); border-radius: 999px; padding: 4px; gap: 4px; }
.sg-age-tab { border: none; background: transparent; font-weight: 600; font-size: 13px; color: var(--dz-gray); padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: all .2s ease; }
.sg-age-tab.is-active { background: #fff; box-shadow: var(--dz-shadow); color: var(--dz-ink); }
.sg-progress-count { font-size: 13px; font-weight: 600; color: var(--dz-violet); margin: 12px 0 0; }

.sg-steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0 0; }
.sg-steps[hidden] { display: none; }
.sg-step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--dz-line); align-items: flex-start; }
.sg-step:last-child { border-bottom: none; }
.sg-step-check {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--dz-line); background: #fff; cursor: pointer;
  counter-increment: step; position: relative; transition: all .2s ease;
  font-weight: 700; color: var(--dz-gray); display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.sg-step-check::before { content: counter(step); }
.sg-step.is-done .sg-step-check { background-image: var(--dz-gradient); border-color: transparent; color: #fff; }
.sg-step.is-done .sg-step-check::before { content: "\2713"; }
.sg-step.is-done .sg-step-text { color: var(--dz-gray); text-decoration: line-through; text-decoration-color: rgba(130,130,130,.5); }
.sg-step-body { flex: 1; }
.sg-step-text { margin: 3px 0 0; }
.sg-temp-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-top: 8px; }
.sg-temp-badge img { height: 15px; width: 15px; }
.sg-temp-badge--cold { background: rgba(49, 138, 242, .12); color: var(--dz-blue); }
.sg-temp-badge--warm { background: rgba(255, 168, 0, .16); color: #b87700; }
.sg-temp-badge--lukewarm { background: rgba(255, 168, 0, .12); color: #b87700; }

/* Colour safety */
.sg-colour-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sg-colour-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.sg-swatch { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--dz-line); margin-top: 3px; }
.sg-swatch--white { background: #fff; }
.sg-swatch--light { background: #dfe6f2; }
.sg-swatch--dark { background: #2f3542; }
.sg-swatch--coloured { background: conic-gradient(#ea2d2d, #FFA800, #44922f, #318AF2, #7158e2, #ea2d2d); }

/* FAQ */
.sg-faq-item { border-bottom: 1px solid var(--dz-line); padding: 14px 0; }
.sg-faq-item:last-child { border-bottom: none; }
.sg-faq-q { font-weight: 700; margin: 0 0 6px; font-size: 16px; }
.sg-faq-a { margin: 0; color: #444; }

/* Sidebar */
.sg-combo-side { display: grid; gap: 20px; position: sticky; top: 84px; }
.sg-side-cta { background-image: var(--dz-gradient); color: #fff; border-radius: var(--dz-radius); padding: 22px; text-align: center; box-shadow: var(--dz-shadow); }
.sg-side-cta img { filter: brightness(0) invert(1); margin-bottom: 6px; }
.sg-side-cta h3 { color: #fff; font-size: 19px; margin: 0 0 8px; }
.sg-side-cta p { font-size: 14px; margin: 0 0 16px; opacity: .95; }
.sg-side-cta-btn { background: #fff; background-image: none; color: var(--dz-blue); width: 100%; }
.sg-side-cta-btn:hover { color: var(--dz-blue); }
.sg-related { background: var(--dz-surface); border-radius: var(--dz-radius); box-shadow: var(--dz-shadow); padding: 20px; }
.sg-related h3 { font-size: 15px; margin: 0 0 10px; }
.sg-related h3:not(:first-child) { margin-top: 18px; }
.sg-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sg-related a { font-size: 14px; font-weight: 500; }

/* Stain landing */
.sg-stain-head { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.sg-stain-intro { color: var(--dz-gray); font-size: 16px; margin: 6px 0 0; }

/* CTA band */
.sg-cta-band { background-image: var(--dz-gradient); border-radius: var(--dz-radius); padding: 40px 24px; text-align: center; color: #fff; margin-top: 40px; }
.sg-cta-band h2 { color: #fff; font-size: 26px; margin: 0 0 8px; }
.sg-cta-band p { margin: 0 0 20px; opacity: .95; }
.sg-cta-band-btn { background: #fff; background-image: none; color: var(--dz-blue); }
.sg-cta-band-btn:hover { color: var(--dz-blue); }

/* ---- Footer ---- */
.sg-footer { background: #0B1E33; color: #cdd6e3; margin-top: 50px; }
.sg-footer-inner { max-width: 1140px; margin: 0 auto; padding: 40px 20px 24px; }
.sg-footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sg-footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.sg-footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.sg-footer-col a { color: #cdd6e3; font-size: 14px; }
.sg-footer-col a:hover { color: #fff; }
.sg-footer-note { font-size: 14px; margin: 0 0 14px; }
.sg-footer-email { font-size: 13px; margin: 14px 0 0; }
.sg-footer-email a { color: #cdd6e3; }
.sg-footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 18px; font-size: 13px; }
.sg-footer-bottom a { color: #cdd6e3; margin-right: 16px; }

/* ---- DryZ loading pattern ---- */
.loading {
  background: rgba(255, 255, 255, 0.8) none repeat scroll 0 0;
  bottom: 0; left: 0; line-height: 100vh; position: fixed; right: 0; top: 0;
  text-align: center; z-index: 999999; display: none;
}
.loading.show { display: block; }

/* ---- Confetti ---- */
.sg-confetti { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 99998; }
.sg-confetti span { position: absolute; width: 9px; height: 14px; opacity: 0; animation: sg-fall 1400ms ease-in forwards; }
@keyframes sg-fall {
  0% { transform: translateY(-10vh) rotate(0); opacity: 1; }
  100% { transform: translateY(90vh) rotate(540deg); opacity: 0; }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .sg-combo-grid { grid-template-columns: 1fr; }
  .sg-combo-side { position: static; }
  .sg-footer-cols { grid-template-columns: repeat(2, 1fr); }
  .sg-nav { display: none; }
  .sg-hero-title { font-size: 30px; }
  .sg-combo-title { font-size: 25px; }
}
@media (max-width: 480px) {
  .sg-footer-cols { grid-template-columns: 1fr; }
  .sg-tile-grid { grid-template-columns: repeat(2, 1fr); }
  .sg-solver { padding: 18px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .sg-confetti { display: none !important; }
}

/* ==========================================================================
   Phase 2.5 — search-first, progressive picker
   ========================================================================== */
[hidden] { display: none !important; }

/* Search box */
.sg-search { position: relative; max-width: 520px; margin: 0 auto 22px; }
.sg-search-input {
  width: 100%;
  border: 2px solid var(--dz-line);
  border-radius: 999px;
  padding: 14px 20px 14px 46px;
  font-size: 16px;
  font-family: inherit;
  color: var(--dz-ink);
  background: var(--dz-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237158e2' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat 16px center;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.sg-search-input:focus { outline: none; border-color: var(--dz-violet); box-shadow: 0 0 0 4px rgba(113, 88, 226, .14); }
.sg-search-count { text-align: center; font-size: 13px; color: var(--dz-gray); margin: 10px 0 0; }

/* Group headings */
.sg-group-head { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--dz-gray); margin: 22px 0 12px; }
.sg-group-head--pop { color: var(--dz-violet); }
.sg-popular .sg-group-head--pop { margin-top: 0; }

/* Show-all details/summary */
.sg-showall { margin-top: 8px; }
.sg-showall-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--dz-blue);
  list-style: none; padding: 8px 4px;
}
.sg-showall-toggle::-webkit-details-marker { display: none; }
.sg-showall-toggle::after { content: "\25be"; transition: transform .2s ease; }
.sg-showall[open] > .sg-showall-toggle::after { transform: rotate(180deg); }
.sg-showall-body { padding-top: 6px; }
.sg-tile-group { margin-bottom: 10px; }

/* Picked-stain chip */
.sg-chip-row { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 4px 0 22px; }
.sg-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background-image: var(--dz-gradient); color: #fff; border: none;
  padding: 6px 8px 6px 6px; border-radius: 999px; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: var(--dz-shadow);
}
/* Icon sits on a white circular badge so the full-colour glyph reads clearly on the gradient chip. */
.sg-chip img {
  width: 26px; height: 26px; padding: 4px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  object-fit: contain;
}
.sg-chip-x { font-size: 18px; line-height: 1; opacity: .9; padding-right: 6px; }
.sg-chip-hint { font-size: 13px; color: var(--dz-gray); }

/* Segmented control (garment / household) */
.sg-segmented { display: inline-flex; background: var(--dz-soft); border-radius: 999px; padding: 4px; gap: 4px; margin: 0 auto 22px; }
.sg-solver .sg-segmented { display: flex; width: fit-content; }
.sg-seg-opt { border: none; background: transparent; font-weight: 600; font-size: 14px; color: var(--dz-gray); padding: 9px 22px; border-radius: 999px; cursor: pointer; transition: all .2s ease; }
.sg-seg-opt.is-selected { background: #fff; box-shadow: var(--dz-shadow); color: var(--dz-ink); }

/* Quest panels + centering */
.sg-quest-panel .sg-quest-title { text-align: center; }
.sg-popular, .sg-fabric-set { margin-bottom: 4px; }
.sg-noresult { text-align: center; color: var(--dz-gray); font-size: 15px; padding: 18px; }

/* No-JS fallback: without JS, open the show-all details so every tile is visible/crawlable,
   and reveal the fabric step (JS re-hides it and drives the reveal). */
.no-js .sg-showall { }

/* ==========================================================================
   Consolidated stain page (Consolidation plan): fabric chooser + method
   sections + client-side emphasis. All server-rendered; JS reshapes only.
   ========================================================================== */

/* ---- Dual-labelled fabric chooser ---- */
.sg-choose { margin: 30px 0 10px; }
.sg-choose-help { color: var(--dz-gray); font-size: 15px; margin: -8px 0 18px; }
.sg-choose-grid { display: flex; flex-direction: column; gap: 18px; }
.sg-choose-group { }
.sg-choose-group-label {
  display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--dz-gray); margin: 0 0 10px;
}
.sg-choose-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sg-choose-tile {
  display: flex; align-items: center; gap: 10px;
  background: var(--dz-surface); border: 2px solid var(--dz-line);
  border-radius: var(--dz-radius-sm); padding: 10px 12px;
  color: var(--dz-ink); font-weight: 600; font-size: 14px;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.sg-choose-tile:hover { text-decoration: none; color: var(--dz-ink); transform: translateY(-2px); border-color: var(--dz-violet); box-shadow: 0 8px 18px rgba(113,88,226,.14); }
.sg-choose-tile img { width: 34px; height: 34px; flex: none; object-fit: contain; }
.sg-choose-name { line-height: 1.2; }
/* The "common item" is the primary label; the fabric type sits under it, muted. */
.sg-fab-type { display: block; font-size: 11px; font-weight: 500; color: var(--dz-gray); }
.sg-choose-tile.is-selected {
  border-color: transparent; background-image: var(--dz-gradient); color: #fff;
  box-shadow: var(--dz-shadow-lift);
}
.sg-choose-tile.is-selected .sg-fab-type { color: rgba(255,255,255,.85); }
.sg-choose-tile.is-selected img { background: #fff; border-radius: 8px; padding: 4px; }

/* ---- Method sections ---- */
.sg-methods { margin-top: 8px; }
.sg-method { scroll-margin-top: 84px; } /* offset for the sticky header on anchor jump */
.sg-method-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sg-method-title { font-size: 21px; margin: 0; }
.sg-method-covers { color: var(--dz-gray); font-size: 14px; margin: 8px 0 18px; }
.sg-method-fabrics { display: block; margin-top: 4px; }
.sg-method-fabrics strong { color: var(--dz-ink); }
.sg-sub { font-size: 16px; margin: 22px 0 10px; }
.sg-method .sg-product-list { margin: 0; padding-left: 18px; }

/* Active section gets a subtle brand ring; collapsed ones tuck away their body. */
.sg-method.is-active { box-shadow: 0 0 0 2px var(--dz-blue), var(--dz-shadow); }
.sg-method.is-collapsed > *:not(.sg-method-head):not(.sg-method-covers) { display: none; }
.sg-method.is-collapsed { cursor: pointer; opacity: .92; }
.sg-method.is-collapsed .sg-method-covers { margin-bottom: 0; }
.sg-method.is-collapsed::after {
  content: "Show this method \25be"; display: inline-block; margin-top: 8px;
  font-size: 13px; font-weight: 600; color: var(--dz-blue);
}

/* Inline "call a pro" block within a method section */
.sg-method-pro {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--dz-soft); border-radius: var(--dz-radius-sm);
  padding: 16px 18px; margin: 20px 0 4px;
}
.sg-method-pro img { flex: none; }
.sg-method-pro strong { display: block; margin-bottom: 4px; }
.sg-method-pro p { margin: 0 0 12px; font-size: 14px; }
.sg-method-cta { font-size: 14px; padding: 9px 18px; }

/* ---- Related stains ---- */
.sg-related-stains { margin-top: 36px; }
.sg-related-stain-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.sg-related-stain-list li a {
  display: inline-block; background: var(--dz-surface); border: 1px solid var(--dz-line);
  border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px;
}
.sg-related-stain-list li a:hover { text-decoration: none; border-color: var(--dz-violet); }

@media (max-width: 640px) {
  .sg-choose-tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .sg-method-title { font-size: 19px; }
}
