/* =====================================================================
   PRODUCT DETAIL PAGES: product and solution pages
   (body.product-detail-page.sv-page), e.g. pages/dynamics-365-sales-1.html.
   Built on the shared site components (page-hero, sec-head-center,
   offer-card, section-dark, final-cta) and the same patterns as the
   Services and Use Cases pages. Load after styles.css and section-nav.css.
   Pages are generated with _dev/tools/build_product_page.py.
   ===================================================================== */

.product-detail-page section[id] { scroll-margin-top: 120px; }
.product-detail-page .d365-cta-center { justify-content: center; }

/* Product badge above the hero title: icon + name */
.pp-product {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy, #1A3A7C);
}
.pp-product img { width: 44px; height: 44px; flex: none; }

/* Label chip: "Copilot assistance", "Preview", "Illustrative solution" */
.pp-chip {
  display: inline-block;
  align-self: flex-start;
  padding: .25rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: #fff;
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--txt-head);
}
.pp-chip-preview { background: #fff4da; border-color: #eed59e; color: #725113; }

/*: : : CARDS WITH ICON (features, use cases): : : : : : : : : : : */
.pp-card-top {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .35rem;
}
.pp-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bg-blue);
  color: var(--blue);
  transition: background .3s, color .3s, transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.pp-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.offer-card:hover .pp-icon {
  background: var(--grad);
  color: #fff;
  transform: rotate(-8deg) scale(1.06);
}
/* Customer channels: brand logos on a white tile so their colours stay true */
.pp-icon--logo { background: #fff; border: 1px solid var(--border); }
.pp-icon--logo img { width: 28px; height: 28px; object-fit: contain; }
.offer-card:hover .pp-icon--logo { background: #fff; color: var(--blue); }

.pp-tag {
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--txt-muted);
}

/* Owner-written use-case cards: several paragraphs, then
   "What we configure" and "Measures to agree" */
.pp-case-body { flex: 1; display: flex; flex-direction: column; gap: .7rem; }
.product-detail-page .offer-card .pp-case-body p { flex: none; }
.product-detail-page .offer-card p.pp-case-detail {
  flex: none;
  font-size: var(--fs-card-sm);
  line-height: 1.6;
  color: var(--txt-muted);
}
.product-detail-page .offer-card p.pp-case-detail:first-of-type { margin-top: .4rem; padding-top: .8rem; border-top: 1px solid var(--border-soft); }
.pp-case-detail strong { display: block; color: var(--txt-head); font-family: var(--font-display); }

/*: : : AI (dark band): : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */
.pp-ai-grid {
  /* three per row; a shorter last row is centred (e.g. five cards: 3 + 2) */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 3rem;
}
.pp-ai-grid > .pp-ai-card { flex: 0 0 calc((100% - 2.5rem) / 3); min-width: 0; }
.pp-ai-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .04);
}
.pp-ai-card h3 { margin: .35rem 0 .2rem; line-height: 1.3; color: #fff; }
/* small label above the title (AI Agents page: the way each approach works) */
.pp-ai-tag { align-self: flex-start; font-family: var(--font-display); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7FE3E6; }
.pp-ai-card p { max-width: none; font-size: var(--fs-card-body); color: rgba(255, 255, 255, .75); }

/*: : : PROCESS EXAMPLES: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */
.pp-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 2.5rem;
}
.pp-switch button {
  padding: .55rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: #fff;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  color: var(--txt-head);
  cursor: pointer;
  transition: color .18s, background-color .18s, border-color .18s;
}
.pp-switch button:hover { color: var(--blue); border-color: #a6c8ed; }
.pp-switch button[aria-pressed="true"] { color: #fff; background: var(--grad); border-color: transparent; }
.pp-switch button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.pp-process {
  margin-top: 1.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}
.pp-process[hidden] { display: none; }
.pp-process-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--border-soft);
}
.pp-process-head h3 { line-height: 1.3; }
.pp-process-head p { margin-top: .4rem; font-size: var(--fs-card-sm); color: var(--txt-muted); }
.pp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  list-style: none;
}
.pp-step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;   /* custom: step number */
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pp-steps h4 { margin: .75rem 0 .45rem; line-height: 1.3; }
.pp-steps p { max-width: none; font-size: var(--fs-card-sm); line-height: 1.65; }
.pp-process-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 1.25rem 2rem;
  background: var(--bg-soft);
  font-size: var(--fs-card-sm);
  line-height: 1.6;
}
.pp-process-foot strong { display: block; margin-bottom: .2rem; font-family: var(--font-display); color: var(--txt-head); }
.pp-measures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 2rem 1.75rem;
  border-top: 1px solid var(--border-soft);
}
.pp-measures-title {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--txt-muted);
}
.pp-measure { padding-top: .75rem; border-top: 2px solid var(--bg-blue); }
.pp-measure h4 { margin-bottom: .3rem; line-height: 1.3; }
.pp-measure p { max-width: none; font-size: var(--fs-card-sm); line-height: 1.6; }

