/*
 * SIGMAN base — typography, layout, buttons, forms, badges.
 * Values come from tokens.css (ported from the Shopify latest theme settings).
 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body-family);
  font-weight: var(--font-body-weight);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-foreground);
  background: var(--color-background);
}

/* Display headings: Bebas Neue, uppercase, positive tracking. Bebas ships one
   weight — pin 400 and block synthesis so browsers never fake a bold. h5/h6
   are metadata-level headings and stay on the body face. */
h1, h2, h3, h4 {
  font-family: var(--font-display-family);
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-transform: uppercase;
  line-height: var(--line-height-display-tight);
  margin: 0 0 0.5em;
}
h5, h6 {
  font-family: var(--font-heading-family);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(40px, 5vw, var(--font-size-h1)); letter-spacing: 0.03em; }
h2 { font-size: clamp(33px, 4.5vw, var(--font-size-h2)); letter-spacing: 0.04em; }
h3 { font-size: clamp(26px, 3.5vw, var(--font-size-h3)); letter-spacing: 0.05em; }
h4 { font-size: var(--font-size-h4); letter-spacing: 0.05em; }
h5 { font-size: var(--font-size-h5); font-weight: 600; line-height: 1.5; }
h6 { font-size: var(--font-size-h6); font-weight: 600; line-height: 1.5; }

a { color: inherit; }
p { margin: 0 0 1em; }
ul { padding: 0; }

.page-width {
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}
/* WooCommerce emits .screen-reader-text (sale prices, form labels, …) and its
   own stylesheets are dequeued in inc/assets.php, so the helper is defined here
   — without it those strings render as visible copy. */
.visually-hidden,
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-to-content-link:focus {
  position: fixed; top: 8px; left: 8px;
  z-index: 999;
  width: auto; height: auto;
  clip: auto;
  background: var(--color-background);
  padding: 10px 16px;
}

/* ── Buttons ── */
.sgm-btn,
button.sgm-btn,
.button,
.single_add_to_cart_button,
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body-family);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em; /* DM Sans is wider than the old condensed face */
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  padding: 14px 28px;
  border-radius: var(--button-radius);
  border: 0;
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  transition: opacity var(--sgm-dur-fast) var(--sgm-ease), transform var(--sgm-dur-fast) var(--sgm-ease);
}
@media (any-pointer: fine) {
  .sgm-btn:hover, .button:hover, .single_add_to_cart_button:hover:not(.disabled) { filter: brightness(1.2); }
}

/* ── Focus + selection: drawn from the palette, not browser defaults ── */
:where(a, button, [tabindex], summary, input, select, textarea):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
/* Media links sit inside overflow: hidden frames — draw the ring inside. */
:where(.sgm-card__media, .sgm-bento__card, .sgm-pdp__thumb) :focus-visible,
:where(.sgm-bento__card):focus-visible { outline-offset: -3px; }
/* Filled buttons carry white text, and the ring sits outside them on the
   page background — draw it in navy there; light buttons on dark get white. */
:where(.sgm-btn, .button, .single_add_to_cart_button, .sgm-buynow, .sgm-stickybar__btn, .sgm-cd__checkout):focus-visible { outline-color: var(--color-primary); }
:where(.sgm-newsletter, .sgm-footer, #header-component) :focus-visible { outline-color: #fff; }
::selection { background: var(--color-primary); color: #fff; }
.sgm-btn--secondary {
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
  border: var(--button-secondary-border);
}

/* ── Forms ── */
input[type='text'], input[type='email'], input[type='tel'], input[type='password'],
input[type='search'], input[type='number'], textarea, select {
  font-family: var(--font-body-family);
  font-size: 0.9rem;
  background: var(--input-bg);
  color: var(--input-text);
  border: var(--input-border);
  border-radius: var(--input-radius);
  padding: 10px 14px;
  max-width: 100%;
}

/* ── Badges (pill, top-right on media) ── */
.sgm-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 6px 10px;
  border-radius: var(--badge-radius);
}
.sgm-badge--sale { background: var(--badge-sale-bg); color: var(--badge-sale-text); }
.sgm-badge--soldout { background: var(--badge-soldout-bg); color: var(--badge-soldout-text); }
.sgm-badge--low { background: #fff; color: var(--color-sale); box-shadow: inset 0 0 0 1px currentColor; } /* outline: one filled red badge per card (Sale) */

/* Review stars — gold everywhere */
.sgm-star.on,
.sgm-stars__fg,
.sgm-vrev__stars,
.sgm-acc__rating .sgm-stars__fg { color: #f5a623 !important; }

/* ── Price display (Shopify style: sale big, compare-at small struck — sgm-luxe) ── */
.sgm-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sgm-price ins, .sgm-price .sgm-price__current { text-decoration: none; font-weight: 700; }
.sgm-price del, .sgm-price .sgm-price__compare {
  font-size: 0.82em;
  opacity: 0.55;
}

/* WooCommerce notices, minimal neutral styling */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  list-style: none;
  padding: 12px 16px;
  margin: 0 0 16px;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  background: #fafafa;
  font-size: 0.9rem;
}
.woocommerce-error { border-left-color: var(--color-sale); }

/* Generic section spacing rhythm */
.sgm-section { padding-block: var(--section-space); }
.sgm-section--tight { padding-block: var(--section-space-tight); }
.sgm-eyebrow {
  font-size: var(--sgm-text-eyebrow);
  letter-spacing: var(--sgm-tracking-eyebrow);
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.7;
}
