/**
 * Allomedix Child Theme — Component Styles
 *
 * Depends on: allomedix-tokens (CSS custom properties must be loaded first)
 *
 * Structure:
 *   1. Reset / Base
 *   2. Typography
 *   3. Layout — Container, Section, Grids
 *   4. Cards
 *   5. Buttons
 *   6. Badges
 *   7. Product Card
 *   8. Hero
 */


/* ═══════════════════════════════════════════════════════════════════════════
   1. RESET / BASE
   ═══════════════════════════════════════════════════════════════════════════ */

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

body {
  font-family: var(--am-font-sans);
  font-size:   var(--am-fs-base);
  color:       var(--am-ink);
  line-height: var(--am-lh-base);
  background-color: var(--am-bg);
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  padding-left: var(--am-sp-6);
}


/* ═══════════════════════════════════════════════════════════════════════════
   2. TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family:  var(--am-font-sans);
  font-weight:  600;
  color:        var(--am-primary);
  line-height:  var(--am-lh-tight);
  margin-top:   0;
  margin-bottom: var(--am-sp-4);
}

h1 { font-size: var(--am-fs-3xl); }
h2 { font-size: var(--am-fs-2xl); }
h3 { font-size: var(--am-fs-xl);  }
h4 { font-size: var(--am-fs-lg);  }
h5 { font-size: var(--am-fs-base); }
h6 { font-size: var(--am-fs-sm);   }

p {
  margin-top:    0;
  margin-bottom: var(--am-sp-4);
}

a {
  color:           var(--am-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--am-primary-700);
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: var(--am-fs-sm);
  color:     var(--am-muted);
}

/* Long-form article body (drug monographs, editorial content) */
.am-article {
  font-family: var(--am-font-serif);
  font-size:   var(--am-fs-lg);
  line-height: var(--am-lh-base);
  max-width:   70ch;
  color:       var(--am-ink);
}

.am-article h2,
.am-article h3,
.am-article h4 {
  font-family: var(--am-font-sans);
}

.am-article p,
.am-article li {
  margin-bottom: var(--am-sp-4);
}

