/*
Theme Name: KoneqtiKit — Lifestyle
Theme URI: https://koneqti.vercel.app
Description: KoneqtiKit Family 4 (Soft Lifestyle/Blog) — a Kadence child theme built for Pinterest-driven content sites in hair, beauty, nail, fashion, crochet, craft, home, food, and fitness niches. Pairs with the koneqti-blocks plugin (recommended, not required — works standalone). Part of the Koneqti product suite.
Author: Koneqti
Author URI: https://koneqti.vercel.app
Template: kadence
Version: 1.0.20
Requires PHP: 7.4
Requires at least: 6.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: koneqtikit
*/

/* =================================================================
   KONEQTIKIT — FAMILY 4 (SOFT LIFESTYLE/BLOG)
   Design system locked per spec Section 4.5.
   Golden Rule (spec Section 1): this stylesheet NEVER targets content
   rendered by koneqti-blocks plugin (the_content output). It only styles
   the theme's own shell — header, footer, homepage, archive, single-post
   WRAPPER (title/meta/related-posts), and WooCommerce listing pages.
   ================================================================= */

/* -----------------------------------------------------------------
   1. DESIGN TOKENS — CSS custom properties
   --kk-accent is the ONE value that changes per niche/site (Section 4.5).
   Everything else references these tokens — never hardcode a hex below.
   ----------------------------------------------------------------- */
:root {
  /* Niche accent — overridden per-site via Customizer (inc/customizer.php
     outputs an inline <style> block that redefines just this one variable) */
  --kk-accent: #D9A88F; /* default: hair (rose gold) */
  --kk-accent-hover: color-mix(in srgb, var(--kk-accent) 85%, black 15%);

  /* Light mode palette (default) — Section 4.5 table */
  --kk-bg: #FAFAF8;
  --kk-surface: #FFFFFF;
  --kk-border: #ECE8E1;
  --kk-text: #1A1A1A;
  /* (Bug fix: #9C9890 measured at only 2.87:1 contrast against white —
     fails WCAG AA's 4.5:1 minimum for normal text. Confirmed as the cause
     of "header/footer text not visible" in real-site testing. #6B6862
     measures 5.55:1, comfortably passing, while still reading as a clearly
     secondary/muted tone rather than full-strength body text.) */
  --kk-text-meta: #6B6862;

  /* Footer tones — overridden by the chosen palette (functions.php injector).
     Defaults keep the original light footer so existing sites are unchanged
     until a non-classic palette is picked. */
  --kk-footer-bg: var(--kk-surface);
  --kk-footer-text: var(--kk-text);

  /* Spacing scale — 8px base unit */
  --kk-space-1: 8px;
  --kk-space-2: 16px;
  --kk-space-3: 24px;
  --kk-space-4: 32px;
  --kk-space-6: 48px;
  --kk-space-8: 64px;
  --kk-space-12: 96px;

  /* Typography */
  --kk-font-heading: "DM Serif Display", Georgia, serif;
  --kk-font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radius + shadow */
  --kk-radius-sm: 6px;
  --kk-radius-md: 10px;
  --kk-radius-lg: 14px;
  --kk-shadow-card: 0 1px 3px rgba(26, 26, 26, 0.06);
  --kk-shadow-hover: 0 12px 28px rgba(26, 26, 26, 0.10);

  /* Motion */
  --kk-transition-fast: 150ms ease;
  --kk-transition-base: 400ms ease-out;
}

/* Dark mode — Section 4.5: base palette swaps, --kk-accent stays the same
   (a niche's rose gold stays rose gold in dark mode, by design) */
[data-theme="dark"] {
  --kk-bg: #16140F;
  --kk-surface: #211E18;
  --kk-border: #3A352C;
  --kk-text: #F2EFE9;
  /* Intentionally NOT the same value as light mode's fixed --kk-text-meta
     above. #9C9890 measures 5.78:1 against this dark surface — already
     passes WCAG AA, so no change needed here. The light-mode bug was
     specific to that color sitting on a WHITE background, not a general
     problem with the hex value itself. */
  --kk-text-meta: #9C9890;
  --kk-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3);
  --kk-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* -----------------------------------------------------------------
   2. BASE / RESET
   ----------------------------------------------------------------- */
body.koneqtikit {
  background: var(--kk-bg);
  color: var(--kk-text);
  font-family: var(--kk-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--kk-transition-base), color var(--kk-transition-base);
}

.koneqtikit h1,
.koneqtikit h2,
.koneqtikit h3,
.koneqtikit .kk-font-heading {
  font-family: var(--kk-font-heading);
  font-weight: 400;
  color: var(--kk-text);
  line-height: 1.25;
}

.koneqtikit a {
  color: var(--kk-text);
  text-decoration: none;
}

.koneqtikit a:hover {
  color: var(--kk-accent);
}

.koneqtikit img {
  max-width: 100%;
  display: block;
}

/* -----------------------------------------------------------------
   3. LAYOUT CONTAINER
   ----------------------------------------------------------------- */
.kk-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--kk-space-4);
}

@media (max-width: 640px) {
  .kk-container {
    padding: 0 var(--kk-space-3);
  }
}

/* -----------------------------------------------------------------
   4. HEADER
   ----------------------------------------------------------------- */
.kk-header {
  background: var(--kk-surface);
  border-bottom: 1px solid var(--kk-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.kk-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--kk-space-3) var(--kk-space-4);
  max-width: 1180px;
  margin: 0 auto;
}

.kk-logo {
  font-family: var(--kk-font-heading);
  font-size: 21px;
  color: var(--kk-text);
  letter-spacing: 0.01em;
}

.kk-logo img {
  max-height: 36px;
}

.kk-nav {
  position: relative;
}

/* (Bug fix: items_wrap was stripping the <ul> entirely, so these rules
   previously had nothing to match — raw browser bullet points rendered
   instead. Now there's a real <ul class="kk-nav-list"> to target.) */
.kk-nav-list {
  display: flex;
  gap: var(--kk-space-4);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.kk-nav-list li {
  list-style: none;
  margin: 0;
  position: relative;
}

.kk-nav-list a {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kk-text-meta);
  transition: color var(--kk-transition-fast);
}

.kk-nav-list a:hover,
.kk-nav-list .current-menu-item > a {
  color: var(--kk-accent);
}

/* Submenus (e.g. "Recipes" with Dinners/Lunch/Soups children) — these were
   rendering as a flat, unstyled flood of bullets stacked over the hero.
   Hidden by default, revealed on hover/focus of the parent item only. */
.kk-nav-list .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--kk-surface);
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-md);
  box-shadow: var(--kk-shadow-hover);
  padding: var(--kk-space-1) 0;
  flex-direction: column;
  gap: 0;
  z-index: 60;
}

.kk-nav-list li:hover > .sub-menu,
.kk-nav-list li:focus-within > .sub-menu {
  display: flex;
}

.kk-nav-list .sub-menu a {
  display: block;
  width: 100%;
  padding: var(--kk-space-1) var(--kk-space-3);
  text-transform: none;
  letter-spacing: normal;
  font-size: 13px;
}

/* Dark mode toggle button */
.kk-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--kk-border);
  background: var(--kk-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--kk-transition-fast);
}

