/*
 * Oxa base styles.
 * Resets, typography defaults, and layout primitives only.
 * Component styles live next to their templates under /components/<name>/styles.css.
 */

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

html, body { margin: 0; padding: 0; }

html {
  font-family: var(--nesa-font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--oxa-text);
  background: var(--oxa-bg);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

/*
 * No sideways scroll.
 *
 * Every band on this site is full-bleed and several are horizontal scrollers,
 * so a single element a few pixels too wide — a grid track that floors at
 * min-content, a `100vw` that forgot the scrollbar — turns the whole page into
 * a horizontal scroller with a strip of blank document on the right.
 *
 * `clip`, not `hidden`: `overflow: hidden` makes body a scroll container, which
 * silently breaks `position: sticky` on anything inside it. `clip` just clips.
 *
 * This is a guard, not a licence. It stops one stray element ruining the page,
 * but a section that genuinely overflows should still be fixed at the source —
 * with this on, the symptom is invisible, so check with
 * `document.documentElement.scrollWidth > innerWidth` rather than by eye.
 */
body {
  min-height: 100vh;
  overflow-x: clip;
}

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

a { color: inherit; text-decoration: none; transition: color var(--oxa-dur) var(--oxa-ease); }
a:hover { color: inherit; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--oxa-space-3) 0;
  font-family: var(--nesa-font-serif);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--nesa-ink);
}
h1 { font-size: var(--oxa-fs-3xl); line-height: 1.1; }
h2 { font-size: var(--oxa-fs-3xl); line-height: 1.15; }
h3 { font-size: var(--oxa-fs-2xl); line-height: 1.2; }
h4 { font-size: var(--oxa-fs-xl); }

/* The hero headline is the one place the design goes sans: heavy, uppercase,
 * tightly tracked — the opposite of the serif section titles. Opt in with
 * .nesa-display rather than making h1 do double duty. */
.nesa-display {
  font-family: var(--nesa-font-sans);
  font-size: var(--oxa-fs-4xl);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

p { margin: 0 0 var(--oxa-space-3) 0; }

button, input, select, textarea { font: inherit; color: inherit; }

/* Layout primitives — small set, intentionally not a full utility framework. */

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

.oxa-content {
  max-width: var(--oxa-content-width);
  margin-inline: auto;
}

.oxa-stack > * + * { margin-top: var(--oxa-space-3); }
.oxa-stack-lg > * + * { margin-top: var(--oxa-space-5); }

.oxa-section {
  padding-block: clamp(var(--oxa-space-5), 8vw, var(--oxa-space-8));
}

.oxa-eyebrow {
  display: inline-block;
  font-size: var(--oxa-fs-xs);
  font-family: var(--nesa-font-sans);
  text-transform: uppercase;
  letter-spacing: var(--nesa-track-wide);
  color: var(--nesa-ink-soft);
}

.oxa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.25rem;
  border-radius: 0;
  background: var(--nesa-ink);
  color: #fff;
  font-family: var(--nesa-font-sans);
  font-size: var(--oxa-fs-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--nesa-track-ui);
  border: 1px solid var(--nesa-ink);
  transition: background var(--oxa-dur) var(--oxa-ease), color var(--oxa-dur) var(--oxa-ease);
}
.oxa-btn:hover { background: transparent; color: var(--nesa-ink); }

.oxa-btn--ghost {
  background: #fff;
  color: var(--nesa-ink);
  border-color: var(--nesa-ink);
}
.oxa-btn--ghost:hover { background: var(--nesa-ink); color: #fff; }

.oxa-grid {
  display: grid;
  gap: var(--oxa-space-4);
}

.oxa-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.oxa-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.oxa-grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.oxa-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.oxa-render-error {
  background: #fff4f4;
  color: #842029;
  border: 1px solid #f5c2c7;
  padding: 0.75rem 1rem;
  border-radius: var(--oxa-radius);
  font-family: var(--oxa-font-mono);
  font-size: var(--oxa-fs-sm);
}

:focus-visible {
  outline: 2px solid var(--nesa-ink);
  outline-offset: 2px;
}

/* Visually-hidden helper for accessible labels. */
.oxa-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.oxa-site-header {
  border-bottom: 1px solid var(--oxa-border);
  background: var(--oxa-bg);
  padding-block: var(--oxa-space-3);
  position: sticky; top: 0; z-index: 5;
}
.oxa-site-nav {
  display: flex; align-items: center; justify-content: space-between;
}
.oxa-site-brand { font-weight: 600; }
.oxa-site-menu {
  display: flex; gap: var(--oxa-space-3);
  list-style: none; margin: 0; padding: 0;
}
.oxa-site-menu a { color: var(--oxa-muted); }
.oxa-site-menu a:hover { color: var(--oxa-text); }

.oxa-site-footer {
  padding-block: var(--oxa-space-4);
  color: var(--oxa-muted);
  border-top: 1px solid var(--oxa-border);
}

/* ── WooCommerce buttons ───────────────────────────────────────────────── */

/*
 * Base skin for WooCommerce's own buttons.
 *
 * inc/wc-buttons.php switches off WooCommerce's default button styling (it was
 * painting the add-to-cart purple), so anything it prints that the theme has no
 * specific rule for — Apliko kuponin, Përditëso shportën, Kthehu në dyqan —
 * would otherwise render as a raw browser button. Deliberately low specificity
 * so every existing rule for a specific button still wins.
 */
.woocommerce .button,
.woocommerce input.button,
.woocommerce button.button,
.woocommerce a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.75rem;
  border: 1px solid var(--nesa-ink);
  border-radius: 0;
  background: var(--nesa-ink);
  color: #fff;
  font-family: var(--nesa-font-sans);
  font-size: var(--oxa-fs-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--nesa-track-ui);
  line-height: 1;
  cursor: pointer;
  transition: background var(--oxa-dur) var(--oxa-ease), color var(--oxa-dur) var(--oxa-ease);
}
.woocommerce .button:hover,
.woocommerce input.button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover {
  background: #000;
  color: #fff;
}

/* Secondary weight for the ones WooCommerce marks as not-primary. */
.woocommerce .button:not(.alt):not(.checkout-button) {
  background: transparent;
  color: var(--nesa-ink);
}
.woocommerce .button:not(.alt):not(.checkout-button):hover {
  background: var(--nesa-ink);
  color: #fff;
}

/* Disabled: muted, never purple, and clearly not clickable. */
.woocommerce .button.disabled,
.woocommerce .button:disabled,
.woocommerce button.button.disabled,
.woocommerce button.button:disabled {
  background: var(--nesa-ink-soft);
  border-color: var(--nesa-ink-soft);
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}
