/* Pre-workout Finder + homepage tools section */
/* Reuses all variables and base components from main.css + index.css */

/* ── Tools section (homepage) ── */
.tools-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 20px 8px;
}
.tools-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) {
  .tools-grid { grid-template-columns: 1fr; }
}
.tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  cursor: pointer;
}
.tool-card:hover {
  border-color: var(--green-border);
  background: var(--green-light);
  box-shadow: var(--sh-sm);
}
.tool-card--active {
  border-color: var(--green);
  background: var(--green-light);
}
.tool-card-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}
.tool-card-body { flex: 1; min-width: 0; }
.tool-card-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.tool-card-badge {
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--green);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.tool-card-desc {
  font-size: .76rem;
  color: var(--text-2);
  line-height: 1.45;
}
.tool-card--active .tool-card-name { color: var(--green); }
.tool-card-arrow {
  font-size: 1rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .15s;
}
.tool-card:hover .tool-card-arrow { transform: translateX(3px); color: var(--green); }

/* ── Tool tabs (homepage inline switcher) ── */
.tool-tabs {
  display: flex;
  gap: 10px;
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px 4px;
}
.tool-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.tool-tab:hover {
  border-color: var(--green-border);
  background: var(--green-light);
  box-shadow: var(--sh-sm);
}
.tool-tab--active {
  border-color: var(--green);
  background: var(--green-light);
}
.tool-tab-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.tool-tab-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tool-tab-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tool-tab--active .tool-tab-name { color: var(--green); }
.tool-tab-sub {
  font-size: .72rem;
  color: var(--text-2);
  line-height: 1.3;
}
.tool-tab-badge {
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--green);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .04em;
}
@media (max-width: 420px) {
  .tool-tabs { flex-direction: column; }
}

/* ── Header ── */
.pw-header {
  background: linear-gradient(135deg, #0d2a1c 0%, #1a5235 60%, #26724a 100%);
  padding: 60px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pw-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,255,255,.07) 0%, transparent 70%);
  pointer-events: none;
}
.pw-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 16px auto 12px;
}
.pw-header p {
  color: rgba(255,255,255,.82);
  font-size: .98rem;
  max-width: 540px;
  margin: 0 auto 24px;
  line-height: 1.65;
}
.pw-header-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  border: 1px solid rgba(255,255,255,.18);
}
.pw-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pw-trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(255,255,255,.13);
  color: rgba(255,255,255,.9);
  font-size: .75rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.2);
}

/* ── Step progress ── */
.pw-steps-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 20px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pw-steps-row::-webkit-scrollbar { display: none; }
.pw-step-item {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.pw-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  transition: all .2s;
  flex-shrink: 0;
}
.pw-step-dot.active {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
}
.pw-step-dot.done {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.pw-step-label {
  font-size: .68rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  margin-top: 4px;
}
.pw-step-label.active { color: var(--green); font-weight: 700; }
.pw-step-label.done   { color: var(--green); }
.pw-step-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.pw-step-line {
  height: 2px;
  width: 28px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
  transition: background .2s;
}
.pw-step-line.done { background: var(--green); }

/* ── Question panels ── */
.pw-question {
  animation: fadeSlideIn .3s ease both;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pw-q-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.pw-q-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}
.pw-q-sub {
  font-size: .85rem;
  color: var(--text-2);
  margin-bottom: 18px;
}

/* Option cards — reuses index.css base, override for pw */
.pw-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 6px;
}
.pw-options[data-field="goal"] {
  grid-template-columns: repeat(3, 1fr);
}
.pw-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 15px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.pw-option:hover {
  border-color: var(--green-border);
  background: var(--green-light);
}
.pw-option.active {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: 0 0 0 2px rgba(26,82,53,.12);
}
.pw-option-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.pw-option-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.pw-option-desc {
  font-size: .74rem;
  color: var(--text-2);
  line-height: 1.4;
}
.pw-option.active .pw-option-name { color: var(--green); }
.pw-option.active .pw-option-desc { color: var(--green-mid); }

/* Warning badge on option */
.pw-option-warn {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--amber-light);
  border: 1px solid var(--amber-border);
  color: var(--amber);
  font-size: .65rem;
  font-weight: 700;
}

/* ── Progress / summary ── */
.pw-live-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-xs);
  background: var(--green-light);
  border: 1px solid var(--green-border);
  font-size: .8rem;
  color: var(--green);
  font-weight: 600;
  margin-top: 16px;
  opacity: 0;
  transition: opacity .3s;
}
.pw-live-summary.show { opacity: 1; }
.pw-live-summary-bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(26,82,53,.15);
  overflow: hidden;
}
.pw-live-summary-fill {
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width .3s ease;
}

/* ── Submit button ── */
.pw-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  margin-top: 24px;
  border-radius: var(--r-sm);
  background: var(--green);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.pw-submit:hover { background: var(--green-mid); }
.pw-submit:active { transform: scale(.99); }
.pw-submit:disabled { opacity: .55; cursor: not-allowed; }