.kk-theme-toggle:hover {
  border-color: var(--kk-accent);
}

.kk-theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke: var(--kk-text);
}

.kk-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  /* (Bug fix: <button> elements don't reliably inherit text color from
     the page — browsers apply their own default/reset color to buttons,
     which can render the SVG icon below (stroke="currentColor") invisible
     or near-invisible. Confirmed via real-site testing: hamburger icon
     was not visible at all in the mobile header. Explicit color fixes it.) */
  color: var(--kk-text);
  padding: 0;
}

.kk-mobile-toggle svg {
  display: block;
  stroke: var(--kk-text);
}

@media (max-width: 860px) {
  .kk-nav { display: none; }
  .kk-mobile-toggle { display: flex; }

  /* Mobile nav open state — JS toggles .kk-nav-open (Bug fix: button now works) */
  .kk-nav.kk-nav-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--kk-surface);
    border-bottom: 1px solid var(--kk-border);
    padding: var(--kk-space-2) var(--kk-space-4);
    box-shadow: var(--kk-shadow-card);
  }
  .kk-nav.kk-nav-open .kk-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .kk-nav.kk-nav-open .kk-nav-list a {
    padding: var(--kk-space-2) 0;
    border-bottom: 1px solid var(--kk-border);
  }
  .kk-nav.kk-nav-open .kk-nav-list li:last-child > a { border-bottom: none; }
  /* Submenus expand inline on mobile instead of hover-popover */
  .kk-nav.kk-nav-open .sub-menu {
    display: block;
    position: static;
    border: none;
    box-shadow: none;
    padding-left: var(--kk-space-3);
  }
}

/* -----------------------------------------------------------------
   5. HERO (homepage featured post)
   ----------------------------------------------------------------- */
.kk-hero {
  position: relative;
  min-height: 320px;
  border-radius: var(--kk-radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin: var(--kk-space-6) auto;
  max-width: 1180px;
}

/* Modifier: used as a child inside .kk-featured-grid/.kk-side-col —
   those parents already handle spacing via grid gap, so the standalone
   hero's own margin/max-width would conflict. */
.kk-hero.kk-hero--in-grid {
  margin: 0;
  max-width: none;
  width: 100%;
  height: 100%;
}

.kk-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.kk-hero-overlay {
  position: absolute;
  inset: 0;
  /* (Bug fix round 2: the gradient-only approach still wasn't reliably
     readable on busy/light photos — confirmed by real-site screenshot.
     Switched to a solid dark panel anchored to the bottom, sized to fully
     contain the text, rather than relying on a gradient to "happen to be
     dark enough" wherever the title lands. Guarantees contrast regardless
     of the photo's own colors.) */
  background: linear-gradient(
    180deg,
    rgba(10, 8, 8, 0) 0%,
    rgba(10, 8, 8, 0.35) 40%,
    rgba(10, 8, 8, 0.94) 68%,
    rgba(10, 8, 8, 0.97) 100%
  );
}

.kk-hero-content {
  position: relative;
  padding: var(--kk-space-4) var(--kk-space-4) var(--kk-space-6);
  z-index: 2;
  width: 100%;
}

.kk-hero-tag {
  font-size: 11px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: var(--kk-space-2);
}

.kk-hero-title {
  font-family: var(--kk-font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  max-width: 540px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  /* (Critical bug fix: `.koneqtikit h1` from the global heading rule has
     higher CSS specificity than a single-class `.kk-hero-title` selector,
     so white was losing to the default dark text color — confirmed by
     real-site screenshot showing dark-on-dark, nearly invisible text.
     !important is justified here: this color must NEVER lose to the
     global heading rule regardless of selector order, since hero text
     sits on a photo and needs guaranteed contrast.) */
  color: #fff !important;
}

/* -----------------------------------------------------------------
   5.5 MAGAZINE FEATURED GRID — large story + 2 side stories
   Homepage variant: replaces the old single-hero-only layout with a
   real magazine feel (the "still too plain" feedback from real testing).
   ----------------------------------------------------------------- */
.kk-featured-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--kk-space-3);
  margin: var(--kk-space-6) 0;
}

@media (max-width: 860px) {
  .kk-featured-grid { grid-template-columns: 1fr; }
}

/* The large featured card — direct child of .kk-featured-grid, rendered
   by koneqtikit_render_feature_card() as <a class="kk-hero kk-hero--in-grid"> */
.kk-featured-grid > .kk-hero {
  min-height: 380px;
}

.kk-side-col {
  display: flex;
  flex-direction: column;
  gap: var(--kk-space-3);
}

/* The smaller side cards — direct children of .kk-side-col, same markup
   pattern as the main featured card, just shorter and with smaller type. */
.kk-side-col > .kk-hero {
  min-height: 178px;
  flex: 1;
}

.kk-side-col > .kk-hero .kk-hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(10, 8, 8, 0) 0%,
    rgba(10, 8, 8, 0.3) 35%,
    rgba(10, 8, 8, 0.92) 70%,
    rgba(10, 8, 8, 0.95) 100%
  );
}

.kk-side-col > .kk-hero .kk-hero-content {
  padding: var(--kk-space-3);
}

.kk-side-col > .kk-hero .kk-hero-title {
  font-size: 16px;
  max-width: none;
}

/* -----------------------------------------------------------------
   5.6 TRENDING GRID — one large card + smaller cards mixed
   ----------------------------------------------------------------- */
.kk-trending-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--kk-space-3);
  margin-bottom: var(--kk-space-6);
}

@media (max-width: 860px) {
  .kk-trending-grid { grid-template-columns: 1fr 1fr; }
  .kk-trending-grid .kk-card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .kk-trending-grid { grid-template-columns: 1fr; }
}

.kk-trending-grid .kk-card:first-child .kk-card-img-wrap {
  aspect-ratio: 16 / 10;
}

.kk-trending-grid .kk-card:first-child .kk-card-title {
  font-size: 21px;
  -webkit-line-clamp: 2;
}

/* -----------------------------------------------------------------
   5.7 SECTION BAR — label + "view all" link, used between grid sections
   ----------------------------------------------------------------- */
.kk-section-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: var(--kk-space-6) 0 var(--kk-space-3);
}

.kk-section-bar .kk-section-label {
  margin: 0;
}

.kk-section-bar a {
  font-size: 12px;
  color: var(--kk-accent);
  font-weight: 500;
}

/* -----------------------------------------------------------------
   5.8 COMPACT GRID — 4-across smaller cards for secondary sections
   ----------------------------------------------------------------- */
.kk-compact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--kk-space-3);
  margin-bottom: var(--kk-space-8);
}

@media (max-width: 860px) {
  .kk-compact-grid { grid-template-columns: repeat(2, 1fr); }
}

.kk-compact-grid .kk-card-title {
  font-size: 14px;
  font-family: var(--kk-font-body);
  font-weight: 500;
}

/* -----------------------------------------------------------------
   5.10 MINIMAL EDITORIAL LAYOUT (homepage variant 'minimal')
   Direction 1: asymmetric hero + side rail + 3-up grid.
   Self-contained; only used by template-parts/homepage/minimal.php.
   Shared shop-row/newsletter-strip styling is reused from 5.9/elsewhere.
   ----------------------------------------------------------------- */
