/* Shared storefront reading scale, loaded after each child theme.
   Brand typography, headings and icon-only controls remain in their own theme. */
body {
  --readability-text: 1.125rem;
  --readability-small: 1rem;
  --readability-paragraph: .875rem;
  --readability-nav: 1.0625rem;
  /* Module settings are emitted on :root; body keeps the public reading floor. */
  --abcds-pl-text-size: var(--readability-small);
  --abcds-pdp-text-size: var(--readability-text);
}

/* Supporting text keeps its hierarchy without falling below 16px. */
body :is(small, .small, .form-text, .col-form-label-sm,
  .valid-feedback, .invalid-feedback, .valid-tooltip, .invalid-tooltip,
  .dropdown-header, .figure-caption, .blockquote-footer,
  .password-requirements__length, .password-requirements__score,
  .copyright, .subcategory__link--with-image,
  .product-line__item--small-info, .product-line__item-availability-message,
  .product-line__item-unit-price, .product-line__item-regular-price,
  .product-line__item-discount, .cart-summary-product__attributes,
  .cart-summary-product__price, .cart-summary-product__quantity,
  .cart-summary-product__unit-price, .cart-summary-product__gift,
  .order-confirmation__product-quantity, .order-confirmation__product-attribute,
  .order-confirmation__product-reference, .order-confirmation__product-price-unit,
  .brand__description, .brand__products, .supplier__description, .supplier__products,
  .attachment__description, .attachment__link, .product-customization__label,
  .product-customization__message, .product-customization__image-remove,
  .checkout-steps__subtitle, .search-filters__slider-values,
  .ps-emailalerts__product-delete, .ps-emailalerts__product-attributes) {
  font-size: var(--readability-small);
  line-height: 1.5;
}
body :is(h6, .h6, pre, code, kbd) { font-size: var(--readability-small); }
body :is(.order-history__cell--reference, .order-history__cell--date,
  .order-history__cell--total, .order-history__cell--payment),
body .order-history__cell::before,
body .grid-table__cell::before,
body .page-guest-tracking .order-message__date,
body .page-order-detail .order-message__date {
  font-size: var(--readability-small);
  line-height: 1.5;
}
body.page-guest-tracking .order-message__date,
body.page-order-detail .order-message__date,
body #checkout-personal-information-step em,
body .product-comment-modal #ratingNotChosen {
  font-size: var(--readability-small);
  line-height: 1.5;
}

/* Native controls have their own Bootstrap size variables. */
body .btn:not(.btn-lg),
body .btn-group-sm > .btn { --bs-btn-font-size: var(--readability-small); --bs-btn-line-height: 1.5; }
body :is(.form-control-sm, .form-select-sm),
body .input-group-sm > :is(.form-control, .form-select, .input-group-text, .btn) {
  font-size: var(--readability-small);
  line-height: 1.5;
}
body :is(.form-control, .form-select) { min-height: 44px; }
body .breadcrumb { --bs-breadcrumb-font-size: var(--readability-small); line-height: 1.5; }
body .pagination-sm { --bs-pagination-font-size: var(--readability-small); }
body .badge { --bs-badge-font-size: var(--readability-small); line-height: 1.4; }
body .tooltip { --bs-tooltip-font-size: var(--readability-small); }
body .popover { --bs-popover-font-size: var(--readability-small); }
body .toast { --bs-toast-font-size: var(--readability-small); }
body .header-block__badge {
  font-size: .875rem;
  min-width: 1.5rem;
  height: 1.5rem;
  line-height: 1.2;
}
body .noui-tooltip { font-size: var(--readability-small); line-height: 1.5; }

/* Native catalog and product details. No generic span/i/button font reset. */
body .product-miniature .product-flags .badge,
body .product-miniature .product-list-review .product-list-comments-number,
body.page-product :is(.product__tax-infos, .product__delivery-infos,
  .product__minimal-quantity, .product__unit-price,
  .product__discount-amount, .product__discount-percentage),