/* Muted / secondary text utility */
.am-text-muted {
  color:     var(--am-muted);
  font-size: var(--am-fs-sm);
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. LAYOUT — CONTAINER · SECTION · GRIDS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Centered, max-width wrapper */
.am-container {
  width:          100%;
  max-width:      1200px;
  margin-inline:  auto;
  padding-inline: var(--am-sp-6);
}

/* Section vertical rhythm */
.am-section {
  padding-block: var(--am-sp-16);
}

.am-section--sm {
  padding-block: var(--am-sp-10);
}

.am-section--lg {
  padding-block: var(--am-sp-24);
}

/* Alternate section background */
.am-section--alt {
  background-color: var(--am-surface);
}

/* ── Responsive grids (mobile-first: 1 col → multi-col at 768px) ── */

.am-grid-2,
.am-grid-3,
.am-grid-4 {
  display:               grid;
  grid-template-columns: 1fr;
  gap:                   var(--am-sp-6);
}

@media (min-width: 768px) {
  .am-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .am-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (min-width: 1024px) {
  .am-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.am-card {
  background:    var(--am-surface);
  border:        1px solid var(--am-border);
  border-radius: var(--am-radius);
  padding:       var(--am-sp-6);
  box-shadow:    var(--am-shadow-sm);
  transition:    box-shadow 0.2s ease, transform 0.2s ease;
}

.am-card:hover {
  box-shadow: var(--am-shadow);
  transform:  translateY(-2px);
}

.am-card__title {
  font-size:     var(--am-fs-lg);
  font-weight:   600;
  color:         var(--am-primary);
  margin-bottom: var(--am-sp-2);
}

.am-card__body {
  font-size: var(--am-fs-sm);
  color:     var(--am-muted);
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.am-btn {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  gap:             var(--am-sp-2);
  padding:         var(--am-sp-3) var(--am-sp-6);
  border-radius:   var(--am-radius-pill);
  font-family:     var(--am-font-sans);
  font-size:       var(--am-fs-sm);
  font-weight:     600;
  line-height:     1;
  text-decoration: none;
  cursor:          pointer;
  border:          2px solid transparent;
  transition:      background-color 0.18s ease,
                   color            0.18s ease,
                   border-color     0.18s ease,
                   box-shadow       0.18s ease;
}

.am-btn:focus-visible {
  outline:        3px solid var(--am-accent);
  outline-offset: 3px;
}

/* Primary — solid trust blue */
.am-btn-primary {
  background-color: var(--am-primary);
  color:            #ffffff;
  border-color:     var(--am-primary);
}

.am-btn-primary:hover,
.am-btn-primary:focus-visible {
  background-color: var(--am-primary-700);
  border-color:     var(--am-primary-700);
  color:            #ffffff;
}

/* Outline — transparent with primary border */
.am-btn-outline {
  background-color: transparent;
  color:            var(--am-primary);
  border-color:     var(--am-primary);
}

.am-btn-outline:hover,
.am-btn-outline:focus-visible {
  background-color: var(--am-primary);
  color:            #ffffff;
}

/* Secondary / green */
.am-btn-secondary {
  background-color: var(--am-secondary);
  color:            #ffffff;
  border-color:     var(--am-secondary);
}

.am-btn-secondary:hover,
.am-btn-secondary:focus-visible {
  background-color: var(--am-secondary-700);
  border-color:     var(--am-secondary-700);
  color:            #ffffff;
}

/* Size modifiers */
.am-btn--sm {
  padding:   var(--am-sp-2) var(--am-sp-4);
  font-size: var(--am-fs-xs);
}

.am-btn--lg {
  padding:   var(--am-sp-4) var(--am-sp-8);
  font-size: var(--am-fs-base);
}


/* ═══════════════════════════════════════════════════════════════════════════
   6. BADGES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Base badge */
.am-badge-rx,
.am-badge-otc,
.am-badge-ta {
  display:         inline-flex;
  align-items:     center;
  gap:             var(--am-sp-1);
  padding:         var(--am-sp-1) var(--am-sp-3);
  border-radius:   var(--am-radius-pill);
  font-size:       var(--am-fs-xs);
  line-height:     1;
  letter-spacing:  0.03em;
  text-transform:  uppercase;
  white-space:     nowrap;
}

/* Rx-only — visually distinct, high contrast */
.am-badge-rx {
  background-color: var(--am-rx-bg);
  color:            var(--am-rx);
  font-weight:      700;
}

.am-badge-rx::before {
  content: "℞";
  font-style: normal;
  font-size:  0.9em;
}

/* OTC — green wellness feel */
.am-badge-otc {
  background-color: var(--am-otc-bg);
  color:            var(--am-secondary);
  font-weight:      600;
}

/* Therapeutic area — neutral label */
.am-badge-ta {
  background-color: var(--am-bg);
  color:            var(--am-muted);
  font-weight:      500;
  border:           1px solid var(--am-border);
}


/* ═══════════════════════════════════════════════════════════════════════════
   7. PRODUCT CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.am-product-card {
  display:        flex;
  flex-direction: column;
  background:     var(--am-surface);
  border:         1px solid var(--am-border);
  border-radius:  var(--am-radius-lg);
  overflow:       hidden;
  box-shadow:     var(--am-shadow-sm);
  transition:     box-shadow 0.2s ease, transform 0.2s ease;
}

.am-product-card:hover {
  box-shadow: var(--am-shadow);
  transform:  translateY(-3px);
}

/* Product image / icon area */
.am-product-card__media {
  aspect-ratio:    4 / 3;
  background-color: var(--am-bg);
  display:         flex;
  align-items:     center;
  justify-content: center;
  overflow:        hidden;
}

.am-product-card__media img {
  width:      100%;
  height:     100%;
  object-fit: cover;
}

/* Badge row */
.am-product-card__badges {
  display:    flex;
  flex-wrap:  wrap;
  gap:        var(--am-sp-2);
  padding:    var(--am-sp-4) var(--am-sp-5) 0;
}

/* Main content area */
.am-product-card__body {
  flex:    1;
  padding: var(--am-sp-4) var(--am-sp-5) var(--am-sp-5);
}

/* Brand / product name */
.am-product-card__name {
  font-size:     var(--am-fs-lg);
  font-weight:   600;
  color:         var(--am-primary);
  margin-bottom: var(--am-sp-1);
  line-height:   var(--am-lh-tight);
}

/* INN / generic name — smaller, muted */
.am-product-card__generic {
  font-size:     var(--am-fs-sm);
  color:         var(--am-muted);
  font-style:    italic;
  margin-bottom: var(--am-sp-3);
}

/* Meta row — strength, pack size, form */
.am-product-card__meta {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--am-sp-2) var(--am-sp-4);
  font-size:   var(--am-fs-xs);
  color:       var(--am-muted);
  margin-bottom: var(--am-sp-4);
}

.am-product-card__meta-item {
  display:     flex;
  align-items: center;
  gap:         var(--am-sp-1);
}

/* Footer CTA */
.am-product-card__footer {
  padding:     var(--am-sp-4) var(--am-sp-5);
  border-top:  1px solid var(--am-border);
  display:     flex;
  align-items: center;
  gap:         var(--am-sp-3);
}


/* ═══════════════════════════════════════════════════════════════════════════
   8. HERO
   ═══════════════════════════════════════════════════════════════════════════ */

.am-hero {
  position:        relative;
  overflow:        hidden;
  padding-block:   var(--am-sp-20);
  /* Gradient: deep trust blue → slightly lighter — avoids flat-colour feel */
  background:      linear-gradient(
    135deg,
    var(--am-primary-700) 0%,
    var(--am-primary)     60%,
    #155e84              100%
  );
  color: #ffffff;
  text-align: center;
}

/* Subtle dot-pattern overlay for texture */
.am-hero::before {
  content:  "";
  position: absolute;
  inset:    0;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  pointer-events:  none;
}

.am-hero__inner {
  position:   relative; /* above ::before */
  z-index:    1;
  max-width:  760px;
  margin-inline: auto;
  padding-inline: var(--am-sp-6);
}

/* Eyebrow / kicker above headline */
.am-hero__eyebrow {
  display:         inline-block;
  font-size:       var(--am-fs-sm);
  font-weight:     600;
  letter-spacing:  0.08em;
  text-transform:  uppercase;
  color:           var(--am-accent);
  margin-bottom:   var(--am-sp-4);
}

.am-hero__headline {
  font-size:     var(--am-fs-3xl);
  font-weight:   700;
  color:         #ffffff;
  line-height:   var(--am-lh-tight);
  margin-bottom: var(--am-sp-5);
}

.am-hero__subheadline {
  font-size:     var(--am-fs-lg);
  color:         rgba(255, 255, 255, 0.85);
  max-width:     56ch;
  margin-inline: auto;
  margin-bottom: var(--am-sp-8);
  line-height:   var(--am-lh-base);
}

/* CTA button group */
.am-hero__cta-group {
  display:         flex;
  flex-wrap:       wrap;
  justify-content: center;
  gap:             var(--am-sp-4);
}

/* Override outline button colours for dark hero background */
.am-hero .am-btn-outline {
  color:        #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.am-hero .am-btn-outline:hover,
.am-hero .am-btn-outline:focus-visible {
  background-color: rgba(255, 255, 255, 0.15);
  color:            #ffffff;
  border-color:     #ffffff;
}

/* Large-screen headline size bump */
@media (min-width: 768px) {
  .am-hero {
    padding-block: var(--am-sp-24);
  }

  .am-hero__headline {
    font-size: var(--am-fs-display);
  }

  .am-hero__subheadline {
    font-size: var(--am-fs-xl);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   9. FOOTER (parts/footer.html)
   ═══════════════════════════════════════════════════════════════════════════
   Custom 4-column footer rendered by the block template part. Replaces the
   parent theme's default footer which had placeholder text (trans-menu etc.).
*/

.am-footer {
  background-color: var(--am-primary) !important;
  color: #ffffff;
  padding-top:    var(--am-sp-16);
  padding-bottom: var(--am-sp-8);
}

.am-footer * {
  color: #ffffff;
}

.am-footer .am-container {
  padding-inline: var(--am-sp-6);
}

.am-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--am-sp-10);
  margin-bottom: var(--am-sp-12);
}

@media (min-width: 768px) {
  .am-footer__grid {
    grid-template-columns: 1.6fr 1fr 1.4fr;
    gap: var(--am-sp-12);
  }
}

.am-footer__col {
  font-size: var(--am-fs-sm);
  line-height: 1.65;
}

.am-footer__brand .am-footer__logo {
  display: inline-block;
  margin-bottom: var(--am-sp-4);
}

.am-footer__brand .am-footer__logo img {
  width: 200px;
  height: auto;
}

.am-footer__tagline {
  font-family: var(--am-font-serif);
  font-size:   var(--am-fs-lg);
  font-style:  italic;
  margin:      0 0 var(--am-sp-3);
  opacity:     0.9;
}

.am-footer__about {
  margin:    0 0 var(--am-sp-4);
  opacity:   0.8;
  max-width: 30ch;
}

.am-footer__heading {
  font-family:     var(--am-font-sans) !important;
  font-size:       var(--am-fs-sm);
  font-weight:     700;
  text-transform:  uppercase;
  letter-spacing:  0.08em;
  margin:          0 0 var(--am-sp-4);
  color:           #ffffff !important;
  opacity:         0.95;
}

.am-footer__list {
  list-style: none;
  padding:    0;
  margin:     0;
}

.am-footer__list li {
  margin-bottom: var(--am-sp-2);
}

.am-footer__list a,
.am-footer__contact-line a {
  color:           #ffffff;
  text-decoration: none;
  opacity:         0.85;
  transition:      opacity 0.18s ease;
}

.am-footer__list a:hover,
.am-footer__contact-line a:hover {
  opacity:         1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.am-footer__address {
  font-style:    normal;
  margin:        0 0 var(--am-sp-3);
  opacity:       0.85;
}

.am-footer__contact-line {
  margin: var(--am-sp-1) 0;
}

.am-footer__cta {
  /* override base outline button colors to be readable on dark bg */
  border-color: rgba(255, 255, 255, 0.5) !important;
  color:        #ffffff !important;
  background:   transparent !important;
}

.am-footer__cta:hover {
  background:   rgba(255, 255, 255, 0.12) !important;
  border-color: #ffffff !important;
}

/* Bottom legal bar */
.am-footer__bottom {
  border-top:    1px solid rgba(255, 255, 255, 0.15);
  padding-top:   var(--am-sp-6);
  display:       flex;
  flex-direction: column;
  gap:           var(--am-sp-2);
}

.am-footer__legal,
.am-footer__regulatory {
  margin:    0;
  font-size: var(--am-fs-xs);
  opacity:   0.7;
}

@media (min-width: 768px) {
  .am-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--am-sp-6);
  }

  .am-footer__regulatory {
    max-width: 55%;
    text-align: right;
  }
}

/* ============================================================================
   Block-template semantic classes
   Added for HTML block templates in templates/*.html. Each class is referenced
   by a wp:group / wp:column className attribute.
   ========================================================================== */

/* Page header (archive, taxonomy pages) */
.am-page-header {
  padding: var(--am-sp-12) 0 var(--am-sp-8);
  background: linear-gradient(180deg, color-mix(in srgb, var(--am-primary) 6%, white), white);
  border-bottom: 1px solid var(--am-border);
}
.am-page-header__title,
.am-page-header h1 {
  font-family: var(--am-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 var(--am-sp-2);
  color: var(--am-ink);
}
.am-page-header__lead,
.am-page-header > p {
  font-size: var(--am-fs-lg);
  color: var(--am-muted);
  margin: 0;
}

/* Trust strip on front page */
.am-trust-strip {
  padding: var(--am-sp-8) 0;
  background: var(--am-surface, #f7faf9);
  border-top: 1px solid var(--am-border);
  border-bottom: 1px solid var(--am-border);
}
.am-trust-strip h3,
.am-trust-strip h4 {
  font-size: var(--am-fs-base);
  font-weight: 700;
  margin: 0 0 var(--am-sp-1);
  color: var(--am-primary);
  letter-spacing: 0.02em;
}
.am-trust-strip p {
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
  margin: 0;
}

/* Therapeutic-area tile grid */
.am-ta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--am-sp-4);
  margin: var(--am-sp-6) 0;
}
@media (min-width: 600px) { .am-ta-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .am-ta-grid { grid-template-columns: repeat(4, 1fr); } }
.am-ta-grid .am-card {
  text-align: center;
  padding: var(--am-sp-5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.am-ta-grid .am-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--am-shadow-md, 0 4px 12px rgba(14,74,107,0.10));
}
.am-ta-grid h3 {
  font-size: var(--am-fs-base);
  margin: 0;
}
.am-ta-grid a {
  color: var(--am-primary);
  text-decoration: none;
}

/* About-section stats */
.am-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--am-sp-4);
  margin: var(--am-sp-6) 0;
}
.am-stats .am-card {
  text-align: center;
  padding: var(--am-sp-6);
}
.am-stats h3 {
  font-size: var(--am-fs-display, 2rem);
  color: var(--am-primary);
  margin: 0 0 var(--am-sp-1);
}

/* Contact CTA strip */
.am-cta-strip {
  padding: var(--am-sp-10) 0;
  background: linear-gradient(135deg, var(--am-primary), var(--am-primary-700));
  color: white;
  text-align: center;
}
.am-cta-strip h2,
.am-cta-strip h3 {
  color: white;
  margin: 0 0 var(--am-sp-3);
}
.am-cta-strip p { color: rgba(255,255,255,0.85); margin: 0 0 var(--am-sp-5); }
.am-cta-strip .am-btn,
.am-cta-strip .wp-block-button__link {
  background: white;
  color: var(--am-primary);
  font-weight: 600;
}

/* Archive layout (products + taxonomy pages) */
.am-archive-layout {
  padding: var(--am-sp-8) 0;
  gap: var(--am-sp-8);
}
.am-archive-main {
  min-width: 0;
}
.am-filter-sidebar {
  background: white;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius-md, 8px);
  padding: var(--am-sp-5);
}
.am-filter-sidebar h3 {
  font-size: var(--am-fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--am-muted);
  margin: 0 0 var(--am-sp-3);
}
.am-filter-sidebar h3:not(:first-child) { margin-top: var(--am-sp-6); }
.am-filter-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.am-filter-sidebar li { margin-bottom: var(--am-sp-2); }
.am-filter-sidebar a {
  color: var(--am-ink);
  text-decoration: none;
  font-size: var(--am-fs-sm);
  display: block;
  padding: var(--am-sp-1) var(--am-sp-2);
  border-radius: 4px;
  transition: background 0.12s ease;
}
.am-filter-sidebar a:hover {
  background: color-mix(in srgb, var(--am-primary) 6%, white);
  color: var(--am-primary);
}