/* ── Results section ── */
#pw-results {
  display: none;
  animation: fadeSlideIn .35s ease both;
}
#pw-results.show { display: block; }

.pw-results-header {
  padding: 28px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.pw-results-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.pw-results-sub {
  font-size: .85rem;
  color: var(--text-2);
}
.pw-redo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: var(--r-xs);
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.pw-redo-btn:hover { background: var(--border); }

/* ── Product recommendation cards ── */
.pw-recs-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pw-rec-card {
  border-radius: var(--r);
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  animation: fadeSlideIn .35s ease both;
}
.pw-rec-card:nth-child(2) { animation-delay: .07s; }
.pw-rec-card:nth-child(3) { animation-delay: .14s; }

.pw-rec-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  gap: 10px;
}
.pw-rec-rank {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pw-rank-badge {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.pw-rank-badge.rank-1 { background: var(--green); color: #fff; }
.pw-rank-badge.rank-2 { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.pw-rank-badge.rank-3 { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.pw-rec-score {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
}
.pw-rec-match-pct {
  font-size: .8rem;
  font-weight: 700;
  color: var(--green);
}

.pw-rec-body {
  padding: 18px 18px 14px;
}
.pw-rec-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.pw-rec-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.pw-rec-name-wrap {}
.pw-rec-brand {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.pw-rec-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 3px;
}
.pw-rec-tagline {
  font-size: .8rem;
  color: var(--text-2);
}

.pw-rec-benefit {
  font-size: .87rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* Why this matches you */
.pw-match-reasons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--r-xs);
  background: var(--green-light);
  border: 1px solid var(--green-border);
}
.pw-match-reason {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .8rem;
  color: var(--green);
  line-height: 1.5;
}
.pw-match-reason-check { flex-shrink: 0; font-weight: 700; }

/* Ingredients list */
.pw-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.pw-ingredient-chip {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-2);
}

/* Dosage row */
.pw-dosage-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  background: var(--surface2);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  font-size: .8rem;
  color: var(--text-2);
}
.pw-dosage-icon { flex-shrink: 0; }

/* Stim-free badge */
.pw-stimfree-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font-size: .72rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Warning note */
.pw-warning-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  background: var(--amber-light);
  border: 1px solid var(--amber-border);
  font-size: .78rem;
  color: var(--amber);
  margin-bottom: 12px;
  line-height: 1.5;
}

.pw-rec-footer {
  padding: 0 18px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.pw-price-wrap {
  flex: 1;
  min-width: 100px;
}
.pw-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.pw-price-note {
  font-size: .72rem;
  color: var(--muted);
}
.pw-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: var(--r-xs);
  background: var(--green);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.pw-buy-btn:hover { background: var(--green-mid); }
.pw-buy-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Ecosystem CTA ── */
.pw-ecosystem-cta {
  margin-top: 32px;
  padding: 20px;
  border-radius: var(--r);
  background: var(--surface2);
  border: 1px solid var(--border);
  text-align: center;
}
.pw-ecosystem-cta h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.pw-ecosystem-cta p {
  font-size: .85rem;
  color: var(--text-2);
  margin-bottom: 14px;
}
.pw-ecosystem-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r-xs);
  background: var(--green);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
}
.pw-ecosystem-link:hover { background: var(--green-mid); }

/* ── Profile badge (shown in results) ── */
.pw-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.pw-profile-chip {
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: .74rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ── Caffeine note ── */
.pw-caffeine-note {
  padding: 12px 14px;
  border-radius: var(--r-xs);
  background: var(--amber-light);
  border: 1px solid var(--amber-border);
  font-size: .8rem;
  color: var(--amber);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── FAQ ── */
.pw-faq { margin-top: 8px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .pw-options {
    grid-template-columns: 1fr 1fr;
  }
  .pw-options[data-field="goal"] {
    grid-template-columns: 1fr 1fr;
  }
  .pw-rec-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .pw-buy-btn { justify-content: center; }
  /* Stepper: na mobilu skrýt textové popisky a zúžit spojnice — jinak 6 kroků
     přeteče centrovaný overflow-x kontejner a první krok se ořízne (nedostupný). */
  .pw-steps-row { padding: 18px 8px 8px; }
  .pw-step-label { display: none; }
  .pw-step-line { width: 16px; }
}
@media (max-width: 380px) {
  .pw-options { grid-template-columns: 1fr; }
}

/* Stack Builder cross-promo banner on homepage */
.pw-crosspromo-banner {
  padding: 20px;
  border-radius: var(--r);
  background: linear-gradient(135deg, #0d2a1c, #1a5235);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 0;
}
.pw-crosspromo-icon { font-size: 2.2rem; flex-shrink: 0; }
.pw-crosspromo-text { flex: 1; min-width: 160px; }
.pw-crosspromo-text h3 { font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: 3px; }
.pw-crosspromo-text p  { font-size: .8rem; color: rgba(255,255,255,.75); line-height: 1.4; }
.pw-crosspromo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--r-xs);
  background: #fff;
  color: var(--green);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
  flex-shrink: 0;
}
.pw-crosspromo-link:hover { opacity: .9; }
