/* Drugestan Health Magazine v1.28.0
   Content integrity, compact scientific cards, and mobile products restoration. */
:root{
  --d28-navy:#0b315d;
  --d28-teal:#0b918f;
  --d28-violet:#6c3db7;
  --d28-orange:#d96f16;
  --d28-blue:#3477c8;
  --d28-line:#d6e3ec;
  --d28-text:#2d465d;
}

/* Hero summary is no longer silently cut off. */
body[class*="single-dhms_"] .dhm-v22-refine .dhm-v13-left-summary p{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:7!important;
  overflow:hidden!important;
  max-height:calc(1.95em * 7)!important;
}
body[class*="single-dhms_"] .dhm-v22-refine .dhm-v28-summary-link{
  display:inline-flex!important;
  margin-top:9px!important;
  color:var(--d28-violet)!important;
  font-size:12px!important;
  font-weight:900!important;
  text-decoration:none!important;
}
body[class*="single-dhms_"] .dhm-v22-refine .dhm-v22-continue{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
}

@media (min-width:1180px){
  /* One coherent 12-column desktop system. */
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules{
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    gap:20px 16px!important;
    align-items:stretch!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-v13-main{grid-column:1/-1!important;order:10!important}
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-table-section{grid-column:span 6!important;order:20!important}
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-faq-section{grid-column:span 6!important;order:20!important}

  /* Four support cards: exact one-row balance. */
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-action,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-warning,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-pharmacist-section,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-professional{
    grid-column:span 3!important;
    order:30!important;
    min-width:0!important;
    width:100%!important;
    margin:0!important;
  }

  /* Scientific subtopics + sources: a clean 3-up row when there are three items. */
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-text.dhm-heading-outside,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-sources{
    grid-column:span 4!important;
    order:40!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    align-self:stretch!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-text.dhm-heading-outside > h2,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-sources > h2{
    margin:0 0 9px!important;
    font-family:inherit!important;
    font-size:17px!important;
    line-height:1.5!important;
    font-weight:900!important;
    color:var(--d28-navy)!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-text.dhm-heading-outside > .dhm-section-card,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-sources{
    min-height:190px!important;
    max-height:260px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-sources{
    background:#f2fbfb!important;
    border:1px solid #cfe8e8!important;
    border-right:4px solid var(--d28-teal)!important;
    border-radius:14px!important;
    padding:16px!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-sources .dhm-toggle-body{
    display:block!important;
    max-height:160px!important;
    overflow:auto!important;
    padding-left:3px!important;
    font-size:12.5px!important;
    line-height:1.8!important;
    color:var(--d28-text)!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-sources .dhm-toggle-body.is-collapsed{
    overflow:hidden!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-sources .dhm-toggle-head{margin-top:8px!important}
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-sources .dhm-section-toggle-btn{
    font:inherit!important;font-size:11.5px!important;font-weight:900!important;color:var(--d28-teal)!important;
  }

  /* Products remain a major full-width horizontal rail: exactly five cards visible. */
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-sync-products{
    grid-column:1/-1!important;
    order:50!important;
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    min-width:0!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-products-grid,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-related-products{
    display:flex!important;
    flex-flow:row nowrap!important;
    gap:12px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x mandatory!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-products-grid > .dhm-sync-product,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-related-products > *{
    flex:0 0 calc((100% - 48px)/5)!important;
    width:calc((100% - 48px)/5)!important;
    min-width:calc((100% - 48px)/5)!important;
    max-width:calc((100% - 48px)/5)!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-v16-modules > .dhm-v13-related{grid-column:1/-1!important;order:60!important}
}

@media (max-width:899px){
  /* Mobile products must exist in the document and be horizontally browsable. */
  body[class*="single-dhms_"] .dhm-v22-refine #dhm-products,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-products{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    position:relative!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    margin:22px 0!important;
    scroll-margin-top:92px!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine #dhm-products > h2{
    display:block!important;
    font-size:24px!important;
    line-height:1.5!important;
    color:var(--d28-navy)!important;
    margin:0 0 12px!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine #dhm-products > .dhm-section-card{
    display:block!important;
    visibility:visible!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    padding:12px!important;
    background:#f1fafb!important;
    border:1px solid #cae3e6!important;
    border-right:4px solid var(--d28-teal)!important;
    border-radius:15px!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-products-grid,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-related-products{
    display:flex!important;
    flex-flow:row nowrap!important;
    gap:10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    width:100%!important;
    max-width:100%!important;
    padding:2px 1px 8px!important;
    scroll-snap-type:x mandatory!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-products-grid > .dhm-sync-product,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-related-products > *{
    display:block!important;
    flex:0 0 78vw!important;
    width:78vw!important;
    min-width:78vw!important;
    max-width:78vw!important;
    height:auto!important;
    min-height:0!important;
    scroll-snap-align:center!important;
  }

  /* Keep the fixed CTA above Woodmart bottom nav and make it genuinely clickable. */
  body[class*="single-dhms_"] .dhm-v25-products-only.dhm-v19-mobile-actions{
    display:block!important;
    visibility:visible!important;
    pointer-events:none!important;
    position:fixed!important;
    left:14px!important;
    right:14px!important;
    bottom:94px!important;
    z-index:2147483000!important;
  }
  body[class*="single-dhms_"] .dhm-v25-products-only .dhm-v19-products{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    width:100%!important;
    min-height:54px!important;
    align-items:center!important;
    justify-content:center!important;
    background:linear-gradient(90deg,#6221d7,#7f24df)!important;
    color:#fff!important;
    border-radius:18px!important;
    font-size:16px!important;
    font-weight:900!important;
    text-decoration:none!important;
  }

  /* Scientific subtopics/sources are readable cards on phones, not orphan text. */
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-text.dhm-heading-outside,
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-sources{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:18px 0!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-sources .dhm-toggle-body{
    display:block!important;
    max-height:240px!important;
    overflow:hidden!important;
  }
  body[class*="single-dhms_"] .dhm-v22-refine .dhm-sync-sources .dhm-toggle-body:not(.is-collapsed){max-height:none!important;overflow:visible!important}
}
