/* ==========================================================================
   Badd Kitty — global design system (ported 1:1 from the Shopify brand layer:
   snippets/bk-brand-system.liquid + config/settings_data.json tokens).
   Loaded on every page. Page-specific CSS is code-split (see inc/assets.php).
   ========================================================================== */

:root {
  /* Brand palette (bk-brand-system.liquid) */
  --bk-plum:    #1a0628;
  --bk-fuchsia: #dc4486;
  --bk-rose:    #bb3a72;
  --bk-cream:   #f7f5f4;
  --bk-border:  #e7dfe9;
  --bk-muted:   #4d3d55;

  /* Semantic tokens */
  --bk-bg:         #ffffff;
  --bk-fg:         #000000;
  --bk-heading:    var(--bk-plum);
  --bk-link:       var(--bk-rose);
  --bk-link-hover: var(--bk-plum);

  /* Typography (settings_data.json) */
  --bk-font-body:    'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bk-font-heading: 'Montserrat', 'Poppins', sans-serif;
  --bk-fw-body:    400;
  --bk-fw-body-b:  600;
  --bk-fw-sub:     500;
  --bk-fw-heading: 700;

  --bk-fs-body: 1rem;        /* 16px */
  --bk-fs-h1:   clamp(2rem, 1.4rem + 3vw, 3.5rem);   /* -> 56px */
  --bk-fs-h2:   clamp(1.75rem, 1.3rem + 2.2vw, 3rem); /* -> 48px */
  --bk-fs-h3:   clamp(1.4rem, 1.15rem + 1.2vw, 2rem);
  --bk-fs-h4:   1.25rem;
  --bk-lh-body: 1.7;

  /* Buttons / shapes (settings_data.json) */
  --bk-btn-primary-bg:   var(--bk-plum);
  --bk-btn-primary-fg:   #ffffff;
  --bk-btn-radius:       6px;
  --bk-badge-sale-bg:    var(--bk-rose);
  --bk-badge-sale-fg:    #ffffff;

  /* Layout */
  --bk-page-narrow: 780px;
  --bk-page-wide:   1200px;
  --bk-gutter:      1rem;
  --bk-logo-h:      48px;
  --bk-logo-h-mob:  28px;

  /* ---- Horizon base bridge --------------------------------------------
     The copied Shopify stylesheets reference these base-theme variables.
     Map them onto brand tokens so editorial/hub/card CSS renders correctly. */
  --bk-line:        var(--bk-border);
  --bk-hub-ink:     var(--bk-plum);
  --bk-hub-muted:   var(--bk-muted);
  --bk-hub-cream:   var(--bk-cream);
  --bk-hub-line:    var(--bk-border);
  --bk-hub-accent:  var(--bk-fuchsia);
  --header-height:        64px;
  --header-group-height:  64px;
  --layer-sticky:         100;
  --quick-add-collapsed-width: 2.75rem;
}

/* ---- Base ---------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bk-bg);
  color: var(--bk-fg);
  font-family: var(--bk-font-body);
  font-weight: var(--bk-fw-body);
  font-size: var(--bk-fs-body);
  line-height: var(--bk-lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--bk-heading);
  font-family: var(--bk-font-heading);
  font-weight: var(--bk-fw-heading);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
  text-wrap: balance;
}
h1 { font-size: var(--bk-fs-h1); }
h2 { font-size: var(--bk-fs-h2); }
h3 { font-size: var(--bk-fs-h3); }
h4 { font-size: var(--bk-fs-h4); }

p { margin: 0 0 1rem; }

a { color: var(--bk-link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover, a:focus-visible { color: var(--bk-link-hover); }

/* ---- Accessibility (PERFORMANCE.md: contrast, focus, target-size, skip link) */
:focus-visible {
  outline: 3px solid var(--bk-fuchsia);
  outline-offset: 3px;
}