.kk-min {
  padding-top: var(--kk-space-4);
}
.kk-min-hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--kk-space-3);
  margin-bottom: var(--kk-space-6);
}
@media (max-width: 860px) {
  .kk-min-hero-grid { grid-template-columns: 1fr; }
}

/* Featured hero (left) */
.kk-min-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 380px;
  border-radius: var(--kk-radius-lg);
  overflow: hidden;
  text-decoration: none;
}
@media (max-width: 860px) {
  .kk-min-hero { min-height: 300px; }
}
.kk-min-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 400ms ease;
}
.kk-min-hero:hover .kk-min-hero-bg { transform: scale(1.04); }
.kk-min-hero-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 14, 0.80), rgba(20, 18, 14, 0.05) 65%);
}
.kk-min-hero-tx {
  position: relative;
  padding: var(--kk-space-4);
  color: #fff;
}
.kk-min-hero-title {
  font-family: var(--kk-font-heading);
  font-size: 30px;
  line-height: 1.14;
  color: #fff;
  margin: 0;
}
@media (max-width: 540px) {
  .kk-min-hero-title { font-size: 24px; }
}

/* Kicker (shared light/accent variants) */
.kk-min-kicker {
  display: inline-block;
  font-family: var(--kk-font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: var(--kk-space-1);
  color: var(--kk-accent);
}
.kk-min-kicker--light { color: #fff; opacity: 0.92; }

/* Category label (small, on light surfaces) */
.kk-min-cat {
  display: block;
  font-family: var(--kk-font-body);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kk-accent);
  font-weight: 500;
  margin-bottom: 5px;
}

/* Side rail (right) */
.kk-min-rail {
  display: flex;
  flex-direction: column;
  gap: var(--kk-space-2);
  justify-content: space-between;
}
.kk-min-rail-card {
  display: flex;
  gap: var(--kk-space-2);
  align-items: center;
  text-decoration: none;
  color: var(--kk-text);
  transition: transform var(--kk-transition-fast);
}
.kk-min-rail-card:hover { transform: translateX(4px); }
.kk-min-rail-thumb {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: var(--kk-radius-md);
  background-size: cover;
  background-position: center;
  display: block;
}
.kk-min-rail-thumb--empty { background: var(--kk-border); }
.kk-min-rail-body { display: block; }
.kk-min-rail-title {
  display: block;
  font-family: var(--kk-font-heading);
  font-size: 17px;
  line-height: 1.2;
  transition: color var(--kk-transition-fast);
}
.kk-min-rail-card:hover .kk-min-rail-title { color: var(--kk-accent); }

/* 3-up grid below */
.kk-min-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--kk-space-3);
  margin: var(--kk-space-4) 0 var(--kk-space-8);
  padding-top: var(--kk-space-4);
  border-top: 1px solid var(--kk-border);
}
@media (max-width: 860px) {
  .kk-min-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .kk-min-grid { grid-template-columns: 1fr; }
}
.kk-min-gcard {
  display: block;
  text-decoration: none;
  color: var(--kk-text);
}
.kk-min-gcard-thumb {
  display: block;
  width: 100%;
  height: 170px;
  border-radius: var(--kk-radius-md);
  background-size: cover;
  background-position: center;
  margin-bottom: var(--kk-space-2);
  transition: transform var(--kk-transition-fast);
}
.kk-min-gcard:hover .kk-min-gcard-thumb { transform: translateY(-3px); }
.kk-min-gcard-title {
  display: block;
  font-family: var(--kk-font-heading);
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 6px;
  transition: color var(--kk-transition-fast);
}
.kk-min-gcard:hover .kk-min-gcard-title { color: var(--kk-accent); }
.kk-min-gcard-meta {
  display: block;
  font-size: 12px;
  color: var(--kk-text-meta);
}

/* Section label above secondary bands */
.kk-min-section-head {
  margin: var(--kk-space-6) 0 var(--kk-space-3);
}
.kk-min-section-label {
  font-family: var(--kk-font-heading);
  font-size: 22px;
  line-height: 1.1;
  color: var(--kk-text);
}

/* Second grid row sits directly under its label (no top border/rule) */
.kk-min-grid--flush {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Browse-by-category strip */
.kk-min-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--kk-space-2);
  margin-bottom: var(--kk-space-8);
}
@media (max-width: 860px) {
  .kk-min-cats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .kk-min-cats { grid-template-columns: 1fr; }
}
.kk-min-cat-tile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--kk-space-2);
  padding: var(--kk-space-3);
  background: var(--kk-surface);
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-md);
  text-decoration: none;
  transition: border-color var(--kk-transition-fast), transform var(--kk-transition-fast);
}
.kk-min-cat-tile:hover {
  border-color: var(--kk-accent);
  transform: translateY(-2px);
}
.kk-min-cat-name {
  font-family: var(--kk-font-heading);
  font-size: 18px;
  line-height: 1.1;
  color: var(--kk-text);
}
.kk-min-cat-count {
  font-size: 12px;
  color: var(--kk-text-meta);
  white-space: nowrap;
}

/* -----------------------------------------------------------------
   5.11 BENTO LAYOUT (homepage variant 'bento')
   Direction 1: hero-left 2x2 + supporting tiles. Uses grid-template-
   areas for exact placement, with explicit collapses at each
   breakpoint (bento must NOT be left to auto-reflow on mobile).
   ----------------------------------------------------------------- */
.kk-bento-wrap {
  padding-top: var(--kk-space-4);
}
.kk-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 150px;
  gap: var(--kk-space-2);
  margin-bottom: var(--kk-space-8);
  grid-template-areas:
    "hero hero a a"
    "hero hero b c"
    "d    e    f f";
}
.kk-bento-hero { grid-area: hero; }
.kk-bento-a    { grid-area: a; }
.kk-bento-b    { grid-area: b; }
.kk-bento-c    { grid-area: c; }
.kk-bento-d    { grid-area: d; }
.kk-bento-e    { grid-area: e; }
.kk-bento-f    { grid-area: f; }

