/* Infusion Store — product page V5, below-the-fold rules (loaded in the footer, non-blocking). */

/* 9:16 rail */
.v5-rail-wrap { margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.v5-rail { display: flex; gap: 12px; list-style: none; margin: 0; padding: 4px 0 12px; }
.v5-vcard { flex: 0 0 min(42vw, 180px); scroll-snap-align: start; }
.v5-vcard--wide { flex-basis: min(78vw, 360px); }
.v5-vcard__btn { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: var(--radius-l); background: var(--navy) linear-gradient(160deg, #22324a, #0e1622); overflow: hidden; cursor: pointer; color: #fff; }
.v5-vcard--wide .v5-vcard__btn { aspect-ratio: 16 / 9; }
.v5-vcard__btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v5-vcard__title { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 10px 10px; font-size: .875rem; font-weight: 700; text-align: left; background: linear-gradient(transparent, rgb(0 0 0 / 70%)); }

/* Syllabus & PDFs */
.v5-featured { display: flex; gap: 16px; align-items: center; background: var(--cream); border: 1px solid #f3e3a8; border-radius: var(--radius-l); padding: 16px; margin: 0 0 18px; }
.v5-featured__img { width: 96px; height: auto; border-radius: 8px; box-shadow: 0 2px 8px rgb(0 0 0 / 12%); }
.v5-featured__label { margin: 0; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--link-hover); }
.v5-featured__title { margin: 2px 0 10px; font-weight: 700; font-size: 1.0625rem; }
.v5-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.v5-filters button { border: 1px solid var(--line); background: #fff; border-radius: 30px; padding: 6px 14px; font: inherit; font-size: .875rem; cursor: pointer; }
.v5-filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.v5-syl { width: 100%; border-collapse: collapse; }
.v5-syl th, .v5-syl td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--line); }
.v5-syl thead th { font-size: .8125rem; color: var(--muted); background: var(--surface); }
.v5-syl__n { width: 42px; font-weight: 800; color: var(--muted); }
.v5-syl__s p { margin: 6px 0 0; color: #3f4a5a; font-size: .9375rem; }
.v5-syl__a { white-space: nowrap; }
.v5-dl { font-size: .875rem; margin-left: 8px; }
.v5-tags span { display: inline-block; font-size: .6875rem; font-weight: 700; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1px 8px; margin: 2px 2px 0 0; }
@media (max-width: 699px) {
	.v5-syl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.v5-syl, .v5-syl tbody, .v5-syl tr, .v5-syl td { display: block; }
	.v5-syl tr { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 10px; padding: 4px 0; }
	.v5-syl tr[hidden] { display: none; }
	.v5-syl td { border: 0; padding: 6px 12px; }
	.v5-syl__n { width: auto; }
	.v5-syl__n:empty { display: none; }
	.v5-syl__a { white-space: normal; }
}

/* Notes and MCQs */
.v5-note { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; margin: 0 0 16px; background: #fff; }
.v5-note__src { margin: -6px 0 10px; font-size: .8125rem; color: var(--muted); }
.v5-note__body table { border-collapse: collapse; }
.v5-note__body td, .v5-note__body th { border: 1px solid var(--line); padding: 6px 8px; }
.v5-mcqs { padding-left: 1.4em; }
.v5-mcq { margin: 0 0 18px; }
.v5-mcq__q { font-weight: 700; margin: 0 0 4px; }
.v5-mcq__meta { margin: 0 0 6px; font-size: .8125rem; color: var(--muted); }
.v5-mcq__opts { margin: 0 0 8px; }
.v5-mcq details summary { cursor: pointer; font-weight: 700; color: var(--navy); }

/* WhatsApp feedback */
.v5-wa { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.v5-wa__item { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; }
.v5-wa__head { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: .9375rem; }
.v5-wa__head time { color: var(--muted); font-size: .8125rem; }
.v5-wa__src { font-size: .75rem; font-weight: 700; color: var(--success); background: #eaf6ef; border-radius: 20px; padding: 1px 8px; }
.v5-wa blockquote { margin: 0; padding: 0; border: 0; }
.v5-stars { margin: 0; color: #b7791f; letter-spacing: 2px; }

/* Related articles */
.v5-related__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.v5-related__grid a { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); height: 100%; }
.v5-related__grid img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.v5-related__title { display: block; padding: 10px 12px; font-weight: 700; }

/* Dialogs */
html.v5-locked { overflow: hidden; }
.v5-dialog { border: 0; padding: 0; background: #fff; color: var(--ink); max-width: min(960px, 100vw); width: 100%; max-height: 100dvh; border-radius: var(--radius-l); }
.v5-dialog::backdrop { background: rgb(10 15 25 / 80%); }
.v5-dialog__close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 92%); font-size: 1.75rem; line-height: 1; cursor: pointer; color: var(--navy); }
.v5-dialog__title { margin: 0; padding: 14px 60px 10px 16px; font-weight: 700; }
.v5-dialog__foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px 16px; }
.v5-dialog__foot:empty { display: none; }
.v5-pdf__body iframe { display: block; width: 100%; height: min(75dvh, 900px); border: 0; background: var(--surface); }
.v5-pdf__note { padding: 0 16px; }
.v5-video { background: #000; color: #fff; max-width: min(520px, 100vw); }
.v5-video .v5-dialog__title { color: #fff; }
.v5-video__stage { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: calc(100dvh - 140px); margin: 0 auto; background: #000; }
.v5-video__stage.is-wide { aspect-ratio: 16 / 9; }
.v5-video__stage iframe, .v5-video__stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.v5-video__nav { position: absolute; top: 50%; left: 0; right: 0; display: flex; justify-content: space-between; pointer-events: none; }
.v5-video__nav button { pointer-events: auto; width: 40px; height: 56px; border: 0; background: rgb(255 255 255 / 20%); color: #fff; font-size: 1.75rem; cursor: pointer; }
.v5-video__nav button:disabled { visibility: hidden; }
.v5-video:has(.is-wide) { max-width: min(960px, 100vw); }
@media (max-width: 699px) {
	.v5-dialog { border-radius: 0; height: 100dvh; max-height: 100dvh; }
	.v5-video__stage { max-height: calc(100dvh - 120px); }
}

/* Mobile sticky purchase bar */
.v5-buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(0 0 0 / 8%); }
.v5-buybar[hidden] { display: none; }
.v5-buybar__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.v5-buybar__title { font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v5-buybar__price { font-weight: 800; }
.v5-buybar__price del { font-weight: 400; font-size: .8125rem; }
.v5-buybar__btn { flex: 0 0 auto; }
html.v5-has-buybar body { padding-bottom: 76px; }
@media (min-width: 900px) { .v5-buybar { display: none !important; } }