/* Generic badge (small TA / dosage-form chip) */
.am-badge {
  display: inline-block;
  font-size: var(--am-fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--am-primary);
  background: color-mix(in srgb, var(--am-primary) 8%, white);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

/* Product info card (right sidebar on single-product) */
.am-product-card__brand {
  font-family: var(--am-font-serif);
  font-size: var(--am-fs-xl);
  margin: var(--am-sp-3) 0 var(--am-sp-1);
  color: var(--am-ink);
  line-height: 1.2;
}

/* Related products section */
.am-related-products {
  margin: var(--am-sp-8) 0;
}
.am-related-products h3 {
  font-size: var(--am-fs-xl);
  margin: 0 0 var(--am-sp-5);
  color: var(--am-ink);
}
.am-product-card-mini {
  padding: var(--am-sp-4);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.am-product-card-mini:hover {
  transform: translateY(-2px);
  box-shadow: var(--am-shadow-md, 0 4px 12px rgba(14,74,107,0.10));
}
.am-product-card-mini h4 {
  font-size: var(--am-fs-base);
  margin: 0 0 var(--am-sp-1);
}
.am-product-card-mini h4 a {
  color: var(--am-primary);
  text-decoration: none;
}

/* Product HTML field sections (indications, contraindications, side effects) */
.am-product-html-field {
  margin-bottom: var(--am-sp-7);
}
.am-product-html-field__heading {
  font-family: var(--am-font-serif);
  font-size: var(--am-fs-xl);
  color: var(--am-ink);
  margin: 0 0 var(--am-sp-3);
  padding-bottom: var(--am-sp-2);
  border-bottom: 2px solid color-mix(in srgb, var(--am-primary) 15%, white);
}
.am-product-html-field__body {
  font-size: var(--am-fs-base);
  line-height: 1.65;
  color: var(--am-ink);
}
.am-product-html-field__body ul,
.am-product-html-field__body ol {
  padding-left: 1.25rem;
}
.am-product-html-field__body li {
  margin-bottom: var(--am-sp-1);
}

/* Single product layout */
.am-single-product { padding: 0; }
.am-product-header {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--am-primary) 8%, white),
    color-mix(in srgb, var(--am-secondary) 5%, white));
  border-bottom: 1px solid var(--am-border);
  padding: var(--am-sp-8) var(--am-sp-5);
}
.am-product-title {
  font-family: var(--am-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--am-ink);
  margin: var(--am-sp-2) 0 var(--am-sp-1);
  line-height: 1.2;
}
.am-product-generic {
  font-size: var(--am-fs-lg);
  color: var(--am-muted);
  margin: 0;
  font-style: italic;
}
.am-product-body { padding: var(--am-sp-8) var(--am-sp-5); }
.am-product-body__sidebar {
  position: sticky;
  top: var(--am-sp-5);
  align-self: flex-start;
}
@media (max-width: 781px) {
  .am-product-body__sidebar { position: static; }
}