body.page-product #product-comments-list .comment__top {
  font-size: var(--readability-small);
  line-height: 1.5;
}
body .product-miniature__title {
  font-size: var(--readability-text);
  line-height: 1.45;
}
body#product .product__description table { font-size: var(--readability-small); line-height: 1.5; }

/* Category navigation stays readable in the bar, flyouts and mobile menu. */
body .ps-mainmenu__tree-link,
body .ps-mainmenu--mobile .menu__link {
  font-size: var(--readability-nav);
  font-weight: 700;
  line-height: 1.45;
}
body .ps-mainmenu .submenu__left-item,
body .ps-mainmenu .menu-item:not(.menu-item__group-main-item),
body .ps-categorytree a {
  font-size: var(--readability-small);
  font-weight: 600;
  line-height: 1.5;
}
body .ps-mainmenu--mobile .menu__link { min-height: 44px; }

/* Datasheet icons retain their configured sizes; only their text is enlarged. */
body .abcds-pl,
body .product-miniature .abcds-pl,
body :is(.abcds-table, .abcds-product-ref, .abcds-group-desc, .abcds-group-description) {
  font-size: var(--readability-small);
  line-height: 1.5;
}
body .abcds-pdp { font-size: var(--readability-text); line-height: 1.5; }

/* The review module fixes catalog counts at 12px with a 14px line height. */
body .reviews_list_stars { line-height: 1.5; }
body .reviews_list_stars > span:not(.star_content) {
  font-size: var(--readability-small);
  line-height: 1.5;
}

/* Cookie controls use a module font shorthand, independent of body size. */
body .mscc,
body :is(.mscc-required, .mscc-providers),
body .mscc-policy table {
  font-size: var(--readability-small);
  line-height: 1.55;
}

/* One-page checkout module uses fixed 12–14px rules and loads after native CSS.
   Scoped selectors correct those values without editing the shared module. */
body#checkout .abopc-header nav { font-size: var(--readability-small); line-height: 1.5; }
body #abopc :is(.abopc-back, .abopc-number, .form-label, .form-check-label,
  .abopc-summary-note,
  .abopc-legal-links, .abopc-footer, .delivery-option__carrier-name,
  .delivery-option__content, .delivery-option__price, .payment-option__label,
  .abopc-city-options [role="option"]) {
  font-size: var(--readability-small);
  line-height: 1.5;
}
body #abopc .abopc-extra > summary,
body #abopc .abopc-summary-heading a,
body #abopc .cart-summary__line:not(.abopc-grand-total),
body #abopc .cart-voucher .accordion-button,
body #abopc .abopc-guarantee > a:not(.abopc-notice-link),
body #abopc #abopc-notice-dialog > a {
  font-size: var(--readability-small);
  line-height: 1.5;
}
body #abopc :is(.form-control, .form-select, .btn),
body #abopc #personal-information-tabs .nav-link {
  font-size: var(--readability-small);
  line-height: 1.5;
}
body #abopc :is(.abopc-final-total, .abopc-status, .alert, .payment-option__additional-information) {
  font-size: var(--readability-text);
  line-height: 1.6;
}
body #abopc .abopc-card-heading h2,
body #abopc .abopc-guarantee h2,
body #abopc .abopc-durability-label h3 {
  font-size: var(--readability-text);
  line-height: 1.45;
}

/* One paragraph scale for every storefront; the brand font is inherited. */
body :is(p, .rich-text, .category__description, .error__text),
body #abopc :is(p, .abopc-estimate, .abopc-total-note),
body#product :is(.product__description-short, .product__description),
body.page-product #product-comments-list .comment__text {
  font-size: var(--readability-paragraph);
  line-height: 1.65;
}

/* Keep native carousel swiping and allow two-finger image magnification. */
body:has(.el-product-tabs,.ab-product-tabs) .product-images-modal .carousel {
  touch-action:pan-y pinch-zoom;
}
