/* Betta line-up pages (src/betta-pages.njk), the /pool-skimmers/ photo carousel
   and the product pages' "More from Betta" row. Loaded only by those templates
   (a <link> at the top of their content), so nothing here ships site-wide.
   Uses the site's colour tokens from style.css with plain fallbacks. */

/* ---- Photo carousel: CSS scroll-snap, prev / next buttons ---- */
.bl-carousel-section { padding: 40px 0 8px; }
.bl-carousel { position: relative; }
.bl-carousel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.bl-carousel-title { font-size: 20px; font-weight: 700; color: var(--ink, #1d1d1f); letter-spacing: -0.01em; margin: 0; }
.bl-carousel-nav { display: flex; gap: 8px; flex-shrink: 0; }
.bl-carousel-btn {
    width: 40px; height: 40px; border-radius: 50%; padding: 0;
    border: 1px solid var(--border-strong, #d2d2d7); background: #fff; color: var(--ink, #1d1d1f);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    transition: border-color .15s, color .15s, opacity .15s;
}
.bl-carousel-btn:hover { border-color: var(--accent, #0071e3); color: var(--accent, #0071e3); }
.bl-carousel-btn:focus-visible { outline: 2px solid var(--accent, #0071e3); outline-offset: 2px; }
.bl-carousel-btn[disabled] { opacity: .35; cursor: default; border-color: var(--border-strong, #d2d2d7); color: var(--ink, #1d1d1f); }
.bl-track {
    display: flex; gap: 16px; margin: 0; padding: 4px 2px 14px; list-style: none;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.bl-track:focus-visible { outline: 2px solid var(--accent, #0071e3); outline-offset: 4px; }
.bl-slide { flex: 0 0 min(82vw, 360px); scroll-snap-align: start; }
.bl-slide figure {
    margin: 0; height: 100%; background: #fff; border: 1px solid var(--border, #e8e8ed);
    border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
}
.bl-slide a { display: block; color: inherit; text-decoration: none; }
.bl-slide img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; }
.bl-slide figcaption { padding: 12px 16px 14px; font-size: 14px; line-height: 1.4; color: var(--ink-body, #424245); border-top: 1px solid var(--border, #e8e8ed); }
@media (prefers-reduced-motion: reduce) { .bl-track { scroll-behavior: auto; } }

/* ---- Product grid: stock line under the price ---- */
.bl-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; margin: 6px 0 2px; }
.bl-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.bl-stock-in { color: var(--green, #0f7a43); }
.bl-stock-out { color: var(--ink-muted, #86868b); }
.bl-card-summary { font-size: 13px; line-height: 1.45; color: var(--ink-secondary, #6e6e73); margin: 6px 0 0; }
.cp-grid.bl-grid-few { grid-template-columns: repeat(auto-fit, minmax(240px, 320px)); justify-content: center; }

/* ---- Comparison table (inside .pillar-article-inner) ---- */
.bl-compare-wrap { overflow-x: auto; margin: 16px 0 8px; }
.pillar-article-inner table.bl-compare { display: table; width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.bl-compare caption { text-align: left; font-weight: 600; color: var(--ink, #1d1d1f); padding-bottom: 8px; }
.bl-compare th, .bl-compare td { padding: 10px 12px; border: 1px solid var(--border, #e8e8ed); text-align: left; vertical-align: top; }
.bl-compare thead th { background: var(--surface-alt, #f5f5f7); }
.bl-compare tbody th { background: var(--surface-near, #fbfbfd); font-weight: 600; white-space: nowrap; }
.pillar-article-inner table.bl-compare-1 { min-width: 0; }
.bl-compare-note { font-size: 13px; color: var(--ink-secondary, #6e6e73); }

/* ---- Brand page: category tiles ---- */
.bl-cats { padding: 8px 0 40px; }
.bl-cats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.bl-cat {
    display: block; padding: 18px 20px; border: 1px solid var(--border, #e8e8ed); border-radius: 14px;
    background: #fff; color: var(--ink, #1d1d1f); text-decoration: none; transition: border-color .15s, transform .15s;
}
.bl-cat:hover { border-color: var(--accent, #0071e3); transform: translateY(-2px); }
.bl-cat strong { display: block; font-size: 16px; margin-bottom: 4px; }
.bl-cat span { font-size: 13px; line-height: 1.45; color: var(--ink-secondary, #6e6e73); }

/* ---- Product page: "More from Betta" row and category links ---- */
.bl-more { padding: 64px 0; }
.bl-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; }
.bl-more-card {
    display: flex; flex-direction: column; border: 1px solid var(--border, #e8e8ed); border-radius: 14px; overflow: hidden;
    background: #fff; color: var(--ink, #1d1d1f); text-decoration: none; transition: border-color .15s, transform .15s;
}
.bl-more-card:hover { border-color: var(--accent, #0071e3); transform: translateY(-2px); }
.bl-more-card img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; }
.bl-more-body { padding: 12px 16px 16px; border-top: 1px solid var(--border, #e8e8ed); display: flex; flex-direction: column; gap: 4px; }
.bl-more-name { font-size: 15px; font-weight: 600; }
.bl-more-price { font-size: 14px; }
.bl-more-price s { color: var(--ink-muted, #86868b); font-weight: 400; margin-left: 6px; }
.bl-more-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.bl-more-links a {
    display: inline-block; padding: 9px 16px; border: 1px solid var(--border-strong, #d2d2d7); border-radius: 999px;
    font-size: 14px; color: var(--ink, #1d1d1f); text-decoration: none; background: #fff;
}
.bl-more-links a:hover { border-color: var(--accent, #0071e3); color: var(--accent, #0071e3); }

/* ---- Product page: infographic story rows keep the square photo whole ---- */
.bl-story .pdp-story-media img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border-radius: 16px; }

@media (max-width: 600px) {
    .bl-carousel-section { padding-top: 28px; }
    .bl-carousel-title { font-size: 17px; }
    .bl-more { padding: 44px 0; }
}