.kk-bento-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  border-radius: var(--kk-radius-lg);
  overflow: hidden;
  text-decoration: none;
  min-height: 0;
}
.kk-bento-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 400ms ease;
}
.kk-bento-tile:hover .kk-bento-bg { transform: scale(1.05); }
.kk-bento-bg--empty { background: var(--kk-border); }
.kk-bento-ov {
  position: absolute;
  inset: 0;
  /* Stronger, taller gradient so titles stay legible even on light/white
     images (agent-generated featured images vary widely in brightness).
     Goes near-opaque at the base, fades by ~75% up. */
  background: linear-gradient(to top,
    rgba(20, 18, 14, 0.88) 0%,
    rgba(20, 18, 14, 0.55) 30%,
    rgba(20, 18, 14, 0.12) 60%,
    transparent 78%);
}
.kk-bento-tx {
  position: relative;
  z-index: 2;
  padding: var(--kk-space-2);
  color: #fff;
}
.kk-bento-c {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 5px;
  /* shadow backstop: keeps the kicker readable over light image areas */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.kk-bento-t {
  display: block;
  font-family: var(--kk-font-heading);
  line-height: 1.15;
  color: #fff;
  /* shadow backstop: guarantees title contrast even where the gradient
     and a bright image meet. Subtle enough to be invisible on dark images. */
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.kk-bento-tile--big .kk-bento-t { font-size: 26px; }
.kk-bento-tile--med .kk-bento-t { font-size: 17px; }
.kk-bento-tile--sm  .kk-bento-t { font-size: 14px; }

/* Pinterest-style save button (appears on hover) */
.kk-bento-save {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--kk-transition-fast), transform var(--kk-transition-fast);
}
.kk-bento-tile:hover .kk-bento-save { opacity: 1; transform: none; }
.kk-bento-save svg { width: 15px; height: 15px; stroke: var(--kk-accent); }

/* Tablet: 2 columns, hero spans full width on top */
@media (max-width: 860px) {
  .kk-bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
    grid-template-areas:
      "hero hero"
      "hero hero"
      "a    a"
      "b    c"
      "d    e"
      "f    f";
  }
  .kk-bento-tile--big .kk-bento-t { font-size: 24px; }
}

/* Mobile: single column stack, each tile a comfortable height */
@media (max-width: 540px) {
  .kk-bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
    grid-template-areas:
      "hero"
      "a"
      "b"
      "c"
      "d"
      "e"
      "f";
  }
  .kk-bento-grid .kk-bento-tile--big { grid-row: span 1; }
  .kk-bento-save { opacity: 1; transform: none; } /* no hover on touch — always show */
}

/* -----------------------------------------------------------------
   5.12 CATEGORY SHOWCASE LAYOUT (homepage variant 'category')
   The "bento everywhere" showpiece: shared tile styling + 5 distinct
   grid patterns (A–E), each with its own mobile collapse.
   ----------------------------------------------------------------- */
/* Shared tile (same legibility treatment as bento Section 5.11) */
.kk-cs-wrap { padding-top: var(--kk-space-4); }
.kk-cs-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  border-radius: var(--kk-radius-lg);
  overflow: hidden;
  text-decoration: none;
  min-height: 0;
}
.kk-cs-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 400ms ease;
}
.kk-cs-tile:hover .kk-cs-bg { transform: scale(1.05); }
.kk-cs-bg--empty { background: var(--kk-border); }
.kk-cs-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(20, 18, 14, 0.88) 0%,
    rgba(20, 18, 14, 0.55) 30%,
    rgba(20, 18, 14, 0.12) 60%,
    transparent 78%);
}
.kk-cs-tx { position: relative; z-index: 2; padding: var(--kk-space-2); color: #fff; }
.kk-cs-c {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.kk-cs-t {
  display: block;
  font-family: var(--kk-font-heading);
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.kk-cs-tile--big .kk-cs-t { font-size: 24px; }
.kk-cs-tile--med .kk-cs-t { font-size: 17px; }
.kk-cs-tile--sm  .kk-cs-t { font-size: 14px; }
.kk-cs-save {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 3;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--kk-transition-fast), transform var(--kk-transition-fast);
}
.kk-cs-tile:hover .kk-cs-save { opacity: 1; transform: none; }
.kk-cs-save svg { width: 15px; height: 15px; stroke: var(--kk-accent); }

/* Pattern A — hero spotlight: big left + 3 stacked right */
.kk-cs-pa {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-auto-rows: 110px;
  gap: var(--kk-space-2);
  margin-bottom: var(--kk-space-6);
  grid-template-areas: "h a" "h b" "h c";
}
.kk-cs-h { grid-area: h; } .kk-cs-a { grid-area: a; }
.kk-cs-b { grid-area: b; } .kk-cs-c { grid-area: c; }

/* Pattern B — trio columns: 3 equal tall */
.kk-cs-pb {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 230px;
  gap: var(--kk-space-2);
  margin-bottom: var(--kk-space-6);
}

/* Pattern C — offset mosaic: wide + 2 small + tall */
.kk-cs-pc {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 120px;
  gap: var(--kk-space-2);
  margin-bottom: var(--kk-space-6);
  grid-template-areas: "w w s1 t" "w w s2 t";
}
.kk-cs-w { grid-area: w; } .kk-cs-s1 { grid-area: s1; }
.kk-cs-s2 { grid-area: s2; } .kk-cs-t { grid-area: t; }

/* Pattern D — filmstrip: big left + 4 small (2x2) */
.kk-cs-pd {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-auto-rows: 115px;
  gap: var(--kk-space-2);
  margin-bottom: var(--kk-space-6);
  grid-template-areas: "big a b" "big c d";
}
.kk-cs-big { grid-area: big; } .kk-cs-pd .kk-cs-a { grid-area: a; }
.kk-cs-pd .kk-cs-b { grid-area: b; } .kk-cs-pd .kk-cs-c { grid-area: c; }
.kk-cs-d { grid-area: d; }

/* Pattern E — even quad: 4 equal */
.kk-cs-pe {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: var(--kk-space-2);
  margin-bottom: var(--kk-space-6);
}

/* Tablet collapse */
@media (max-width: 860px) {
  .kk-cs-pa {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "h h" "a b" "c c";
  }
  .kk-cs-pb { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; }
  .kk-cs-pc {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "w w" "s1 s2" "t t";
  }
  .kk-cs-pd {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "big big" "a b" "c d";
  }
  .kk-cs-pe { grid-template-columns: 1fr 1fr; }
  .kk-cs-tile--big .kk-cs-t { font-size: 22px; }
}

/* Mobile collapse — everything single column, save always visible (no hover) */
@media (max-width: 540px) {
  .kk-cs-pa, .kk-cs-pb, .kk-cs-pc, .kk-cs-pd, .kk-cs-pe {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    grid-auto-rows: 200px;
  }
  .kk-cs-pa > *, .kk-cs-pb > *, .kk-cs-pc > *, .kk-cs-pd > *, .kk-cs-pe > * {
    grid-area: auto !important;
  }
  .kk-cs-save { opacity: 1; transform: none; }
}


/* -----------------------------------------------------------------
   5.13 COVER HERO LAYOUT (homepage variant 'cover')
   Full-bleed cover image + floating cards that overlap upward into it.
   Lower sections reuse kk-compact-grid etc.
   ----------------------------------------------------------------- */
/* Wrap establishes a positioning context so the float cards' negative
   margin + z-index reliably layer above the cover. */
.kk-cv-wrap { position: relative; }
.kk-cv-cover {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  height: 460px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.kk-cv-cover-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.kk-cv-cover-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 14, 0.62), rgba(20, 18, 14, 0.18));
}
.kk-cv-cover-tx {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--kk-space-4);
  color: #fff;
}
.kk-cv-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.92;
  margin-bottom: 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.kk-cv-cover-title {
  font-family: var(--kk-font-heading);
  font-size: 46px;
  line-height: 1.08;
  max-width: 60%;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}
