/* jdtheme26 — default text rhythm (operator 2026-09-27: 「預設css的所有文字 letter-spacing: 0.15em; line-height: 1.5;」;
   2026-09-29: 「css預設html 的 line height 改成1.6」 → 1.6).
   line-height: unitless 1.6 on <body> inherits as "1.6 × the element's own font size".
   letter-spacing: `.15em` declared on <body> would inherit as an ABSOLUTE length (16px → 2.4px, i.e. 0.18em on 13px text, 0.22em on 11px text),
   so it is also declared on every element (`body :where(*)`, specificity 0,0,1) — each text then gets .15em of its own size. Class-level rules that
   carry a deliberate value of their own (category names, …) still win over that. Loaded last (priority 10018). */
body {
  letter-spacing: .15em;
  line-height: 1.6;
}
body :where(*) { letter-spacing: .15em; }
button, input, select, textarea { letter-spacing: inherit; }

/* WoodMart re-states line-height on a few containers (base.css h1–h6/.title/table/.wd-nav links, woo-product-loop.css .wd-product,
   widget-general.css .widget, …) and its part stylesheets load AFTER this file → `body` prefix to win. Everything inside inherits the 1.6. */
body :is(h1, h2, h3, h4, h5, h6, legend, .title),
body .wd-entities-title,
body table,
body .wd-nav > li > a,
body .wd-product,
body :is(.widget, .wd-widget, div[class^="vc_wp"]) { line-height: 1.6; }

/* ---- BODY TEXT: 14px / 1.6 (first 1.125rem / 1.9, then 15px / 1.9: operator 2026-09-29: 「網站所有"內文" … font-size: 1.125rem, line-height: 1.9; letter spacing照我原本的」) ----
   "Body text" = running text: every paragraph of the page content, and the lists / quotes / definition texts inside text containers.
   NOT body text: titles, menus, buttons, product cards, prices, breadcrumbs, form fields, the footer.
   Specificity is kept at the lowest that still beats WoodMart's reset (`p { font-size: 100%; line-height: inherit }`): two element names, no class —
   so ANY rule with a class that names a size on purpose keeps it (home cards 13px, hero sentence 15px, …). Lists inside this theme's own
   Raw HTML blocks (.wpb_raw_code: cards, tags, address lines) are components, not running text, and are left alone. Letter-spacing stays .15em (rule above). Font = --jd-font-body (assets/css/jd-fonts.css). */
body {
  --jd-body-size: 14px;                /* history 2026-09-29: 1.125rem -> 15px -> 14px */
  --jd-body-lh: 1.6;                   /* history 2026-09-29: 1.9 -> 1.6 */
}
/* not running text although written as <p>: stock / price labels, form rows (checkout, account, cart), anything inside a form or a product card */
body :where(.wd-page-content) p:where(:not(.stock, .price, .form-row, .woocommerce-result-count, form *, .wd-product *, .cart_totals *, .woocommerce-MyAccount-navigation *)),
body :where(.wd-page-content) :where(.entry-content, .wd-entry-content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description, .term-description, .wd-accordion-content, .wpb_text_column, .wd-text-block) :where(:not(.wpb_raw_code *)):is(li, dd, blockquote) {
  font-family: var(--jd-font-body);
  font-size: var(--jd-body-size);
  line-height: var(--jd-body-lh);
}

/* Icon glyphs / counters: letter-spacing adds a trailing gap after each glyph, which would push centred icons and count digits off-centre */
body :is(.wd-tools-icon, .wd-tools-count, .wd-action-icon, .wd-icon, .fab, .fas, .far, .fa, [class*="wd-icon-"], .wd-nav-mob-tab, .wd-scroll-content > i) { letter-spacing: 0; }
body :is(.wd-tools-icon, .wd-tools-count, .wd-action-icon, .fab, .fas, .far)::before { letter-spacing: 0; }

/* ---- Page titles in 源泉圓體 (GenSen Rounded 2 TW, Medium) — operator 2026-09-27: 「page的標題改用 源泉圓體」 ----------------------------------------
   https://github.com/ButTaiwan/gensen-font (release v2.100, SIL OFL 1.1 — licence files in assets/fonts/). Two subset tiers built by
   build/scripts/build-gensen-title-font.py: tier 1 (~0.4 MB) = the characters the site actually uses in titles/menus/WooCommerce labels,
   tier 2 (~2.7 MB) = every other Big5 hanzi — a separate family that only downloads when a title contains a character tier 1 lacks.
   Rare characters neither has fall through to the normal stack (Baloo 2 / Noto Sans TC). Applies to the title of the page-title band (H1). */
@font-face {
  font-family: "GenSen Rounded 2 TW";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/GenSenRounded2TW-M-t1.woff2") format("woff2");
}
@font-face {
  font-family: "GenSen Rounded 2 TW Ext";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/GenSenRounded2TW-M-t2.woff2") format("woff2");
}
body .wd-page-title .entry-title {
  font-family: "GenSen Rounded 2 TW", "GenSen Rounded 2 TW Ext", "Baloo 2", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  font-weight: 500;
}

/* ---- Breadcrumbs 12px (operator 2026-09-27: 「.wd-breadcrumbs 文字字級改12px」) — every `.wd-breadcrumbs` (page-title band, product page top row, …) ---- */
body .wd-breadcrumbs,
body .wd-breadcrumbs :is(a, span, .wd-last, .wd-delimiter) { font-size: 12px; }

/* ---- Page-title band shows the WHOLE banner (operator 2026-09-27: 「wd-page-title-bg 的背景改成這張，並且尺寸要改成顯示全部，不要切到」) ----
   Theme Settings `title-background` = the dog-and-cat watercolour (2010×408, white paper, grass running off both side edges) with size `contain`.
   `contain` alone would leave white strips left/right on a band wider than 2010:408 (desktop ≈ 6:1) and cut the grass off; so the band never gets flatter than the
   picture: on wide screens it is exactly picture-shaped (1445 px → 293 px high), on narrow screens the title content is the taller side and the picture (full
   width) just gets white bars above/below (the paper is white, so they vanish). */
body .wd-page-title.page-title { aspect-ratio: 2010 / 408; }

/* The store address links to the store's Google Maps page wherever it is written (2026-09-30): it keeps the text's colour and gets a
   thin underline; the About / store / contact pages give their links their own look. */
body a.jd-map-link { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
body a.jd-map-link:is(:hover, :focus-visible) { color: inherit; opacity: .7; }