/*: : : CONNECTED SYSTEMS MAP: : : : : : : : : : : : : : : : : : : : : : : : : : The shared ind-map (css/styles.css, homepage industries) with the
   product in the centre and the systems left and right. Labels sit beside
   the tiles (the descriptions are full sentences); ≤900px: one list. */
.ind-map--systems .ind-core { width: calc(200 / 1040 * 100%); gap: 8px; }
.ind-map--systems .ind-core-badge { width: 36%; }
.ind-map--systems .ind-core-badge img { width: 64%; }
.ind-map--systems .ind-core-pill {
  max-width: 86%;
  padding: 6px 10px;
  font-size: clamp(9px, .85vw, 11.5px);
  line-height: 1.25;
  text-transform: none;
  letter-spacing: .01em;
}
.ind-tile-box img {
  width: 52%;
  height: 52%;
  object-fit: contain;
  transform: rotate(calc(var(--r) * -1));
}
.ind-map--systems .ind-tile-label {
  top: 50%;
  width: calc(240 / 84 * 100%);
  transform: translate(0, -50%);
}
.ind-map--systems .ind-tile.is-left .ind-tile-label {
  left: auto;
  right: calc(100% + 16px);
  text-align: right;
  transform: translate(-10px, -50%);
}
.ind-map--systems .ind-tile.is-right .ind-tile-label {
  left: calc(100% + 16px);
  text-align: left;
  transform: translate(10px, -50%);
}
.ind-map--systems.is-in .ind-tile.is-left .ind-tile-label,
.ind-map--systems.is-in .ind-tile.is-right .ind-tile-label { transform: translate(0, -50%); }
.ind-map--systems .ind-tile-label span {
  margin-top: 4px;
  font-size: var(--fs-card-sm);
  line-height: 1.5;
  color: var(--txt-body);
}

@media (max-width: 900px) {
  .ind-map.ind-map--systems { grid-template-columns: 1fr; gap: 1.25rem; max-width: 560px; }
  .ind-map--systems .ind-core { width: min(200px, 60vw); margin-bottom: 1rem; }
  .ind-map--systems .ind-core-pill { font-size: 11px; }
  .ind-map.ind-map--systems .ind-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: auto;
    aspect-ratio: auto;
    justify-self: stretch;
    margin: 0;
  }
  .ind-map--systems .ind-tile-float { flex: none; width: 64px; height: 64px; }
  .ind-map.ind-map--systems .ind-tile .ind-tile-label,
  .ind-map.ind-map--systems.is-in .ind-tile .ind-tile-label {
    position: static;
    width: auto;
    text-align: left;
    transform: none;
  }
}

/*: : : DELIVERY PHASES: shared expanding panels (x-steps, css/styles.css) */
.product-detail-page .x-steps { margin-top: 3rem; }

/*: : : FAQ, related pages: : : : : : : : : : : : : : : : : : : : : : : : : : : */
.pp-faq {
  display: grid;
  gap: .75rem;
  max-width: 52rem;
  margin: 3rem auto 0;
}
.pp-faq details {
  padding: 0 1.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  background: #fff;
}
.pp-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 700;
  color: var(--txt-head);
}
.pp-faq summary::-webkit-details-marker { display: none; }
.pp-faq summary::after { content: '+'; flex: none; font-size: 1.3rem; line-height: 1; color: var(--blue); }
.pp-faq details[open] summary::after { content: '\2212'; }
.pp-faq details p { margin: 0 0 1.25rem; max-width: none; }

/* Related pages: several links in one card */
.pp-links { display: flex; flex-direction: column; gap: .45rem; }
.pp-links .offer-link { margin-top: 0; }

/* Final CTA: what to bring */
.pp-bring {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin: 1.75rem 0 2.25rem;
  padding: 0;
  list-style: none;
}
.pp-bring li {
  padding: .45rem .95rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: #fff;
  font-size: var(--fs-card-sm);
  color: var(--txt-head);
}

/*: : : RESPONSIVE: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */
@media (max-width: 1000px) {
  .pp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-measures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .pp-ai-grid > .pp-ai-card { flex-basis: 100%; }
}
@media (max-width: 600px) {
  .pp-steps, .pp-measures, .pp-process-foot { grid-template-columns: 1fr; }
  .pp-process-head { display: block; padding: 1.5rem; }
  .pp-process-head .pp-chip { margin-top: .75rem; }
  .pp-steps, .pp-process-foot, .pp-measures { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-icon { transition: none; }
}
@media print {
  .pp-process[hidden] { display: block; }
  .pp-switch { display: none; }
}