.bk-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--bk-plum);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 6px 0;
}
.bk-skip-link:focus { left: 0; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

/* ---- Buttons ------------------------------------------------------------- */
.button,
button,
.bk-btn,
input[type='submit'],
[type='submit'] {
  min-height: 44px;              /* target-size */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--bk-font-heading);
  font-weight: var(--bk-fw-sub);
  line-height: 1.2;
  border: 0;
  border-radius: var(--bk-btn-radius);
  cursor: pointer;
  text-decoration: none;
}
.bk-btn--primary,
.button.alt,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--bk-btn-primary-bg);
  color: var(--bk-btn-primary-fg);
}
.bk-btn--primary:hover { background: #2a0f3d; color: #fff; }
.bk-btn--secondary {
  background: transparent;
  color: var(--bk-fg);
  border: 1px solid var(--bk-plum);
}

/* ---- Sale / stock badges ------------------------------------------------- */
.bk-badge,
.woocommerce span.onsale {
  background: var(--bk-badge-sale-bg);
  color: var(--bk-badge-sale-fg);
  font-family: var(--bk-font-heading);
  font-weight: var(--bk-fw-heading);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  min-height: 0;
  min-width: 0;
}

/* ---- Layout containers --------------------------------------------------- */
.bk-container { width: 100%; max-width: var(--bk-page-wide); margin: 0 auto; padding-inline: var(--bk-gutter); }
.bk-container--narrow { max-width: var(--bk-page-narrow); }

/* ---- Header / footer base (Horizon base reconstructed to brand) ---------- */
.bk-site-header {
  border-bottom: 1px solid var(--bk-border);
  background: var(--bk-bg);
}
.bk-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.bk-logo { display: inline-flex; align-items: center; }
.bk-logo img { height: var(--bk-logo-h); width: auto; }
.bk-logo--text {
  font-family: var(--bk-font-heading);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  color: var(--bk-plum);
  text-decoration: none;
}
.bk-nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.bk-nav a { color: var(--bk-plum); font-family: var(--bk-font-heading); font-weight: var(--bk-fw-sub); text-decoration: none; }

.bk-site-footer {
  border-top: 1px solid var(--bk-border);
  background: var(--bk-cream);
  color: var(--bk-muted);
  margin-top: 3rem;
  padding-block: 2.5rem;
}
.bk-site-footer a { color: var(--bk-rose); }

@media (max-width: 749px) {
  .bk-logo img { height: var(--bk-logo-h-mob); }
}

/* ==========================================================================
   Editorial / non-catalog page styling — ported verbatim from
   bk-brand-system.liquid so content pages match the Shopify build 1:1.
   ========================================================================== */

.bk-seo-landing,
.bk-location-landing,
.bk-store-page,
.bk-editorial-article,
.bk-core-page {
  color: #000;
  font-family: var(--bk-font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  margin: 0 auto;
  max-width: var(--bk-page-narrow);
}

.bk-seo-landing h2, .bk-location-landing h2, .bk-store-page h2,
.bk-editorial-article h2, .bk-editorial-article h3,
.bk-core-page h2, .bk-core-page h3 {
  color: var(--bk-plum);
  font-family: var(--bk-font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.bk-content-section { border-top: 1px solid var(--bk-border); margin-top: 2.5rem; padding-top: 2.5rem; }
.bk-lead { color: var(--bk-muted); font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem); line-height: 1.65; }

.bk-content-section a, .bk-editorial-article a, .bk-core-page a {
  color: var(--bk-rose); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
}
.bk-content-section a:hover, .bk-content-section a:focus-visible,
.bk-editorial-article a:hover, .bk-editorial-article a:focus-visible,
.bk-core-page a:hover, .bk-core-page a:focus-visible { color: var(--bk-plum); }

.bk-content-section ul, .bk-core-page ul { padding-left: 1.35rem; }
.bk-content-section li + li, .bk-core-page li + li { margin-top: 0.65rem; }

.bk-faq details, .bk-core-page details {
  background: #fff; border: 1px solid var(--bk-border); border-radius: 6px; margin-top: 0.75rem; padding: 1rem 1.125rem;
}
.bk-faq summary, .bk-core-page summary {
  color: var(--bk-plum); cursor: pointer; font-family: var(--bk-font-heading); font-weight: 700;
}
.bk-faq details p, .bk-core-page details p { color: var(--bk-muted); margin: 0.85rem 0 0; }

.bk-trust, .bk-store-experience, .bk-core-highlight {
  background: var(--bk-cream); border-top: 0; border-radius: 6px; padding: 2rem;
}
.bk-store-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 1.5rem; }
.bk-store-card { border: 1px solid var(--bk-border); border-radius: 6px; padding: 1.25rem; }

.bk-editorial-article blockquote, .bk-editorial-article aside {
  border-left: 4px solid var(--bk-fuchsia); margin: 2rem 0; padding: 1rem 1.25rem;
}

@media (max-width: 749px) {
  .bk-seo-landing, .bk-location-landing, .bk-store-page, .bk-editorial-article, .bk-core-page { font-size: 1rem; }
  .bk-content-section { margin-top: 2rem; padding-top: 2rem; }
  .bk-trust, .bk-store-experience, .bk-core-highlight { margin-left: -1rem; margin-right: -1rem; padding: 1.5rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bk-seo-landing *, .bk-location-landing *, .bk-store-page *, .bk-editorial-article *, .bk-core-page * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
