/* Storefront chrome, konfetki/prototip/index.html. */

/* Promo strip, :55–61. */
.k-promo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 16px;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: var(--typo-inverted);
  background: var(--warm-800);
}

.k-promo__more,
.k-promo__more:hover { color: var(--typo-brand-inverted); }
.k-promo__more { font-weight: 600; }

/* The zero-height sticky anchor is in layout.css (:66–78, :2260). */
.k-header .k-sticky-header__backdrop {
  opacity: 0;
  pointer-events: none;
}
.k-header--scrolled[data-variant="glass"] .k-sticky-header__backdrop { opacity: 1; }
.k-main--header-offset { padding-top: calc(2 * var(--k-hdr-top) + var(--k-hdr-h)); }

.k-header__frame {
  z-index: var(--k-overlay-layer-header);
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--k-side);
}

/* HG (:2093–2096): only the font size interpolates without rounding to whole pixels. */
.k-header {
  --k-hg-delta: calc(100cqw - 768px);
  --k-hg-pad-left: round(nearest, clamp(16px, 16px + var(--k-hg-delta) * .046875, 28px), 1px);
  --k-hg-gap: round(nearest, clamp(8px, 8px + var(--k-hg-delta) * .03125, 16px), 1px);
  --k-hg-left-gap: round(nearest, clamp(16px, 16px + var(--k-hg-delta) * .09375, 40px), 1px);
  --k-hg-nav-gap: round(nearest, clamp(16px, 16px + var(--k-hg-delta) * .046875, 28px), 1px);
  --k-hg-font: clamp(14px, 14px + var(--k-hg-delta) * .0078125, 16px);
  --k-hg-right-gap: round(nearest, clamp(4px, 4px + var(--k-hg-delta) * .015625, 8px), 1px);
  --k-hg-button: round(nearest, clamp(40px, 40px + var(--k-hg-delta) * .03125, 48px), 1px);
  --k-hg-badge: round(nearest, clamp(32px, 32px + var(--k-hg-delta) * .015625, 36px), 1px);
  --k-hg-cart-pad: round(nearest, clamp(14px, 14px + var(--k-hg-delta) * .015625, 18px), 1px);
  --k-hg-cart-gap: round(nearest, clamp(8px, 8px + var(--k-hg-delta) * .0078125, 10px), 1px);
  --k-hg-search-pad: round(nearest, clamp(12px, 12px + var(--k-hg-delta) * .015625, 16px), 1px);
  --k-search-width: clamp(200px, 19cqw, 280px); /* :2248–2250 */

  /* Light and glass palette and elevation, :25–31, :2228–2237. */
  --k-header-ink: var(--typo-primary);
  --k-header-bg: var(--bg-default);
  --k-header-ring: inset 0 0 0 1px var(--warm-300), 0 8px 24px rgba(37,37,37,0.06);
  --k-header-control-bg: var(--warm-100);
  --k-header-control-hover: #EDE4D8;
  --k-header-control-ring: none;
  --k-header-placeholder: var(--typo-secondary);
  --k-header-cart-ring: inset 0 0 0 1px var(--warm-300);
  color: var(--k-header-ink);
}

.k-header[data-variant="glass"] {
  --k-header-ink: var(--typo-inverted);
  --k-header-bg: var(--white-a18);
  --k-header-ring: inset 0 0 0 1px var(--white-a55);
  --k-header-control-bg: var(--white-a18);
  --k-header-control-hover: var(--white-a32);
  --k-header-control-ring: var(--k-header-ring);
  --k-header-placeholder: var(--white-a80);
  --k-header-cart-ring: none;
}

/* Capsule and left/right groups, :78–86. */
.k-header__capsule {
  height: var(--k-hdr-h);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--k-hg-gap);
  padding: 0 8px 0 var(--k-hg-pad-left);
  border-radius: 999px;
  background: var(--k-header-bg);
  box-shadow: var(--k-header-ring);
}

.k-header[data-variant="glass"] .k-header__capsule {
  backdrop-filter: blur(24px); /* :2231 */
  -webkit-backdrop-filter: blur(24px);
}

