/* ==========================================================
   Buffalo Nation: full-bleed layout (15 Nov 2026)
   Wide container (1760px) with fluid gutters; edge-to-edge bands.
   Loaded last so it overrides tokens/home/product/archive/pages.
   ========================================================== */
:root, body.bn-theme {
  --wrap: 1760px;
  --gutter: clamp(16px, 3.2vw, 64px);
  --global-content-width: 1760px;
  --global-content-edge-padding: clamp(16px, 3.2vw, 64px);
}
body.bn-theme .site-container,
body.bn-theme .content-container.site-container { max-width: var(--wrap); }
body.bn-theme .content-container.site-container { padding-left: var(--gutter); padding-right: var(--gutter); }

/* Shop and category grids: more columns on wide screens */
@media (min-width: 1440px) {
  body.bn-theme .bn-plp__main > ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  body.bn-theme .bn-plp.no-aside .bn-plp__main > ul.products,
  body.bn-theme .bn-cols-4 ul.products { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
@media (min-width: 1800px) {
  body.bn-theme .bn-plp__main > ul.products { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

/* Homepage rails: 5 cards on wide screens, 6 on very wide */
@media (min-width: 1440px) {
  body.bn-theme .bn-home .bn-rail ul.products.products { grid-auto-columns: calc((100% - 96px) / 5) !important; }
}
@media (min-width: 1880px) {
  body.bn-theme .bn-home .bn-rail ul.products.products { grid-auto-columns: calc((100% - 120px) / 6) !important; }
}

/* Product page: keep the buy area readable on very wide screens */
@media (min-width: 1440px) {
  body.bn-theme.single-product .bn-pdp-top { grid-template-columns: minmax(0, 52fr) minmax(0, 48fr); }
  body.bn-theme.single-product .bn-pdp-top > .summary { max-width: 760px; }
  body.bn-theme .bn-rev__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Wider screens: related products 5 across */
@media (min-width: 1440px) {
  body.bn-theme.single-product .related ul.products,
  body.bn-theme.single-product .upsells ul.products { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
/* Content pages (About, FAQ, Contact, Gift guide, policies...): bands run edge to edge, content stays in .bn-wrap */
body.bn-theme .content-container.site-container:has(.bn-pg) { max-width: none; padding-left: 0; padding-right: 0; }
body.bn-theme .content-container.site-container:has(.bn-pg) .entry-content-wrap,
body.bn-theme .content-container.site-container:has(.bn-pg) .entry.content-bg { padding: 0; margin: 0; box-shadow: none; border-radius: 0; background: transparent; }
body.bn-theme .content-container.site-container:has(.bn-pg) .content-wrap,
body.bn-theme .content-container.site-container:has(.bn-pg) .site-main { max-width: none; width: 100%; }

/* Shop: category tiles fit one row on wide screens */
@media (min-width: 1440px) {
  body.bn-theme .bn-shopcats .bn-cattiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}
/* Shop grid: the OSIYO10 tile sits after the 6th card; size it so no card is left alone on its row */
@media (min-width: 1440px) and (max-width: 1799.98px) {
  body.bn-theme .bn-plp__main > ul.products:not(.bn-view-list) > li.bn-promo--d3 { grid-column: span 2; }
}
@media (min-width: 1800px) {
  body.bn-theme .bn-plp__main > ul.products:not(.bn-view-list) > li.bn-promo--d3 { grid-column: span 4; }
}

/* Product page: 6 related pieces = one full row on wide screens, 3x2 on laptops, 2x3 on phones */
@media (min-width: 1440px) {
  body.bn-theme.single-product .related ul.products,
  body.bn-theme.single-product .upsells ul.products { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}
@media (min-width: 768px) and (max-width: 1439.98px) {
  body.bn-theme.single-product .related ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
/* Product page: pills above the title already show New / Hand-forged / Sale, so hide the duplicate flags on the image */
body.bn-theme .bn-pdp-media .bn-pdp-flags { display: none !important; }