.kk-cv-cover-title a { color: #fff; text-decoration: none; }
.kk-cv-cover-title a:hover { text-decoration: underline; text-underline-offset: 4px; }

.kk-cv-float {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--kk-space-3);
  margin-top: -90px;
  margin-bottom: var(--kk-space-8);
  position: relative;
  z-index: 3;
}
.kk-cv-fcard {
  background: var(--kk-surface);
  border-radius: var(--kk-radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(20, 18, 14, 0.16);
  text-decoration: none;
  color: var(--kk-text);
  transition: transform var(--kk-transition-fast), box-shadow var(--kk-transition-fast);
}
.kk-cv-fcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 34px rgba(20, 18, 14, 0.22);
}
.kk-cv-fcard-im {
  display: block;
  width: 100%;
  height: 150px;
  background-size: cover;
  background-position: center;
}
.kk-cv-fcard-im--empty { background: var(--kk-border); }
.kk-cv-fcard-bd { display: block; padding: var(--kk-space-2) var(--kk-space-3) var(--kk-space-3); }
.kk-cv-fcard-c {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kk-accent);
  font-weight: 600;
  margin-bottom: 6px;
}
.kk-cv-fcard-t {
  display: block;
  font-family: var(--kk-font-heading);
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.kk-cv-fcard-m { display: block; font-size: 12px; color: var(--kk-text-meta); }

@media (max-width: 860px) {
  .kk-cv-cover { height: 380px; }
  .kk-cv-cover-title { font-size: 34px; max-width: 80%; }
  .kk-cv-float { grid-template-columns: 1fr 1fr; margin-top: -70px; }
  .kk-cv-float .kk-cv-fcard:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  .kk-cv-cover { height: 300px; }
  .kk-cv-cover-title { font-size: 27px; max-width: 100%; }
  .kk-cv-float {
    grid-template-columns: 1fr;
    margin-top: var(--kk-space-4);
  }
  .kk-cv-float .kk-cv-fcard:nth-child(3) { grid-column: auto; }
}


.kk-newsletter-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--kk-space-3);
  background: linear-gradient(135deg, color-mix(in srgb, var(--kk-accent) 12%, var(--kk-surface)), var(--kk-surface));
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-lg);
  padding: var(--kk-space-4) var(--kk-space-4);
  margin: var(--kk-space-6) 0;
  flex-wrap: wrap;
}

.kk-newsletter-strip h3 {
  font-size: 17px;
  margin: 0 0 2px;
}

.kk-newsletter-strip p {
  font-size: 12px;
  color: var(--kk-text-meta);
  margin: 0;
}

.kk-newsletter-strip form {
  display: flex;
  gap: var(--kk-space-1);
  flex-shrink: 0;
}

.kk-newsletter-strip input {
  padding: 9px 12px;
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-sm);
  background: var(--kk-bg);
  color: var(--kk-text);
  font-size: 13px;
  width: 200px;
}

.kk-newsletter-strip button {
  background: var(--kk-accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--kk-radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--kk-transition-fast);
}

.kk-newsletter-strip button:hover {
  background: var(--kk-accent-hover);
}

/* -----------------------------------------------------------------
   6. SECTION LABELS
   ----------------------------------------------------------------- */
.kk-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--kk-text-meta);
  margin: var(--kk-space-6) 0 var(--kk-space-3);
}

/* -----------------------------------------------------------------
   7. CARD GRID (homepage + archive post cards)
   ----------------------------------------------------------------- */
.kk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--kk-space-4);
  margin-bottom: var(--kk-space-8);
}

@media (max-width: 860px) {
  .kk-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .kk-grid { grid-template-columns: 1fr; }
}

.kk-card {
  background: var(--kk-surface);
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-md);
  overflow: hidden;
  box-shadow: var(--kk-shadow-card);
  transition: transform var(--kk-transition-fast), box-shadow var(--kk-transition-fast), border-color var(--kk-transition-fast);

  /* Scroll fade-in state (Section 4.5 motion spec) — JS toggles .kk-visible */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--kk-transition-base), transform var(--kk-transition-base);
}

.kk-card.kk-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hover-lift — desktop/pointer devices only, per Section 4.5 */
@media (hover: hover) and (pointer: fine) {
  .kk-card:hover {
    transform: translateY(-3px);
    border-color: var(--kk-accent);
    box-shadow: var(--kk-shadow-hover);
  }
}

.kk-card-img-wrap {
  position: relative;
  aspect-ratio: 2 / 3; /* Pinterest-correct ratio, Section 4.5 + 8 */
  background: var(--kk-border);
  overflow: hidden;
}

.kk-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kk-card-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.kk-pin-btn {
  position: absolute;
  top: var(--kk-space-2);
  right: var(--kk-space-2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(20, 15, 15, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity var(--kk-transition-fast);
}

@media (hover: hover) and (pointer: fine) {
  .kk-card:hover .kk-pin-btn { opacity: 1; }
}

@media (hover: none) {
  .kk-pin-btn { opacity: 1; } /* always visible on touch devices */
}

.kk-card-body {
  display: block;
  padding: var(--kk-space-3);
  color: var(--kk-text);
}

.kk-card-body:hover {
  color: var(--kk-text);
}

.kk-card-cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--kk-accent);
  margin-bottom: var(--kk-space-1);
}

.kk-card-title {
  font-family: var(--kk-font-heading);
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: var(--kk-space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kk-card-meta {
  font-size: 11px;
  color: var(--kk-text-meta);
  display: flex;
  align-items: center;
  gap: var(--kk-space-1);
}

/* -----------------------------------------------------------------
   8. SHOP ROW (homepage + shop grid — Section 6/6.1, theme-owned only)
   ----------------------------------------------------------------- */
.kk-shop-row {
  display: flex;
  gap: var(--kk-space-3);
  overflow-x: auto;
  padding-bottom: var(--kk-space-2);
  margin-bottom: var(--kk-space-8);
  scrollbar-width: thin;
}

.kk-shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--kk-space-3);
  margin-bottom: var(--kk-space-8);
}

@media (max-width: 860px) {
  .kk-shop-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  .kk-shop-grid { grid-template-columns: repeat(2, 1fr); }
}

.kk-shop-card {
  min-width: 150px;
  background: var(--kk-surface);
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-md);
  flex-shrink: 0;
  transition: border-color var(--kk-transition-fast);
}

.kk-shop-row .kk-shop-card { flex-shrink: 0; }
.kk-shop-grid .kk-shop-card { min-width: 0; }

@media (hover: hover) and (pointer: fine) {
  .kk-shop-card:hover { border-color: var(--kk-accent); }
}

.kk-shop-img {
  aspect-ratio: 1 / 1;
  background: var(--kk-border);
  border-radius: var(--kk-radius-md) var(--kk-radius-md) 0 0;
  overflow: hidden;
}

.kk-shop-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kk-shop-name {
  font-size: 12px;
  color: var(--kk-text);
  margin: var(--kk-space-2) var(--kk-space-2) 2px;
  font-weight: 500;
}

.kk-shop-price {
  font-size: 12px;
  color: var(--kk-accent);
  font-weight: 500;
  margin: 0 var(--kk-space-2) var(--kk-space-2);
}

