/* Buya AI — flagship portfolio treatment */
.product-stage[data-product-key="buya-ai"] {
  min-height: 660px;
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1.58fr);
}

.product-stage[data-product-key="buya-ai"] .product-story {
  background: #fffaf5;
}

.portfolio-demo--buya-ai {
  min-height: 606px;
  padding: 0;
  background: #f7f5f1;
  color: #171717;
}

.buya-showcase {
  display: grid;
  min-height: 606px;
  grid-template-rows: auto auto auto 1fr;
}

.buya-showcase__top {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid #d7d2ca;
  background: #171717;
  color: #fff;
}

.buya-showcase__top strong {
  font-family: Georgia, serif;
  font-size: 18px;
}

.buya-showcase__top span {
  color: #f18a68;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.buya-showcase__top i {
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  color: #d7ff52;
  font-size: 6px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.buya-showcase__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(190px, 0.88fr);
  gap: 24px;
  align-items: end;
  padding: 15px 17px 13px;
  border-bottom: 1px solid #d7d2ca;
}

.buya-showcase__intro > div {
  display: grid;
  gap: 4px;
}

.buya-showcase__intro small {
  color: #dc6f50;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.buya-showcase__intro strong {
  max-width: 520px;
  font-family: Georgia, serif;
  font-size: clamp(18px, 2vw, 27px);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.buya-showcase__intro p {
  margin: 0;
  color: #66615c;
  font-size: 9px;
  line-height: 1.5;
}

.buya-view-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 17px;
  background: #efece6;
}

.buya-view-nav .mini-choice {
  min-height: 31px;
  border-color: #aaa49d;
  background: transparent;
  color: #171717;
  font-size: 8px;
}

.buya-view-nav .mini-choice.is-active {
  border-color: #171717;
  background: #171717;
  color: #fff;
}

.buya-view-panel {
  min-width: 0;
  padding: 0 17px 17px;
  background: #efece6;
}

/* Real answer */
.buya-answer-workspace {
  display: grid;
  min-height: 420px;
  grid-template-columns: 126px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 9px;
}

.buya-case-strip {
  display: grid;
  grid-row: 1 / 3;
  gap: 5px;
  align-content: start;
  padding: 8px;
  border: 1px solid #cbc5bc;
  background: #fff;
}

.buya-case-strip .mini-choice {
  min-height: 38px;
  justify-content: flex-start;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid #e1ddd7;
  background: transparent;
  text-align: left;
}

.buya-case-strip .mini-choice:last-child {
  border-bottom: 0;
}

.buya-case-strip .mini-choice.is-active {
  background: #f18a68;
  color: #171717;
}

.buya-question {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #cbc5bc;
  border-radius: 12px;
  background: #fff;
}

.buya-question small {
  grid-column: 1;
  color: #a04c34;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.buya-question strong {
  grid-column: 1;
  overflow-wrap: anywhere;
  font-size: 9px;
}

.buya-question span {
  display: grid;
  width: 27px;
  height: 27px;
  grid-column: 2;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 8px;
  background: #171717;
  color: #fff;
  font-size: 11px;
}

.buya-real-answer {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 9px;
  padding: 12px;
  border: 1px solid #cbc5bc;
  border-left: 4px solid #f18a68;
  border-radius: 10px;
  background: #fff;
}

.buya-real-answer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.buya-real-answer > header div {
  display: grid;
  gap: 2px;
}

.buya-real-answer > header b {
  font-family: Georgia, serif;
  font-size: 14px;
}

.buya-real-answer > header small {
  color: #8a837c;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.buya-real-answer > header > span {
  padding: 4px 7px;
  background: #e4f1df;
  color: #2e6838;
  font-size: 6px;
  font-weight: 900;
}

.buya-real-answer > p {
  margin: 0;
  color: #4d4945;
  font-family: Georgia, serif;
  font-size: 10px;
  line-height: 1.55;
}

.buya-reference-list {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #ded9d1;
}

.buya-reference-list > small {
  margin-bottom: 2px;
  color: #a04c34;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.buya-reference-list > div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 6px 7px;
  border: 1px solid #ded9d1;
  background: #faf8f4;
}

.buya-reference-list span {
  color: #dc6f50;
  font-family: Georgia, serif;
  font-size: 8px;
  font-style: italic;
  font-weight: 700;
}

.buya-reference-list strong {
  overflow-wrap: anywhere;
  font-size: 7px;
  line-height: 1.35;
}

.buya-reference-list i {
  font-size: 8px;
  font-style: normal;
}