/* Compliance note */
.am-compliance-note {
  background: color-mix(in srgb, var(--am-rx, #B5345A) 5%, white);
  border-color: color-mix(in srgb, var(--am-rx, #B5345A) 25%, white);
}
.am-compliance-note__text {
  margin: 0;
  color: var(--am-ink);
}

/* ============================================================================
   Homepage v2 — pillar strip, values, about strip, section titles
   ========================================================================== */

/* Section title + lead (used across home page) */
.am-section__title {
  font-family: var(--am-font-serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--am-ink);
  margin: 0 0 var(--am-sp-2);
  line-height: 1.2;
}
.am-section__lead {
  font-size: var(--am-fs-lg);
  color: var(--am-muted);
  margin: 0 0 var(--am-sp-7);
  max-width: 640px;
}
.am-section__lead.has-text-align-center { margin-left: auto; margin-right: auto; }

/* Hero — stronger styling so it actually looks like a hero */
.am-hero {
  padding: var(--am-sp-16) var(--am-sp-5);
  background: linear-gradient(135deg, var(--am-primary) 0%, var(--am-primary-700) 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.am-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, color-mix(in srgb, var(--am-secondary) 25%, transparent) 0%, transparent 50%),
              radial-gradient(circle at 80% 30%, color-mix(in srgb, var(--am-accent, #E8A33D) 12%, transparent) 0%, transparent 55%);
  pointer-events: none;
}
.am-hero__inner { position: relative; }
.am-hero__headline {
  color: white;
  font-family: var(--am-font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 var(--am-sp-4);
  letter-spacing: -0.5px;
}
.am-hero__subheadline {
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--am-fs-lg);
  line-height: 1.55;
  margin: 0 0 var(--am-sp-7);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.am-hero__cta-group .wp-block-button.am-btn-primary .wp-block-button__link {
  background: white;
  color: var(--am-primary);
  font-weight: 600;
}
.am-hero__cta-group .wp-block-button.am-btn-outline .wp-block-button__link {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  font-weight: 600;
}
.am-hero__cta-group .wp-block-button.am-btn-outline .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

/* Pillar strip — three brand value props with SVG icons */
.am-pillar-strip {
  padding: var(--am-sp-12) var(--am-sp-5);
  background: white;
}
.am-pillar {
  text-align: center;
  padding: var(--am-sp-4) var(--am-sp-3);
}
.am-pillar__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--am-sp-3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--am-primary) 8%, white);
  color: var(--am-primary);
  border-radius: 50%;
}
.am-pillar__icon svg { width: 32px; height: 32px; }
.am-pillar__heading {
  font-family: var(--am-font-serif);
  font-size: var(--am-fs-xl);
  color: var(--am-ink);
  margin: 0 0 var(--am-sp-2);
}
.am-pillar__text {
  font-size: var(--am-fs-base);
  color: var(--am-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* Section variants */
.am-section {
  padding: var(--am-sp-12) var(--am-sp-5);
}
.am-section--alt {
  background: color-mix(in srgb, var(--am-primary) 4%, #f7faf9);
}
.am-section--sm { padding: var(--am-sp-8) var(--am-sp-5); }

/* Featured Products query wrapper */
.am-featured-products .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--am-sp-5);
  list-style: none;
  padding: 0;
  margin: 0;
}
.am-featured-products .wp-block-post {
  list-style: none;
  margin: 0;
}
.am-featured-products .am-product-card {
  padding: var(--am-sp-5);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--am-sp-2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.am-featured-products .am-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(14, 74, 107, 0.10);
}
.am-featured-products .wp-block-post-title {
  font-size: var(--am-fs-lg);
  margin: 0;
}
.am-featured-products .wp-block-post-title a {
  color: var(--am-primary);
  text-decoration: none;
}
.am-featured-products .wp-block-post-excerpt {
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
  flex: 1;
}
.am-featured-products .wp-block-post-excerpt__more-link {
  color: var(--am-secondary);
  font-weight: 600;
  text-decoration: none;
}

/* Values grid — 6 cards in 3x2 (collapses on mobile) */
.am-values {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--am-sp-4);
}
@media (min-width: 600px) { .am-values { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .am-values { grid-template-columns: repeat(3, 1fr); } }

.am-value-card {
  background: white;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius-md, 8px);
  padding: var(--am-sp-5);
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.am-value-card:hover {
  border-color: color-mix(in srgb, var(--am-primary) 30%, white);
  transform: translateY(-2px);
}
.am-value-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--am-sp-5);
  width: 32px;
  height: 3px;
  background: var(--am-secondary);
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
}
.am-value-card__title {
  font-family: var(--am-font-serif);
  font-size: var(--am-fs-lg);
  color: var(--am-primary);
  margin: var(--am-sp-2) 0 var(--am-sp-2);
}
.am-value-card__text {
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
  line-height: 1.6;
  margin: 0;
}

/* About strip — two-column intro + stats */
.am-about-strip { padding-top: var(--am-sp-14); padding-bottom: var(--am-sp-14); }
.am-about-strip .am-section__title { margin-bottom: var(--am-sp-4); }
.am-about-strip .am-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--am-sp-3);
  margin: 0;
}
.am-about-strip .am-stats .am-card {
  padding: var(--am-sp-4);
  text-align: center;
  background: white;
}
.am-about-strip .am-stats .am-card h3 {
  font-family: var(--am-font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--am-primary);
  margin: 0 0 var(--am-sp-1);
  line-height: 1;
}
.am-about-strip .am-stats .am-card p {
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
  margin: 0;
}

/* On narrow screens, stack the about columns */
@media (max-width: 781px) {
  .am-about-strip .wp-block-columns { gap: var(--am-sp-6) !important; }
}

/* ============================================================================
   Homepage v3 — full-width sections, button wrapper fix, TA marquee,
                 better featured-product card, equal-height grids
   ========================================================================== */

/* Body / page background — soft surface so white sections feel layered */
body {
  background: #f5f7f9;
}
.wp-site-blocks {
  background: transparent;
}

/* Buttons: when am-btn-* classes are applied to wp-block-button wrapper,
   reset the wrapper and style the inner __link instead. This eliminates the
   double-border / nested-pill look. */
.wp-block-button.am-btn,
.wp-block-button.am-btn-primary,
.wp-block-button.am-btn-outline,
.wp-block-button.am-btn-secondary {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.wp-block-button.am-btn .wp-block-button__link,
.wp-block-button.am-btn-primary .wp-block-button__link,
.wp-block-button.am-btn-outline .wp-block-button__link,
.wp-block-button.am-btn-secondary .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--am-sp-2);
  padding: var(--am-sp-3) var(--am-sp-6);
  border-radius: var(--am-radius-pill);
  font-family: var(--am-font-sans);
  font-size: var(--am-fs-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
}
.wp-block-button.am-btn-primary .wp-block-button__link {
  background-color: var(--am-primary);
  color: #ffffff;
  border-color: var(--am-primary);
}
.wp-block-button.am-btn-primary .wp-block-button__link:hover {
  background-color: var(--am-primary-700);
  border-color: var(--am-primary-700);
  color: #ffffff;
}
.wp-block-button.am-btn-outline .wp-block-button__link {
  background-color: transparent;
  color: var(--am-primary);
  border-color: var(--am-primary);
}
.wp-block-button.am-btn-outline .wp-block-button__link:hover {
  background-color: var(--am-primary);
  color: #ffffff;
}
/* Hero invert */
.am-hero__cta-group .wp-block-button.am-btn-primary .wp-block-button__link {
  background-color: #ffffff;
  color: var(--am-primary);
  border-color: #ffffff;
}
.am-hero__cta-group .wp-block-button.am-btn-primary .wp-block-button__link:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
}
.am-hero__cta-group .wp-block-button.am-btn-outline .wp-block-button__link {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.75);
}
.am-hero__cta-group .wp-block-button.am-btn-outline .wp-block-button__link:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
}