/* -----------------------------------------------------------------
   9. SINGLE POST WRAPPER (title/meta/related only — NEVER the_content)
   Golden Rule (Section 1): everything koneqti-blocks renders inside
   the_content keeps ITS OWN inline styles. This block intentionally
   stops styling at the content boundary.
   ----------------------------------------------------------------- */
.kk-post-head {
  max-width: 740px;
  margin: var(--kk-space-6) auto 0;
  padding: 0 var(--kk-space-4);
}

.kk-post-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--kk-accent);
  margin-bottom: var(--kk-space-2);
}

.kk-post-title {
  font-family: var(--kk-font-heading);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: var(--kk-space-3);
}

.kk-post-meta {
  font-size: 12px;
  color: var(--kk-text-meta);
  display: flex;
  gap: var(--kk-space-3);
  align-items: center;
  margin-bottom: var(--kk-space-3);
}

.kk-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--kk-accent);
  display: inline-block;
}

.kk-post-hero-img {
  border-radius: var(--kk-radius-lg);
  overflow: hidden;
  margin-bottom: var(--kk-space-4);
  aspect-ratio: 16 / 9;
}

.kk-post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* This wrapper holds the_content — zero styling rules target its contents.
   It exists ONLY to constrain max-width to match the post head above it. */
.kk-content-zone {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 var(--kk-space-4);
}

.kk-post-footer-zone {
  max-width: 1180px;
  margin: var(--kk-space-8) auto 0;
  padding: 0 var(--kk-space-4);
}

/* -----------------------------------------------------------------
   10. FOOTER
   ----------------------------------------------------------------- */
.kk-footer {
  background: var(--kk-footer-bg);
  color: var(--kk-footer-text);
  border-top: 1px solid var(--kk-border);
  margin-top: var(--kk-space-12);
  padding: var(--kk-space-8) 0 var(--kk-space-6);
}
/* When a palette sets a dark footer bg, headings/links/logo read in the
   palette's footer-text tone; the accent still pops for interactive bits. */
.kk-footer .kk-logo,
.kk-footer .kk-footer-heading,
.kk-footer h2,
.kk-footer h3 { color: var(--kk-footer-text); }
.kk-footer a:not(.kk-logo):not(.kk-social-ic):not(.btn) { color: var(--kk-footer-text); opacity: 0.85; }
.kk-footer a:not(.kk-logo):not(.kk-social-ic):not(.btn):hover { opacity: 1; color: var(--kk-accent); }

.kk-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--kk-space-6);
  margin-bottom: var(--kk-space-6);
}

@media (max-width: 700px) {
  .kk-footer-grid { grid-template-columns: 1fr; }
}

.kk-footer-tagline {
  font-size: 13px;
  color: var(--kk-text-meta);
  line-height: 1.6;
  max-width: 320px;
  margin-top: var(--kk-space-2);
}

.kk-footer-heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kk-text-meta);
  margin-bottom: var(--kk-space-2);
}

.kk-footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kk-footer-links li {
  list-style: none;
  margin: 0;
}

.kk-footer-links a {
  display: block;
  font-size: 13px;
  color: var(--kk-text);
  margin-bottom: var(--kk-space-1);
}

.kk-footer-bottom {
  border-top: 1px solid var(--kk-border);
  padding-top: var(--kk-space-3);
  font-size: 11px;
  color: var(--kk-text-meta);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--kk-space-2);
}

/* -----------------------------------------------------------------
   11. EMAIL CAPTURE
   ----------------------------------------------------------------- */
.kk-email-capture {
  background: var(--kk-surface);
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-lg);
  padding: var(--kk-space-6);
  text-align: center;
  margin: var(--kk-space-8) auto;
  max-width: 1180px;
}

.kk-email-capture h3 {
  font-size: 22px;
  margin-bottom: var(--kk-space-1);
}

.kk-email-capture p {
  font-size: 13px;
  color: var(--kk-text-meta);
  margin-bottom: var(--kk-space-3);
}

.kk-email-form {
  display: flex;
  gap: var(--kk-space-1);
  max-width: 380px;
  margin: 0 auto;
}

.kk-email-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-sm);
  background: var(--kk-bg);
  color: var(--kk-text);
  font-size: 13px;
}

.kk-email-form button {
  background: var(--kk-accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--kk-radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--kk-transition-fast);
}

.kk-email-form button:hover {
  background: var(--kk-accent-hover);
}

/* -----------------------------------------------------------------
   12. PAGINATION
   ----------------------------------------------------------------- */
.kk-pagination {
  margin: var(--kk-space-6) 0 var(--kk-space-12);
}

.kk-pagination .nav-links {
  display: flex;
  gap: var(--kk-space-1);
  justify-content: center;
  flex-wrap: wrap;
}

.kk-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-sm);
  background: var(--kk-surface);
  color: var(--kk-text);
  font-size: 14px;
  transition: border-color var(--kk-transition-fast), background var(--kk-transition-fast);
}

.kk-pagination .page-numbers:hover {
  border-color: var(--kk-accent);
}

.kk-pagination .page-numbers.current {
  background: var(--kk-accent);
  color: #fff;
  border-color: var(--kk-accent);
}

/* -----------------------------------------------------------------
   13. ACCESSIBILITY — prefers-reduced-motion (Section 4.5, required not optional)
   ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .kk-card,
  .kk-card.kk-visible,
  .koneqtikit * {
    transition: none !important;
    animation: none !important;
  }
  .kk-card {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* -----------------------------------------------------------------
   14. FOCUS STATES
   (Bug fix: no custom focus style existed anywhere, so keyboard/touch
   focus fell back to the browser default outline — visible as a jarring
   orange/blue ring on card links in testing. Replaced with a deliberate,
   on-brand focus ring that still meets accessibility requirements.)
   ----------------------------------------------------------------- */
.koneqtikit a:focus-visible,
.koneqtikit button:focus-visible,
.koneqtikit input:focus-visible {
  outline: 2px solid var(--kk-accent);
  outline-offset: 2px;
  border-radius: var(--kk-radius-sm);
}

/* Mouse-click focus (not keyboard) shouldn't show a ring at all — only
   :focus-visible (keyboard/assistive tech) gets the outline above. */
.koneqtikit a:focus:not(:focus-visible),
.koneqtikit button:focus:not(:focus-visible) {
  outline: none;
}
.kk-license-screen {
  max-width: 480px;
  margin: var(--kk-space-12) auto;
  text-align: center;
  padding: var(--kk-space-4);
}

.kk-license-screen h1 {
  font-size: 24px;
  margin-bottom: var(--kk-space-2);
}

.kk-license-screen p {
  color: var(--kk-text-meta);
  font-size: 14px;
  margin-bottom: var(--kk-space-4);
}

.kk-license-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-sm);
  margin-bottom: var(--kk-space-2);
  font-size: 14px;
  text-align: center;
  font-family: monospace;
}