.k-header__left,
.k-header__nav,
.k-header__right {
  display: flex;
  align-items: center;
  min-width: 0;
}
.k-header__left { gap: var(--k-hg-left-gap); flex: 0 0 auto; }
.k-header__logo { display: block; flex: none; width: 47px; height: 44px; } /* :80 */
.k-header__nav {
  gap: var(--k-hg-nav-gap);
  white-space: nowrap;
  font-size: var(--k-hg-font);
  line-height: 24px;
  font-weight: 500;
}
.k-header__nav a,
.k-header__nav a:hover { color: inherit; }
.k-header__right { justify-content: flex-end; flex: 0 0 auto; gap: var(--k-hg-right-gap); }

/* Closed search and round buttons, :96–100, :167–168 and :2248–2250. */
.k-search,
.k-header__button {
  display: flex;
  align-items: center;
  height: var(--k-hg-button);
  border-radius: 999px;
  background: var(--k-header-control-bg);
  box-shadow: var(--k-header-control-ring);
  color: var(--k-header-ink);
}
.k-search:hover,
.k-header__button:hover {
  background: var(--k-header-control-hover);
  color: var(--k-header-ink);
}
.k-search {
  width: var(--k-search-width);
  flex: 0 0 auto;
  min-width: 0;
  gap: 8px;
  padding: 0 var(--k-hg-search-pad);
}
.k-search input[name="search"] {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--typo-primary);
  font: 400 var(--k-hg-font)/24px Onest, sans-serif;
}
.k-search input::placeholder { color: var(--k-header-placeholder); opacity: 1; }
.k-header__button { flex: 0 0 auto; width: var(--k-hg-button); justify-content: center; }

