/* ==========================================================================
   AelisMed — product detail page (Framos-style layout)
   Companion stylesheet for the com_spsimpleportfolio / item template override.
   Every rule is scoped to #aelismed-detail so the rest of the theme is untouched.
   Design tokens mirror the approved mockup (aelismed-mockups/css/design.css).
   ========================================================================== */

@font-face {
  font-family: 'Tomorrow';
  src: url('../fonts/Tomorrow-Bold.woff2') format('woff2'),
       url('../fonts/Tomorrow-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

#aelismed-detail {
  --aed-ink:        #202b39;
  --aed-ink-2:      #11181e;
  --aed-muted:      #53616b;
  --aed-muted-2:    #7d8b95;
  --aed-accent:     #397f91;
  --aed-accent-d:   #286779;
  --aed-accent-l:   #5097a9;
  --aed-accent-pale:#8cc6d4;
  --aed-bg:         #f7f8fa;
  --aed-bg-2:       #eef2f4;
  --aed-line:       #dce1e4;
  --aed-line-2:     #e8edef;
  --aed-eyebrow-bg: #e8f0f2;
  --aed-eyebrow-fg: #327487;
  --aed-h-font:     'Tomorrow', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --aed-b-font:     'Source Sans 3', 'Source Sans Pro', -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;

  background: #fff;
  color: var(--aed-muted);
  font-family: var(--aed-b-font);
  font-size: 16px;
  line-height: 1.65;
}

#aelismed-detail *,
#aelismed-detail *::before,
#aelismed-detail *::after { box-sizing: border-box; }

#aelismed-detail img { max-width: 100%; height: auto; display: block; }
#aelismed-detail a { text-decoration: none; }

#aelismed-detail h1,
#aelismed-detail h2,
#aelismed-detail h3,
#aelismed-detail h4 {
  font-family: var(--aed-h-font);
  color: var(--aed-ink);
  font-weight: 700;
  margin: 0;
}

#aelismed-detail h1 { font-size: 40px; line-height: 1.08; letter-spacing: -0.025em; }
#aelismed-detail h2 { font-size: 32px; line-height: 1.14; letter-spacing: -0.02em; }
#aelismed-detail h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
#aelismed-detail h4 { font-size: 15px; line-height: 1.35; letter-spacing: 0.02em; text-transform: uppercase; }
#aelismed-detail p  { margin: 0; }

.aed-container { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* ---------------------------------------------------------------- crumb */
#aelismed-detail .aed-crumb { background: var(--aed-ink-2); padding: 13px 0; }
#aelismed-detail .aed-crumb-pill {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .06); border-radius: 24px;
  padding: 8px 20px; font-size: 13px; color: #93a3ac;
}
#aelismed-detail .aed-crumb-pill a { color: var(--aed-accent-pale); }
#aelismed-detail .aed-crumb-pill a:hover { color: #fff; }
#aelismed-detail .aed-sep { opacity: .5; }
#aelismed-detail .aed-cur { color: #fff; }

/* ----------------------------------------------------------- hero block */
#aelismed-detail .aed-hero { padding: 52px 0 0; }

#aelismed-detail .aed-hero-grid {
  display: grid; grid-template-columns: 1.02fr 1fr; gap: 54px; align-items: start;
}

#aelismed-detail .aed-main-media {
  margin: 0; border-radius: 22px; overflow: hidden;
  background: var(--aed-bg); border: 1px solid var(--aed-line-2);
  min-height: 460px; display: flex; align-items: center; justify-content: center;
}
#aelismed-detail .aed-main-media img { width: 100%; object-fit: contain; }
#aelismed-detail .aed-media-placeholder {
  font-family: var(--aed-h-font); color: var(--aed-muted-2); font-size: 16px;
  padding: 40px; text-align: center;
}

#aelismed-detail .aed-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
#aelismed-detail .aed-chip {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--aed-eyebrow-bg); color: var(--aed-eyebrow-fg);
  padding: 7px 14px; border-radius: 8px;
}