.kk-license-form button {
  width: 100%;
  background: var(--kk-accent);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--kk-radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* =================================================================
   6. SWAPPABLE HEADER & FOOTER VARIANTS (spec Section 4.6)
   Shared building blocks + per-variant styles. Defaults (standard
   header / columns footer) already styled above; this covers the
   additional variants.
   ================================================================= */

/* ---- shared header bits ---- */
.kk-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Header: CENTERED ---- */
.kk-header--centered .kk-header-inner--centered {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.kk-header--centered .kk-header-logo-center {
  grid-column: 2;
  text-align: center;
}
.kk-header--centered .kk-header-actions--right {
  grid-column: 3;
  justify-self: end;
}
.kk-nav--centered {
  display: flex;
  justify-content: center;
  padding: var(--kk-space-2) 0;
  border-top: 1px solid var(--kk-border);
}
.kk-nav--centered .kk-nav-list {
  display: flex;
  gap: var(--kk-space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 640px) {
  .kk-header--centered .kk-header-inner--centered { grid-template-columns: auto 1fr; }
  .kk-header--centered .kk-header-logo-center { grid-column: 1; text-align: left; }
  .kk-header--centered .kk-header-actions--right { grid-column: 2; }
  .kk-nav--centered { display: none; }
}

/* ---- Header: MINIMAL ---- */
.kk-nav--hidden { display: none; }

/* ---- Header: SEARCH-FORWARD ---- */
.kk-header-search {
  position: relative;
  display: flex;
  align-items: center;
}
.kk-header-search-ic {
  position: absolute;
  left: 10px;
  color: var(--kk-text-meta);
  pointer-events: none;
}
.kk-header-search input {
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-md);
  padding: 8px 12px 8px 32px;
  font-size: 14px;
  background: var(--kk-surface);
  color: var(--kk-text);
  width: 180px;
  transition: width var(--kk-transition-fast), border-color var(--kk-transition-fast);
}
.kk-header-search input:focus {
  outline: none;
  border-color: var(--kk-accent);
  width: 220px;
}
@media (max-width: 860px) {
  .kk-header--search .kk-nav { display: none; }
  .kk-header-search input { width: 140px; }
  .kk-header-search input:focus { width: 160px; }
}
@media (max-width: 540px) {
  .kk-header-search { display: none; }
}

/* ---- Header: ANNOUNCEMENT BAR ---- */
.kk-announce {
  background: var(--kk-accent);
  color: #fff;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 9px var(--kk-space-3);
}
.kk-announce a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}
.kk-announce a:hover { text-decoration: underline; }

/* ---- shared footer bits ---- */
.kk-footer-copy { color: var(--kk-text-meta); font-size: 13px; }
.kk-footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kk-space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---- Footer: SIMPLE ---- */
.kk-footer--simple { padding: var(--kk-space-5) 0; }
.kk-footer-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--kk-space-3);
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .kk-footer-simple { flex-direction: column; text-align: center; gap: var(--kk-space-2); }
}

/* ---- Footer: NEWSLETTER-FORWARD ---- */
.kk-footer-nl {
  text-align: center;
  padding: var(--kk-space-6) 0 var(--kk-space-5);
  border-bottom: 1px solid var(--kk-border);
  margin-bottom: var(--kk-space-4);
}
.kk-footer-nl-title {
  font-family: var(--kk-font-heading);
  font-size: 28px;
  margin: 0 0 8px;
}
.kk-footer-nl-sub { color: var(--kk-text-meta); margin: 0 0 var(--kk-space-3); }
.kk-footer-nl-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}
.kk-footer-nl-form input {
  flex: 1;
  border: 1px solid var(--kk-border);
  border-radius: var(--kk-radius-md);
  padding: 12px 14px;
  font-size: 14px;
  background: var(--kk-surface);
  color: var(--kk-text);
}
.kk-footer-nl-form input:focus { outline: none; border-color: var(--kk-accent); }
.kk-footer-nl-form button {
  background: var(--kk-accent);
  color: #fff;
  border: none;
  border-radius: var(--kk-radius-md);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.kk-footer--newsletter .kk-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--kk-space-3);
  flex-wrap: wrap;
}
@media (max-width: 540px) {
  .kk-footer-nl-form { flex-direction: column; }
  .kk-footer--newsletter .kk-footer-bottom { flex-direction: column; text-align: center; }
}

/* ---- Footer: SOCIAL-FORWARD ---- */
.kk-footer--social { padding: var(--kk-space-6) 0 var(--kk-space-4); }
.kk-footer-social-top { text-align: center; margin-bottom: var(--kk-space-4); }
.kk-footer-socials {
  display: flex;
  justify-content: center;
  gap: var(--kk-space-2);
  margin-top: var(--kk-space-3);
}
.kk-social-ic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kk-surface);
  border: 1px solid var(--kk-border);
  color: var(--kk-text);
  transition: background var(--kk-transition-fast), color var(--kk-transition-fast), transform var(--kk-transition-fast);
}
.kk-social-ic:hover {
  background: var(--kk-accent);
  color: #fff;
  border-color: var(--kk-accent);
  transform: translateY(-2px);
}
.kk-footer--social .kk-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--kk-space-3);
  border-top: 1px solid var(--kk-border);
  padding-top: var(--kk-space-3);
  flex-wrap: wrap;
}
@media (max-width: 540px) {
  .kk-footer--social .kk-footer-bottom { flex-direction: column; text-align: center; }
}

/* ---- Footer: MEGA ---- */
.kk-footer--mega { padding: var(--kk-space-6) 0 var(--kk-space-4); }
.kk-footer-mega-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: var(--kk-space-4);
  margin-bottom: var(--kk-space-4);
}
.kk-footer-recent { display: flex; flex-direction: column; gap: var(--kk-space-2); }
.kk-footer-recent-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--kk-text);
}
.kk-footer-recent-im {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--kk-radius-sm);
  background-size: cover;
  background-position: center;
}
.kk-footer-recent-t {
  font-size: 13px;
  line-height: 1.3;
  transition: color var(--kk-transition-fast);
}
.kk-footer-recent-item:hover .kk-footer-recent-t { color: var(--kk-accent); }
.kk-footer--mega .kk-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--kk-border);
  padding-top: var(--kk-space-3);
}
@media (max-width: 860px) {
  .kk-footer-mega-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .kk-footer-mega-grid { grid-template-columns: 1fr; }
  .kk-footer--mega .kk-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* mega-brand column: a touch more breathing room for the lead block */
.kk-footer-mega-brand { padding-right: var(--kk-space-3); }

/* =================================================================
   6.5 MEGA HEADERS (6 styles: columns/featured/grid/discovery/shop/search)
   Shared hover-dropdown mechanism + per-style panel layouts. All panels
   inherit palette tokens. On touch/mobile the panels collapse to a simple
   stacked menu (mega panels are pointer-only).
   ================================================================= */
.kk-mega .kk-header-inner { position: relative; }
.kk-mega-nav { display: flex; }
.kk-mega-nav-list {
  display: flex;
  gap: var(--kk-space-3);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.kk-mega-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--kk-text);
  font-size: 15px;
  padding: 6px 0;
}
.kk-mega-item > a:hover { color: var(--kk-accent); }
.kk-mega-caret { font-size: 9px; opacity: 0.7; }

/* The panel: hidden by default, drops down full-width under the header */
.kk-mega-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--kk-surface);
  border-top: 1px solid var(--kk-border);
  box-shadow: 0 16px 36px rgba(20, 18, 14, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--kk-transition-fast), transform var(--kk-transition-fast), visibility var(--kk-transition-fast);
  z-index: 90;
}
.kk-mega-item--has-panel:hover .kk-mega-panel,
.kk-mega-item--has-panel:focus-within .kk-mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.kk-mega-panel-inner { padding: var(--kk-space-4) var(--kk-space-3); }

