/* ==========================================================================
   Hadjikyriakos — base layer
   Shared tokens + primitives. Area files (header.css, shop.css …) build on
   these; do not redefine them there.
   ========================================================================== */

:root {
  --hk-radius-sm: var(--wp--custom--radius--sm);
  --hk-radius: var(--wp--custom--radius--lg);
  --hk-radius-xl: var(--wp--custom--radius--xl);
  --hk-pill: var(--wp--custom--radius--pill);
  --hk-ease: var(--wp--custom--transition--base);
  --hk-ease-fast: var(--wp--custom--transition--fast);
  --hk-ease-slow: var(--wp--custom--transition--slow);
  --hk-shadow-sm: var(--wp--preset--shadow--sm);
  --hk-shadow: var(--wp--preset--shadow--md);
  --hk-shadow-lg: var(--wp--preset--shadow--lg);
  --hk-header-h: var(--wp--custom--header--height);
  --hk-bg: var(--wp--preset--color--base);
  --hk-surface: var(--wp--preset--color--surface);
  --hk-surface-2: var(--wp--preset--color--surface-2);
  --hk-line: var(--wp--preset--color--line);
  --hk-muted: var(--wp--preset--color--muted);
  --hk-ink: var(--wp--preset--color--contrast);
  --hk-ink-2: var(--wp--preset--color--contrast-2);
  --hk-accent: var(--wp--preset--color--accent);
  --hk-accent-strong: var(--wp--preset--color--accent-strong);
  --hk-accent-soft: var(--wp--preset--color--accent-soft);
  --hk-accent-text: #8f6000;
  --hk-sale: var(--wp--preset--color--danger);
  --hk-ok: var(--wp--preset--color--success);
  --hk-gutter: clamp(1rem, 4vw, 2.5rem);
  --hk-wide: calc(1360px + 2 * var(--hk-gutter));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01"; }
img, svg, video { max-width: 100%; height: auto; }
:where(a) { text-underline-offset: 0.18em; text-decoration-thickness: 1px; transition: color var(--hk-ease-fast); }
:focus-visible { outline: 3px solid var(--hk-accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--hk-accent-soft); color: var(--hk-ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Utilities ---------- */
.hk-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; }
.hk-container { width: 100%; max-width: var(--hk-wide); margin-inline: auto; padding-inline: var(--hk-gutter); }
.hk-eyebrow { font-size: var(--wp--preset--font-size--xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hk-accent-text); }
.hk-muted { color: var(--hk-muted); }
.hk-surface { background: var(--hk-surface); }
.hk-rounded { border-radius: var(--hk-radius); overflow: hidden; }

/* ---------- Reveal motion (JS adds .is-visible) ---------- */
.hk-js .hk-reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--hk-ease-slow), transform var(--hk-ease-slow); }
.hk-js .hk-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.hk-btn,
.wp-element-button,
.wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color var(--hk-ease-fast), color var(--hk-ease-fast), border-color var(--hk-ease-fast), transform var(--hk-ease-fast), box-shadow var(--hk-ease-fast);
}
.hk-btn { padding: .8rem 1.5rem; border-radius: var(--hk-pill); font-weight: 600; font-size: var(--wp--preset--font-size--sm); background: var(--hk-ink); color: #fff; }
.hk-btn:hover { background: var(--hk-ink-2); color: #fff; }
.hk-btn:active, .wp-element-button:active { transform: translateY(1px); }
.hk-btn--accent, .is-style-accent .wp-block-button__link { background: var(--hk-accent); color: var(--hk-ink); }
.hk-btn--accent:hover, .is-style-accent .wp-block-button__link:hover { background: var(--hk-accent-strong); color: var(--hk-ink); }
.hk-btn--ghost, .is-style-outline .wp-block-button__link { background: transparent; color: var(--hk-ink); border-color: var(--hk-line); }
.hk-btn--ghost:hover, .is-style-outline .wp-block-button__link:hover { border-color: var(--hk-ink); background: transparent; color: var(--hk-ink); }
.hk-btn--sm { min-height: 36px; padding: .5rem 1rem; font-size: var(--wp--preset--font-size--xs); }
.hk-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--hk-pill); border: 0; background: transparent; color: var(--hk-ink); cursor: pointer; transition: background-color var(--hk-ease-fast); position: relative; }
.hk-icon-btn:hover { background: var(--hk-surface); }
.hk-icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hk-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--hk-accent); color: var(--hk-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.hk-count:empty, .hk-count[data-count="0"] { display: none; }

/* ---------- Cards ---------- */
.hk-card { background: var(--hk-bg); border: 1px solid var(--hk-line); border-radius: var(--hk-radius); transition: box-shadow var(--hk-ease), transform var(--hk-ease), border-color var(--hk-ease); }
.hk-card:hover { box-shadow: var(--hk-shadow-lg); transform: translateY(-3px); border-color: transparent; }
.is-style-hk-card { background: var(--hk-bg); border: 1px solid var(--hk-line); border-radius: var(--hk-radius); padding: var(--wp--preset--spacing--40); }
.is-style-hk-panel { background: var(--hk-surface); border-radius: var(--hk-radius-xl); padding: var(--wp--preset--spacing--50); }

/* ---------- Badges / chips ---------- */
.hk-badge { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .6rem; border-radius: var(--hk-pill); font-size: 12px; font-weight: 650; line-height: 1.2; background: var(--hk-ink); color: #fff; }
.hk-badge--sale { background: var(--hk-sale); }
.hk-badge--accent { background: var(--hk-accent); color: var(--hk-ink); }
.hk-badge--soft { background: var(--hk-surface); color: var(--hk-ink); }
.hk-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border: 1px solid var(--hk-line); border-radius: var(--hk-pill); font-size: var(--wp--preset--font-size--sm); background: var(--hk-bg); color: var(--hk-ink); text-decoration: none; transition: border-color var(--hk-ease-fast), background var(--hk-ease-fast); }
.hk-chip:hover, .hk-chip.is-active { border-color: var(--hk-ink); }
.hk-chip.is-active { background: var(--hk-ink); color: #fff; }

/* ---------- Forms ---------- */
:where(input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=number], input[type=url], select, textarea) {
  width: 100%; min-height: 48px; padding: .75rem 1rem; font: inherit; font-size: var(--wp--preset--font-size--sm); color: var(--hk-ink);
  background: var(--hk-bg); border: 1px solid var(--hk-line); border-radius: var(--hk-radius-sm);
  transition: border-color var(--hk-ease-fast), box-shadow var(--hk-ease-fast);
}
:where(input, select, textarea):focus { outline: none; border-color: var(--hk-ink); box-shadow: 0 0 0 4px var(--hk-accent-soft); }
:where(label) { font-size: var(--wp--preset--font-size--sm); font-weight: 550; }

/* ---------- Section rhythm ---------- */
.hk-section { padding-block: var(--wp--preset--spacing--60); }
.hk-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: var(--wp--preset--spacing--40); }
.hk-section-head h2 { margin: 0; }

/* ---------- Horizontal rails (scroll-snap) ---------- */
.hk-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: var(--wp--preset--spacing--30); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.hk-rail::-webkit-scrollbar { display: none; }
.hk-rail > * { scroll-snap-align: start; }
@media (min-width: 1024px) { .hk-rail { grid-auto-columns: calc((100% - 3 * var(--wp--preset--spacing--30)) / 4); } }

/* ---------- Skeleton / loading ---------- */
.hk-skeleton { background: linear-gradient(90deg, var(--hk-surface) 25%, var(--hk-surface-2) 50%, var(--hk-surface) 75%); background-size: 200% 100%; animation: hk-shimmer 1.4s infinite; border-radius: var(--hk-radius-sm); }
@keyframes hk-shimmer { to { background-position: -200% 0; } }

/* ---------- Main content spacing ---------- */
.wp-site-blocks > main { min-height: 50vh; }

/* Kept from woocommerce-layout.css (no longer loaded outside cart/checkout/account). */
.woocommerce img, .woocommerce-page img { height: auto; max-width: 100%; }
