/* BestSavings 1.9.0: section title links, carousel "see all" card, retailer hubs, /retailers/ directory, price beat table. Theme tokens only (dark default + light). */

/* Section title that is the link */
.bs-sec-link { margin: 0 0 8px; font-size: clamp(1.25rem, 3.6vw, 1.75rem); line-height: 1.2; }
.bs-sec-link a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: inherit; text-decoration: none; }
.bs-sec-link a:hover, .bs-sec-link a:focus-visible { text-decoration: underline; text-decoration-color: var(--bs-gold, #f0c04f); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.bs-sec-link a:focus-visible { outline: 3px solid var(--bs-gold, #f0c04f); outline-offset: 3px; border-radius: 6px; }
.bs-sec-arrow { flex: 0 0 auto; width: 30px; height: 30px; padding: 4px; border: 2px solid var(--bs-card-border, #000); border-radius: 999px; background: var(--bs-gold, #f0c04f); color: #1f1600; box-sizing: border-box; animation: bs-nudge 1.4s ease-in-out 1s 2; }
.bs-sec-link a:hover .bs-sec-arrow, .bs-sec-link a:focus-visible .bs-sec-arrow { animation: bs-nudge .9s ease-in-out infinite; }
@keyframes bs-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
.bs-home .bs-deals-wrap .bs-sec-link { margin-bottom: 8px; }

/* "See all" card at the end of a carousel */
.bs-car-more-i { flex-basis: 120px; }
.bs-car-more { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 100%; padding: 12px; border: 2px dashed var(--md-outline, #8fa597); border-radius: var(--md-radius-m, 12px); color: var(--md-on-surface); text-decoration: none; font-weight: 700; font-size: .875rem; text-align: center; }
.bs-car-more:hover, .bs-car-more:focus-visible { border-style: solid; border-color: var(--bs-gold, #f0c04f); }
.bs-car-more:focus-visible { outline: 3px solid var(--bs-gold, #f0c04f); outline-offset: 2px; }
.bs-car-more-ic { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 2px solid var(--bs-card-border, #000); border-radius: 999px; background: var(--md-primary, #43c783); color: var(--md-on-primary, #06210f); }
.bs-car-more:hover .bs-car-more-ic { animation: bs-nudge .9s ease-in-out infinite; }
@media (min-width: 782px) { .bs-car-more-i { flex-basis: 140px; } }

/* Chips used as links (filters, sorts, jump links) */
.bs-chip-l { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 2px solid var(--md-outline, #8fa597); border-radius: 999px; color: var(--md-on-surface); text-decoration: none; font-weight: 600; font-size: .875rem; white-space: nowrap; }
.bs-chip-l:hover { border-color: var(--bs-gold, #f0c04f); }
.bs-chip-l:focus-visible { outline: 3px solid var(--bs-gold, #f0c04f); outline-offset: 2px; }
.bs-chip-l.is-on { background: var(--md-primary, #43c783); border-color: var(--md-primary, #43c783); color: var(--md-on-primary, #06210f); }

/* Retailer hub */
.bs-rh { display: flex; flex-direction: column; gap: 4px; }
.bs-rh-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.bs-rh-logo { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 56px; padding: 6px 10px; border: 2px solid var(--bs-card-border, #000); border-radius: 12px; background: #fff; box-sizing: border-box; }
.bs-rh-logo img { max-height: 40px; width: auto; max-width: 120px; object-fit: contain; }
.bs-rh-letter { width: 56px; padding: 0; background: var(--bs-tile, #f4f1e6); color: #0e1712; font-family: var(--bs-font-display, inherit); font-weight: 800; font-size: 1.75rem; }
.bs-rh-intro { flex: 999 1 320px; min-width: 0; }
.bs-rh-intro p { margin: 0 0 4px; }
.bs-rh-meta, .bs-rh-fine { font-size: .8125rem; }
.bs-rh-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0 !important; }
.bs-rh-jump, .bs-rh-sort { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 4px 2px; margin: 8px 0; }
.bs-rh-jump::-webkit-scrollbar, .bs-rh-sort::-webkit-scrollbar { display: none; }
.bs-rh-sec { margin: 20px 0 4px; }
.bs-rh-sec > h2 { margin: 0 0 10px; font-size: clamp(1.25rem, 3.6vw, 1.75rem); }
.bs-rh-list { list-style: none; margin: 0; padding: 0; border: 2px solid var(--bs-card-border, #000); border-radius: 12px; background: var(--md-surface-container); }
.bs-rh-list li { display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--md-outline-variant, rgba(143, 165, 151, .35)); }
.bs-rh-list li:last-child { border-bottom: 0; }
.bs-rh-list a { color: var(--md-on-surface); font-weight: 600; min-width: 0; }
.bs-rh-list span { color: var(--md-on-surface-variant); font-size: .875rem; }
.bs-rh-list small { flex-basis: 100%; color: var(--md-on-surface-variant); font-size: .8125rem; }
.bs-rh-pm h2 { margin-top: 0; }
.bs-rh-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0; padding: 0; }
.bs-rh-chips li { padding: 4px 12px; border: 2px solid var(--md-outline, #8fa597); border-radius: 999px; font-size: .8125rem; font-weight: 600; }
.bs-rh-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.bs-rh-faq { margin: 0 0 8px; padding: 0 14px; border: 2px solid var(--bs-card-border, #000); border-radius: 12px; background: var(--md-surface-container); }
.bs-rh-faq summary { display: flex; align-items: center; min-height: 48px; cursor: pointer; font-weight: 700; }
.bs-rh-faq p { margin: 0 0 14px; color: var(--md-on-surface-variant); }
.bs-rh-all { margin-top: 20px; }
.bs-rh-disc { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--md-outline-variant, rgba(143, 165, 151, .35)); }

/* /retailers/ directory */
.bs-rd { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; align-items: stretch; }
.bs-rd > nav, .bs-rd > .bs-rd-l, .bs-rd > p, .bs-rd-grid-end { grid-column: 1 / -1; }
.bs-rd-az { display: flex; flex-wrap: wrap; gap: 4px; }
.bs-rd-az a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; border-radius: 8px; color: var(--md-on-surface); font-weight: 700; text-decoration: none; }
.bs-rd-az a:hover { background: var(--md-surface-container); }
.bs-rd-l { margin: 12px 0 0; font-size: 1.25rem; }
.bs-rd-t { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 10px; border: 2px solid var(--bs-card-border, #000); border-radius: 12px; background: var(--md-surface-container); color: var(--md-on-surface); text-decoration: none; }
.bs-rd-t:hover { border-color: var(--bs-gold, #f0c04f); }
.bs-rd-t:focus-visible { outline: 3px solid var(--bs-gold, #f0c04f); outline-offset: 2px; }
.bs-rd-logo { grid-row: 1 / span 3; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 40px; border-radius: 8px; background: #fff; overflow: hidden; }
.bs-rd-logo img { max-width: 52px; max-height: 32px; object-fit: contain; }
.bs-rd-logo.bs-rh-letter { width: 40px; font-size: 1.25rem; border: 0; }
.bs-rd-n { font-weight: 700; }
.bs-rd-p { justify-self: start; padding: 1px 8px; border-radius: 999px; background: var(--bs-gold, #f0c04f); color: #1f1600; font-size: .75rem; font-weight: 700; }
.bs-rd-pr { background: transparent; color: var(--md-on-surface-variant); border: 1px solid var(--md-outline, #8fa597); }

/* Multi-select filter dropdown (replaces the pill chips; used on /retailers/ and /brands/) */
.bs-rd-filt { margin: 2px 0 10px; }
.bs-rd-filt > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 2px solid var(--md-outline, #8fa597); border-radius: 999px; color: var(--md-on-surface); font-weight: 600; font-size: .875rem; cursor: pointer; list-style: none; }
.bs-rd-filt > summary::-webkit-details-marker { display: none; }
.bs-rd-filt > summary::after { content: ""; width: 8px; height: 8px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.bs-rd-filt[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
.bs-rd-filt > summary:hover, .bs-rd-filt[open] > summary { border-color: var(--bs-gold, #f0c04f); }
.bs-rd-filt > summary:focus-visible { outline: 3px solid var(--bs-gold, #f0c04f); outline-offset: 2px; }
.bs-rd-filt-body { margin-top: 10px; padding: 14px; border: 2px solid var(--md-outline, #8fa597); border-radius: 12px; background: var(--md-surface-container); }
.bs-rd-filt-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 14px; max-height: 320px; overflow-y: auto; }
.bs-rd-fo { display: flex; align-items: center; gap: 9px; min-height: 34px; font-size: .875rem; cursor: pointer; }
.bs-rd-fo input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--md-primary, #43c783); cursor: pointer; }
.bs-rd-filt-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
@media (max-width: 600px) { .bs-rd-filt-opts { grid-template-columns: 1fr 1fr; } }

/* /price-beat-policies/ table and the product page box */
.bs-pb-tbl-wrap { overflow-x: auto; border: 2px solid var(--bs-card-border, #000); border-radius: 12px; margin: 12px 0; }
.bs-pb-tbl { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 760px; }
.bs-pb-tbl th, .bs-pb-tbl td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--md-outline-variant, rgba(143, 165, 151, .35)); }
.bs-pb-tbl thead th { background: var(--md-surface-container); position: sticky; top: 0; }
.bs-pb-tbl tbody th { font-weight: 700; }
.bs-pb-lo { margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) { .bs-sec-arrow, .bs-sec-link a:hover .bs-sec-arrow, .bs-car-more:hover .bs-car-more-ic { animation: none; } }

/* 1.7.0 homepage: compact shortcuts, tighter sections, no hero art on phones, placeholder for listings without a photo */
.bs-sc { margin: 8px 0 24px; }
.bs-sc-h { margin: 0 0 8px; font-size: clamp(1.125rem, 3vw, 1.375rem); }
.bs-sc-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.bs-sc-a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px 6px 6px; border: 2px solid var(--bs-card-border, #000); border-radius: 12px; background: var(--md-surface-container); color: var(--md-on-surface); text-decoration: none; font-weight: 600; font-size: .9375rem; line-height: 1.2; }
.bs-sc-a:hover { border-color: var(--bs-gold, #f0c04f); }
.bs-sc-a:focus-visible { outline: 3px solid var(--bs-gold, #f0c04f); outline-offset: 2px; }
.bs-sc-i { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--bs-gold, #f0c04f); color: #1f1600; }
@media (max-width: 700px) {
	.bs-sc-row { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: minmax(168px, 72%); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
	.bs-sc-row::-webkit-scrollbar { display: none; }
	.bs-sc-a { scroll-snap-align: start; }
	.bs-home .bs-hero .bs-hero-art { display: none; }
}
.bs-home section.bs-deals-wrap { padding-top: 16px; padding-bottom: 4px; } /* beats bs-core.css and the theme's global styles */
.bs-home section.bs-deals-wrap:last-child { padding-bottom: 24px; }
.bs-deals-wrap .bs-sc { margin: 0; }
.bs-car-img .bs-car-noimg { color: #8fa597; }
/* 1.7.3: less empty space on phones (hero, last section, footer gap) */
body:has(.bs-home) .bs-foot { margin-top: 0; }
@media (max-width: 600px) {
	.bs-home section.bs-hero { padding: 20px 16px !important; } /* beats the 68px !important in Global Styles */
	.bs-home .bs-hero .bs-hero-x { top: 10px; right: 10px; }
	.bs-home .bs-hero h1 { margin: 0 0 10px; padding-right: 48px; font-size: 2rem; line-height: 1.15; }
	.bs-home .bs-hero p { font-size: 1rem; line-height: 1.45; margin: 0; }
	.bs-home section.bs-deals-wrap:last-child { padding-bottom: 16px; }
}
/* 1.7.4: shorter hero on desktop and tablet; shortcuts fill whole rows on wide screens */
@media (min-width: 601px) {
	.bs-home section.bs-hero { padding-top: 28px !important; padding-bottom: 28px; }
	.bs-home .bs-hero h1 { margin-bottom: 10px; padding-right: 56px; }
	.bs-home .bs-hero .bs-hero-art { width: min(180px, 30vw); }
}
@media (min-width: 1100px) { .bs-sc-row { grid-template-columns: repeat(6, 1fr); } }
/* 1.7.5: "see all" card no taller than the cards beside it; blog strip cards (16:9 photo) */
.bs-car-more { box-sizing: border-box; min-height: 0; height: auto; align-self: stretch; }
.bs-car-item.bs-car-blog { flex-basis: 240px; }
.bs-car-blog .bs-car-img { aspect-ratio: 16 / 9; background: var(--md-surface-container-high, #22362a); }
.bs-car-blog .bs-car-img img { object-fit: cover; }
.bs-car-blog .bs-car-t { min-height: 0; font-size: .875rem; }
@media (min-width: 782px) { .bs-car-item.bs-car-blog { flex-basis: 280px; } }
.bs-car-item, .bs-car-card { min-width: 0; } /* long one-line meta must not widen a card */
/* 1.10.0: cashback card (retailer hubs, product pages) */
.bs-cb h3 { margin: 0 0 8px; font-size: 1.125rem; }
.bs-cb-list { list-style: none; margin: 0 0 8px; padding: 0; }
.bs-cb-row { display: grid; grid-template-columns: minmax(96px, auto) auto 1fr; align-items: center; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--md-outline-variant, rgba(143, 165, 151, .35)); }
.bs-cb-row:last-child { border-bottom: 0; }
.bs-cb-p { font-weight: 700; }
.bs-cb-r { justify-self: start; padding: 2px 10px; border-radius: 999px; background: var(--bs-gold, #f0c04f); color: #1f1600; font-weight: 800; font-size: .9375rem; }
.bs-cb-row.is-off .bs-cb-r { background: transparent; color: var(--md-on-surface-variant); border: 1px solid var(--md-outline, #8fa597); font-weight: 600; }
.bs-cb-t { color: var(--md-on-surface-variant); font-size: .8125rem; }
.bs-cb-l { grid-column: 1 / -1; font-size: .875rem; }
.bs-cb-cats { grid-column: 1 / -1; font-size: .8125rem; }
.bs-cb-cats summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; color: var(--md-primary, #43c783); font-weight: 600; }
.bs-cb-cats ul { margin: 4px 0 0; padding-left: 18px; columns: 2 220px; }
@media (max-width: 600px) { .bs-cb-row { grid-template-columns: 1fr auto; } .bs-cb-t { grid-column: 1 / -1; } }
.bs-cb-pick { margin: 0 0 6px; font-weight: 600; } /* 1.10.1 */
/* 1.10.2: cashback history chart */
.bs-cbc { margin: 4px 0 8px; }
.bs-cbc svg { width: 100%; max-width: 520px; height: auto; display: block; }
.bs-cbc-ax { stroke: var(--md-outline-variant, rgba(143, 165, 151, .5)); stroke-width: 1; }
.bs-cbc-t { fill: var(--md-on-surface-variant, #b3c5ba); font-size: 9px; }
.bs-cbc-l { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.bs-cbc-topcashback { stroke: var(--bs-gold, #f0c04f); background: var(--bs-gold, #f0c04f); }
.bs-cbc-shopback { stroke: var(--md-primary, #43c783); background: var(--md-primary, #43c783); stroke-dasharray: 6 3; }
.bs-cbc figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8125rem; }
.bs-cbc-k { display: inline-flex; align-items: center; gap: 6px; }
.bs-cbc-k i { width: 14px; height: 4px; border-radius: 2px; }
.bs-cb-sub { margin: 10px 0 2px; font-weight: 700; font-size: .9375rem; } /* 1.11.0 */
.bs-cb-r.bs-cb-pts { background: transparent; color: var(--md-on-surface); border: 2px solid var(--bs-gold, #f0c04f); }

/* 1.12.0: community score on homepage cards (shown once enough votes come in) */
.bs-car-v { display: inline-flex; align-items: center; gap: 2px; align-self: flex-start; margin-top: 4px; padding: 1px 8px 1px 5px; border: 1.5px solid currentColor; border-radius: 999px; font-size: .75rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.bs-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