/* Sections — when full-width via alignfull, break out of am-main's
   inherited global padding using 100vw + calc trick.
   Requires html overflow-x: hidden to suppress any sub-pixel scrollbar. */
html { overflow-x: hidden; }

.am-main {
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}
.am-main > .alignfull,
.am-main .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Collapse the gap between the header template-part and the first section.
   WP block themes add blockGap margins between top-level children;
   we want our hero to sit flush under the header. */
.wp-site-blocks > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
header.wp-block-template-part {
  margin: 0 !important;
  /* Sticky header — stays at top while scrolling */
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 2px 8px rgba(14, 74, 107, 0.04);
}
footer.wp-block-template-part {
  margin-top: 0 !important;
}

/* Make sure the inner template-part wrappers also pick up the sticky-friendly bg */
header.wp-block-template-part > .wp-block-group,
header.wp-block-template-part > .hostinger-ai-menu {
  background: transparent !important;
}

/* Tighter padding so sections feel connected without an obvious whitespace gap */
.am-hero {
  padding-top: var(--am-sp-20, 6rem);
  padding-bottom: var(--am-sp-20, 6rem);
}
.am-pillar-strip {
  padding-top: var(--am-sp-10);
  padding-bottom: var(--am-sp-10);
}

/* Kill the block-gap between sections inside am-main. WP's constrained/flow
   layout injects margin-block-start: var(--wp--style--block-gap, 24px) on every
   child, which created the gray strip between hero and pillar. */
.am-main {
  --wp--style--block-gap: 0;
}
.am-main > *,
.am-main.is-layout-constrained > *,
.am-main.is-layout-flow > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Featured Products — breathing room between heading/lead and the grid; smaller cards */
.am-section .am-featured-products {
  margin-top: var(--am-sp-6);
}
.am-fp-card {
  min-height: 0;
  padding: var(--am-sp-4);
  gap: var(--am-sp-1);
}
/* Equal heights row-by-row without inflating individual cards */
.am-featured-products {
  grid-auto-rows: 1fr;
}
/* Footer hugs content — no excess empty space below */
.am-fp-card__footer {
  margin-top: var(--am-sp-3);
}
.am-fp-card__title { font-size: 1.1rem; }
.am-fp-card__generic { font-size: 0.8rem; }
.am-fp-card__strength { font-size: 0.8rem; }
.am-fp-card__footer { padding-top: var(--am-sp-2); }

/* "What We Stand For" — enforce equal-height with min-height + flex column */
.am-values {
  grid-auto-rows: 1fr;
  align-items: stretch;
}
.am-value-card,
.wp-block-group.am-value-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start;
  min-height: 180px;
  height: auto;
  padding: var(--am-sp-5) !important; /* beat .has-global-padding */
}
.am-value-card__title {
  margin-top: var(--am-sp-3);
}
.am-value-card__text {
  margin-top: 0;
  flex: 1;
}

/* Kill WP's :where(.is-layout-flow) > * { margin-block-start: 40px } on grid
   children — it was making 2nd/3rd cards in a row 40px shorter than the
   first-child card. Same fix for value cards and About stats. */
.am-values > *,
.am-stats > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* About section — breathing room + equal-height + colored stat values */
.am-about-strip {
  padding-top: var(--am-sp-20, 6rem) !important;
  padding-bottom: var(--am-sp-20, 6rem) !important;
}
.am-about-strip .am-stats {
  grid-auto-rows: 1fr;
  align-items: stretch;
}
.am-about-strip .am-stats .am-card,
.am-about-strip .am-stats .wp-block-group.am-card {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 130px;
  height: auto;
  padding: var(--am-sp-5) !important;
}
.am-about-strip .am-stats .am-card h3 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  background: linear-gradient(135deg, var(--am-secondary), var(--am-secondary-700, #136A52));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  font-weight: 700;
}
/* Footer disclaimer (compact) — already inline-styled, but ensure it doesn't inherit other rules */
.allomedix-medical-disclaimer p { margin: 0 0 4px; }
.allomedix-medical-disclaimer p:last-child { margin-bottom: 0; }

/* Section title centering helpers (used in heading + lead at top of sections) */
.am-section__title.has-text-align-center,
.am-section h2.has-text-align-center { text-align: center; }

/* ----- Therapeutic Areas marquee ----- */
.am-ta-marquee {
  overflow: hidden;
  width: 100%;
  margin: var(--am-sp-4) 0 0;
  /* Soft fade-out at both edges */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.am-ta-marquee__track {
  display: flex;
  gap: var(--am-sp-4);
  width: max-content;
  animation: am-ta-scroll 55s linear infinite;
  will-change: transform;
}
.am-ta-marquee:hover .am-ta-marquee__track,
.am-ta-marquee:focus-within .am-ta-marquee__track {
  animation-play-state: paused;
}
@keyframes am-ta-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .am-ta-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
            mask-image: none;
    scroll-snap-type: x mandatory;
  }
  .am-ta-marquee__track {
    animation: none;
    width: max-content;
  }
  .am-ta-tile { scroll-snap-align: start; }
}

.am-ta-tile {
  flex: 0 0 200px;
  height: 160px;
  background: white;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius-md, 10px);
  padding: var(--am-sp-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--am-sp-3);
  text-align: center;
  text-decoration: none;
  color: var(--am-ink);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.am-ta-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--am-primary) 30%, white);
  box-shadow: 0 8px 20px rgba(14, 74, 107, 0.10);
}
.am-ta-tile__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--am-secondary) 10%, white);
  color: var(--am-secondary-700, #136A52);
  border-radius: 50%;
}
.am-ta-tile__icon svg { width: 28px; height: 28px; }
.am-ta-tile__name {
  font-family: var(--am-font-sans);
  font-size: var(--am-fs-sm);
  font-weight: 600;
  color: var(--am-ink);
  line-height: 1.3;
}

/* ----- Featured product cards (custom block: allomedix/featured-products) ----- */
.am-featured-products {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--am-sp-5);
  align-items: stretch;
  margin: 0;
}
@media (min-width: 640px) { .am-featured-products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .am-featured-products { grid-template-columns: repeat(4, 1fr); } }

