/* ── Price & Availability case study ── */

body {
  background: #ffffff;
}

/* ── Hero — reuses .cc-hero (text + image, shared font sizes),
   overriding only the background to the P&A warm sand. ── */
.pa-hero {
  background: #f2ece4;
}

/* Keep the banner image whole (no cropping) and as large as the band allows,
   mirroring the Panelboard hero treatment. The banner is landscape, so give the
   media column a little more room than the default 50fr — this lets the image
   reach the same 344px height as the Panelboard hero. */
.pa-hero .cc-hero-inner {
  grid-template-columns: 65fr 55fr;
  padding-bottom: 40px;
}

.pa-hero .cc-hero-media img {
  width: auto;
  max-width: 100%;
  max-height: 344px;
  margin: 0 auto;
}

/* ── User research — stats (indented from both sides) ── */
.pa-research {
  padding: 0 64px;
}

.pa-research-intro {
  margin-bottom: 24px;
}

/* ── Core features — early AI-sketched wireframes ── */
.pa-wireframes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pa-wireframe {
  margin: 0;
}

.pa-wireframe img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.pa-wireframe figcaption {
  margin-top: 10px;
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.55);
}

/* ── AI-assisted early testing — flow diagram ── */
.pa-flow {
  margin-top: 8px;
}

.pa-flow svg {
  display: block;
  width: 100%;
  height: auto;
}

.pa-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pa-stat {
  font-family: 'Satoshi', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}

/* Highlighted figures, matching the Figma research callouts */
.pa-stat-num {
  font-family: 'Satoshi', sans-serif;
  font-weight: 500;
  font-size: 26px;
  color: var(--red);
}

.pa-stat-num .pa-pct {
  font-size: 16px;
}

.pa-challenges {
  margin-top: 4px;
}

/* ── AI-Assisted Analysis ── */
.pa-ai-themes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
  padding: 0;
}

.pa-ai-themes li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Satoshi', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}

.pa-ai-themes .pa-feature-tag {
  flex-shrink: 0;
  min-width: 96px;
  text-align: center;
}

.pa-ai-note {
  margin-top: 8px;
}

/* ── Core features ── */
.pa-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
  margin-top: 24px;
}

.pa-feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.pa-feature-tag {
  display: inline-block;
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.43;
  padding: 4px 14px;
  border-radius: 8px;
  white-space: nowrap;
}

.pa-feature-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.pa-feature-body {
  font-family: 'Satoshi', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
}

/* Priority pill colours — neutral ink family, ranked by darkness */
.pa-tag--must {
  color: var(--black);
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.4);
}

.pa-tag--high {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.pa-tag--nice {
  color: var(--gray-mid);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.pa-tag--noted {
  color: var(--gray-mid);
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* ── UI Design ── */
/* Image 7 / text 5 — matches the ratio used on the Panelboard case study */
.pa-ui-row {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 24px;
  align-items: center;
  margin-top: 72px;
}

/* Plain text wrapper next to a screenshot — no outline, just spacing */
.pa-ui-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pa-ui-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}

.pa-ui-figure {
  margin: 0;
  text-align: center;
}

.pa-ui-row img,
.pa-ui-pair img {
  border-radius: 0;
}

/* Specificity must beat .gb-wireframe-img img (giselle-bedding.css) */
.gb-wireframe-img .pb-wireframe-screenshot {
  border-radius: 0;
}

/* Zig-zag rows: match the 24px image/text gap used by the rows above
   (overrides .gb-wireframe's 64px), which also renders the images larger. */
.gb-wireframe.pb-wireframe-row {
  gap: 24px;
}

.pa-ui-caption {
  margin-top: 6px;
  text-align: center;
  font-size: 16px;
  font-style: italic;
}

/* Problem → solution pairing — ties each step back to a research finding */
.pa-solves-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.pa-solves-tags .pa-solves-tag {
  margin-bottom: 0;
}

.pa-solves-tag {
  display: inline-block;
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.43;
  padding: 4px 14px;
  border-radius: 8px;
  color: var(--red);
  background: rgba(253, 89, 86, 0.08);
  border: 1px solid rgba(253, 89, 86, 0.3);
  margin-bottom: 12px;
}

/* ── Order flow (cart → checkout → confirmation) ── */
/* Two independent columns: left stacks cart + confirmation, right stacks text + checkout */
.pa-order-flow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 72px;
  align-items: start;
}

.pa-order-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pa-order-flow img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

/* ── Mobile Design ── */
/* Full content width — matches the sections above */
.pa-mobile {
  margin: 48px 0 0;
}

.pa-mobile-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Responsive ── */
/* When rows stack on mobile, always show the image first, text below.
   Overrides giselle's .gb-wireframe--stacked rule that drops the image last. */
@media (max-width: 1024px) {
  .gb-wireframe--stacked .gb-wireframe-img {
    order: -1;
  }
}

@media (max-width: 900px) {
  .pa-ui-row,
  .pa-ui-pair,
  .pa-order-flow {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Order-flow: keep all screenshots on top, drop the text block to the bottom */
  .pa-order-flow .pa-order-col .pa-ui-text {
    order: 1;
  }

  .pa-features {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pa-wireframes {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Drop the indent on mobile */
  .pa-research {
    padding: 0;
  }
}

@media (max-width: 600px) {
  .pa-stat-num {
    font-size: 22px;
  }
}
