/**
 * AVYN base — element defaults only (box model, typography from the
 * Customizer variables, the paper ground, the container). Everything with a
 * design lives in chrome.css and the per-area sheets under .avyn-* classes,
 * so page builders render their own widgets untouched.
 */

/* ── Box model / normalize (the values the ported design was built on) ── */
html { box-sizing: border-box; -webkit-text-size-adjust: 100%; }
/* The approved site rendered with a 91.2% root font size on tablets and
   phones (every rem in the design scales with it). Kept verbatim. */
@media (max-width: 921px) { html { font-size: 91.2%; } }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; }
img, video { max-width: 100%; height: auto; border: 0; }
figure { margin: 0; }
hr { box-sizing: content-box; height: 0; }
small { font-size: 80%; }
:where(table) { border-collapse: separate; border-spacing: 0; border: 1px solid var(--avyn-rule); border-width: 1px 0 0 1px; margin: 0 0 1.5em; width: 100%; }
:where(th, td) { border: 1px solid var(--avyn-rule); border-width: 0 1px 1px 0; padding: 0.7em 1em; text-align: left; }
:where(button, input, select, textarea) { font-family: inherit; font-size: 100%; line-height: 1.65; margin: 0; }
:where(button, select) { text-transform: none; }
:where(label, legend) { font-size: 14px; line-height: 20px; }
:where(fieldset legend) { margin-bottom: 1.5em; padding: 0 0.5em; }
:where(address) { margin: 0 0 1.5em; }
/* Text fields and generic buttons as the approved build rendered them
   (the component sheets restate their own paddings/colours on top). */
/* Form fields exactly as the approved build rendered them. The `html`
   prefix gives these the (0,1,1) weight the old theme's late dynamic rules
   had, so a bare class like .avyn-input still yields to them while the
   component sheets (which load later at the same weight) still win. */
html input[type="text"], html input[type="number"], html input[type="email"], html input[type="url"], html input[type="password"], html input[type="search"], html input[type="reset"], html input[type="tel"], html input[type="date"], html select, html textarea {
  color: #475569; background: var(--avyn-panel); border: 1px solid var(--avyn-rule); border-radius: 4px; -webkit-appearance: none;
  font-size: 1rem; font-style: normal; font-weight: 400; line-height: 24px; width: 100%; padding: 12px 16px;
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
}
html input[type="text"], html input[type="number"], html input[type="email"], html input[type="url"], html input[type="password"], html input[type="search"], html input[type="reset"], html input[type="tel"], html input[type="date"], html select { height: 40px; }
:where(button, .button, input[type="button"], input[type="submit"], input[type="reset"]) {
  background: var(--avyn-brand); color: #fff; border: 0; font-weight: 500; font-size: 1rem; line-height: 1em; padding: 15px 30px; cursor: pointer;
}
:where(fieldset) { border: 1px solid var(--avyn-rule); margin: 0; padding: 0.35em 0.625em 0.75em; }
:where(blockquote) { border-left: 5px solid var(--avyn-rule); padding: 20px; font-size: 1.2em; font-style: italic; margin: 0 0 1.5em; position: relative; }
:where(dd) { margin: 0 1.5em 1em; }
:where(p) { margin: 0 0 1.75em; }
:where(ol, ul) { margin: 0 0 1.5em 3em; padding: 0; }
:where(li > ul, li > ol) { margin-bottom: 0; }

/* ── Typography from the Customizer variables ────────────────────────── */
body {
  font-family: var(--avyn-font-body); font-size: var(--avyn-text-size);
  font-weight: var(--avyn-text-weight); line-height: var(--avyn-text-lh);
  letter-spacing: var(--avyn-text-ls); text-transform: var(--avyn-text-tt);
  color: var(--avyn-graphite);
}
:where(h1, h2, h3, h4, h5, h6) {
  clear: both; margin: 0; color: var(--avyn-ink);
  font-family: var(--avyn-font-heading); font-weight: var(--avyn-heading-weight);
  letter-spacing: var(--avyn-heading-ls); text-transform: var(--avyn-heading-tt);
}
:where(h1) { font-size: var(--avyn-h1-size); line-height: var(--avyn-heading-lh, 1.4); }
:where(h2) { font-size: var(--avyn-h2-size); line-height: var(--avyn-heading-lh, 1.3); }
:where(h3) { font-size: var(--avyn-h3-size); line-height: var(--avyn-heading-lh, 1.3); }
:where(h4) { font-size: var(--avyn-h4-size); line-height: var(--avyn-heading-lh, 1.2); }
:where(h5) { font-size: var(--avyn-h5-size); line-height: var(--avyn-heading-lh, 1.2); }
:where(h6) { font-size: var(--avyn-h6-size); line-height: var(--avyn-heading-lh, 1.25); }
/* The page title the design rendered with: 2rem/600, 1.2 leading, tight bottom margin. */
.avyn-page-title {
  font-family: var(--avyn-font-heading); font-weight: 600; font-size: 2rem; line-height: 1.2; margin: 0 0 0.6em; color: var(--avyn-ink);
  letter-spacing: var(--avyn-heading-ls); text-transform: var(--avyn-heading-tt);
}
:where(.entry-content p) { margin-bottom: 1.6em; }
:where(.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6) { margin-bottom: 20px; }
.entry-content > :last-child { margin-bottom: 0; }
/* The approved layouts were built under a WooCommerce-era rule that gave
   every h2 a 0.7em bottom margin once Woo's script tagged the body; the
   product cards and section heads rely on that spacing. Kept verbatim. */