.buya-real-answer > footer {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.buya-real-answer > footer span {
  padding: 4px 6px;
  border: 1px solid #d4cec6;
  color: #68625c;
  font-size: 6px;
  font-weight: 900;
}

/* System */
.buya-system-view,
.buya-difference-view {
  display: grid;
  min-height: 420px;
  align-content: start;
  gap: 13px;
  padding: 15px;
  border: 1px solid #cbc5bc;
  background: #fff;
}

.buya-system-lead,
.buya-difference-lead {
  display: grid;
  max-width: 680px;
  gap: 5px;
}

.buya-system-lead small,
.buya-difference-lead small {
  color: #dc6f50;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.buya-system-lead strong,
.buya-difference-lead strong {
  font-family: Georgia, serif;
  font-size: clamp(19px, 2.3vw, 28px);
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.buya-system-lead p,
.buya-difference-lead p {
  max-width: 670px;
  margin: 0;
  color: #625d57;
  font-size: 9px;
  line-height: 1.55;
}

.buya-pipeline {
  display: grid;
  grid-template-columns: 1fr 10px 1fr 10px 1fr 10px 1fr 10px 1fr;
  gap: 4px;
  align-items: stretch;
}

.buya-pipeline > div {
  display: grid;
  min-width: 0;
  min-height: 108px;
  align-content: start;
  gap: 5px;
  padding: 10px;
  border: 1px solid #cbc5bc;
  background: #faf8f4;
}

.buya-pipeline > div:nth-of-type(5) {
  background: #171717;
  color: #fff;
}

.buya-pipeline span {
  color: #dc6f50;
  font-family: Georgia, serif;
  font-size: 8px;
  font-style: italic;
  font-weight: 700;
}

.buya-pipeline strong {
  font-size: 9px;
}

.buya-pipeline small {
  color: #6b655f;
  font-size: 7px;
  line-height: 1.4;
}

.buya-pipeline > div:nth-of-type(5) small {
  color: rgba(255, 255, 255, 0.66);
}

.buya-pipeline > i {
  align-self: center;
  font-size: 8px;
  font-style: normal;
  text-align: center;
}

.buya-system-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.buya-system-stats div {
  display: grid;
  gap: 3px;
  padding: 11px;
  border-top: 4px solid #f18a68;
  background: #171717;
  color: #fff;
}

.buya-system-stats strong {
  font-family: Georgia, serif;
  font-size: 15px;
}

.buya-system-stats span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 7px;
}

/* Difference */
.buya-difference-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.buya-difference-grid article {
  display: grid;
  min-height: 142px;
  align-content: start;
  gap: 7px;
  padding: 11px;
  border: 1px solid #cbc5bc;
  background: #faf8f4;
}

.buya-difference-grid article:nth-child(2) {
  background: #f7d8ca;
}

.buya-difference-grid article:nth-child(3) {
  background: #171717;
  color: #fff;
}

.buya-difference-grid span {
  color: #dc6f50;
  font-family: Georgia, serif;
  font-size: 9px;
  font-style: italic;
  font-weight: 700;
}

.buya-difference-grid strong {
  font-size: 9px;
  line-height: 1.2;
}

.buya-difference-grid p {
  margin: 0;
  color: #67615b;
  font-size: 7px;
  line-height: 1.5;
}

.buya-difference-grid article:nth-child(3) p {
  color: rgba(255, 255, 255, 0.65);
}

.buya-honesty {
  padding: 11px 13px;
  border-left: 5px solid #d7ff52;
  background: #171717;
  color: #fff;
}

.buya-honesty b {
  font-family: Georgia, serif;
  font-size: 10px;
  line-height: 1.45;
}

@media (width <= 980px) {
  .product-stage[data-product-key="buya-ai"] {
    grid-template-columns: minmax(210px, 0.4fr) minmax(0, 1.6fr);
  }

  .buya-showcase__intro {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .buya-pipeline {
    grid-template-columns: repeat(5, minmax(96px, 1fr));
    overflow-x: auto;
  }

  .buya-pipeline > i {
    display: none;
  }
}

@media (width <= 760px) {
  .product-stage[data-product-key="buya-ai"] {
    grid-template-columns: 1fr;
  }

  .portfolio-demo--buya-ai,
  .buya-showcase {
    min-height: 650px;
  }

  .buya-answer-workspace {
    grid-template-columns: 1fr;
  }

  .buya-case-strip {
    display: flex;
    grid-row: auto;
    overflow-x: auto;
  }

  .buya-case-strip .mini-choice {
    min-width: max-content;
    border-right: 1px solid #e1ddd7;
    border-bottom: 0;
  }

  .buya-difference-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width <= 420px) {
  .buya-showcase__top {
    flex-wrap: wrap;
  }

  .buya-showcase__top span {
    order: 3;
    width: 100%;
  }

  .buya-showcase__intro,
  .buya-view-panel {
    padding-right: 11px;
    padding-left: 11px;
  }

  .buya-view-nav {
    padding-right: 11px;
    padding-left: 11px;
  }

  .buya-view-nav .mini-choice {
    padding-inline: 6px;
    font-size: 7px;
  }

  .buya-real-answer > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .buya-system-view,
  .buya-difference-view {
    padding: 12px;
  }

  .buya-pipeline {
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }

  .buya-pipeline > div:nth-of-type(5) {
    grid-column: 1 / -1;
  }

  .buya-system-stats,
  .buya-difference-grid {
    grid-template-columns: 1fr;
  }

  .buya-difference-grid article {
    min-height: auto;
  }
}