/* ---- COLUMNS ---- */
.kk-mega-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--kk-space-2) var(--kk-space-4);
}
.kk-mega-col-link {
  display: block;
  font-size: 14px;
  color: var(--kk-text);
  text-decoration: none;
  padding: 5px 0;
}
.kk-mega-col-link:hover { color: var(--kk-accent); }

/* ---- FEATURED ---- */
.kk-mega-featured { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--kk-space-4); }
.kk-mega-featured-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px var(--kk-space-3); align-content: start; }
.kk-mega-featured-links a { font-size: 14px; color: var(--kk-text); text-decoration: none; padding: 5px 0; }
.kk-mega-featured-links a:hover { color: var(--kk-accent); }
.kk-mega-featured-card { display: block; text-decoration: none; color: var(--kk-text); }
.kk-mega-featured-im { display: block; width: 100%; height: 130px; border-radius: var(--kk-radius-md); background-size: cover; background-position: center; margin-bottom: 10px; }
.kk-mega-featured-k { display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--kk-accent); font-weight: 600; margin-bottom: 4px; }
.kk-mega-featured-t { display: block; font-family: var(--kk-font-heading); font-size: 16px; line-height: 1.2; }

/* ---- IMAGE GRID ---- */
.kk-mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--kk-space-2); }
.kk-mega-tile { text-decoration: none; color: var(--kk-text); }
.kk-mega-tile-im { display: block; width: 100%; height: 90px; border-radius: var(--kk-radius-md); background-size: cover; background-position: center; margin-bottom: 7px; }
.kk-mega-tile-im--empty { background: var(--kk-border); }
.kk-mega-tile-nm { display: block; font-size: 13px; font-weight: 600; }
.kk-mega-tile-ct { display: block; font-size: 11px; color: var(--kk-text-meta); }
.kk-mega-tile:hover .kk-mega-tile-nm { color: var(--kk-accent); }

/* ---- DISCOVERY ---- */
.kk-mega-discovery { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--kk-space-4); }
.kk-mega-disc-h { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--kk-accent); font-weight: 600; margin-bottom: 10px; }
.kk-mega-disc-trend { display: grid; grid-template-columns: 1fr 1fr; gap: var(--kk-space-2); }
.kk-mega-disc-tc { text-decoration: none; color: var(--kk-text); }
.kk-mega-disc-im { display: block; width: 100%; height: 80px; border-radius: var(--kk-radius-sm); background-size: cover; background-position: center; margin-bottom: 6px; }
.kk-mega-disc-t { display: block; font-family: var(--kk-font-heading); font-size: 13px; line-height: 1.2; }
.kk-mega-disc-tc:hover .kk-mega-disc-t { color: var(--kk-accent); }
.kk-mega-disc-tiles { display: flex; flex-direction: column; gap: 6px; }
.kk-mega-disc-tl { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--kk-text); }
.kk-mega-disc-sw { width: 28px; height: 28px; border-radius: 7px; background: var(--kk-accent); opacity: 0.85; flex-shrink: 0; }
.kk-mega-disc-nm { font-size: 13px; font-weight: 500; }
.kk-mega-disc-ct { font-size: 11px; color: var(--kk-text-meta); margin-left: auto; }
.kk-mega-disc-tl:hover .kk-mega-disc-nm { color: var(--kk-accent); }
.kk-mega-disc-tags { margin-top: var(--kk-space-2); }
.kk-mega-disc-chip { display: inline-block; font-size: 11px; color: var(--kk-text-meta); border: 1px solid var(--kk-border); border-radius: 20px; padding: 4px 11px; margin: 0 5px 5px 0; text-decoration: none; }
.kk-mega-disc-chip:hover { border-color: var(--kk-accent); color: var(--kk-accent); }

/* ---- SHOP-AWARE ---- */
.kk-mega-shop { display: grid; grid-template-columns: 1fr 1.5fr; gap: var(--kk-space-4); }
.kk-mega-shop--noprod { grid-template-columns: 1fr; }
.kk-mega-shop-h { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--kk-accent); font-weight: 600; margin-bottom: 9px; }
.kk-mega-shop-links a { display: block; font-size: 14px; color: var(--kk-text); text-decoration: none; padding: 4px 0; }
.kk-mega-shop-links a:hover { color: var(--kk-accent); }
.kk-mega-shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--kk-space-2); }
.kk-mega-shop-card { text-decoration: none; color: var(--kk-text); }
.kk-mega-shop-im { display: block; width: 100%; height: 84px; border-radius: var(--kk-radius-md); background-size: cover; background-position: center; margin-bottom: 7px; }
.kk-mega-shop-nm { display: block; font-size: 12px; line-height: 1.25; margin-bottom: 3px; }
.kk-mega-shop-pr { display: block; font-size: 13px; font-weight: 600; color: var(--kk-accent); }

/* ---- SEARCH-LED ---- */
.kk-mega-search-box { display: flex; align-items: center; gap: 9px; border: 1.5px solid var(--kk-accent); border-radius: var(--kk-radius-md); padding: 11px 14px; margin-bottom: 13px; color: var(--kk-accent); }
.kk-mega-search-box input { border: none; background: transparent; font-size: 14px; color: var(--kk-text); width: 100%; }
.kk-mega-search-box input:focus { outline: none; }
.kk-mega-search-pop { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--kk-text-meta); font-weight: 600; margin-bottom: 8px; }
.kk-mega-search-tags { margin-bottom: var(--kk-space-2); }
.kk-mega-search-chip { display: inline-block; font-size: 12px; color: var(--kk-text-meta); background: var(--kk-bg); border-radius: 20px; padding: 5px 12px; margin: 0 5px 5px 0; text-decoration: none; }
.kk-mega-search-chip--hot { background: var(--kk-accent); color: #fff; }
.kk-mega-search-chip:hover { color: var(--kk-accent); }
.kk-mega-search-chip--hot:hover { color: #fff; opacity: 0.9; }
.kk-mega-search-trend { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--kk-space-2); margin-top: 6px; }
.kk-mega-search-tc { text-decoration: none; color: var(--kk-text); }
.kk-mega-search-im { display: block; width: 100%; height: 70px; border-radius: var(--kk-radius-sm); background-size: cover; background-position: center; margin-bottom: 6px; }
.kk-mega-search-t { display: block; font-size: 12px; line-height: 1.2; }
.kk-mega-search-tc:hover .kk-mega-search-t { color: var(--kk-accent); }

/* ---- MEGA: tablet + mobile (panels become inline, no hover) ---- */
@media (max-width: 980px) {
  .kk-mega-nav { display: none; } /* mega nav is pointer-only; mobile uses the toggle menu */
}

/* mega wrapper hooks (layout containers used by discovery/shop/search panels) */
.kk-mega-disc-sec { min-width: 0; }
.kk-mega-shop-prods { min-width: 0; }
.kk-mega-search { max-width: 720px; }
