/* Drugestan Health Magazine v1.25.0
   Final polish: compact support headings, 5-up equal product rail, single working mobile CTA, no duplicate review footer. */
:root{
  --d25-navy:#082f5c;
  --d25-teal:#008f8a;
  --d25-violet:#6d35c6;
}

/* The duplicate footer is suppressed defensively even for cached/legacy markup. */
.dhm-v13-review-footer{display:none!important}

@media (min-width:1180px){
  /* Keep the four support-card headings on one visual line and align their tops. */
  .dhm-v22-refine .dhm-v16-modules > .dhm-sync-action > h2,
  .dhm-v22-refine .dhm-v16-modules > .dhm-sync-warning > h2,
  .dhm-v22-refine .dhm-v16-modules > .dhm-pharmacist-section > h2,
  .dhm-v22-refine .dhm-v16-modules > .dhm-professional > h2{
    font-size:20px!important;
    line-height:1.35!important;
    white-space:nowrap!important;
    margin:0 0 9px!important;
    overflow:visible!important;
  }

  /* Five equal product cards are visible at once; the rest stay in the same horizontal rail. */
  .dhm-v22-refine .dhm-sync-products-grid,
  .dhm-v22-refine .dhm-related-products{
    display:grid!important;
    grid-template-columns:none!important;
    grid-template-rows:1fr!important;
    grid-auto-flow:column!important;
    grid-auto-columns:calc((100% - 48px)/5)!important;
    gap:12px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    align-items:stretch!important;
    scroll-snap-type:x mandatory!important;
    scrollbar-width:thin!important;
    padding:2px 2px 10px!important;
  }
  .dhm-v22-refine .dhm-sync-product,
  .dhm-v22-refine .dhm-related-product,
  .dhm-v22-refine .dhm-related-products > *{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    box-sizing:border-box!important;
    scroll-snap-align:start!important;
  }
  .dhm-v22-refine .dhm-sync-product-main{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    gap:8px!important;
  }
  .dhm-v22-refine .dhm-sync-product-main img,
  .dhm-v22-refine .dhm-related-product img{
    width:78px!important;
    height:78px!important;
    object-fit:contain!important;
    margin-inline:auto!important;
  }
}

/* Tablet: three equal cards visible, still one horizontal rail. */
@media (min-width:900px) and (max-width:1179px){
  .dhm-v22-refine .dhm-sync-products-grid,
  .dhm-v22-refine .dhm-related-products{
    grid-auto-columns:calc((100% - 20px)/3)!important;
    gap:10px!important;
  }
}

/* Mobile: only one meaningful fixed action, placed above the site's bottom navigation. */
@media (max-width:899px){
  .dhm-v25-products-only.dhm-v19-mobile-actions{
    display:block!important;
    position:fixed!important;
    left:16px!important;
    right:16px!important;
    bottom:88px!important;
    z-index:160!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    pointer-events:none!important;
  }
  .dhm-v25-products-only .dhm-v19-products{
    pointer-events:auto!important;
    display:flex!important;
    width:100%!important;
    min-height:50px!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:18px!important;
    color:#fff!important;
    background:linear-gradient(90deg,#6b20d9 0%,#7d2be3 100%)!important;
    box-shadow:0 8px 24px rgba(81,31,172,.24)!important;
    font-size:15px!important;
    font-weight:900!important;
    text-decoration:none!important;
  }
  /* The old controls must never leak from inherited styles. */
  .dhm-v25-products-only .dhm-v19-save,
  .dhm-v25-products-only .dhm-v19-round{display:none!important}

  /* Product rail remains horizontal and touch-friendly on phones. */
  .dhm-v22-refine .dhm-sync-products-grid,
  .dhm-v22-refine .dhm-related-products{
    display:grid!important;
    grid-template-columns:none!important;
    grid-auto-flow:column!important;
    grid-auto-columns:minmax(72vw,72vw)!important;
    gap:10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x mandatory!important;
    padding-bottom:8px!important;
  }
  .dhm-v22-refine .dhm-sync-product,
  .dhm-v22-refine .dhm-related-product,
  .dhm-v22-refine .dhm-related-products > *{
    width:100%!important;
    min-width:0!important;
    scroll-snap-align:center!important;
  }
}