.am-fp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--am-sp-2);
  background: white;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius-md, 10px);
  padding: var(--am-sp-5);
  min-height: 240px;
  text-decoration: none;
  color: var(--am-ink);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.am-fp-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--am-primary) 30%, white);
  box-shadow: 0 8px 20px rgba(14, 74, 107, 0.10);
}
.am-fp-card__rx,
.am-fp-card__otc {
  position: absolute;
  top: var(--am-sp-3);
  right: var(--am-sp-3);
  font-family: var(--am-font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--am-radius-pill);
  line-height: 1;
}
.am-fp-card__rx {
  background: color-mix(in srgb, var(--am-rx, #B5345A) 12%, white);
  color: var(--am-rx, #B5345A);
}
.am-fp-card__otc {
  background: color-mix(in srgb, var(--am-secondary) 12%, white);
  color: var(--am-secondary-700, #136A52);
}
.am-fp-card__title {
  font-family: var(--am-font-serif);
  font-size: 1.25rem;
  color: var(--am-primary);
  margin: 0;
  padding-right: 2.5rem; /* leave room for badge */
  line-height: 1.25;
}
.am-fp-card__generic {
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}
.am-fp-card__strength {
  font-size: var(--am-fs-sm);
  color: var(--am-ink);
  margin: 0;
  font-weight: 600;
}
.am-fp-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--am-sp-2);
  margin-top: auto;
  padding-top: var(--am-sp-3);
  border-top: 1px solid var(--am-border);
}
.am-fp-card__ta {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--am-muted);
}
.am-fp-card__arrow {
  font-size: 1.25rem;
  color: var(--am-secondary);
  transition: transform 0.15s ease;
}
.am-fp-card:hover .am-fp-card__arrow { transform: translateX(3px); }

/* Override the old Query-Loop-based featured product styles (no-op if Query Loop is gone) */
.am-featured-products .wp-block-post-template { display: none; }

/* ----- Equal-height value cards ----- */
.am-values {
  align-items: stretch;
}
.am-value-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.am-value-card__text { margin-top: auto; }

/* ----- Equal-height About stats ----- */
.am-about-strip .am-stats {
  grid-auto-rows: 1fr;
}
.am-about-strip .am-stats .am-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCTS ARCHIVE PAGE — compact hero + filter chips + products grid
   ═══════════════════════════════════════════════════════════════════════════ */

/* Compact hero variant (used on archive/taxonomy pages) */
.am-hero.am-hero--sm {
  padding-top: var(--am-sp-12, 4rem);
  padding-bottom: var(--am-sp-12, 4rem);
}
.am-hero.am-hero--sm .am-hero__headline {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--am-sp-3);
}
.am-hero.am-hero--sm .am-hero__subheadline {
  font-size: var(--am-fs-base);
  margin-bottom: 0;
}

/* Products page wrapper */
.am-products-page {
  display: flex;
  flex-direction: column;
  gap: var(--am-sp-7, 2.5rem);
}
.am-products-page > * { margin: 0 !important; }

/* Therapeutic-area filter chip strip */
.am-ta-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--am-sp-2, 0.5rem);
  justify-content: center;
}
.am-ta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--am-radius-pill, 999px);
  border: 1px solid var(--am-border);
  background: white;
  color: var(--am-ink);
  font-family: var(--am-font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.am-ta-chip:hover {
  background: color-mix(in srgb, var(--am-primary) 6%, white);
  border-color: color-mix(in srgb, var(--am-primary) 25%, var(--am-border));
  color: var(--am-primary);
}
.am-ta-chip.is-active {
  background: var(--am-primary);
  border-color: var(--am-primary);
  color: white;
  font-weight: 600;
}
.am-ta-chip.is-active:hover {
  background: var(--am-primary-700, var(--am-primary));
  color: white;
}

/* Products grid — reuses .am-fp-card styling from featured-products block.
   Three columns on desktop (vs four for featured) so cards have more room. */
.am-products-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--am-sp-5);
  align-items: stretch;
}
@media (min-width: 640px) { .am-products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .am-products-grid { grid-template-columns: repeat(3, 1fr); } }

/* Pagination */
.am-products-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
}
.am-products-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--am-border);
  background: white;
  color: var(--am-ink);
  font-family: var(--am-font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.am-products-pagination .page-numbers:hover {
  background: color-mix(in srgb, var(--am-primary) 6%, white);
  border-color: color-mix(in srgb, var(--am-primary) 25%, var(--am-border));
  color: var(--am-primary);
}
.am-products-pagination .page-numbers.current {
  background: var(--am-primary);
  border-color: var(--am-primary);
  color: white;
}
.am-products-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  color: var(--am-muted);
}

/* Empty state */
.am-products-empty {
  text-align: center;
  padding: var(--am-sp-12, 4rem) var(--am-sp-5);
  background: white;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius-md, 10px);
  color: var(--am-muted);
}
.am-products-empty .am-btn-link {
  display: inline-block;
  margin-top: var(--am-sp-3);
  color: var(--am-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE PRODUCT PAGE — gradient hero header + content layout
   Inherits .am-hero / .am-hero--sm gradient; this section restyles the inner
   eyebrow chips, brand kicker, and supporting text so the rx-badge / TA /
   dosage-form pills read clearly on the deep-blue background.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hero eyebrow row: pill cluster above the title (Rx / TA / dosage form) */
.am-product-hero .am-product-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--am-sp-2, 0.5rem);
  margin-bottom: var(--am-sp-4, 1rem);
}

