/* bs-film - uses bs-core Material tokens; fallbacks keep it readable without them. */
.bs-film {
	--f-surface: var(--md-surface-container, transparent);
	--f-on: var(--md-on-surface, currentColor);
	--f-muted: var(--md-on-surface-variant, color-mix(in srgb, currentColor 72%, transparent));
	--f-primary: var(--md-primary, #1e7a4b);
	--f-outline: var(--md-outline, color-mix(in srgb, currentColor 45%, transparent));
	--f-gold: var(--bs-gold, #f0c04f);
	--f-on-gold: var(--bs-on-gold, #1f1600);
	--f-ink: var(--bs-ink, currentColor);
	color: var(--f-on);
	font-variant-numeric: tabular-nums;
}
.bs-film .bs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bs-film-lede { font-size: 1.05rem; color: var(--f-muted); max-width: 60ch; }

/* Format tabs */
.bs-film-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.bs-film-tab {
	min-height: 40px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--f-outline);
	background: transparent; color: var(--f-on); font: inherit; font-weight: 600; cursor: pointer;
}
.bs-film-tab[aria-selected="true"] { background: var(--f-primary); border-color: var(--f-ink); color: var(--md-on-primary, #06210f); }
.bs-film-tab:focus-visible, .bs-film select:focus-visible, .bs-film input:focus-visible { outline: 3px solid var(--f-gold); outline-offset: 2px; }

/* Filters */
.bs-film-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.bs-film-field { display: flex; flex-direction: column; gap: 4px; }
.bs-film-field label { font-size: 0.8rem; font-weight: 600; color: var(--f-muted); }
.bs-film-field select, .bs-film-field input {
	min-height: 48px; padding: 0 12px; border-radius: var(--md-radius-m, 12px); border: 2px solid var(--f-outline);
	background: var(--f-surface); color: var(--f-on); font: inherit; width: 100%; box-sizing: border-box;
}
.bs-film-toggles { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0; }
.bs-film-check { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; }
.bs-film-check input { width: 18px; height: 18px; accent-color: var(--f-primary); }
.bs-film-count { color: var(--f-muted); font-size: 0.9rem; margin: 8px 0; }

/* Tables */
.bs-film-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bs-film-table { width: 100%; border-collapse: collapse; }
.bs-film-table th { text-align: left; font-size: 0.8rem; color: var(--f-muted); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--f-outline); white-space: nowrap; }
.bs-film-table td { padding: 10px; border-bottom: 1px solid color-mix(in srgb, var(--f-outline) 40%, transparent); vertical-align: top; }
.bs-film-table small { display: block; color: var(--f-muted); font-size: 0.78rem; margin-top: 2px; }
.bs-film-table a { color: var(--f-primary); font-weight: 600; text-decoration: none; }
.bs-film-table a:hover { text-decoration: underline; }
.bs-film-price strong { font-family: "Bricolage Grotesque", inherit; font-size: 1.15rem; }
.bs-film-pill { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 12px; background: var(--f-gold); color: var(--f-on-gold); font-size: 12px; font-weight: 700; }
.bs-film-oos { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--f-muted); border: 1px dashed var(--f-outline); border-radius: 12px; padding: 1px 8px; }
.bs-film-offers tr.is-oos td { opacity: 0.6; }
.bs-film-empty { padding: 24px 0; color: var(--f-muted); }

/* Mobile: list rows become cards */
@media (max-width: 640px) {
	.bs-film-filters { grid-template-columns: 1fr 1fr; gap: 8px; }
	.bs-film-search { grid-column: 1 / -1; }
	.bs-film-field select, .bs-film-field input { min-height: 44px; }
	.bs-film-tab { min-height: 36px; padding: 0 12px; }
	.bs-film-list thead { display: none; }
	.bs-film-list, .bs-film-list tbody, .bs-film-list tr, .bs-film-list td { display: block; width: 100%; box-sizing: border-box; }
	.bs-film-list tr { border: 2px solid var(--f-ink); border-radius: var(--md-radius-l, 18px); background: var(--f-surface); box-shadow: 4px 4px 0 var(--f-gold); margin: 0 4px 14px 0; padding: 6px 4px; }
	.bs-film-list td { border: 0; padding: 4px 10px; }
	.bs-film-list td.bs-film-low::before { content: "30-day low: "; color: var(--f-muted); }
	.bs-film-list td.bs-film-stores::before { content: "Stores: "; color: var(--f-muted); }
}

/* Stock page */
.bs-film-crumbs { font-size: 0.85rem; color: var(--f-muted); margin-bottom: 8px; }
.bs-film-crumbs a { color: var(--f-primary); }
.bs-film-h { margin: 0 0 4px; }
.bs-film-meta { color: var(--f-muted); margin: 0 0 16px; }
.bs-film-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.bs-film-stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.bs-film-stat span { font-size: 0.8rem; color: var(--f-muted); font-weight: 600; }
.bs-film-stat strong { font-family: "Bricolage Grotesque", inherit; font-size: 1.6rem; }
.bs-film-stat small { color: var(--f-muted); font-size: 0.8rem; }
.bs-film .bs-card:not(.bs-film-hub-card) { background: var(--f-surface); border: 2px solid var(--f-ink); border-radius: var(--md-radius-l, 18px); box-shadow: 4px 4px 0 var(--f-gold); }
.bs-film-chart { padding: 16px; }
.bs-film-svg { width: 100%; height: auto; display: block; }
.bs-film-svg .grid { stroke: var(--f-outline); stroke-opacity: 0.35; stroke-width: 1; }
.bs-film-svg .axis { fill: var(--f-muted); font-size: 12px; }
.bs-film-svg .line-all { fill: none; stroke: var(--f-primary); stroke-width: 3; stroke-linejoin: round; }
.bs-film-svg .line-au { fill: none; stroke: var(--f-gold); stroke-width: 2; stroke-dasharray: 6 4; stroke-linejoin: round; }
.bs-film-legend { font-size: 0.85rem; color: var(--f-muted); }
.bs-film-legend .k { display: inline-block; width: 18px; height: 3px; vertical-align: middle; }
.bs-film-legend .k-all { background: var(--f-primary); }
.bs-film-legend .k-au { background: var(--f-gold); }
.bs-film-note { font-size: 0.85rem; color: var(--f-muted); margin-top: 20px; max-width: 70ch; }
.bs-film-how { margin-top: 12px; }
.bs-film-how summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; }

/* Hub */
.bs-film-hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.bs-film-hub-card { display: block; padding: 20px; text-decoration: none; color: var(--f-on); background: var(--f-surface); border: 2px solid var(--f-ink); border-radius: var(--md-radius-l, 18px); box-shadow: 4px 4px 0 var(--f-gold); }
.bs-film-hub-card h2 { margin: 0 0 8px; }
.bs-film-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; margin-top: 8px; border-radius: 999px; border: 2px solid var(--f-ink); background: var(--f-primary); color: var(--md-on-primary, #06210f); font-weight: 700; }

/* Best value box */
.bs-film-deals { padding: 16px 18px; margin: 12px 0 20px; }
.bs-film-deals h2 { margin: 0 0 10px; font-size: 1.25rem; }
.bs-film-deals ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bs-film-deals li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--f-outline) 40%, transparent); }
.bs-film-deals li:last-child { border-bottom: 0; padding-bottom: 0; }
.bs-film-deal-name { grid-column: 1; font-weight: 700; color: var(--f-primary); text-decoration: none; }
.bs-film-deals .bs-film-pill { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; }
.bs-film-deal-price { grid-column: 1; font-size: 0.9rem; }
.bs-film-deal-price a { color: var(--f-primary); }
.bs-film-deals small { grid-column: 1; color: var(--f-muted); font-size: 0.78rem; }
.bs-film-deals-note { font-size: 0.78rem; color: var(--f-muted); margin: 10px 0 0; }