.woocommerce-js h2 { margin-bottom: 0.7em; }
:where(a) { color: var(--avyn-brand); text-decoration: none; }
:where(a:hover) { color: var(--avyn-brand-deep); }
/* Button typography only (family/weight/size/spacing/transform); colours and
   paddings stay with chrome.css / WooCommerce / the block. The doubled
   selector out-ranks chrome.css's `body .avyn-btn` so the Customizer values
   apply — their defaults equal the design's hard-coded values. */
html body .avyn-btn, html body button.avyn-btn, html body a.avyn-btn, html body .wp-block-button__link, html body .woocommerce .button, html body input[type="submit"] {
  font-family: var(--avyn-font-button); font-weight: var(--avyn-button-weight);
  font-size: var(--avyn-button-size); letter-spacing: var(--avyn-button-ls); text-transform: var(--avyn-button-tt);
}

/* ── Accessibility helpers ───────────────────────────────────────────── */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; height: auto; width: auto; margin: 0; padding: 0.75rem 1rem; position: fixed; top: 0; left: 0; z-index: 100000; background: var(--avyn-ink); color: var(--avyn-panel); font-size: 0.875rem; text-decoration: none; }

/* ── The paper ground everywhere. The doubled selector outranks Elementor's
      body background declarations. ─────────────────────────────────────── */
html body, html body.elementor-default, html body .site, html body .site-content { background-color: var(--avyn-paper); }

/* The legacy Elementor footer's icon list overhangs the viewport by ~3px on
   phones; clip until the footer is rebuilt. */
html body { overflow-x: clip; }

/* Reserve the scrollbar's width even on pages short enough not to scroll —
   otherwise the whole layout nudges sideways when navigating between a long
   and a short page (visible on account endpoints, worse under PJAX). */
html { scrollbar-gutter: stable; }

/* Small global refinements; page design itself is built in Elementor. */
.woocommerce a.button,
.woocommerce button.button.alt {
  background-color: var(--avyn-brand);
}

/* ── Container (Customizer → AVYN → Layout; per-page override) ──────────
   boxed: capped at the container width with side padding.
   full-width: edge to edge, no padding (what the old page-builder layout
   produced) — the shop, product, account, cart/checkout and front page.
   canvas: same as full-width; the Canvas template prints no chrome. */
.site-content { width: 100%; }
.avyn-container { width: 100%; margin: 0 auto; }
.avyn-layout-boxed .avyn-container { max-width: calc(var(--avyn-container-width) + 40px); padding: 0 20px; }
/* The boxed content margins the approved build used: none on phones and
   tablets, 4em below from 922px, 60px above and below from 1200px. */
@media (min-width: 922px) { .avyn-layout-boxed .avyn-container { padding-bottom: 4em; } }
@media (min-width: 1200px) { .avyn-layout-boxed .avyn-container { padding: 60px 20px; } }
.avyn-layout-full-width .avyn-container, .avyn-layout-canvas .avyn-container { max-width: none; padding: 0; }
.avyn-entry-header { margin-bottom: 1.5em; }
/* Full width keeps the page-builder-era entry box: 2em down, 20px in, and
   the title another 2em down inside it (the measured old geometry). */
.avyn-layout-full-width .avyn-entry { padding: 2em 20px 0; }
.avyn-layout-full-width .avyn-entry-header { margin-top: 2em; }
/* The single product view rendered inside the same 2em/20px box (the shop
   archive and account views did not). */
.avyn-layout-full-width.single-product .site-main { padding: 2em 20px 0; }
.avyn-entry-meta { margin: 0.25rem 0 0; font-family: var(--avyn-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--avyn-slate); }
.avyn-entry + .avyn-entry { margin-top: 3rem; }
.avyn-entry-thumb { display: block; margin: 0 0 1rem; }
.avyn-page-links { margin: 1.5rem 0 0; font-family: var(--avyn-mono); font-size: 0.75rem; }
.avyn-archive-header { margin-bottom: 2rem; }
.avyn-archive-description { color: var(--avyn-slate); }
.avyn-404 { text-align: center; padding: 3rem 0; }
.avyn-404 .search-form { max-width: 28rem; margin: 1.5rem auto; display: flex; gap: 0.5rem; }
.avyn-404 .search-form label { flex: 1; }
.avyn-404 .search-form input[type="search"] { width: 100%; }
.avyn-comments { margin-top: 3rem; border-top: 1px solid var(--avyn-rule); padding-top: 2rem; }
.avyn-comment-list { list-style: none; margin: 0; padding: 0; }
.avyn-comment-list .comment-body { border-bottom: 1px solid var(--avyn-rule); padding: 1rem 0; }
.avyn-comment-list .children { list-style: none; margin: 0 0 0 1.5rem; }
.pagination .nav-links, .avyn-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.pagination .page-numbers, .avyn-pagination .page-numbers {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.75rem; border: 1px solid var(--avyn-rule);
  font-family: var(--avyn-mono); font-size: 0.75rem; color: var(--avyn-graphite); text-decoration: none; background: var(--avyn-panel);
}
.pagination .page-numbers.current, .avyn-pagination .page-numbers.current { background: var(--avyn-ink); border-color: var(--avyn-ink); color: var(--avyn-panel); }