/* Rx badge inside the dark hero: stay red-on-white so it pops */
.am-product-hero .am-rx-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #ffffff;
  color: var(--am-rx, #c0392b);
  font-family: var(--am-font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.am-product-hero .am-rx-badge::before {
  content: "\211E";
  margin-right: 0.3rem;
}

/* Therapeutic-area + dosage-form chips (rendered via core/post-terms) */
.am-product-hero .am-product-hero__ta,
.am-product-hero .am-product-hero__df {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-family: var(--am-font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}
.am-product-hero .am-product-hero__ta a,
.am-product-hero .am-product-hero__df a {
  color: inherit;
  text-decoration: none;
}
.am-product-hero .am-product-hero__ta a:hover,
.am-product-hero .am-product-hero__df a:hover {
  text-decoration: underline;
}

/* Brand kicker above title — small uppercase serif-ish lead */
.am-product-hero .am-product-hero__brand {
  font-family: var(--am-font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 var(--am-sp-2, 0.5rem);
}
.am-product-hero .am-product-hero__brand:empty { display: none; }

/* Title — uses am-hero__headline base; tighten for product detail page */
.am-product-hero .am-product-hero__title {
  margin-bottom: var(--am-sp-3, 0.75rem);
}

/* Generic (molecule) — sits where the hero subheadline normally sits */
.am-product-hero .am-product-hero__generic {
  font-style: italic;
  margin-bottom: var(--am-sp-2, 0.5rem);
}
.am-product-hero .am-product-hero__generic:empty { display: none; }

/* Strength — small contrast line, optional */
.am-product-hero .am-product-hero__strength {
  font-family: var(--am-font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}
.am-product-hero .am-product-hero__strength:empty { display: none; }

/* Detail section: ensure am-product-body keeps comfortable padding inside the
   full-width am-section without doubling spacing. */
.am-product-detail .am-product-body {
  margin: 0;
}

/* Sticky sidebar info card on wide screens */
@media (min-width: 900px) {
  .am-product-body__sidebar {
    position: sticky;
    top: var(--am-sp-6, 1.5rem);
    align-self: flex-start;
  }
}

/* Related-products block: hide its internal <h3> on the single-product page
   because the template now provides a centered .am-section__title above it. */
.am-single-product .am-related-products > h3 {
  display: none;
}
.am-single-product .am-related-products {
  margin: 0;
}

/* Make the related-products mini cards inherit the fp-card visual language */
.am-single-product .am-related-products .am-grid-3 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--am-sp-5, 1.5rem);
}
@media (min-width: 640px) {
  .am-single-product .am-related-products .am-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .am-single-product .am-related-products .am-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== FIXES BATCH — Rx pill, stats grid, CTA strip ===== */

/* Rx pill inside the sidebar product-info-card was stretching full-width because
   .am-product-card is a flex column (default align-items: stretch). Anchor it. */
.am-product-card > .am-rx-badge,
.am-product-card > .am-badge-rx {
  align-self: flex-start;
}

/* Stats grid: force 4 even columns on desktop so "Pan-India" / "Gurugram" don't
   blow out the auto-fit minmax. Also cap the value font-size so longer string
   values (city/country names) don't break wrap awkwardly. */
.am-stats {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .am-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}
.am-stats .am-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.am-stats .am-card h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  line-height: 1.1;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: none;
}
.am-stats .am-card p {
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
  margin: 0;
}

/* CTA strip: differentiate primary vs outline buttons on the dark gradient bg.
   Previously a blanket rule made both look like solid white pills; the outline
   button then visually blended into the dark gradient. */
.am-cta-strip .wp-block-button.am-btn-primary .wp-block-button__link {
  background: white;
  color: var(--am-primary);
  border: 1.5px solid white;
  font-weight: 600;
}
.am-cta-strip .wp-block-button.am-btn-primary .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.9);
}
.am-cta-strip .wp-block-button.am-btn-outline .wp-block-button__link {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  font-weight: 600;
}
.am-cta-strip .wp-block-button.am-btn-outline .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: white;
}

/* ===== 404 / ERROR PAGES ===== */
.am-error-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--am-primary) 70%, white);
  margin-bottom: var(--am-sp-2);
}

.am-suggest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--am-sp-4);
  margin-top: var(--am-sp-5);
}
@media (min-width: 600px) {
  .am-suggest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .am-suggest-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Slim variant of am-fp-card for suggestion links (no badge / footer) */
.am-fp-card.am-fp-card--slim {
  min-height: 0;
  gap: var(--am-sp-3);
  padding: var(--am-sp-4);
}
.am-fp-card.am-fp-card--slim .am-fp-card__title {
  padding-right: 0;
  font-size: 1.15rem;
}
.am-suggest__text {
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
  margin: 0;
  line-height: 1.5;
}
.am-suggest__arrow {
  margin-top: auto;
  font-size: 1.2rem;
  color: var(--am-primary);
  font-weight: 700;
  transition: transform 0.15s ease;
}
.am-fp-card.am-fp-card--slim:hover .am-suggest__arrow {
  transform: translateX(4px);
}

.am-error-note {
  margin-top: var(--am-sp-6);
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
}

/* Search template — center the WP search block in the hero */
.am-error-hero .wp-block-search {
  margin: var(--am-sp-4) auto 0;
  max-width: 480px;
}
.am-error-hero .wp-block-search .wp-block-search__input {
  border-radius: var(--am-radius-md, 10px);
}


/* ═══════════════════════════════════════════════════════════════════════════
   THERAPEUTIC-AREA TAXONOMY ARCHIVE — hero variant
   Rendered server-side by allomedix/products-grid when on a TA archive.
   Inherits am-hero + am-hero--sm (deep-blue gradient, white text); adds an
   inline SVG icon to the left of the eyebrow + headline + description block.
   ═══════════════════════════════════════════════════════════════════════════ */
.am-ta-hero__inner {
  display: flex;
  align-items: center;
  gap: var(--am-sp-5, 1.5rem);
  text-align: left;
  max-width: 1100px;
  width: 100%;
}
.am-ta-hero__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--am-radius-md, 12px);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.75rem;
}
.am-ta-hero__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.am-ta-hero__text {
  flex: 1 1 auto;
  min-width: 0;
}
.am-ta-hero__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin: 0 0 var(--am-sp-2, 0.5rem);
  color: #fff;
}
.am-ta-hero__headline { margin-bottom: var(--am-sp-2, 0.5rem); }
.am-ta-hero__subheadline { margin: 0; max-width: 64ch; }
@media (max-width: 640px) {
  .am-ta-hero__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--am-sp-4, 1rem);
  }
  .am-ta-hero__icon { width: 56px; height: 56px; }
  .am-ta-hero__subheadline { margin-left: auto; margin-right: auto; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   CONTACT PAGE / FORM
   ═══════════════════════════════════════════════════════════════════════════
   Used by:
     - templates/page-contact.html  (info column + form column inside am-section)
     - blocks/contact-form/render.php  (the form itself + status banners)
*/

/* ── Left column: contact info list ─────────────────────────────────────── */
.am-contact-info {
  list-style: none;
  padding: 0;
  margin: var(--am-sp-6, 1.5rem) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--am-sp-5, 1.25rem);
}

.am-contact-info__item {
  display: flex;
  gap: var(--am-sp-4, 1rem);
  align-items: flex-start;
}

.am-contact-info__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 74, 107, 0.08);
  color: var(--am-primary, #0E4A6B);
}

.am-contact-info__icon svg {
  width: 22px;
  height: 22px;
}

.am-contact-info__body {
  flex: 1 1 auto;
  min-width: 0;
}

.am-contact-info__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--am-muted, #6B7785);
  margin-bottom: 0.25rem;
}

.am-contact-info__value {
  font-style: normal;
  color: var(--am-ink, #0B1B2B);
  line-height: 1.45;
  word-break: break-word;
}

.am-contact-info__value a {
  color: var(--am-primary, #0E4A6B);
  text-decoration: none;
}

.am-contact-info__value a:hover,
.am-contact-info__value a:focus-visible {
  text-decoration: underline;
}

/* ── Right column: form card ────────────────────────────────────────────── */
.am-contact-form-wrap {
  margin-top: var(--am-sp-4, 1rem);
}

.am-contact-form__anchor {
  display: block;
  position: relative;
  top: -100px;
  visibility: hidden;
}

.am-contact-form {
  background: #ffffff;
  border: 1px solid rgba(14, 74, 107, 0.12);
  border-radius: 12px;
  padding: var(--am-sp-6, 1.5rem);
  box-shadow: 0 1px 2px rgba(11, 27, 43, 0.04);
}

@media (min-width: 768px) {
  .am-contact-form {
    padding: var(--am-sp-8, 2rem);
  }
}

.am-contact-form__row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--am-sp-5, 1.25rem);
}

.am-contact-form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--am-sp-4, 1rem);
}