/* Cart pill, :171–174, :2246 and :2330–2331. */
.k-cart-pill,
.k-cart-pill:hover {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--k-hg-cart-gap);
  height: var(--k-hg-button);
  padding: 0 var(--k-hg-cart-pad);
  border-radius: 999px;
  background: var(--bg-default);
  box-shadow: var(--k-header-cart-ring);
  color: var(--typo-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.k-cart-pill:has([data-cart-count]:not([hidden])) { padding-right: 6px; }
.k-cart-pill [data-cart-count]:not([hidden]) {
  display: grid;
  width: var(--k-hg-badge);
  height: var(--k-hg-badge);
  place-items: center;
  border-radius: 999px;
  background: var(--bg-brand);
  color: var(--typo-inverted);
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .k-header__right { flex: 1 1 auto; }
  .k-search {
    width: 100%;
    flex: 1 1 var(--k-search-width);
    max-width: max(var(--k-search-width), 232px); /* :2240–2249 */
  }
  .k-cart-pill--compact [data-cart-total] { display: none; } /* :2202–2214 */
}

.k-mobile-header,
.k-mobile-bottom { display: none; }

@media (width < 768px) {
  .k-promo,
  .k-header__frame { display: none; }
  .k-main--header-offset { padding-top: 72px; }
  .k-header .k-sticky-header__backdrop { height: 72px; }

  /* Mobile chrome, :180–190 and :2254–2260. */
  .k-mobile-header {
    position: absolute;
    inset: 12px 16px auto;
    z-index: var(--k-overlay-layer-header);
    display: flex;
    height: 48px;
    align-items: center;
    gap: 8px;
  }
  .k-mobile-header__logo { display: block; flex: none; width: 43px; height: 40px; }
  .k-mobile-header__spacer { flex: 1; }
  .k-mobile-header__button,
  .k-mobile-header__button:hover {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--k-header-bg);
    box-shadow: var(--k-shadow-chip);
    color: var(--k-header-ink);
  }
  .k-mobile-header__button.k-mobile-header__back { width: 48px; height: 48px; }
  .k-header[data-variant="glass"] .k-mobile-header__button { box-shadow: var(--k-header-ring); }

  /* Replace the stock absolute footer layout only when the mobile surface is present.
     The bottom surface stays in flow, reserving its actual height at the end of the page. */
  #container.k-page:has(> [data-mobile-bottom]) {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-bottom: 0;
  }
  #container.k-page:has(> [data-mobile-bottom]) > footer { position: static; }
  #container.k-page:has(> [data-mobile-bottom]) > main :is(#content, #column-left, #column-right) { padding-bottom: 0; }
  .k-mobile-bottom { display: block; }
  .k-page > .k-mobile-bottom { margin-top: auto; }
  html:has(.k-page > [data-mobile-bottom]) { scroll-padding-bottom: 96px; }
  html:has(.k-page > [data-mobile-bottom] > [data-mobile-panel]:not([hidden])) { scroll-padding-bottom: 176px; }

  /* Tab bar, :1456–1461. */
  .k-tabbar {
    height: var(--k-tabbar-h);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    padding-top: 10px;
  }
  .k-tabbar__tab,
  .k-tabbar__tab:hover {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--typo-secondary);
  }
  .k-tabbar__tab[aria-current] { color: var(--typo-primary); }
  .k-tabbar__pill {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 36px;
    border-radius: 999px;
  }
  .k-tabbar__tab[aria-current] .k-tabbar__pill { background: var(--warm-100); }
  .k-tabbar__badge {
    position: absolute;
    right: 4px;
    top: -4px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--bg-brand);
    color: var(--typo-inverted);
    font-size: 12px;
    font-weight: 600;
  }
  .k-tabbar__badge[hidden] { display: none; }
  .k-tabbar__label { font-size: 12px; line-height: 16px; font-weight: 500; }

  /* Shared cart and product panels, :1425–1451. */
  .k-mobile-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    box-shadow: inset 0 -1px 0 var(--bg-border);
    color: var(--typo-primary);
  }
  .k-mobile-panel[hidden],
  .k-mobile-panel [hidden] { display: none; }
  .k-mobile-panel:has(> [data-pdp-error]:not(:empty)) { flex-wrap: wrap; row-gap: 8px; }
  .k-mobile-panel [data-pdp-error] {
    flex: 0 0 100%;
    color: var(--typo-critical);
    font-size: 14px;
    line-height: 20px;
    overflow-wrap: anywhere;
  }
  .k-mobile-panel [data-pdp-error]:empty { position: absolute; }
  .k-mobile-panel__summary {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
  }
  .k-mobile-panel__pack { color: var(--typo-secondary); font-weight: 500; }
  .k-mobile-panel__amount {
    font-size: clamp(20px, 6.15cqw, 24px);
    line-height: 32px;
    letter-spacing: -.01em;
    white-space: nowrap;
  }
  .k-mobile-panel__amount--sale { color: var(--typo-brand); }
  .k-mobile-panel__cta,
  .k-mobile-panel__stepper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: 56px;
    border: 0;
    border-radius: 999px;
    background: var(--control-primary-bg);
    color: var(--typo-inverted);
    font-weight: 600;
  }
  .k-mobile-panel__cta {
    justify-content: center;
    padding: 0 52px 0 12px;
    font-size: clamp(14px, 4.1cqw, 16px);
    line-height: 1.25;
    text-align: center;
  }
  .k-mobile-panel__cta:not([aria-disabled="true"], :disabled):hover {
    color: var(--typo-inverted);
    background: var(--control-primary-bg-hover);
  }
  .k-mobile-panel__cta:is([aria-disabled="true"], :disabled) { cursor: default; }
  .k-mobile-panel__cta:is([aria-disabled="true"], :disabled):not(.k-mobile-panel__cta--preorder) {
    background: var(--control-disabled-bg);
    color: var(--control-disabled-typo);
  }
  .k-mobile-panel__arrow {
    position: absolute;
    right: 4px;
    top: 4px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--k-gradient-accent);
  }
  .k-mobile-panel__stepper { font-size: 16px; }
  .k-mobile-panel__stepper button {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    height: 56px;
    border: 0;
    border-radius: inherit;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
  }
  .k-mobile-panel__stepper button:disabled { color: var(--warm-400); }
  .k-mobile-panel__stepper button:focus-visible { outline-offset: -3px; outline-color: var(--white) !important; }
  .k-mobile-panel__stepper [data-pdp-qty] { flex: 1; min-width: 24px; text-align: center; }
}
