/* Best Health IQ — blog, post, cart, error and content page styles.
   Reuses the home tokens declared in bhiq-home.css (--bhiq-*). */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Shared page hero band ───────────────────────────────────── */
.bhiq-pagehero { background: var(--bhiq-navy, #16233A); color: rgba(255,255,255,.82); padding: 120px 0 72px; text-align: center; }
.bhiq-pagehero .bhiq__wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.bhiq-pagehero h1 { color: #fff !important; font-size: 52px; line-height: 1.2; max-width: 900px; }
.bhiq-pagehero p { max-width: 720px; margin: 0; }
.bhiq-pagehero__tags { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; margin: 0; }
.bhiq-pagehero__tags li { font-family: var(--bhiq-ui); font-size: 14px; font-weight: 600; color: #fff; padding: 6px 14px; border: 1px solid rgba(255,255,255,.3); border-radius: 50px; }
.bhiq-crumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; margin: 0; font-family: var(--bhiq-ui); font-size: 14px; font-weight: 600; }
.bhiq-crumbs a { color: rgba(255,255,255,.75); }
.bhiq-crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.bhiq-crumbs [aria-current] { color: #fff; }

/* ── Rich body (page + post content) ─────────────────────────── */
.bhiq-rte { color: var(--bhiq-muted); font-size: 16px; line-height: 1.75; display: flex; flex-direction: column; gap: 18px; }
.bhiq-rte > * { margin: 0; }
.bhiq-rte h2, .bhiq-rte h3, .bhiq-rte h4, .bhiq-rte h5, .bhiq-rte h6 { font-family: var(--bhiq-serif); color: var(--bhiq-ink); font-weight: 700; line-height: 1.3; margin-top: 14px; }
.bhiq-rte h2 { font-size: 34px; }
.bhiq-rte h3 { font-size: 26px; }
.bhiq-rte h4 { font-size: 22px; }
.bhiq-rte h5, .bhiq-rte h6 { font-size: 19px; }
.bhiq-rte a { color: var(--bhiq-blue); text-decoration: underline; }
.bhiq-rte ul, .bhiq-rte ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.bhiq-rte img { max-width: 100%; height: auto; border-radius: 16px; }
.bhiq-rte blockquote { border-left: 3px solid var(--bhiq-blue); padding-left: 18px; font-style: italic; }
.bhiq-rte hr { border: 0; border-top: 1px solid var(--bhiq-line); }

/* ── Generic content page ───────────────────────────────────── */
.bhiq-page__body { max-width: 900px; margin: 0 auto; }

/* ── Blog index ─────────────────────────────────────────────── */
.bhiq-blog__filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.bhiq-blog__filter { font-family: var(--bhiq-ui); font-weight: 600; font-size: 15px; padding: 10px 20px; border-radius: 50px; border: 1px solid var(--bhiq-line); background: #fff; color: var(--bhiq-ink); cursor: pointer; }
.bhiq-blog__filter[aria-pressed="true"] { background: linear-gradient(195deg, var(--bhiq-navy) 0%, var(--bhiq-blue) 100%); color: #fff; border-color: transparent; }
.bhiq-blog__filter:focus-visible, .bhiq-qty button:focus-visible, .bhiq-cart__remove:focus-visible { outline: 2px solid var(--bhiq-blue); outline-offset: 2px; }
.bhiq-postcard { background: #fff; border: 1px solid #E6EAF2; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.bhiq-postcard[hidden] { display: none; }
.bhiq-postcard__media { display: block; aspect-ratio: 1200 / 628; background: linear-gradient(195deg, var(--bhiq-navy) 0%, var(--bhiq-blue) 100%); overflow: hidden; }
.bhiq-postcard__media img { width: 100%; height: 100%; object-fit: cover; }
.bhiq-postcard__body { padding: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.bhiq-postcard__body h2 { font-size: 22px !important; line-height: 1.35 !important; }
.bhiq-postcard__body .bhiq-btn { margin-top: auto; align-self: flex-start; }
.bhiq-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; list-style: none; padding: 0; margin: 0; font-family: var(--bhiq-ui); font-size: 14px; font-weight: 600; }
.bhiq-pagehero .bhiq-post__meta { justify-content: center; color: rgba(255,255,255,.8); }
.bhiq-empty { text-align: center; padding: 64px 24px; background: var(--bhiq-soft); border-radius: 20px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.bhiq-pager { margin-top: 48px; display: flex; justify-content: center; }
.bhiq-pager .pagination-list { display: flex; gap: 8px; align-items: center; }
.bhiq-pager .pagination-list a, .bhiq-pager .pagination-list span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50px; border: 1px solid var(--bhiq-line); font-family: var(--bhiq-ui); font-weight: 600; }
.bhiq-pager .is-active { background: var(--bhiq-blue); color: #fff; border-color: var(--bhiq-blue) !important; }
.bhiq-pager .pagination-summary { display: none; }

/* ── Post detail ────────────────────────────────────────────── */
.bhiq-article { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.bhiq-article__hero { border-radius: 20px; overflow: hidden; aspect-ratio: 1200 / 628; }
.bhiq-article__hero img { width: 100%; height: 100%; object-fit: cover; }
.bhiq-article__lead { font-size: 18px; color: var(--bhiq-ink); }
.bhiq-article__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; border-top: 1px solid var(--bhiq-line); padding-top: 24px; }
.bhiq-article__tags, .bhiq-article__share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; list-style: none; padding: 0; margin: 0; }
.bhiq-article__share a { font-family: var(--bhiq-ui); font-weight: 600; font-size: 14px; color: var(--bhiq-blue); }
.bhiq-related { margin-top: 72px; }
.bhiq-related > h2 { font-size: 30px; margin-bottom: 28px !important; }
.bhiq-empty h2 { font-size: 28px; }

/* ── Cart ───────────────────────────────────────────────────── */
.bhiq-cart__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.bhiq-cart__lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.bhiq-cart__line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 20px; align-items: center; background: #fff; border: 1px solid #E6EAF2; border-radius: 20px; padding: 16px; }
.bhiq-cart__thumb { width: 96px; height: 96px; border-radius: 14px; overflow: hidden; background: var(--bhiq-soft); }
.bhiq-cart__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bhiq-cart__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bhiq-cart__info h2 { font-size: 20px !important; line-height: 1.35 !important; }
.bhiq-cart__variant, .bhiq-cart__unit { font-size: 14px; }
.bhiq-cart__side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.bhiq-cart__linetotal { font-family: var(--bhiq-serif); font-weight: 700; color: var(--bhiq-ink); font-size: 20px; }
.bhiq-qty { display: inline-flex; align-items: center; border: 1px solid var(--bhiq-line); border-radius: 50px; overflow: hidden; }
.bhiq-qty button { width: 36px; height: 36px; background: #fff; border: 0; cursor: pointer; font-size: 18px; color: var(--bhiq-ink); }
.bhiq-qty input { width: 44px; height: 36px; border: 0; text-align: center; font-family: var(--bhiq-ui); font-weight: 600; color: var(--bhiq-ink); -moz-appearance: textfield; }
.bhiq-qty input::-webkit-outer-spin-button, .bhiq-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bhiq-cart__remove { background: none; border: 0; padding: 0; font-family: var(--bhiq-ui); font-size: 14px; font-weight: 600; color: var(--bhiq-pink, #CC3366); cursor: pointer; text-decoration: underline; }
.bhiq-cart__summary { background: var(--bhiq-navy); color: rgba(255,255,255,.82); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; }
.bhiq-cart__summary h2 { color: #fff !important; font-size: 26px !important; }
.bhiq-cart__rows { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.bhiq-cart__row { display: flex; justify-content: space-between; gap: 12px; }
.bhiq-cart__row dt { margin: 0; }
.bhiq-cart__row dd { margin: 0; color: #fff; font-weight: 600; }
.bhiq-cart__row--total { border-top: 1px solid rgba(255,255,255,.18); padding-top: 14px; font-size: 18px; }
.bhiq-cart__row--total dd { font-family: var(--bhiq-serif); font-size: 24px; }
.bhiq-cart__row[hidden] { display: none; }
.bhiq-cart__codes { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bhiq-cart__codes li { font-family: var(--bhiq-ui); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 50px; background: rgba(255,255,255,.12); color: #fff; }
.bhiq-cart__summary .bhiq-btn { width: 100%; background: var(--bhiq-blue); }
.bhiq-cart__note { font-size: 13px; opacity: .75; margin: 0; }
.bhiq-cart[data-state="empty"] .bhiq-cart__grid { display: none; }
.bhiq-cart[data-state="filled"] .bhiq-empty { display: none; }
.bhiq-cart[aria-busy="true"] .bhiq-cart__grid { opacity: .6; pointer-events: none; }

/* ── Error page ─────────────────────────────────────────────── */
.bhiq-error { text-align: center; }
.bhiq-error__code { font-family: var(--bhiq-serif); font-weight: 700; font-size: 120px; line-height: 1; color: #fff; margin: 0; }
.bhiq-error .bhiq__btns { justify-content: center; }

@media (max-width: 991px) {
  .bhiq-cart__grid { grid-template-columns: 1fr; }
  .bhiq-cart__summary { position: static; }
  .bhiq-pagehero h1 { font-size: 42px; }
}
@media (max-width: 767px) {
  .bhiq-pagehero { padding: 96px 0 56px; }
  .bhiq-pagehero h1 { font-size: 34px; }
  .bhiq-cart__line { grid-template-columns: 72px minmax(0, 1fr); }
  .bhiq-cart__thumb { width: 72px; height: 72px; }
  .bhiq-cart__side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .bhiq-error__code { font-size: 84px; }
  .bhiq-rte h2 { font-size: 28px; }
  .bhiq-rte h3 { font-size: 22px; }
}
