/**
 * TBC Contractica Custom Fonts
 *
 * TBCContractica-Regular: Default body text (400 weight)
 * TBCContracticaCAPS-Bold: Bold text with all caps (700 weight)
 *
 * Note: The bold font (700 weight) is designed in all caps.
 * When using font-weight: 700 or bold elements, text will automatically
 * render in the caps version of the font.
 */

/* Regular weight - default text */
@font-face {
  font-family: 'TBC Contractica';
  src: url('../../fonts/TBCContractica-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Medium weight - use regular for 500 */
@font-face {
  font-family: 'TBC Contractica';
  src: url('../../fonts/TBCContractica-Regular.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Semibold weight - use regular for 600 */
@font-face {
  font-family: 'TBC Contractica';
  src: url('../../fonts/TBCContractica-Regular.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Bold weight fallback inside the main family.
   Keep this for backward compatibility while we migrate explicit CAPS usage
   to a dedicated font-family below. */
@font-face {
  font-family: 'TBC Contractica';
  src: url('../../fonts/TBCContracticaCAPS-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Dedicated CAPS family - preferred for explicit targeting */
@font-face {
  font-family: 'TBC Contractica CAPS';
  src: url('../../fonts/TBCContracticaCAPS-Bold.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Legacy alias used inconsistently across the theme */
@font-face {
  font-family: 'TBC Contractica Caps';
  src: url('../../fonts/TBCContracticaCAPS-Bold.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Backward-compatible fallback: old theme code expects bold text to become CAPS */
body strong,
body b,
body .bold,
[style*="font-weight: 700"],
[style*="font-weight:700"] {
  text-transform: uppercase;
}

/* Explicit utility hooks for the dedicated CAPS family */
.gstore-font-contractica-caps,
.font-contractica-caps {
  font-family: 'TBC Contractica CAPS', 'TBC Contractica Caps', 'TBC Contractica', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
}

/* Base font stack with TBC Contractica as primary */
body {
  font-family: 'TBC Contractica', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

/* Headings use regular weight by default (not automatically uppercase) */
h1, h2, h3, h4, h5, h6 {
  font-family: 'TBC Contractica', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600; /* Use 600 so it stays as regular, not the caps bold version */
}

/* Only apply bold/caps when explicitly set to 700 or using strong/b tags */
h1 strong, h2 strong, h3 strong, h4 strong, h5 strong, h6 strong,
h1 b, h2 b, h3 b, h4 b, h5 b, h6 b,
.font-bold {
  font-weight: 700;
  text-transform: uppercase;
}

/* =============================================================================
 * Global Layout Fixes
 * ============================================================================= */

/* Prevent horizontal scroll caused by 100vw elements (mega menu, etc.) */
html {
  overflow-x: clip; /* Use 'clip' instead of 'hidden' - doesn't break position:sticky */
  width: 100%;
}

body {
  overflow-x: clip; /* Use 'clip' instead of 'hidden' - doesn't break position:sticky */
  width: 100%;
  position: relative;
}

/* Georgian glyphs render slightly high in the CAPS face only.
   Keep the wrapper generic, but only apply the vertical nudge in
   selectors that explicitly use the CAPS family. */
.gstore-ka-baseline {
  display: inline-block;
}

body .gstore-font-contractica-caps .gstore-ka-baseline,
body .font-contractica-caps .gstore-ka-baseline,
body .gstore-mobile-text .gstore-ka-baseline,
body #gstore-bottom-nav .nav-item > span:not(.nav-cart-badge) .gstore-ka-baseline,
body #gstore-edge-buttons .btn-edge-buy .gstore-ka-baseline,
body .gs-search-btn__label .gstore-ka-baseline,
body .woocommerce-checkout .entry-header .gstore-ka-baseline,
body .woocommerce-checkout .entry-title .gstore-ka-baseline,
body .autofill-soon-badge .gstore-ka-baseline,
body .coming-soon-badge .gstore-ka-baseline,
body .product-coupon-applied .coupon-tag .gstore-ka-baseline,
body .branch-only-badge .gstore-ka-baseline,
body .option-soon-badge .gstore-ka-baseline,
body .gww-s1-title .gstore-ka-baseline,
body .gww-pool-label .gstore-ka-baseline,
body .gww-auth-title .gstore-ka-baseline,
body .gww-auth-submit .gstore-ka-baseline,
body .gww-auth-google .gstore-ka-baseline,
body .gww-panel-tag .gstore-ka-baseline,
body .gww-panel-heading .gstore-ka-baseline,
body .gww-win-badge .gstore-ka-baseline,
body .gww-win-name .gstore-ka-baseline,
body .gww-copy-btn .gstore-ka-baseline {
  transform: translateY(1px);
}

body.home .gstore-badge.condition .gstore-ka-baseline{
    transform: translateY(-1px);
}

body.archive .product-card .gstore-badge-group .gstore-ka-baseline,
body.archive .summary-sort-flag.is-ka .summary-sort-flag__text {
    transform: translateY(1px);
}

.gstore-top-bar .gstore-info-box span,
body.archive .filters-panel .filters-global-footer .reset-btn .gstore-ka-baseline,
body.archive .filters-panel .accordion-title .gstore-ka-baseline,
body.archive .filters-panel .customCheckBox .gstore-ka-baseline,
body.archive .summary-sort-flag:not(.is-ka) .summary-sort-flag__text{
    transform: translateY(2px);
}