#aelismed-detail .aed-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--aed-h-font); font-size: 12.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--aed-accent); margin-bottom: 14px;
}
#aelismed-detail .aed-kicker::before {
  content: ""; width: 22px; height: 2px; background: var(--aed-accent);
}

#aelismed-detail .aed-sub { font-size: 16.5px; margin-top: 16px; color: var(--aed-muted); }

/* key figures strip */
#aelismed-detail .aed-keys {
  display: grid; grid-template-columns: repeat(var(--aed-keys-cols, 4), minmax(0, 1fr));
  border: 1px solid var(--aed-line); border-radius: 14px; overflow: hidden;
  margin: 26px 0; background: #fff;
}
#aelismed-detail .aed-key { padding: 15px 14px; border-right: 1px solid var(--aed-line-2); min-width: 0; }
#aelismed-detail .aed-key:last-child { border-right: 0; }
#aelismed-detail .aed-key-label {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--aed-muted-2); font-weight: 700; margin-bottom: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#aelismed-detail .aed-key-value {
  font-family: var(--aed-h-font); font-size: 15px; color: var(--aed-ink);
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}

/* buttons */
#aelismed-detail .aed-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
#aelismed-detail .aed-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--aed-b-font); font-size: 15px; font-weight: 700;
  padding: 13px 28px; border-radius: 40px;
  background: var(--aed-accent); color: #fff; border: 1.5px solid var(--aed-accent);
  transition: background .18s, color .18s, transform .18s, box-shadow .18s;
  white-space: nowrap;
}
#aelismed-detail .aed-btn:hover {
  background: var(--aed-accent-d); border-color: var(--aed-accent-d); color: #fff;
  transform: translateY(-2px); box-shadow: 0 10px 22px rgba(57, 127, 145, .28);
}
#aelismed-detail .aed-btn-ghost {
  background: transparent; color: var(--aed-ink); border-color: rgba(32, 43, 57, .28);
}
#aelismed-detail .aed-btn-ghost:hover { background: var(--aed-ink); color: #fff; border-color: var(--aed-ink); box-shadow: none; }
#aelismed-detail .aed-btn-light { background: #fff; color: var(--aed-ink); border-color: #fff; }
#aelismed-detail .aed-btn-light:hover { background: #fff; color: var(--aed-accent-d); border-color: #fff; }
#aelismed-detail .aed-btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
#aelismed-detail .aed-btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; box-shadow: none; }

/* support promise */
#aelismed-detail .aed-promise { background: var(--aed-bg); border-radius: 14px; padding: 20px 24px; font-size: 14px; }
#aelismed-detail .aed-promise-row { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; }
#aelismed-detail .aed-promise-row::before {
  content: ""; flex: none; width: 13px; height: 7px; margin-top: 7px;
  border-left: 2px solid var(--aed-accent); border-bottom: 2px solid var(--aed-accent);
  transform: rotate(-45deg);
}
#aelismed-detail .aed-promise-no { color: var(--aed-muted-2); margin-top: 8px; padding-left: 23px; font-size: 13px; }
#aelismed-detail .aed-promise-no b { color: var(--aed-ink); font-family: var(--aed-h-font); letter-spacing: .06em; }

/* sibling list */
#aelismed-detail .aed-siblings { margin-top: 28px; }
#aelismed-detail .aed-siblings h4 { color: var(--aed-muted-2); margin-bottom: 8px; }
#aelismed-detail .aed-siblings ul { list-style: none; margin: 0; padding: 0; }
#aelismed-detail .aed-siblings li { border-bottom: 1px solid var(--aed-line-2); }
#aelismed-detail .aed-siblings a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 2px; font-size: 14.5px; color: var(--aed-ink);
}
#aelismed-detail .aed-siblings a:hover { color: var(--aed-accent); }
#aelismed-detail .aed-code {
  flex: none; color: var(--aed-muted-2); font-family: var(--aed-h-font);
  font-size: 11.5px; letter-spacing: .06em;
}

