*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* The browser's built-in [hidden] rule is a "normal" user-agent style, which
   loses to ANY normal author rule regardless of specificity — so every class
   below that sets its own `display` (`.modal-overlay`, `.mobile-nav`,
   `.cart-layout`, `.pdp__layout`, admin views, etc.) was silently cancelling
   the `hidden` attribute site-wide. Elements toggled via `el.hidden = true`
   stayed laid out, interactive, and (for anything without an opacity/transform
   hide of its own) visible — e.g. address/product modals never actually
   closed, and the closed mobile-nav panel stayed clickable on top of page
   content even on desktop. This single rule restores real hidden behavior
   everywhere; do not remove it or re-introduce a competing unconditional
   `display` without pairing it with `&[hidden]`. */
[hidden] {
  display: none !important;
}

body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-ink);
  background-color: var(--color-white);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

input {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-ink);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section {
  padding-block: var(--space-10);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
}

.section-title {
  font-size: var(--text-2xl);
}

.section-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-teal);
  white-space: nowrap;
  transition: color var(--duration-fast);
}

.section-link:hover {
  color: var(--color-teal-dark);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  h1 { font-size: var(--text-4xl); }
  .section { padding-block: var(--space-12); }
  .container { padding-inline: var(--space-6); }
}

@media (min-width: 1024px) {
  .container { padding-inline: var(--space-8); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