@media (min-width: 600px) {
  .am-contact-form__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.am-contact-form__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--am-ink, #0B1B2B);
}

.am-contact-form__req {
  color: var(--am-rx, #B5345A);
  margin-left: 0.15rem;
}

.am-contact-form__hint {
  font-weight: 400;
  color: var(--am-muted, #6B7785);
  font-size: 0.8125rem;
  margin-left: 0.25rem;
}

.am-contact-form__input {
  width: 100%;
  font: inherit;
  color: var(--am-ink, #0B1B2B);
  background: #fff;
  border: 1px solid rgba(14, 74, 107, 0.22);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  line-height: 1.4;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.am-contact-form__input:focus {
  outline: none;
  border-color: var(--am-primary, #0E4A6B);
  box-shadow: 0 0 0 3px rgba(14, 74, 107, 0.15);
}

.am-contact-form__textarea {
  resize: vertical;
  min-height: 7.5rem;
}

.am-contact-form__select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%230E4A6B' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

/* Hide honeypot but keep it accessible-friendly (no display:none — some bots skip those). */
.am-contact-form__honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.am-contact-form__actions {
  display: flex;
  flex-direction: column;
  gap: var(--am-sp-3, 0.75rem);
  align-items: flex-start;
  margin-top: var(--am-sp-4, 1rem);
}

@media (min-width: 600px) {
  .am-contact-form__actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--am-sp-5, 1.25rem);
  }
}

.am-contact-form button[type="submit"] {
  /* Mirrors .am-btn-primary look without depending on Gutenberg button wrapper. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--am-primary, #0E4A6B);
  color: #ffffff;
  border: 1px solid var(--am-primary, #0E4A6B);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.04s ease;
}

.am-contact-form button[type="submit"]:hover,
.am-contact-form button[type="submit"]:focus-visible {
  background: var(--am-primary-700, #093750);
  border-color: var(--am-primary-700, #093750);
}

.am-contact-form button[type="submit"]:active {
  transform: translateY(1px);
}

.am-contact-form__privacy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--am-muted, #6B7785);
}

.am-contact-form__privacy a {
  color: var(--am-primary, #0E4A6B);
}

/* ── Status banners ─────────────────────────────────────────────────────── */
.am-contact-form__banner {
  border-radius: 10px;
  padding: var(--am-sp-4, 1rem) var(--am-sp-5, 1.25rem);
  margin-bottom: var(--am-sp-5, 1.25rem);
  border: 1px solid transparent;
}

.am-contact-form__banner strong {
  display: block;
  margin-bottom: 0.25rem;
}

.am-contact-form__banner p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.am-contact-form__success {
  background: rgba(27, 138, 107, 0.10);
  border-color: rgba(27, 138, 107, 0.35);
  color: #0f5a45;
}

.am-contact-form__success strong { color: #0f5a45; }

.am-contact-form__error {
  background: rgba(181, 52, 90, 0.08);
  border-color: rgba(181, 52, 90, 0.35);
  color: #7a223c;
}

.am-contact-form__error strong { color: #7a223c; }

/* Stack columns nicely on small screens (the contact section uses wp-block-columns). */
@media (max-width: 781px) {
  .am-contact-info {
    margin-top: var(--am-sp-4, 1rem);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGAL PAGES (Privacy Policy, Terms & Conditions)
   ═══════════════════════════════════════════════════════════════════════════ */

/* The legal pages use a single .am-article inside an .am-section. Tighten up
   heading rhythm so the long-form prose scans cleanly. */
.am-legal .am-article {
  margin-left: auto;
  margin-right: auto;
}

.am-legal .am-article h2 {
  margin-top: var(--am-sp-8, 2rem);
  margin-bottom: var(--am-sp-3, 0.75rem);
  font-size: var(--am-fs-xl, 1.5rem);
  line-height: 1.25;
}

.am-legal .am-article h2:first-child {
  margin-top: 0;
}

.am-legal .am-article h3 {
  margin-top: var(--am-sp-6, 1.5rem);
  margin-bottom: var(--am-sp-2, 0.5rem);
  font-size: var(--am-fs-lg, 1.25rem);
}

.am-legal .am-article ul {
  padding-left: 1.5rem;
  margin-bottom: var(--am-sp-4);
}

.am-legal .am-article li {
  margin-bottom: var(--am-sp-2, 0.5rem);
}

.am-legal .am-article a {
  color: var(--am-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.am-legal .am-article a:hover {
  text-decoration: none;
}

.am-legal__meta {
  font-family: var(--am-font-sans);
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
  margin-bottom: var(--am-sp-2);
}

.am-legal__note {
  font-family: var(--am-font-sans);
  font-size: var(--am-fs-sm);
  color: var(--am-muted);
  padding: var(--am-sp-3) var(--am-sp-4);
  background: color-mix(in srgb, var(--am-primary) 4%, white);
  border-left: 3px solid var(--am-primary);
  border-radius: 4px;
  margin-bottom: var(--am-sp-6);
}

/* Footer legal links (inline, in the bottom bar) */
.am-footer__legal-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  white-space: nowrap;
}

.am-footer__legal-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.9;
}

.am-footer__legal-links a:hover {
  opacity: 1;
  text-decoration: none;
}

.am-footer__legal-sep {
  opacity: 0.5;
}

@media (max-width: 600px) {
  .am-footer__legal-links {
    display: block;
    margin-left: 0;
    margin-top: 0.25rem;
    white-space: normal;
  }
}

/* ===== FAQ ACCORDION =====
   Native <details>/<summary> disclosure used on /contact/.
   Multiple items can be open simultaneously (no `name` attr).
*/
.am-faq {
  max-width: 800px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--am-sp-3);
}

.am-faq__item {
  background-color: #fff;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.am-faq__item[open] {
  border-color: color-mix(in srgb, var(--am-primary) 40%, var(--am-border));
  box-shadow: 0 2px 8px -4px color-mix(in srgb, var(--am-primary) 25%, transparent);
}

/* Remove native disclosure triangle */
.am-faq__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--am-sp-4);
  padding: var(--am-sp-4) var(--am-sp-5);
  font-weight: 600;
  color: var(--am-primary);
  font-size: 1.0625rem;
  line-height: 1.4;
  transition: background-color 0.15s ease;
}

.am-faq__q::-webkit-details-marker {
  display: none;
}

.am-faq__q:hover {
  background-color: color-mix(in srgb, var(--am-primary) 4%, #fff);
}

.am-faq__q:focus-visible {
  outline: 2px solid var(--am-accent);
  outline-offset: -2px;
}

.am-faq__q-text {
  flex: 1 1 auto;
}

.am-faq__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--am-primary);
  transition: transform 0.2s ease;
}

.am-faq__item[open] .am-faq__icon {
  transform: rotate(180deg);
}

.am-faq__a {
  padding: 0 var(--am-sp-5) var(--am-sp-5);
  color: var(--am-ink);
  line-height: 1.6;
}

.am-faq__a > p {
  margin: 0;
}

.am-faq__a > p + p {
  margin-top: var(--am-sp-3);
}

.am-faq__a a {
  color: var(--am-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.am-faq__a a:hover {
  color: var(--am-primary-700);
}