/* --------------------------------------------------------- section nav */
#aelismed-detail .aed-tabs {
  position: sticky; top: 0; z-index: 40; margin-top: 52px;
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-top: 1px solid var(--aed-line-2); border-bottom: 1px solid var(--aed-line-2);
}
#aelismed-detail .aed-tabs .aed-container { display: flex; gap: 6px; overflow-x: auto; }
#aelismed-detail .aed-tabs a {
  font-size: 14px; font-weight: 700; color: var(--aed-muted);
  padding: 15px 18px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
#aelismed-detail .aed-tabs a:hover { color: var(--aed-ink); }
#aelismed-detail .aed-tabs a.on { color: var(--aed-accent-d); border-bottom-color: var(--aed-accent); }

/* ------------------------------------------------------------- sections */
#aelismed-detail .aed-section { padding: 82px 0; scroll-margin-top: 66px; }
#aelismed-detail .aed-bg { background: var(--aed-bg); }

#aelismed-detail .aed-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--aed-eyebrow-bg); color: var(--aed-eyebrow-fg);
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 7px 17px; border-radius: 30px;
  margin-bottom: 20px;
}

#aelismed-detail .aed-sec-head { max-width: 760px; margin-bottom: 44px; }
#aelismed-detail .aed-sec-head h2 { margin-top: 0; }

#aelismed-detail .aed-split {
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 58px; align-items: start;
}
#aelismed-detail .aed-copy h2 { margin: 0 0 20px; }
#aelismed-detail .aed-copy p { font-size: 16px; margin-bottom: 16px; }
#aelismed-detail .aed-copy .aed-feat { margin-top: 22px; }

/* feature list */
#aelismed-detail .aed-feat { list-style: none; margin: 0; padding: 0; }
#aelismed-detail .aed-feat li {
  position: relative; padding: 11px 0 11px 30px;
  border-bottom: 1px solid var(--aed-line-2); font-size: 15px;
}
#aelismed-detail .aed-feat li::before {
  content: ""; position: absolute; left: 0; top: 19px;
  width: 13px; height: 7px;
  border-left: 2px solid var(--aed-accent); border-bottom: 2px solid var(--aed-accent);
  transform: rotate(-45deg);
}

/* specification card */
#aelismed-detail .aed-spec {
  border: 1px solid var(--aed-line); border-radius: 18px;
  overflow: hidden; background: #fff; scroll-margin-top: 84px;
}
#aelismed-detail .aed-spec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--aed-ink); color: #fff; padding: 16px 24px;
  font-family: var(--aed-h-font); font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase;
}
#aelismed-detail .aed-spec-note {
  font-family: var(--aed-b-font); font-size: 11.5px; letter-spacing: .02em;
  text-transform: none; color: #9db0ba; text-align: right;
}
#aelismed-detail .aed-spec dl { margin: 0; }
#aelismed-detail .aed-spec-row {
  display: grid; grid-template-columns: 42% 1fr; gap: 14px;
  padding: 13px 24px; border-bottom: 1px solid var(--aed-line-2); font-size: 14.5px;
}
#aelismed-detail .aed-spec-row:last-child { border-bottom: 0; }
#aelismed-detail .aed-spec dl > .aed-spec-row:nth-child(odd) { background: var(--aed-bg); }
#aelismed-detail .aed-spec dt {
  margin: 0; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--aed-muted-2); font-weight: 700; line-height: 1.5;
}
#aelismed-detail .aed-spec dd { margin: 0; color: var(--aed-ink); font-weight: 600; }

/* capability cards */
#aelismed-detail .aed-card-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px;
}
#aelismed-detail .aed-cap-card {
  background: #fff; border: 1px solid var(--aed-line-2); border-radius: 18px;
  padding: 30px 28px 32px;
  transition: transform .2s, box-shadow .2s;
}
#aelismed-detail .aed-cap-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(32, 43, 57, .09); }
#aelismed-detail .aed-cap-icon {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 12px; margin-bottom: 20px;
  background: var(--aed-eyebrow-bg); color: var(--aed-accent);
  font-family: var(--aed-h-font); font-size: 15px;
}
#aelismed-detail .aed-cap-card h3 { margin-bottom: 12px; font-size: 18px; }
#aelismed-detail .aed-cap-card .aed-feat li:last-child { border-bottom: 0; }

