/* ============================================================
   workshops-detail.css — a workshop's public "View Details" page
   Shared tokens / buttons / header / footer come from public-shell.css;
   the card grid used for the related workshops comes from
   workshops-public.css. This file only holds what is specific to the
   details page.
   ============================================================ */

/* ---------- layout: hero + body on the left, sticky buy box on the right ---------- */
.wd-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 14px 0 8px; }
.wd-hero { min-width: 0; }
.wd-buybox { min-width: 0; }
.wd-main { min-width: 0; }
@media (min-width: 1024px) {
  .wd-layout {
    grid-template-columns: minmax(0, 1fr) 360px; column-gap: 32px; align-items: start;
    grid-template-areas: "hero aside" "facts aside" "main aside";
  }
  .wd-hero { grid-area: hero; }
  .wd-facts { grid-area: facts; }
  .wd-buybox { grid-area: aside; position: sticky; top: 84px; }
  .wd-main { grid-area: main; }
}

/* ---------- breadcrumb: long titles end in "…" instead of being cut off ---------- */
.breadcrumb-bar .wd-crumb { display: inline-block; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (min-width: 720px) { .breadcrumb-bar .wd-crumb { max-width: 460px; } }

/* ---------- hero ---------- */
.wd-ended-banner {
  display: flex; gap: 12px; align-items: flex-start; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 14px; font-size: 0.84rem; line-height: 1.4;
}
.wd-ended-banner i { font-size: 1.3rem; flex-shrink: 0; }
.wd-ended-banner strong { display: block; }

.wd-cover { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #0f172a; aspect-ratio: 1200 / 520; box-shadow: var(--shadow-card); }
.wd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-cover-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e3a8a, #7c3aed); color: rgba(255,255,255,0.75); font-size: 3.4rem; }
.wd-cover-badge { position: absolute; top: 14px; right: 14px; background: #dc2626; color: #fff; font-weight: 800; font-size: 0.8rem; padding: 5px 11px; border-radius: var(--radius-full); box-shadow: 0 4px 12px rgba(239,68,68,0.35); }

.wd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.wd-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; font-weight: 700; padding: 5px 11px; border-radius: var(--radius-full); background: #fff; border: 1px solid var(--border); color: var(--text-muted); }
.wd-chip.topic { background: var(--primary-light); border-color: #bfdbfe; color: var(--primary); }
a.wd-chip { min-height: 34px; }
a.wd-chip:hover { background: var(--primary); color: #fff; }

.wd-title { font-size: clamp(1.4rem, 3.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; color: #0f172a; margin-bottom: 12px; overflow-wrap: anywhere; }

.wd-byline { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.wd-by-avatar { flex: 0 0 auto; }
.wd-by-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #e2e8f0; display: block; }
.wd-by-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 0.86rem; }
.wd-by-line { color: var(--text-muted); }
.wd-by-line a, .wd-by-line strong { color: #0f172a; font-weight: 800; }
.wd-by-line a:hover { color: var(--primary); }
.wd-by-rating { font-size: 0.78rem; color: var(--text-muted); }
.wd-by-rating i { color: var(--accent-amber-text, #b45309); }
.wd-by-rating strong { color: #0f172a; }
.wd-verified { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 0.7rem; font-weight: 800; color: #047857; background: #ecfdf5; padding: 2px 8px; border-radius: var(--radius-full); vertical-align: middle; }
.wd-verified.small { font-size: 0.66rem; padding: 1px 7px; }

/* 6-column grid, every fact spans 2 (3 per row on desktop; 2 per row on phones = span 3).
   The last row is then stretched, so 4, 5 or 7 facts never leave an empty gap. */
.wd-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; min-width: 0; margin: 0; }
.wd-fact { grid-column: span 3; }
.wd-fact:last-child:nth-child(odd) { grid-column: span 6; }
@media (min-width: 640px) {
  .wd-fact { grid-column: span 2; }
  .wd-fact:last-child:nth-child(3n+1) { grid-column: span 6; }
  .wd-fact:last-child:nth-child(3n+2), .wd-fact:nth-last-child(2):nth-child(3n+1) { grid-column: span 3; }
}
.wd-fact { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; min-width: 0; }
@media (min-width: 640px) { .wd-fact { padding: 12px 14px; } }
.wd-fact dt { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.wd-fact dt i { color: var(--primary); font-size: 0.95rem; }
.wd-fact dd small { display: block; margin-top: 2px; font-size: 0.76rem; font-weight: 600; color: var(--text-muted); }
.wd-fact dd { font-size: 0.84rem; font-weight: 700; color: #0f172a; line-height: 1.35; overflow-wrap: anywhere; }

/* ---------- buy box ---------- */
.wd-buybox-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card); }
.wd-price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.wd-price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: #0f172a; line-height: 1.1; }
.wd-mrp { font-size: 1rem; color: var(--text-muted); font-weight: 600; }
.wd-off { background: #ecfdf5; color: #047857; font-weight: 800; font-size: 0.74rem; padding: 3px 9px; border-radius: var(--radius-full); }
.wd-save { font-size: 0.8rem; font-weight: 700; color: #047857; margin: 6px 0 0; }

.wd-urgency {
  display: flex; align-items: center; gap: 8px; margin: 14px 0; padding: 10px 12px; border-radius: var(--radius-md);
  background: #fef2f2; color: #b91c1c; font-size: 0.84rem; font-weight: 800;
}
.wd-urgency i { font-size: 1.05rem; }

.wd-cta { width: 100%; justify-content: center; padding: 14px 18px; font-size: 0.98rem; margin-top: 4px; }
.wd-cta-note { font-size: 0.76rem; color: var(--text-muted); text-align: center; margin: 10px 2px 0; line-height: 1.4; }

.wd-share { display: flex; gap: 8px; margin-top: 14px; }
.wd-share-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; color: var(--text-muted);
  font-size: 0.78rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: var(--transition); min-height: 44px;
}
.wd-share-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.wd-share-btn[hidden] { display: none; }

.wd-trust { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border-light); display: grid; gap: 9px; }
.wd-trust li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.8rem; color: var(--text-muted); line-height: 1.35; }
.wd-trust i { color: var(--primary); font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ---------- body sections ---------- */
.wd-section { padding: 26px 0; border-bottom: 1px solid var(--border-light); }
.wd-section:first-child { padding-top: 8px; }
.wd-section h2, .wd-related h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: #0f172a; margin-bottom: 14px; }
.wd-subhead { font-size: 0.98rem; font-weight: 800; margin: 22px 0 12px; color: #0f172a; }

.wd-prose p { font-size: 0.94rem; line-height: 1.7; color: #334155; margin-bottom: 12px; overflow-wrap: anywhere; }
.wd-prose p:last-child { margin-bottom: 0; }

.wd-checklist { list-style: none; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .wd-checklist { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
.wd-checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; line-height: 1.45; color: #334155; }
.wd-checklist li i { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: #ecfdf5; color: #047857; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; margin-top: 1px; }
.wd-checklist.alt li i { background: var(--primary-light); color: var(--primary); }

.wd-includes { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.wd-includes li { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-full); padding: 8px 14px; font-size: 0.84rem; font-weight: 600; color: #334155; }
.wd-includes li i { color: var(--accent-amber-text, #b45309); font-size: 1rem; }

.wd-agenda { list-style: none; position: relative; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.wd-agenda li { position: relative; display: flex; gap: 14px; padding: 0 0 20px 22px; border-left: 2px solid #dbeafe; }
.wd-agenda li:last-child { padding-bottom: 0; border-left-color: transparent; }
.wd-agenda li::before { content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px #dbeafe; }
.wd-agenda-time { flex: 0 0 96px; min-width: 0; font-size: 0.78rem; font-weight: 800; color: var(--primary); padding-top: 1px; overflow-wrap: anywhere; }
@media (max-width: 480px) { .wd-agenda-time { flex-basis: 78px; } }
.wd-agenda strong { display: block; font-size: 0.94rem; color: #0f172a; line-height: 1.35; overflow-wrap: anywhere; }
.wd-agenda p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; margin-top: 3px; overflow-wrap: anywhere; }

/* ---------- trainer ---------- */
.wd-trainer-card { display: flex; gap: 16px; align-items: center; }
.wd-trainer-avatar { flex: 0 0 76px; }
.wd-trainer-avatar img { width: 76px; height: 76px; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: #e2e8f0; display: block; }
.wd-trainer-info { min-width: 0; }
.wd-trainer-name { display: inline-block; padding: 4px 0; font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.wd-trainer-name:hover { color: var(--primary); }
.wd-trainer-headline { font-size: 0.86rem; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.wd-trainer-loc { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }
/* auto-fit: 1 stat = one full-width card, 2 = halves, 3 = thirds — never a lone card with an empty gap beside it */
.wd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; margin-top: 18px; }
/* White cards with a real border + soft shadow. (They used to be #f8fafc — the same colour as the page background —
   so they looked transparent.) A thin brand-colour bar on top gives them a finished look. */
.wd-tiles div {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px 8px 14px; text-align: center; box-shadow: var(--shadow-subtle); min-width: 0;
}
.wd-tiles div::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent-purple)); }
.wd-tiles strong { display: block; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; color: #0f172a; line-height: 1.15; }
.wd-tiles span { display: block; margin-top: 4px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); line-height: 1.3; }
@media (max-width: 380px) { .wd-tiles span { font-size: 0.7rem; letter-spacing: 0.02em; } }
.wd-skill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wd-skill { background: #fff; color: var(--primary); border: 1px solid #bfdbfe; font-size: 0.74rem; font-weight: 700; padding: 5px 12px; border-radius: var(--radius-full); }
.wd-clients { font-size: 0.84rem; color: var(--text-muted); margin-top: 14px; line-height: 1.5; }
.wd-clients i { color: var(--text-muted); margin-right: 4px; }
.wd-clients strong { color: #0f172a; }
.wd-reviews { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.wd-review { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; margin: 0; }
.wd-review-stars { color: var(--accent-amber-text, #b45309); font-size: 0.92rem; margin-bottom: 6px; }
.wd-review blockquote { font-size: 0.86rem; line-height: 1.55; color: #334155; margin: 0 0 10px; overflow-wrap: anywhere; }
.wd-review figcaption { font-size: 0.76rem; color: var(--text-muted); }
.wd-review figcaption strong { color: #0f172a; }
.wd-profile-link { margin-top: 18px; min-height: 44px; }

/* ---------- FAQ (native <details>: works with no JavaScript) ---------- */
.wd-faq { display: grid; gap: 10px; }
.wd-faq details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); }
.wd-faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 0.92rem; color: #0f172a; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; overflow-wrap: anywhere; }
.wd-faq summary::-webkit-details-marker { display: none; }
.wd-faq summary::after { content: '+'; font-size: 1.3rem; font-weight: 500; color: var(--primary); flex-shrink: 0; line-height: 1; }
.wd-faq details[open] summary::after { content: '–'; }
.wd-faq-a { padding: 0 16px 16px; font-size: 0.88rem; line-height: 1.6; color: #475569; overflow-wrap: anywhere; }

/* ---------- closing CTA + mobile sticky bar ---------- */
.wd-closing {
  margin: 26px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #0f172a, #1e3a8a); color: #fff; border-radius: var(--radius-lg); padding: 20px 22px;
}
.wd-closing strong { display: block; font-size: 1.35rem; font-weight: 800; }
.wd-closing strong s { font-size: 0.9rem; opacity: 0.6; font-weight: 600; margin-left: 6px; }
.wd-closing span { font-size: 0.82rem; color: #cbd5e1; }
.wd-closing .btn { background: #fff; color: #0f172a; box-shadow: none; }
.wd-closing .btn:hover { background: var(--primary-light); }

/* On a phone the sticky bar below already keeps the price + button in reach, so a second one here would just repeat it. */
@media (max-width: 1023px) { .wd-closing { display: none; } }

body.has-sticky-bar { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { body.has-sticky-bar { padding-bottom: 0; } }
.wd-sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1900;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,0.05);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 1024px) { .wd-sticky-bar { display: none !important; } }
.wd-sticky-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; max-width: 1200px; margin: 0 auto; }
.wd-sticky-price { min-width: 0; }
.wd-sticky-price strong { display: block; font-size: 1.05rem; font-weight: 800; color: #0f172a; line-height: 1.15; }
.wd-sticky-price strong s { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; margin-left: 4px; }
.wd-sticky-price span { font-size: 0.7rem; font-weight: 700; color: #b91c1c; }
.wd-sticky-inner .btn { flex-shrink: 0; padding: 11px 16px; font-size: 0.86rem; min-height: 44px; }

/* ---------- related ---------- */
.wd-related { margin: 34px 0 6px; }
@media (min-width: 1200px) { .wd-related .workshops-page-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
