/* Self-hosted typography. Replaces two third-party CDN requests:
 *   fonts.cdnfonts.com/css/playfair          (Playfair variable font)
 *   cdn.jsdelivr.net/.../bootstrap-icons.css (Bootstrap Icons 1.9.0)
 *
 * Eliminates render-blocking cross-origin round-trips for Core Web Vitals.
 * Files live alongside this CSS in public/fonts/; express.static serves
 * .woff2 with the correct MIME (font/woff2) automatically.
 *
 * Playfair Display is licensed under SIL Open Font License 1.1.
 * Bootstrap Icons is licensed under MIT. Both allow redistribution.
 */

/* ---- Playfair (variable, weight 400–900) ----------------------------------
 * Latin + Latin-Extended subsets cover Czech diacritics (ž, š, č, ř, ď, ť,
 * ň, ě + acute/háček variants). Subset split mirrors Google Fonts so the
 * browser only fetches what's needed for the visible text — Cyrillic /
 * Vietnamese subsets dropped because we never use them.
 *
 * font-display: swap shows fallback text immediately while the woff2 loads,
 * so we don't bleed LCP waiting on the font (the whole point of self-hosting).
 */
@font-face {
  font-family: 'Playfair';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/playfair-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/playfair-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/playfair-latin-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/playfair-latin-ext-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Bootstrap Icons 1.9.0 (trimmed + subset) -----------------------------
 * The upstream CSS ships ~1800 icon class definitions (~88 KB). We use only
 * 7 — keep just those plus the base ::before scaffold. The woff2 is ALSO
 * subset to exactly those 7 glyphs (111 KB -> ~1 KB); the full font is kept
 * beside it as bootstrap-icons-full.woff2.bak.
 *
 * If you start using a new bi-* class: (1) look up the codepoint in the
 * upstream CSS at cdn.jsdelivr.net/npm/bootstrap-icons@1.9.0/font/bootstrap-icons.css
 * and add a one-liner below, and (2) RE-SUBSET the woff2 or the new glyph
 * won't render — from public/fonts/:
 *   pyftsubset bootstrap-icons-full.woff2.bak \
 *     --unicodes=f243,f543,f5dd,f63b,f64d,f659,f832,<new> \
 *     --flavor=woff2 --output-file=bootstrap-icons.woff2 \
 *     --no-hinting --desubroutinize
 *
 * font-display: block — icons should never flash as a fallback Unicode
 * character. At ~1 KB the font loads before the block period ever bites, so
 * this no longer delays FCP.
 */
@font-face {
  font-family: 'bootstrap-icons';
  font-display: block;
  src: url('/fonts/bootstrap-icons.woff2') format('woff2');
}

.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bi-cart2::before { content: "\f243"; }
.bi-shop::before { content: "\f543"; }
.bi-trash-fill::before { content: "\f5dd"; }
.bi-dash-lg::before { content: "\f63b"; }
.bi-plus-lg::before { content: "\f64d"; }
.bi-x-lg::before { content: "\f659"; }
.bi-sign-turn-right::before { content: "\f832"; }
