/* Parent AZ_Dynamic_CSS supplies the saved Typography values and switches sizes
   at 960/782px. Scale compact component text relative to those defaults rather
   than giving product cards and footer labels full article-heading sizes. */
.az-child-storefront {
  --az-type-body: calc(var(--az-body-size, 16px) / 16);
  --az-type-h1-base: 48;
  --az-type-h2-base: 34;
  --az-type-h3-base: 26;
  --az-type-h4-base: 18;
  --az-type-h1: calc(var(--az-h1-size, 48px) / var(--az-type-h1-base));
  --az-type-h2: calc(var(--az-h2-size, 34px) / var(--az-type-h2-base));
  --az-type-h3: calc(var(--az-h3-size, 26px) / var(--az-type-h3-base));
  --az-type-h4: calc(var(--az-h4-size, 18px) / var(--az-type-h4-base));
}
@media (max-width: 960px) {
  .az-child-storefront { --az-type-h1-base: 40; --az-type-h2-base: 30; --az-type-h3-base: 24; }
}
@media (max-width: 782px) {
  .az-child-storefront { --az-type-h1-base: 32; --az-type-h2-base: 26; --az-type-h3-base: 22; }
}

/* Use the shared wrapper to outrank the retired shell and Woo component fonts.
   This also covers original header rows when moved into the sticky surface. */
#page.az-child-storefront,
#page.az-child-storefront :is(.az-bb-header, .az-reference-footer, .az-main) {
  font-family: var(--az-font-main, Arial, sans-serif);
  font-weight: var(--az-font-weight, 400);
  line-height: var(--az-body-line-height, 1.55);
  letter-spacing: var(--az-body-letter-spacing, 0em);
}
#page.az-child-storefront :is(.az-main, .az-content) { font-size: var(--az-body-size, 16px); }
#page.az-child-storefront :is(button, input, select, textarea) {
  font-family: var(--az-font-main, Arial, sans-serif);
  letter-spacing: var(--az-body-letter-spacing, 0em);
}
#page.az-child-storefront :is(p, .az-content, .az-content li, .az-post-content, .az-reference-footer__details, .az-reference-footer__keywords li a) {
  line-height: var(--az-body-line-height, 1.55);
}
#page.az-child-storefront :is(h1, h2, h3, h4, .az-bb-script, .az-bb-catalogue__labels button, .az-child-story-product-name) {
  font-family: var(--az-font-heading, var(--az-font-main, Arial, sans-serif));
  font-weight: var(--az-heading-weight, 600);
  line-height: var(--az-heading-line-height, 1.2);
  letter-spacing: var(--az-heading-letter-spacing, 0em);
}
#page.az-child-storefront .az-bb-script { font-style: normal; }
#page.az-child-storefront :is(.az-reference-footer__keywords li a, .az-reference-footer__count) { font-weight: var(--az-font-weight, 400); }

/* Content headings use the exact H1–H4 sizes chosen for the current device. */
#page.az-child-storefront .az-main h1 { font-size: var(--az-h1-size, 48px); }
#page.az-child-storefront .az-main h2 { font-size: var(--az-h2-size, 34px); }
#page.az-child-storefront .az-main h3 { font-size: var(--az-h3-size, 26px); }
#page.az-child-storefront .az-main h4 { font-size: var(--az-h4-size, 18px); }
#page.az-child-storefront :is(.az-page-simple__header h1, .az-cost-page-title) { font-size: var(--az-h1-size, 48px); }
#page.az-child-storefront .az-single-post__content .az-post-content { font-size: var(--az-body-size, 16px); }

/* Product/news cards and utility headings retain their compact visual roles. */
#page.az-child-storefront .az-main .az-product-card__title { font-size: calc(var(--az-type-h3) * 16); }
#page.az-child-storefront .az-main .az-post-card__title { font-size: calc(var(--az-type-h3) * 20); }
#page.az-child-storefront .az-main .az-child-story-product-name { font-size: calc(var(--az-type-h2) * 34); }
@media (max-width: 1024px) {
  #page.az-child-storefront .az-main .az-child-story-product-name { font-size: calc(var(--az-type-h2) * 22); }
}
@media (max-width: 640px) {
  #page.az-child-storefront .az-main .az-child-story-product-name { font-size: calc(var(--az-type-h2) * 19); }
}
#page.az-child-storefront .az-main .az-dealers__card h2 { font-size: calc(var(--az-type-h2) * 16); }
#page.az-child-storefront .az-main .az-dealers__card h2 button { font: inherit; }
#page.az-child-storefront .az-main .az-cost__results h2 { font-size: calc(var(--az-type-h2) * 25); }
#page.az-child-storefront .az-main .az-cost__results h3 { font-size: calc(var(--az-type-h3) * 19); }
#page.az-child-storefront .az-main .az-child-product-story :is(.az-child-story-editorial-card, .az-child-story-feature-detail) h3 { font-size: calc(var(--az-type-h3) * 18); }

/* The menu controls apply directly to desktop, mobile, dropdown and sticky nav. */
#page.az-child-storefront :is(.az-bb-menu a, .az-bb-mobile-menu nav > a, .az-bb-categories-menu a, .az-bb-categories-menu summary, .az-bb-mobile-menu summary) {
  font-family: var(--az-font-main, Arial, sans-serif);
  font-size: var(--az-navigation-size, 16px);
  font-weight: var(--az-navigation-weight, 600);
  line-height: var(--az-body-line-height, 1.55);
  letter-spacing: var(--az-navigation-letter-spacing, 0em);
  white-space: normal;
}
#page.az-child-storefront .az-bb-menu { flex-wrap: wrap; }
#page.az-child-storefront .az-bb-header__bottom .az-bb-categories-menu { max-width: 45%; }
@media (max-width: 600px) {
  #page.az-child-storefront .az-main .az-product-card__title { font-size: calc(var(--az-type-h3) * 13); }
  #page.az-child-storefront .az-bb-header__bottom .az-bb-categories-menu { max-width: none; }
}