/* documents */
#aelismed-detail .aed-doc-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px;
}
#aelismed-detail .aed-doc-card {
  display: flex; flex-direction: column; gap: 9px;
  background: #fff; border: 1px solid var(--aed-line); border-radius: 16px;
  padding: 26px 24px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
#aelismed-detail .aed-doc-card:hover {
  transform: translateY(-3px); border-color: var(--aed-accent-pale);
  box-shadow: 0 14px 30px rgba(32, 43, 57, .09);
}
#aelismed-detail .aed-doc-ico {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 11px; background: var(--aed-eyebrow-bg); color: var(--aed-accent);
  font-family: var(--aed-h-font); font-size: 11px; letter-spacing: .04em;
}
#aelismed-detail .aed-doc-card h3 { font-size: 16.5px; }
#aelismed-detail .aed-doc-card p { flex: 1; font-size: 13.8px; margin: 0; }
#aelismed-detail .aed-link { color: var(--aed-accent); font-size: 13.8px; font-weight: 700; }
#aelismed-detail .aed-link:hover { color: var(--aed-accent-d); }

/* related products */
#aelismed-detail .aed-rel-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
}
#aelismed-detail .aed-rel-card {
  background: #fff; border: 1px solid var(--aed-line); border-radius: 16px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
#aelismed-detail .aed-rel-card:hover {
  transform: translateY(-3px); border-color: var(--aed-accent-pale);
  box-shadow: 0 16px 34px rgba(32, 43, 57, .11);
}
#aelismed-detail .aed-rel-card > a { display: block; color: inherit; }
#aelismed-detail .aed-rel-media {
  height: 168px; background: var(--aed-bg);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
#aelismed-detail .aed-rel-media img { width: 100%; height: 100%; object-fit: contain; }
#aelismed-detail .aed-rel-body { padding: 20px 22px 22px; }
#aelismed-detail .aed-rel-body .aed-code { display: block; margin-bottom: 8px; color: var(--aed-accent); }
#aelismed-detail .aed-rel-body h3 { font-size: 16px; margin-bottom: 12px; }
#aelismed-detail .aed-rel-body .aed-link { display: inline-block; }

/* CTA band */
#aelismed-detail .aed-cta-band { background: var(--aed-ink); padding: 72px 0; }
#aelismed-detail .aed-cta-band .aed-container {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
#aelismed-detail .aed-cta-band h2 { color: #fff; max-width: 620px; font-size: 30px; }
#aelismed-detail .aed-cta-band p { color: #a7b6bf; margin-top: 14px; max-width: 560px; }
#aelismed-detail .aed-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  #aelismed-detail .aed-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  #aelismed-detail .aed-main-media { min-height: 340px; }
  #aelismed-detail .aed-split { grid-template-columns: 1fr; gap: 42px; }
  #aelismed-detail .aed-card-grid { grid-template-columns: 1fr; }
  #aelismed-detail .aed-doc-grid,
  #aelismed-detail .aed-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #aelismed-detail .aed-cta-band .aed-container { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  #aelismed-detail h1 { font-size: 30px; }
  #aelismed-detail h2 { font-size: 25px; }
  #aelismed-detail .aed-container { padding: 0 20px; }
  #aelismed-detail .aed-section { padding: 58px 0; }
  #aelismed-detail .aed-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #aelismed-detail .aed-key { border-bottom: 1px solid var(--aed-line-2); }
  #aelismed-detail .aed-key:nth-child(2n) { border-right: 0; }
  #aelismed-detail .aed-key:nth-last-child(-n+2) { border-bottom: 0; }
  #aelismed-detail .aed-doc-grid,
  #aelismed-detail .aed-rel-grid { grid-template-columns: 1fr; }
  #aelismed-detail .aed-spec-row { grid-template-columns: 1fr; gap: 4px; }
  #aelismed-detail .aed-spec-note { display: none; }
  #aelismed-detail .aed-tabs a { padding: 13px 12px; font-size: 13px; }
}
