/* AFP product pages — THEME-1 (site color scheme + LAYOUT-FIX-2 guards) */

/* ---- Site color scheme ----
   Pulls Elementor's global palette (Site Settings -> Global Colors) when
   available, with fallbacks sampled from allfamilyhealth.com's header.
   Adjust everything from this one block. */
.aafp-pp {
  --afp-primary:      var(--e-global-color-primary, #1d1b84);  /* deep indigo (header) */
  --afp-primary-dark: #14126b;                                  /* hover shade */
  --afp-accent:       var(--e-global-color-accent, #4f6df5);   /* periwinkle blue */
  --afp-cta-bg:       #f7b84b;                                  /* Order Now button */
  --afp-cta-hover:    #f0a92e;
}

.aafp-pp { max-width: 1180px; margin: 0 auto; padding: 40px 20px 64px; color: #1e2a36; }
/* If your theme header still overlaps the top of the page, raise this value. */
@media (max-width: 860px) { .aafp-pp { padding-top: 16px; } }

/* ---- Resilience guards ---- */
/* Never let any image overflow its column, even if other rules fail. */
.aafp-pp img { max-width: 100%; height: auto; }
/* Minimal Swiper structural rules baked into our own stylesheet. Normally the
   vendor swiper-bundle.min.css provides these; duplicating the essentials here
   means the gallery still lays out correctly (one visible slide, no infinite
   vertical stack) even if the vendor file fails to load on a deployment. */
.aafp-pp .swiper { position: relative; overflow: hidden; }
.aafp-pp .swiper-wrapper { display: flex; box-sizing: content-box; }
.aafp-pp .swiper-slide { flex-shrink: 0; width: 100%; position: relative; }
.aafp-pp .aafp-pp-thumbs .swiper-slide { width: 25%; }

/* Before Swiper initializes (or if its JS fails to load), show only the first
   slide instead of stacking all slides into a giant vertical column. */
.aafp-pp-swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }
.aafp-pp-swiper:not(.swiper-initialized) .swiper-button-prev,
.aafp-pp-swiper:not(.swiper-initialized) .swiper-button-next,
.aafp-pp-swiper:not(.swiper-initialized) .swiper-pagination { display: none; }
.aafp-pp-thumbs:not(.swiper-initialized) .swiper-wrapper { display: flex; gap: 10px; }
.aafp-pp-thumbs:not(.swiper-initialized) .swiper-slide { width: calc(25% - 8px); }
.aafp-pp h1, .aafp-pp h2, .aafp-pp h3 { color: var(--afp-primary); line-height: 1.25; }

/* ---- Hero ---- */
.aafp-pp__hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "gallery head"
    "gallery content";
  column-gap: 48px;
  row-gap: 0;
  align-items: start;
}
.aafp-pp__head    { grid-area: head; }
.aafp-pp__left    { grid-area: gallery; }
.aafp-pp__content { grid-area: content; }
/* Swiper-in-grid runaway guard: grid tracks default to min-width:auto (content
   size), so Swiper's 300%-wide slide wrapper can force the track to grow, which
   re-inflates Swiper, which grows the track... until Chrome's ~26,843,442px
   layout ceiling. min-width:0 + max-width caps break the loop at every level. */
.aafp-pp__hero-inner > * { min-width: 0; max-width: 100%; }
.aafp-pp__gallery-panel { min-width: 0; max-width: 100%; overflow: hidden; }
.aafp-pp .aafp-pp-swiper,
.aafp-pp .aafp-pp-thumbs { max-width: 100%; overflow: hidden; }

/* Mobile: drug name + Generic For + rating first, then the image, then the buy column */
@media (max-width: 860px) {
  .aafp-pp__hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "head"
      "gallery"
      "content";
    row-gap: 18px;
  }
  .aafp-pp__gallery-panel { padding: 16px; }
  .aafp-pp__name { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .aafp-pp__headline { margin: 30px auto 4px; }
}

/* Social proof row (stars + rating + orders) */
.aafp-pp__social { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; font-size: .95rem; }
.aafp-pp__social strong { color: var(--afp-primary); font-weight: 800; letter-spacing: .01em; }
.aafp-pp__stars { display: inline-flex; align-items: center; gap: 2.5px; line-height: 1; }
.aafp-pp__stars svg { width: 17px; height: 17px; fill: #fbbf24; }
.aafp-pp__social-sep { color: #cbd5e1; }
.aafp-pp__social-orders { color: #475569; }

.aafp-pp__gallery-panel { background: #f5f2ee; border-radius: 16px; padding: 28px; }
.aafp-pp-swiper { background: transparent; border-radius: 12px; width: 100%; aspect-ratio: 1 / 1; }
.aafp-pp-swiper .swiper-wrapper { height: 100%; }
.aafp-pp-swiper .swiper-slide { height: 100%; }
.aafp-pp-thumbs { margin: 14px auto 0; max-width: 340px; }
.aafp-pp-thumbs .swiper-slide { width: 25%; background: #fff; border: 1.5px solid #dbe4ec; border-radius: 8px; padding: 4px; cursor: pointer; opacity: .8; transition: opacity .15s ease, border-color .15s ease; }
.aafp-pp-thumbs .swiper-slide { aspect-ratio: 1 / 1; }
.aafp-pp-thumbs .swiper-slide img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; border-radius: 5px; }
.aafp-pp-thumbs .swiper-slide-thumb-active { border-color: var(--afp-accent); opacity: 1; }
.aafp-pp-swiper .swiper-slide img { background: transparent; }

/* Full-width headline band below the hero (carries the SEO H1) */
.aafp-pp__headline { text-align: center; margin: 44px auto 8px; max-width: 820px; }
.aafp-pp__headline .aafp-pp__h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.aafp-pp__headline h2.aafp-pp__tagline { margin: 0 !important; font-size: 1.15rem; font-weight: 700; color: var(--afp-accent); line-height: 1.4; }

/* Day-supply note under the selected quantity */
.aafp-pp__opt-note { margin: 10px 0 0; font-size: .9rem; font-weight: 600; color: #16a34a; }

/* Drug name heading (top of right column).
   line-height 1 + zeroed first-child margins keep the heading's top edge level
   with the top of the hero image panel in the left column. The !important wins
   over theme styles like `.entry-content h2 { margin-top: ... }` that would
   otherwise push the name down and break the alignment. */
.aafp-pp__name { margin: 0 0 6px; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
.aafp-pp h2.aafp-pp__name { color: #111827 !important; }
.aafp-pp h2.aafp-pp__name { margin-top: 0 !important; }
.aafp-pp__head > :first-child, .aafp-pp__left > :first-child { margin-top: 0 !important; }
.aafp-pp__left .aafp-pp__gallery-panel { margin-top: 0; }

/* Field labels + pill chips (Select Dosage / Select Quantity) */
.aafp-pp__field { margin: 18px 0 0; }
.aafp-pp__field-label { margin: 0 0 8px; font-weight: 800; color: var(--afp-primary); font-size: .98rem; }
.aafp-pp__req { color: #dc2626; }
.aafp-pp__chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.aafp-pp__pill { display: inline-flex; align-items: center; padding: 10px 20px; border: 1.5px solid #b9c6f2; border-radius: 999px; background: #fff; color: var(--afp-primary); font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.aafp-pp__pill:hover { border-color: var(--afp-accent); }
.aafp-pp__pill.is-selected { border-color: var(--afp-accent); box-shadow: 0 0 0 1px var(--afp-accent); background: #f3f6ff; }
.aafp-pp__pill--opt input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

/* How It Works box */
.aafp-pp__how { margin: 22px 0 0; background: #f2f4f7; border-radius: 14px; padding: 18px 22px; }
.aafp-pp__how-title { margin: 0 0 8px; font-weight: 800; color: var(--afp-primary); }
.aafp-pp__how ol { margin: 0; padding-left: 18px; }
.aafp-pp__how li { font-size: .92rem; color: #334155; line-height: 1.7; }

/* Price row + HSA */
.aafp-pp__price-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px 0 0; }
.aafp-pp__hsa { display: inline-flex; align-items: center; gap: 7px; color: var(--afp-primary); font-size: .95rem; }
.aafp-pp__cta-note { margin: 10px 0 0; text-align: center; font-size: .8rem; color: #b45309; line-height: 1.5; }
.aafp-pp-swiper { border-radius: 10px; overflow: hidden; }
.aafp-pp-swiper .swiper-slide img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; background: #fff; }
.aafp-pp-swiper .swiper-button-prev,
.aafp-pp-swiper .swiper-button-next { color: var(--afp-primary); background: rgba(255,255,255,.95); width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.aafp-pp-swiper .swiper-button-prev::after,
.aafp-pp-swiper .swiper-button-next::after { font-size: 16px; font-weight: 700; }
.aafp-pp-swiper .swiper-pagination-bullet-active { background: var(--afp-primary); }

.aafp-pp__h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; color: var(--afp-primary); }

/* Hero description callout: accent-tinted panel so the summary stands out */
.aafp-pp__summary { margin: 18px 0 0; padding: 18px 22px; background: #f4f6fb; background: color-mix(in srgb, var(--afp-accent) 5%, #fff); border-radius: 12px; }
.aafp-pp__summary p { margin: 0 0 10px; font-size: 1.02rem; line-height: 1.6; color: var(--afp-primary); }
.aafp-pp__summary p:last-child { margin-bottom: 0; }
@media (min-width: 861px) { .aafp-pp__summary { margin-top: 24px; } }

.aafp-pp__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.aafp-pp__badge { display: inline-block; padding: 5px 12px; border-radius: 999px; background: #eef3f8; color: var(--afp-primary); font-size: .82rem; font-weight: 600; }
.aafp-pp__badge--rx { background: #fdf0e7; color: #a45314; }
.aafp-pp__badge--otc { background: #e8f6ec; color: #1c6b36; }

.aafp-pp__price { font-size: 1.15rem; margin: 8px 0 16px; }
.aafp-pp__price strong { font-size: 1.5rem; color: var(--afp-primary); }

.aafp-pp__cta { display: block; width: 100%; margin: 14px 0 0; padding: 16px 34px; border-radius: 999px; background: var(--afp-cta-bg); color: var(--afp-primary) !important; font-weight: 800; font-size: 1.05rem; text-align: center; text-decoration: none; box-sizing: border-box; transition: background .15s ease; }
.aafp-pp__cta:hover { background: var(--afp-cta-hover); }

/* ---- Pricing ---- */
.aafp-pp__pricing { margin: 48px 0 0; }
.aafp-pp__pricing h2 { margin: 0 0 14px; }
.aafp-pp__pricing-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e6eaef; border-radius: 12px; overflow: hidden; }
.aafp-pp__pricing-table th, .aafp-pp__pricing-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eef1f5; }
.aafp-pp__pricing-table thead th { background: #f6f8fb; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: #3f5468; }
.aafp-pp__pricing-table tr.is-default { background: #f4faf6; }
.aafp-pp__tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #1c6b36; color: #fff; font-size: .72rem; font-weight: 700; vertical-align: middle; }

/* ---- Drug information ---- */
.aafp-pp__drug-info { margin: 56px auto 0; max-width: 820px; }
.aafp-pp__facts h2, .aafp-pp__block h2 { font-size: 1.4rem; margin: 0 0 12px; }
.aafp-pp__block { margin: 34px 0 0; }
.aafp-pp__block h3 { font-size: 1.08rem; margin: 18px 0 8px; }
.aafp-pp__block p, .aafp-pp__block li { line-height: 1.65; }
.aafp-pp__block ul { padding-left: 22px; }

.aafp-pp__facts table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e6eaef; border-radius: 12px; overflow: hidden; }
.aafp-pp__facts th, .aafp-pp__facts td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #eef1f5; vertical-align: top; }
.aafp-pp__facts th { width: 220px; background: #f6f8fb; color: #3f5468; font-weight: 600; }
@media (max-width: 600px) { .aafp-pp__facts th { width: 140px; } }

.aafp-pp__note { font-size: .9rem; color: #5a6b7c; background: #f6f8fb; border-left: 3px solid #c6d3df; padding: 8px 12px; border-radius: 0 8px 8px 0; }
.aafp-pp__sources ol { padding-left: 22px; }
.aafp-pp__sources a { color: var(--afp-accent); word-break: break-word; }

/* ---- Group link (product hero) ---- */
.aafp-pp__group-link { margin: 12px 0 0; }
.aafp-pp__group-link a { color: var(--afp-accent); font-weight: 600; text-decoration: none; }
.aafp-pp__group-link a:hover { text-decoration: underline; }

/* ---- Group page ---- */
.aafp-pp__group-head { margin: 0 0 28px; }
.aafp-pp__group-sub { margin: 6px 0 0; color: #3f5468; font-size: 1.05rem; }

.aafp-pp__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }

.aafp-pp__card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e6eaef; border-radius: 14px; overflow: hidden; transition: box-shadow .15s ease, transform .15s ease; }
.aafp-pp__card:hover { box-shadow: 0 6px 22px rgba(18,58,90,.12); transform: translateY(-2px); }

.aafp-pp__card-link { display: block; }
.aafp-pp__card-img { aspect-ratio: 1 / 1; background: #f6f8fb; display: flex; align-items: center; justify-content: center; }
.aafp-pp__card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.aafp-pp__card-noimg { font-size: 2.2rem; font-weight: 800; color: #c6d3df; }

.aafp-pp__card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.aafp-pp__card-title { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.aafp-pp__card-title a { color: var(--afp-primary); text-decoration: none; }
.aafp-pp__card-title a:hover { text-decoration: underline; }

.aafp-pp__card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.aafp-pp__card-badges .aafp-pp__badge { font-size: .72rem; padding: 3px 9px; }

.aafp-pp__card-summary { margin: 0; font-size: .9rem; line-height: 1.5; color: #3f5468; }

.aafp-pp__card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; }
.aafp-pp__card-price { font-size: .92rem; color: #3f5468; }
.aafp-pp__card-price strong { color: var(--afp-primary); font-size: 1.1rem; }
.aafp-pp__card-cta { display: inline-block; padding: 8px 16px; border-radius: 8px; background: var(--afp-primary); color: #fff !important; font-size: .85rem; font-weight: 700; text-decoration: none; }
.aafp-pp__card-cta:hover { background: var(--afp-primary-dark); }

/* ---- Trust chips (hero) ---- */
.aafp-pp__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.aafp-pp__chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid #dbe4ec; color: var(--afp-primary); font-size: .88rem; font-weight: 700; }

/* ---- Buy box ---- */

.aafp-pp__price { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--afp-primary); }
#aafp-pp-price { font-size: 1.35rem; }

/* ---- Trust badges row ---- */
.aafp-pp__badges-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 0; }
.aafp-pp__badges-row--gallery { justify-content: center; gap: 36px; margin: 24px auto 0; }
/* Explicit height (not max-height) so small source images scale UP as well.
   Extra selector depth beats the generic .aafp-pp__badge-item img cap below. */
.aafp-pp__badges-row--gallery .aafp-pp__badge-item img { height: 72px; width: auto; max-height: none; max-width: 210px; object-fit: contain; }
@media (max-width: 600px) { .aafp-pp__badges-row--gallery { gap: 24px; } .aafp-pp__badges-row--gallery .aafp-pp__badge-item img { height: 54px; max-width: 150px; } }
.aafp-pp__badge-item { display: inline-flex; align-items: center; text-decoration: none; }
.aafp-pp__badge-item img { max-height: 34px; max-width: 110px; width: auto; height: auto; object-fit: contain; display: block; }
@media (max-width: 600px) { .aafp-pp__badge-item img { max-height: 28px; max-width: 92px; } }

/* ---- Reviewer byline ---- */
.aafp-pp__byline { margin: 0 0 22px; padding: 10px 14px; background: #f6f8fb; border-left: 3px solid var(--afp-primary); border-radius: 0 8px 8px 0; font-size: .92rem; color: #3f5468; }
.aafp-pp__byline a { color: var(--afp-accent); }
.aafp-pp__byline-updated { color: #5a6b7c; }


/* ---- Contact Us box ---- */
.aafp-pp__contact { margin: 48px 0 0; }
.aafp-pp__contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 30px 34px; }
.aafp-pp__contact-title { font-size: 1.25rem; font-weight: 800; color: var(--afp-primary); margin: 0 0 8px; }
.aafp-pp__contact-text { font-size: .95rem; color: #334155; margin: 0; line-height: 1.6; }
.aafp-pp__contact-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.aafp-pp__contact-phone { display: inline-flex; align-items: center; gap: 8px; background: #1f6feb; color: #fff !important; font-weight: 700; font-size: 1rem; padding: 12px 22px; border-radius: 10px; text-decoration: none; }
.aafp-pp__contact-phone:hover { background: #1a5fd0; }
.aafp-pp__contact-email { font-size: .9rem; font-weight: 600; color: var(--afp-primary); text-decoration: none; }
.aafp-pp__contact-email:hover { text-decoration: underline; }
@media (max-width: 600px) { .aafp-pp__contact-inner { padding: 22px 20px; } .aafp-pp__contact-actions { align-items: flex-start; } }

/* ---- Add to Cart (buy box) ---- */
.aafp-pp button.aafp-pp__add-cart { display: block; width: 100%; margin: 10px 0 0; padding: 14px 24px; border: 2px solid var(--afp-primary) !important; border-radius: 999px !important; background: #fff !important; color: var(--afp-primary) !important; font-weight: 800; font-size: 1rem; line-height: 1.2; text-transform: none; box-shadow: none; cursor: pointer; box-sizing: border-box; transition: background .15s ease, color .15s ease; }
.aafp-pp button.aafp-pp__add-cart:hover { background: #eef3f8 !important; }
.aafp-pp button.aafp-pp__add-cart.is-added { background: #1c6b36 !important; border-color: #1c6b36 !important; color: #fff !important; }
.aafp-pp button.aafp-pp__add-cart:disabled { cursor: default; }

/* ---- Brand name (hero) ---- */
.aafp-pp__brand { margin: 2px 0 8px; font-size: 1.05rem; font-weight: 700; color: #6b7280; }
.aafp-pp__brand strong { color: #6b7280; font-weight: 700; }


/* ═══ Condition pages (/condition/{slug}) ═══ */
.aafp-cond { max-width: 1140px; margin: 0 auto; padding: clamp(18px, 3vw, 36px) clamp(14px, 3vw, 28px) 64px; }
.aafp-cond__hero { text-align: center; margin-bottom: clamp(20px, 4vw, 36px); }
.aafp-cond__h1 { font-size: clamp(26px, 4.5vw, 42px); font-weight: 800; color: #111827; letter-spacing: -.02em; margin: 0 0 12px; line-height: 1.15; }
.aafp-cond__intro { max-width: 760px; margin: 0 auto; font-size: clamp(15px, 1.8vw, 17px); color: #4b5563; line-height: 1.65; }
.aafp-cond__h2 { font-size: clamp(20px, 3vw, 26px); font-weight: 800; color: #111827; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2.5px solid var(--aafp-accent, #4f6df5); }
.aafp-cond__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.aafp-cond-card {
  background: #fff; border: 1.5px solid #e2e9f0; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease;
}
.aafp-cond-card:hover { box-shadow: 0 8px 28px rgba(20, 25, 60, .09); transform: translateY(-2px); }
.aafp-cond-card__img { display: block; aspect-ratio: 4/3; background: #f5f2ee; position: relative; overflow: hidden; }
.aafp-cond-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aafp-cond-card__ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 26px; font-weight: 800; color: #94a3b8; letter-spacing: 2px; }
.aafp-cond-card__cold { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 8px; background: rgba(217,119,6,.9); color: #fff; font-size: 10px; font-weight: 700; }
.aafp-cond-card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.aafp-cond-card__name { font-size: 16px; font-weight: 800; color: #111827; text-decoration: none; line-height: 1.3; }
.aafp-cond-card__name:hover { color: var(--aafp-accent, #4f6df5); }
.aafp-cond-card__generic { font-size: 12px; color: #6b7280; margin-top: 2px; }
.aafp-cond-card__opt { font-size: 13px; font-weight: 700; color: var(--aafp-primary, #1d1b84); margin-top: 8px; }
select.aafp-cond-card__select {
  width: 100%; margin-top: 10px; padding: 10px 34px 10px 12px;
  border: 1.5px solid #dbe0ee; border-radius: 10px; background: #fff;
  font-size: 13px; font-weight: 600; color: #152744; cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%231d1b84' stroke-width='2.5'%3E%3Cpath d='M5 7l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
select.aafp-cond-card__select:focus { border-color: var(--aafp-primary, #1d1b84); box-shadow: 0 0 0 3px rgba(29,27,132,.1); }
.aafp-cond-card__dir { font-size: 12px; color: #6b7280; line-height: 1.5; margin-top: 4px; }
.aafp-cond-card__price { font-size: 24px; font-weight: 800; color: #111827; margin: 10px 0 12px; letter-spacing: -.5px; }
.aafp-cond-card__add {
  margin-top: auto; appearance: none; border: none; cursor: pointer;
  padding: 12px 0; border-radius: 10px; background: var(--aafp-primary, #1d1b84); color: #fff;
  font-weight: 700; font-size: 14px; transition: background .15s ease, transform .05s ease;
}
.aafp-cond-card__add:hover { filter: brightness(1.12); }
.aafp-cond-card__add:active { transform: translateY(1px); }
.aafp-cond-card__add.is-added { background: #16a34a; }
.aafp-cond__desc { max-width: 820px; margin: clamp(28px, 5vw, 48px) auto 0; font-size: 15.5px; color: #374151; line-height: 1.75; }
.aafp-cond__desc h2 { font-size: 22px; font-weight: 800; color: #111827; margin: 28px 0 10px; }
.aafp-cond__desc ul { padding-left: 22px; }
.aafp-cond__badges { justify-content: center; margin-top: clamp(28px, 5vw, 44px); }
.aafp-cond__cta-row { text-align: center; margin-top: clamp(24px, 4vw, 40px); }
.aafp-cond__browse {
  display: inline-block; padding: 14px 34px; border-radius: 999px;
  background: var(--aafp-primary, #1d1b84); color: #fff !important; font-weight: 700;
  text-decoration: none; font-size: 15px;
}
.aafp-cond__browse:hover { filter: brightness(1.12); }
.aafp-cond__contact { margin-top: 14px; font-size: 13px; color: #6b7280; }

.aafp-cond__subtitle { text-align: center; font-size: 14px; color: #6b7280; margin: -4px 0 10px; }
.aafp-cond__subtitle strong { color: #111827; }
.aafp-cond__gallery { max-width: 720px; margin: clamp(18px, 3vw, 28px) auto 0; }
.aafp-cond-swiper { border-radius: 14px; overflow: hidden; background: #f5f2ee; aspect-ratio: 16/10; }
.aafp-cond-swiper .swiper-slide { display: flex; align-items: center; justify-content: center; }
.aafp-cond-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aafp-cond-swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }
.aafp-cond-swiper .swiper-button-prev, .aafp-cond-swiper .swiper-button-next { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.aafp-cond-swiper .swiper-pagination-bullet-active { background: #fff; }
.aafp-cond__sources { padding-left: 22px; font-size: 13.5px; }
.aafp-cond__sources a { color: var(--aafp-accent, #4f6df5); }

.aafp-cond__reviewed { max-width: 1140px; margin: 10px auto 0; padding: 0 clamp(14px,3vw,28px); font-size: 13px; color: #6b7280; }
.aafp-cond__reviewed a { color: var(--aafp-accent, #4f6df5); }
.aafp-cond__desc h3 { font-size: 18px; font-weight: 800; color: #111827; margin: 22px 0 8px; }
.aafp-cond__faq { border: 1px solid #e2e9f0; border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; background: #fff; }
.aafp-cond__faq summary { font-weight: 700; color: #111827; cursor: pointer; }
.aafp-cond__faq[open] summary { margin-bottom: 8px; }
.aafp-cond__treat-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.aafp-cond__treat-link { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 1.5px solid #e2e9f0; border-radius: 12px; background: #fff; text-decoration: none; color: #111827; font-weight: 700; }
.aafp-cond__treat-link span { color: var(--aafp-accent, #4f6df5); font-weight: 600; font-size: 13px; }
.aafp-cond__treat-link:hover { border-color: var(--aafp-accent, #4f6df5); }

/* Condition head: name on top (product-name style), SEO h1 + subtitle h2 below */
.aafp-cond__seoline { font-size: clamp(18px, 2.4vw, 24px); font-weight: 800; color: #374151; margin: 6px 0 0; line-height: 1.3; letter-spacing: -.01em; }
h2.aafp-cond__subline { font-size: inherit; font-weight: inherit; margin-top: 6px; }

.aafp-cond__seoline--below { max-width: 1140px; margin: clamp(26px, 4vw, 40px) auto 4px; padding: 0 clamp(14px, 3vw, 28px); }

/* Condition subtitle: wrap inside the column, never overflow */
.aafp-cond .aafp-pp__head { min-width: 0; }
.aafp-cond .aafp-pp__brand {
  white-space: normal; overflow-wrap: break-word; word-break: normal;
  max-width: 100%; line-height: 1.45;
}
@media (max-width: 680px) { .aafp-cond .aafp-pp__brand { font-size: 14px; } }

/* Condition treatment builder: multi-select cards */
.aafp-cond-builder { display: flex; flex-direction: column; gap: 10px; }
.aafp-cond-pick { border: 1.5px solid #e2e9f0; border-radius: 12px; background: #fff; padding: 12px 14px; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.aafp-cond-pick.is-on { border-color: var(--aafp-primary, #1d1b84); background: #fbfbff; box-shadow: 0 2px 10px rgba(29,27,132,.07); }
.aafp-cond-pick__main { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.aafp-cond-pick__cb { position: absolute; opacity: 0; pointer-events: none; }
.aafp-cond-pick__box { width: 22px; height: 22px; flex: 0 0 auto; border: 2px solid #cbd5e1; border-radius: 6px; background: #fff; position: relative; transition: all .12s ease; }
.aafp-cond-pick.is-on .aafp-cond-pick__box { border-color: var(--aafp-primary, #1d1b84); background: var(--aafp-primary, #1d1b84); }
.aafp-cond-pick.is-on .aafp-cond-pick__box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.aafp-cond-pick__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aafp-cond-pick__name { font-weight: 800; font-size: 15px; color: #111827; line-height: 1.3; }
.aafp-cond-pick__generic { font-size: 12px; color: #6b7280; }
.aafp-cond-pick__price { font-weight: 800; font-size: 16px; color: #111827; white-space: nowrap; }
.aafp-cond-pick__opts { display: none; margin-top: 10px; padding-left: 34px; }
.aafp-cond-pick.is-on .aafp-cond-pick__opts { display: block; }
.aafp-cond-pick__opts select.aafp-cond-card__select { margin-top: 0; max-width: 100%; }
.aafp-cond-pick__fixed { display: inline-block; font-size: 13px; font-weight: 700; color: var(--aafp-primary, #1d1b84); }
.aafp-cond-pick__note { margin: 6px 0 0 !important; }
@media (max-width: 680px) { .aafp-cond-pick__opts { padding-left: 0; } }


/* ═══════════════════════════════════════════════════════════════
   MODERN BRAND THEME — Poppins · Indigo #1d1b84 · Rose accent
   Applies to product landers AND condition pages (shared wrapper).
   Appended last so it wins the cascade; hot-swappable.
   ═══════════════════════════════════════════════════════════════ */
.aafp-pp {
  --aafp-primary: #1d1b84;
  --aafp-primary-dark: #141060;
  --aafp-accent: #e11d48;          /* rose — selected states, matches header cart */
  --aafp-accent-soft: #fff1f4;
  --aafp-green: #16a34a;
  --aafp-green-soft: #dcfce7;
  --aafp-ink: #0f172a;
  --aafp-muted: #64748b;
  --aafp-line: #e7eaf3;
  --aafp-soft: #f6f7fb;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--aafp-ink);
  -webkit-font-smoothing: antialiased;
}

/* Headings & type rhythm */
.aafp-pp .aafp-pp__name { color: var(--aafp-ink); letter-spacing: -0.025em; font-weight: 800; }
.aafp-pp .aafp-pp__brand, .aafp-pp .aafp-pp__brand strong { color: var(--aafp-muted); }
.aafp-pp .aafp-cond__seoline { color: #1f2937; }
.aafp-pp .aafp-cond__desc h2, .aafp-pp .aafp-cond__h2 {
  color: var(--aafp-ink); letter-spacing: -0.02em;
  border-bottom: none; position: relative; padding-bottom: 12px;
}
.aafp-pp .aafp-cond__desc h2::after, .aafp-pp .aafp-cond__h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 52px; height: 4px; border-radius: 99px; background: var(--aafp-primary);
}
.aafp-pp .aafp-cond__desc h3 { color: var(--aafp-ink); }
.aafp-pp .aafp-cond__desc { color: #334155; }

/* Stars: gold */
.aafp-pp .aafp-pp__stars svg { fill: #f5a623; }

/* Gallery frame: softer, deeper radius */
.aafp-pp .aafp-pp__gallery-panel { border-radius: 20px; background: var(--aafp-soft); box-shadow: 0 1px 2px rgba(15,23,42,.05); }

/* Pills — clean white, rose selected (matches live lander) */
.aafp-pp .aafp-pp__pill {
  border: 1.5px solid var(--aafp-line); background: #fff; color: var(--aafp-ink);
  border-radius: 999px; font-weight: 600;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.aafp-pp .aafp-pp__pill:hover { border-color: #b9c0d4; }
.aafp-pp .aafp-pp__pill.is-selected {
  border: 2px solid var(--aafp-accent); background: #fff; color: var(--aafp-ink);
  box-shadow: 0 1px 6px rgba(225,29,72,.12); font-weight: 700;
}

/* Per-unit note: brand green */
.aafp-pp .aafp-pp__opt-note { color: var(--aafp-green); font-weight: 600; }

/* CTAs */
.aafp-pp .aafp-pp__cta {
  background: var(--aafp-primary); border-radius: 14px; font-weight: 700;
  letter-spacing: .01em; box-shadow: 0 6px 18px rgba(29,27,132,.22);
  transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
}
.aafp-pp .aafp-pp__cta:hover { background: var(--aafp-primary-dark); box-shadow: 0 8px 22px rgba(29,27,132,.28); }
.aafp-pp .aafp-pp__cta:active { transform: translateY(1px); }
.aafp-pp .aafp-pp__add-cart {
  background: #fff; color: var(--aafp-primary); border: 1.5px solid var(--aafp-primary);
  border-radius: 14px; font-weight: 700; transition: background .15s ease;
}
.aafp-pp .aafp-pp__add-cart:hover { background: #f3f4ff; }

/* Trust chips: soft green capsules */
.aafp-pp .aafp-pp__chip { background: var(--aafp-green-soft); color: #14532d; border-radius: 999px; font-weight: 600; }

/* Condition builder: modern cards, rose selection */
.aafp-pp .aafp-cond-pick { border: 1.5px solid var(--aafp-line); border-radius: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.aafp-pp .aafp-cond-pick:hover { border-color: #c4cade; }
.aafp-pp .aafp-cond-pick.is-on {
  border: 2px solid var(--aafp-accent); background: var(--aafp-accent-soft);
  box-shadow: 0 4px 16px rgba(225,29,72,.10);
}
.aafp-pp .aafp-cond-pick.is-on .aafp-cond-pick__box { border-color: var(--aafp-accent); background: var(--aafp-accent); }
.aafp-pp .aafp-cond-pick__name { color: var(--aafp-ink); }
.aafp-pp .aafp-cond-pick__price { color: var(--aafp-primary); }
.aafp-pp select.aafp-cond-card__select {
  border-radius: 12px; border-color: var(--aafp-line); font-family: inherit; font-weight: 600;
}
.aafp-pp select.aafp-cond-card__select:focus { border-color: var(--aafp-primary); box-shadow: 0 0 0 3px rgba(29,27,132,.12); }

/* Condition option cards / treatment links / FAQ: unified card language */
.aafp-pp .aafp-cond-card, .aafp-pp .aafp-cond__faq, .aafp-pp .aafp-cond__treat-link {
  border: 1.5px solid var(--aafp-line); border-radius: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.aafp-pp .aafp-cond-card:hover, .aafp-pp .aafp-cond__treat-link:hover {
  border-color: var(--aafp-primary); box-shadow: 0 8px 24px rgba(15,23,42,.08); transform: translateY(-2px);
}
.aafp-pp .aafp-cond__faq summary { font-family: inherit; }
.aafp-pp .aafp-cond__faq[open] { border-color: var(--aafp-primary); }
.aafp-pp .aafp-cond-card__add { background: var(--aafp-primary); border-radius: 12px; }
.aafp-pp .aafp-cond-card__add:hover { background: var(--aafp-primary-dark); filter: none; }
.aafp-pp .aafp-cond__browse { background: var(--aafp-primary); box-shadow: 0 6px 18px rgba(29,27,132,.22); }
.aafp-pp .aafp-cond__browse:hover { background: var(--aafp-primary-dark); filter: none; }
.aafp-pp .aafp-cond__sources a, .aafp-pp .aafp-cond__reviewed a { color: var(--aafp-primary); }
.aafp-pp .aafp-cond__treat-link span { color: var(--aafp-accent); }

/* Badges row breathing room */
.aafp-pp .aafp-pp__badges-row { gap: 18px; }


/* ═══ PRODUCT PAGE BUTTON PARITY — identical to condition page ═══
   High-specificity + !important so legacy ID rules can't out-rank it. */
.aafp-pp a.aafp-pp__cta, .aafp-pp .aafp-pp__cta,
#aafp-product-page #aafp-pp-cta, #aafp-condition-page #aafp-cond-cta {
  display: block !important; width: 100% !important; text-align: center !important;
  background: var(--aafp-primary, #1d1b84) !important;
  background-image: none !important;
  color: #fff !important; border: none !important;
  border-radius: 14px !important; padding: 16px 24px !important;
  font-family: 'Poppins', -apple-system, sans-serif !important;
  font-size: 16px !important; font-weight: 700 !important; letter-spacing: .01em !important;
  text-decoration: none !important; cursor: pointer;
  box-shadow: 0 6px 18px rgba(29,27,132,.22) !important;
  transition: background .15s ease, transform .06s ease, box-shadow .15s ease !important;
}
.aafp-pp a.aafp-pp__cta:hover, .aafp-pp .aafp-pp__cta:hover,
#aafp-product-page #aafp-pp-cta:hover, #aafp-condition-page #aafp-cond-cta:hover {
  background: var(--aafp-primary-dark, #141060) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(29,27,132,.28) !important;
}
.aafp-pp .aafp-pp__cta:active { transform: translateY(1px) !important; }

.aafp-pp .aafp-pp__add-cart,
#aafp-product-page #aafp-pp-add-cart, #aafp-condition-page #aafp-cond-add-cart {
  display: block !important; width: 100% !important; text-align: center !important;
  background: #fff !important; background-image: none !important;
  color: var(--aafp-primary, #1d1b84) !important;
  border: 1.5px solid var(--aafp-primary, #1d1b84) !important;
  border-radius: 14px !important; padding: 14px 24px !important; margin-top: 10px !important;
  font-family: 'Poppins', -apple-system, sans-serif !important;
  font-size: 15px !important; font-weight: 700 !important;
  cursor: pointer; box-shadow: none !important;
  transition: background .15s ease !important;
}
.aafp-pp .aafp-pp__add-cart:hover,
#aafp-product-page #aafp-pp-add-cart:hover, #aafp-condition-page #aafp-cond-add-cart:hover {
  background: #f3f4ff !important; color: var(--aafp-primary, #1d1b84) !important;
}

/* Pills: same parity (product dosage/quantity pills = condition builder styling) */
#aafp-product-page .aafp-pp__pill, #aafp-condition-page .aafp-pp__pill {
  border: 1.5px solid var(--aafp-line, #e7eaf3) !important; background: #fff !important;
  color: var(--aafp-ink, #0f172a) !important; border-radius: 999px !important;
  font-family: 'Poppins', -apple-system, sans-serif !important; font-weight: 600 !important;
  box-shadow: none !important;
}
#aafp-product-page .aafp-pp__pill:hover, #aafp-condition-page .aafp-pp__pill:hover { border-color: #b9c0d4 !important; }
#aafp-product-page .aafp-pp__pill.is-selected, #aafp-condition-page .aafp-pp__pill.is-selected {
  border: 2px solid var(--aafp-accent, #e11d48) !important; background: #fff !important;
  color: var(--aafp-ink, #0f172a) !important; font-weight: 700 !important;
  box-shadow: 0 1px 6px rgba(225,29,72,.12) !important;
}


/* ═══ SINGLE BUTTON + GREEN SELECTION ═══ */
/* Hide "Continue to Checkout" on both pages — Add to Cart is the one button */
#aafp-product-page #aafp-pp-cta,
#aafp-condition-page #aafp-cond-cta { display: none !important; }

/* Add to Cart is promoted to the primary button (solid indigo) */
.aafp-pp .aafp-pp__add-cart,
#aafp-product-page #aafp-pp-add-cart, #aafp-condition-page #aafp-cond-add-cart {
  background: var(--aafp-primary, #1d1b84) !important;
  color: #fff !important; border: none !important;
  padding: 16px 24px !important; font-size: 16px !important; margin-top: 14px !important;
  box-shadow: 0 6px 18px rgba(29,27,132,.22) !important;
}
.aafp-pp .aafp-pp__add-cart:hover,
#aafp-product-page #aafp-pp-add-cart:hover, #aafp-condition-page #aafp-cond-add-cart:hover {
  background: var(--aafp-primary-dark, #141060) !important; color: #fff !important;
  box-shadow: 0 8px 22px rgba(29,27,132,.28) !important;
}

/* Selected borders: rose → GREEN, both pages */
.aafp-pp { --aafp-accent: #16a34a; --aafp-accent-soft: #f0fdf4; }
#aafp-product-page .aafp-pp__pill.is-selected, #aafp-condition-page .aafp-pp__pill.is-selected {
  border: 2px solid #16a34a !important;
  box-shadow: 0 1px 6px rgba(22,163,74,.15) !important;
}
.aafp-pp .aafp-cond-pick.is-on {
  border: 2px solid #16a34a !important; background: #f0fdf4 !important;
  box-shadow: 0 4px 16px rgba(22,163,74,.10) !important;
}
.aafp-pp .aafp-cond-pick.is-on .aafp-cond-pick__box { border-color: #16a34a !important; background: #16a34a !important; }
.aafp-pp .aafp-cond__treat-link span { color: var(--aafp-primary, #1d1b84); }


/* ═══ Slider frame: header navy (#16116e, sampled from allfamilyhealth.com) ═══ */
.aafp-pp .aafp-pp__gallery-panel {
  border: 2px solid #16116e !important;
  background: #fff !important;
  box-shadow: 0 2px 12px rgba(22,17,110,.10) !important;
}
.aafp-pp .aafp-cond-swiper { border: 2px solid #16116e !important; }
/* thumbnails pick up the same identity on their active state */
.aafp-pp .aafp-pp-thumbs .swiper-slide-thumb-active img { outline: 2px solid #16116e; outline-offset: -2px; border-radius: 8px; }


/* ═══ Treatment guidance table ═══ */
.aafp-cond__table-wrap {
  border: 1.5px solid var(--aafp-line, #e7eaf3); border-radius: 16px;
  overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.04); margin-top: 14px;
  background: #fff;
}
.aafp-cond__table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.aafp-cond__table thead th {
  background: #16116e; color: #fff; text-align: left;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: .03em; text-transform: uppercase;
  padding: 14px 18px;
}
.aafp-cond__table tbody td {
  padding: 16px 18px; vertical-align: top; color: #334155; line-height: 1.65;
  border-top: 1px solid var(--aafp-line, #e7eaf3);
}
.aafp-cond__table tbody tr:nth-child(even) { background: #f8f9fd; }
.aafp-cond__table tbody td:first-child { width: 22%; }
.aafp-cond__table tbody td strong { color: var(--aafp-ink, #0f172a); font-weight: 800; display: block; }
.aafp-cond__table-generic { display: block; font-size: 12px; color: var(--aafp-muted, #64748b); margin-top: 2px; }
@media (max-width: 720px) {
  .aafp-cond__table thead { display: none; }
  .aafp-cond__table, .aafp-cond__table tbody, .aafp-cond__table tr, .aafp-cond__table td { display: block; width: 100%; }
  .aafp-cond__table tbody tr { border-top: 2px solid #16116e; padding: 4px 0 10px; }
  .aafp-cond__table tbody tr:first-child { border-top: none; }
  .aafp-cond__table tbody td { border-top: none; padding: 8px 16px; }
  .aafp-cond__table tbody td::before {
    content: attr(data-label); display: block;
    font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    color: #16116e; margin-bottom: 3px;
  }
  .aafp-cond__table tbody td:first-child { width: auto; }
}


/* ═══ Center the below-the-fold H1; trust chips on one line ═══ */
.aafp-pp .aafp-cond__seoline--below { text-align: center; }
.aafp-cond__reviewed { text-align: center; }
.aafp-pp .aafp-pp__chips {
  display: flex !important; flex-wrap: nowrap !important;
  justify-content: center; gap: 10px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.aafp-pp .aafp-pp__chips::-webkit-scrollbar { display: none; }
.aafp-pp .aafp-pp__chip { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 480px) {
  .aafp-pp .aafp-pp__chips { justify-content: flex-start; }
  .aafp-pp .aafp-pp__chip { font-size: 12px; padding: 8px 12px; }
}


/* ═══ Fix: chips row clipping + gallery badge spacing/cropping ═══ */
/* Chips: shrink to fit on one line; center without clipping either end */
.aafp-pp .aafp-pp__chips {
  width: max-content !important; max-width: 100% !important;
  margin-left: auto !important; margin-right: auto !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}
.aafp-pp .aafp-pp__chip { font-size: 12.5px !important; padding: 8px 12px !important; }
.aafp-pp .aafp-pp__chip svg { width: 13px; height: 13px; }

/* Gallery trust badges: never crop, breathe more */
.aafp-pp .aafp-pp__badges-row--gallery {
  gap: clamp(24px, 4vw, 44px) !important;
  align-items: center; justify-content: center;
  overflow: visible !important; flex-wrap: wrap;
  padding: 6px 0;
}
.aafp-pp .aafp-pp__badges-row--gallery .aafp-pp__badge-item { overflow: visible; flex: 0 0 auto; }
.aafp-pp .aafp-pp__badges-row--gallery .aafp-pp__badge-item img {
  height: 68px !important; width: auto !important; max-width: none !important;
  object-fit: contain !important; display: block;
}
@media (max-width: 480px) {
  .aafp-pp .aafp-pp__badges-row--gallery .aafp-pp__badge-item img { height: 54px !important; }
}


/* ═══ Wider spacing between gallery trust badges ═══ */
.aafp-pp .aafp-pp__badges-row--gallery { gap: clamp(40px, 7vw, 80px) !important; }
@media (max-width: 600px) { .aafp-pp .aafp-pp__badges-row--gallery { gap: 28px !important; } }


/* ═══════════════════════════════════════════════════════
   ABOVE-THE-FOLD POLISH — clean buy-box hero
   ═══════════════════════════════════════════════════════ */
/* The whole right column becomes a crisp "buy box" card */
.aafp-pp .aafp-pp__content {
  background: #fff;
  border: 1.5px solid var(--aafp-line, #e7eaf3);
  border-radius: 20px;
  padding: clamp(18px, 2.5vw, 28px);
  box-shadow: 0 1px 3px rgba(15,23,42,.05);
}
@media (max-width: 900px) { .aafp-pp .aafp-pp__content { padding: 18px 16px; } }

/* Head: tighter, calmer hierarchy */
.aafp-pp .aafp-pp__head { margin-bottom: 6px; }
.aafp-pp .aafp-pp__name { margin-bottom: 4px; }
.aafp-pp .aafp-pp__brand { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
.aafp-pp .aafp-pp__social { margin-bottom: 14px; font-size: 14px; }
.aafp-pp .aafp-pp__stars svg { width: 15px; height: 15px; }

/* Summary: modern info callout instead of the heavy peach block */
.aafp-pp .aafp-pp__summary {
  background: #f8f9fd;
  border: none;
  border-left: 4px solid var(--aafp-primary, #1d1b84);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.aafp-pp .aafp-pp__summary p { margin: 0; font-size: 14.5px; line-height: 1.65; color: #334155; }

/* Field labels: quiet, systematic */
.aafp-pp .aafp-pp__field { margin-bottom: 18px; }
.aafp-pp .aafp-pp__field-label {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--aafp-muted, #64748b); margin: 0 0 8px;
}
.aafp-pp .aafp-pp__req { color: var(--aafp-accent, #16a34a); }

/* How-it-works: compact, indigo numerals */
.aafp-pp .aafp-pp__how {
  background: transparent; border: 1px dashed var(--aafp-line, #e7eaf3);
  border-radius: 12px; padding: 12px 16px; margin: 4px 0 16px;
}
.aafp-pp .aafp-pp__how-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--aafp-muted, #64748b); margin: 0 0 6px; }
.aafp-pp .aafp-pp__how ol { margin: 0; padding-left: 18px; }
.aafp-pp .aafp-pp__how li { font-size: 13px; color: #475569; line-height: 1.7; }
.aafp-pp .aafp-pp__how li::marker { color: var(--aafp-primary, #1d1b84); font-weight: 700; }

/* Price row: divider above, confident price */
.aafp-pp .aafp-pp__price-row {
  border-top: 1px solid var(--aafp-line, #e7eaf3);
  padding-top: 16px; margin-top: 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.aafp-pp .aafp-pp__price { font-size: 15px; color: var(--aafp-muted, #64748b); font-weight: 600; margin: 0; }
.aafp-pp .aafp-pp__price span { font-size: 26px; font-weight: 800; color: var(--aafp-ink, #0f172a); letter-spacing: -.02em; margin-left: 4px; }
.aafp-pp .aafp-pp__hsa { font-size: 12.5px; }

/* Disclaimer note: quieter */
.aafp-pp .aafp-pp__cta-note { font-size: 12px; color: #b45309; opacity: .9; margin-top: 10px; line-height: 1.55; }

/* Gallery: navy dots to match the frame */
.aafp-pp .aafp-pp-swiper .swiper-pagination-bullet-active { background: #16116e; }

/* Builder cards inside the buy box: flatter, lighter */
.aafp-pp .aafp-cond-pick { box-shadow: none; }
.aafp-pp .aafp-cond-pick.is-on { box-shadow: 0 2px 10px rgba(22,163,74,.08) !important; }

/* Heading-hierarchy fix: element tags swapped for SEO (h1 first), classes keep the visuals */
h1.aafp-pp__name, h2.aafp-pp__h1, h2.aafp-cond__seoline { margin-top: 0; }


/* ═══ Condition page fix: trust chips must never clip — wrap instead ═══
   The shared one-line rule (flex-wrap:nowrap + hidden scrollbar) clips the
   last chip when the buy-box column is narrower than all three chips.
   Scoped to .aafp-cond so product pages keep their current behavior. */
.aafp-pp.aafp-cond .aafp-pp__chips {
  flex-wrap: wrap !important;
  overflow: visible !important;
  overflow-x: visible !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-content: center !important;
  gap: 8px !important;
  row-gap: 8px !important;
}
.aafp-pp.aafp-cond .aafp-pp__chip { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 480px) {
  .aafp-pp.aafp-cond .aafp-pp__chip { font-size: 12px !important; padding: 7px 11px !important; }
}


/* ═══ Condition page trust chips: hard guarantee — ID-scoped so no
   class-based rule (cached, aggregated, or theme-injected) can restore the
   one-line clipping behavior. Chips wrap to a second row instead. ═══ */
#aafp-condition-page .aafp-pp__chips {
  display: flex !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
  overflow-x: visible !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-content: center !important;
  gap: 8px !important;
  row-gap: 8px !important;
}
#aafp-condition-page .aafp-pp__chip { flex: 0 0 auto !important; white-space: nowrap; }
@media (max-width: 480px) {
  #aafp-condition-page .aafp-pp__chip { font-size: 12px !important; padding: 7px 11px !important; }
}


/* ═══ "More in this category" showcase on product pages ═══ */
.aafp-pp__catmore { max-width: 1180px; margin: 40px auto 0; padding: 0 20px; }
.aafp-pp__catmore-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.aafp-pp__catmore-title { margin: 0; font-size: clamp(20px, 3vw, 26px); font-weight: 800; color: #0f172a; }
.aafp-pp__catmore-title a { color: #1d1b84; text-decoration: none; }
.aafp-pp__catmore-title a:hover { text-decoration: underline; }
.aafp-pp__catmore-all { font-size: 14px; font-weight: 700; color: #16a34a; text-decoration: none; white-space: nowrap; }
.aafp-pp__catmore-all:hover { text-decoration: underline; }
.aafp-pp__cards--catmore .aafp-pp__card-title { font-size: 15px; }
@media (max-width: 640px) {
  .aafp-pp__catmore { padding: 0 12px; margin-top: 28px; }
  .aafp-pp__catmore-head { flex-direction: column; gap: 4px; }
}

/* ═══ "Other strengths & forms" — navigation strip, not a selector ═══ */
.aafp-pp__otherdoses .aafp-pp__pill { font-weight: 600; text-decoration: none; }
.aafp-pp__otherdoses .aafp-pp__pill:hover { border-color: #1d1b84; color: #1d1b84; }
