/* Kaduno default theme (ADR-0094 P3). Neutral, token-driven commerce design.
   All identity comes from --ks-* custom properties set by layout/theme.liquid
   from the store's design profile. Scoped under .ks-themed / kd-* classes so
   platform components (cart drawer, banners) keep their own styling. */

.ks-themed {
  box-sizing: border-box;
  --ks-container: 1200px;
}
.ks-themed *,
.ks-themed *::before,
.ks-themed *::after {
  box-sizing: border-box;
}
.ks-themed {
  background: var(--ks-bg);
  color: var(--ks-text);
  font-family: var(
    --ks-font-body,
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif
  );
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.ks-themed img {
  max-width: 100%;
  display: block;
}
.ks-themed a {
  text-decoration: none;
}
/* Links take the surrounding text colour unless a component says otherwise.
   `:where()` around the whole `a` keeps this at one class of specificity —
   enough to beat a bare `a {}` from platform CSS, not enough to beat a
   component. It used to read `a:where(:not(.btn))`, which was (0,1,1) and so
   outranked every `.kd-*` rule below: `.kd-btn-primary` lost its white label
   and inherited the page text instead, putting near-black on the purple CTA
   (2.1:1 — the storefront homepage axe failure), and `.kd-link` never showed
   its accent colour at all. The `.btn` escape hatch it excluded is not a class
   this theme has ever used. */
:where(.ks-themed a) {
  color: inherit;
}
.ks-themed h1,
.ks-themed h2,
.ks-themed h3,
.ks-themed h4 {
  font-family: var(--ks-font-heading, var(--ks-font-body, inherit));
  line-height: 1.2;
  margin: 0;
}
.ks-themed button {
  font: inherit;
  cursor: pointer;
}

.kd-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Announcement ─────────────────────────────────────── */
.kd-announcement {
  background: var(--ks-text);
  color: var(--ks-bg);
  font-size: 13px;
}
.kd-announcement .kd-wrap {
  padding-top: 8px;
  padding-bottom: 8px;
  text-align: center;
}
.kd-announcement a:hover {
  text-decoration: underline;
}

/* ── Header ───────────────────────────────────────────── */
.kd-header {
  background: var(--ks-surface);
  border-bottom: 1px solid var(--ks-border);
  z-index: 40;
}
.kd-header.kd-sticky {
  position: sticky;
  top: 0;
}
.kd-header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}
.kd-brand {
  flex: none;
  display: inline-flex;
  align-items: center;
}
.kd-logo {
  max-height: 40px;
  width: auto;
}
.kd-wordmark {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.kd-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.kd-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--ks-text-muted);
  white-space: nowrap;
}
.kd-nav a:hover {
  color: var(--ks-text);
  background: var(--ks-bg);
}
.kd-nav a.kd-active {
  color: var(--ks-primary);
}
.kd-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kd-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ks-bg);
  border: 1px solid var(--ks-border);
  border-radius: 999px;
  padding: 7px 14px;
  min-width: 220px;
  color: var(--ks-text-muted);
}
.kd-search form,
.kd-search [data-storefront-search] {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.kd-search input,
.kd-search [data-storefront-search] input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ks-text);
  font: inherit;
  font-size: 14px;
}
.kd-search input::placeholder,
.kd-search [data-storefront-search] input::placeholder {
  color: var(--ks-text-muted);
}
.kd-search:focus-within {
  border-color: var(--ks-primary);
}
.kd-icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.kd-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--ks-text);
}
.kd-icon-link:hover {
  background: var(--ks-bg);
}
.kd-cart-switcher {
  display: flex;
  align-items: center;
}
.kd-hide-prices,
.kd-price-display {
  display: flex;
  align-items: center;
}
.kd-price-display:empty {
  display: none;
}
.kd-cart-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--ks-primary);
  color: var(--ks-primary-text);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 5px;
  min-width: 16px;
  text-align: center;
}

/* ── Hero ─────────────────────────────────────────────── */
.kd-hero {
  background: var(--ks-surface);
  border-bottom: 1px solid var(--ks-border);
}
.kd-hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}
.kd-hero-has-image .kd-hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
}
.kd-eyebrow {
  color: var(--ks-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}
.kd-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.kd-lead {
  color: var(--ks-text-muted);
  font-size: 18px;
  max-width: 54ch;
  margin: 16px 0 0;
}
.kd-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.kd-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 15px;
  border: 1.5px solid transparent;
}
.kd-btn-primary {
  background: var(--ks-primary);
  color: var(--ks-primary-text);
}
.kd-btn-primary:hover {
  background: var(--ks-primary-hover);
}
.kd-btn-ghost {
  border-color: var(--ks-border);
  color: var(--ks-text);
}
.kd-btn-ghost:hover {
  border-color: var(--ks-text);
}
.kd-hero-media img {
  border-radius: 16px;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* ── Sections ─────────────────────────────────────────── */
.kd-section {
  padding: 56px 0;
}
/* Wraps rather than breaking at a breakpoint: .kd-link is nowrap and the
   heading is a vw clamp, so on a narrow phone the pair would push the document
   wider than the viewport. Wrapping holds at every width. */
.kd-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.kd-section-head h2 {
  min-width: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 750;
  letter-spacing: -0.01em;
}
.kd-link {
  color: var(--ks-primary);
  font-weight: 650;
  font-size: 14.5px;
  white-space: nowrap;
}
.kd-link:hover {
  color: var(--ks-primary-hover);
}

.kd-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.kd-tile {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ks-surface);
  border: 1px solid var(--ks-border);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.kd-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}
.kd-tile img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}
.kd-tile-fallback {
  height: 200px;
  display: grid;
  place-items: center;
  background: var(--ks-bg);
  color: var(--ks-text-muted);
  font-size: 48px;
  font-weight: 800;
}
.kd-tile-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
}
.kd-tile-body h3 {
  font-size: 17px;
  font-weight: 650;
}
.kd-tile-count {
  color: var(--ks-text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.kd-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.kd-product {
  background: var(--ks-surface);
  border: 1px solid var(--ks-border);
  border-radius: 12px;
  overflow: hidden;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.kd-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}
.kd-product-media {
  position: relative;
  background: #fff;
}
.kd-product-media img {
  height: 190px;
  width: 100%;
  object-fit: contain;
  padding: 14px;
}
.kd-product-media .kd-tile-fallback {
  height: 190px;
}
/* catalog_show_out_of_stock: sold-out cards render grayed out rather than hidden. */
.kd-product-media-img-oos {
  filter: grayscale(1);
  opacity: 0.55;
}
.kd-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--ks-primary);
  color: var(--ks-primary-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 6px;
  padding: 3px 8px;
}
.kd-product-body {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--ks-border);
}
.kd-product-brand {
  color: var(--ks-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.kd-product-body h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin: 4px 0 8px;
  min-height: 40px;
}
.kd-product-price {
  font-weight: 750;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.kd-product-price-alt,
.kd-pdp-price-alt {
  display: block;
  font-size: 12px;
  color: var(--ks-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Footer ───────────────────────────────────────────── */
.kd-footer {
  background: var(--ks-surface);
  border-top: 1px solid var(--ks-border);
  margin-top: 40px;
}
.kd-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr));
  gap: 36px;
  padding-top: 48px;
  padding-bottom: 32px;
}
.kd-footer-brand .kd-logo {
  max-height: 36px;
}
.kd-footer-tagline {
  color: var(--ks-text-muted);
  font-size: 14.5px;
  max-width: 40ch;
  margin: 12px 0 0;
}
.kd-footer-contact {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--ks-text-muted);
}
.kd-footer-contact a:hover {
  color: var(--ks-text);
}
.kd-footer h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ks-text-muted);
  margin-bottom: 12px;
}
.kd-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kd-footer li {
  margin-bottom: 8px;
  font-size: 14.5px;
}
.kd-footer li a:hover {
  color: var(--ks-primary);
}
.kd-footer-social {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
  margin-top: 14px !important;
}
.kd-footer-social li {
  margin-bottom: 0 !important;
}
.kd-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--ks-bg);
  color: var(--ks-text-muted);
}
.kd-footer-social a:hover {
  color: var(--ks-primary);
}
.kd-footer-social .kd-icon {
  width: 15px;
  height: 15px;
}
.kd-footer-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-top: 1px solid var(--ks-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--ks-text);
}
.kd-footer-fine {
  border-top: 1px solid var(--ks-border);
  padding-top: 18px;
  padding-bottom: 24px;
  color: var(--ks-text-muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.kd-footer-fine-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.kd-payment-icons {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 14px;
}
.kd-payment-icons li {
  margin-bottom: 0 !important;
}
.kd-payment-icon {
  height: 16px;
  width: auto;
  color: var(--ks-text-muted);
}
.kd-payment-text {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ks-text-muted);
}
.kd-footer-cookie-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ks-text-muted);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.kd-footer-cookie-btn:hover {
  color: var(--ks-text);
}

/* ── Announcement strip ──────────────────────────────────── */
.kd-announcement {
  background: var(--announcement-bg, var(--ks-primary));
  color: var(--announcement-fg, var(--ks-primary-text));
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  transition:
    max-height 0.25s ease,
    padding 0.25s ease,
    opacity 0.2s ease;
}
@media (min-width: 640px) {
  .kd-announcement {
    background: var(--announcement-bg-sm, var(--announcement-bg));
    color: var(--announcement-fg-sm, var(--announcement-fg));
  }
}
.kd-announcement[data-ks-scrolled] {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}
.kd-announcement-desktop-only {
  display: none;
}
@media (min-width: 640px) {
  .kd-announcement-desktop-only {
    display: block;
  }
}
.kd-announcement-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}
.kd-announcement-icon {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.85;
}
.kd-announcement-track {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 24px;
  overflow: hidden;
}
.kd-announcement-group {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  min-width: 0;
}
.kd-announcement-item a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.kd-announcement-marquee .kd-announcement-track {
  flex-wrap: nowrap;
  animation: kd-announcement-scroll-ltr var(--announcement-duration, 30s) linear infinite;
}
.kd-announcement-marquee .kd-announcement-track[data-direction='rtl'] {
  animation-name: kd-announcement-scroll-rtl;
}
.kd-announcement-marquee .kd-announcement-group {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.kd-announcement-pause-hover:hover {
  animation-play-state: paused;
}
@keyframes kd-announcement-scroll-ltr {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@keyframes kd-announcement-scroll-rtl {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .kd-announcement-marquee .kd-announcement-track {
    animation: none;
  }
}

/* ── Responsive ───────────────────────────────────────── */
/* ── Mobile navigation drawer ─────────────────────────── */
/* Pure-CSS off-canvas (ADR-0094 — themes ship no JS). The open <summary>
   stretches to a fixed full-viewport backdrop that sits UNDER the panel, so
   any tap outside the panel toggles the drawer shut. */
.kd-mobile-nav {
  display: none;
}
.kd-mobile-nav > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -10px;
  border-radius: 10px;
  list-style: none;
  cursor: pointer;
  color: var(--ks-text);
}
.kd-mobile-nav > summary::-webkit-details-marker {
  display: none;
}
.kd-mobile-nav > summary .kd-icon {
  width: 24px;
  height: 24px;
}
.kd-mobile-nav .kd-close {
  display: none;
}
.kd-mobile-nav[open] > summary .kd-close {
  display: block;
}
.kd-mobile-nav[open] > summary .kd-burger {
  display: none;
}
/* touch-action stops the backdrop from panning the page behind the drawer —
   the no-JS stand-in for a body scroll lock. */
.kd-mobile-nav[open] > summary {
  position: fixed;
  inset: 0;
  z-index: 60;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  padding: 14px 16px;
  align-items: flex-start;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.5);
  color: #ffffff;
  touch-action: none;
}
.kd-drawer {
  display: none;
}
.kd-mobile-nav[open] > .kd-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 61;
  width: min(86vw, 360px);
  background: var(--ks-bg);
  color: var(--ks-text);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 0 40px rgba(15, 23, 42, 0.26);
}
.kd-drawer-head {
  flex: none;
  padding: 18px 20px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ks-text-muted);
}
.kd-drawer-search {
  flex: none;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--ks-border);
}
.kd-drawer-search form,
.kd-drawer-search [data-storefront-search] {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  background: var(--ks-surface);
  border: 1px solid var(--ks-border);
  border-radius: 999px;
  color: var(--ks-text-muted);
}
.kd-drawer-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ks-text);
  font: inherit;
  /* 16px keeps iOS Safari from zooming the viewport on focus. */
  font-size: 16px;
}
.kd-drawer-search form:focus-within {
  border-color: var(--ks-primary);
}
.kd-drawer-nav {
  flex: 1 0 auto;
  padding-bottom: 8px;
}
.kd-m-top,
.kd-m-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ks-border);
  font-size: 15px;
  font-weight: 600;
  color: var(--ks-text);
  list-style: none;
  cursor: pointer;
}
.kd-m-group > summary::-webkit-details-marker {
  display: none;
}
.kd-m-group[open] > summary {
  background: var(--ks-surface);
  color: var(--ks-primary);
}
.kd-m-caret {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.5;
  transition: transform 0.18s ease;
}
.kd-m-group[open] > summary .kd-m-caret {
  transform: rotate(-135deg);
}
.kd-m-sub {
  background: var(--ks-surface);
  border-bottom: 1px solid var(--ks-border);
  padding: 4px 0 8px;
}
/* A parent row toggles rather than navigates, so its own page needs an
   explicit way in — otherwise every category with children is unreachable. */
.kd-m-all {
  display: block;
  padding: 11px 20px 11px 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ks-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kd-m-sub .kd-m-link {
  display: block;
  min-height: 44px;
  padding: 11px 20px 11px 32px;
  font-size: 15px;
  color: var(--ks-text);
}
.kd-m-sub .kd-m-link.kd-active {
  color: var(--ks-primary);
  font-weight: 600;
}
.kd-m-group-2 > summary {
  min-height: 44px;
  padding: 11px 20px 11px 32px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 0;
}
.kd-m-sub-2 {
  background: var(--ks-bg);
  border-top: 1px solid var(--ks-border);
  border-bottom: 1px solid var(--ks-border);
  padding: 2px 0 6px;
}
.kd-m-sub-2 .kd-m-all,
.kd-m-sub-2 .kd-m-link {
  padding-left: 44px;
}
.kd-drawer-foot {
  flex: none;
  padding: 14px 20px 28px;
  border-top: 1px solid var(--ks-border);
}
.kd-drawer-account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ks-text);
}
@media (prefers-reduced-motion: reduce) {
  .kd-m-caret {
    transition: none;
  }
}

@media (max-width: 960px) {
  .kd-mobile-nav {
    display: block;
    flex: none;
  }
  .kd-nav {
    display: none;
  }
  .kd-search {
    min-width: 0;
  }
  .kd-hero-has-image .kd-hero-grid {
    grid-template-columns: 1fr;
  }
  .kd-tiles {
    grid-template-columns: 1fr 1fr;
  }
  .kd-products {
    grid-template-columns: 1fr 1fr;
  }
  .kd-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .kd-tiles,
  .kd-products,
  .kd-footer-grid {
    grid-template-columns: 1fr;
  }
  .kd-search {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kd-tile,
  .kd-product {
    transition: none;
  }
}
.ks-themed a:focus-visible,
.ks-themed button:focus-visible,
.ks-themed input:focus-visible {
  outline: 2px solid var(--ks-primary);
  outline-offset: 2px;
}

/* ── Product islands ──────────────────────────────────────
   `product-purchase` (commerce.product-purchase.v1) and `product-configurator`
   (commerce.product-configurator.v1) mount bare divs carrying `data-ks-part`
   hooks (see the island source under apps/web/…/storefront/islands) — the
   theme owns every visual decision, there is no default look to fall back to.
   Selectors are attribute-based since neither island emits kd-* classes.
   `!important` appears only where a hook wraps a pre-styled platform control
   (Button, quantity stepper) whose own utility classes would otherwise win a
   cascade tie against this stylesheet. The SSR fallback for product-purchase
   (`.kd-buy-row` / `[data-ks-island-ssr]` above) already mirrors the
   `[data-ks-part='purchase']` shape below so hydration doesn't jump. */

[data-ks-island-content='product-purchase'],
[data-ks-island-content='product-configurator'] {
  display: block;
}

/* -- shared: error / loading -- */
[data-ks-part='error'] {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #b91c1c;
  font-size: 14px;
}
[data-ks-part='loading'] {
  min-height: 220px;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    var(--ks-surface) 25%,
    var(--ks-bg) 37%,
    var(--ks-surface) 63%
  );
  background-size: 400% 100%;
  animation: kd-island-shimmer 1.4s ease infinite;
}
@keyframes kd-island-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-ks-part='loading'] {
    animation: none;
  }
}

/* -- shared: purchase row (quantity + add-to-cart) -- */
[data-ks-part='purchase'] {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  margin: 18px 0;
}
[data-ks-part='quantity'] {
  flex: none;
}
[data-ks-part='add-to-cart'] {
  flex: 1;
  min-width: 160px;
}
[data-ks-part='add-to-cart'] button {
  width: 100%;
  height: 46px;
  border-radius: 10px !important;
  border: 1.5px solid transparent !important;
  background: var(--ks-primary) !important;
  color: var(--ks-primary-text) !important;
  font-weight: 650;
  font-size: 15px;
}
[data-ks-part='add-to-cart'] button:hover:not(:disabled) {
  background: var(--ks-primary-hover) !important;
}
[data-ks-part='add-to-cart'] button:disabled {
  opacity: 0.6;
}

/* -- shared: option groups (matrix groups + custom options, both islands) -- */
[data-ks-part='options'] {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}
[data-ks-part='options']:empty {
  display: none;
  margin: 0;
}
[data-ks-part='option-heading'] {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ks-text-muted);
  margin: 0 0 10px;
}
[data-ks-part='option-section'][data-ks-required] [data-ks-part='option-heading']::after {
  content: '*';
  color: #b91c1c;
}
[data-ks-part='option-section'][data-ks-missing] [data-ks-part='option-heading'] {
  color: #b91c1c;
}
[data-ks-part='option-surcharge'] {
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ks-text);
}
[data-ks-part='option-description'] {
  margin: -6px 0 10px;
  font-size: 13px;
  color: var(--ks-text-muted);
}
[data-ks-part='option-choices'] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
[data-ks-part='option-choice'] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px;
  padding: 9px 14px !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--ks-border) !important;
  background: var(--ks-surface) !important;
  color: var(--ks-text) !important;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.2;
}
[data-ks-part='option-choice']:hover {
  border-color: var(--ks-text) !important;
}
[data-ks-part='option-choice'][data-ks-selected] {
  border-color: var(--ks-primary) !important;
  background: var(--ks-primary) !important;
  color: var(--ks-primary-text) !important;
}
[data-ks-part='option-choice'][data-ks-unavailable] {
  opacity: 0.4;
  text-decoration: line-through;
}
[data-ks-part='option-swatch'] {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--ks-border);
}
[data-ks-part='option-choice'][data-ks-selected] [data-ks-part='option-swatch'] {
  border-color: var(--ks-primary-text);
}
[data-ks-part='option-choice-image'] {
  width: 28px;
  height: 28px;
  flex: none;
  object-fit: contain;
  border-radius: 6px;
}
[data-ks-part='option-choice-surcharge'] {
  font-size: 12px;
  opacity: 0.8;
}
[data-ks-part='option-checkbox'] {
  display: flex;
}
[data-ks-part='option-text'] {
  width: 100%;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid var(--ks-border);
  border-radius: 10px;
  font: inherit;
  color: var(--ks-text);
  background: var(--ks-surface);
}

/* -- product-purchase --
   `price-was` also carries the Omnibus prior price on the configurator, where
   the same struck-through treatment applies. */
[data-ks-island-content='product-purchase'] [data-ks-part='price-was'],
[data-ks-island-content='product-configurator'] [data-ks-part='price-was'] {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  color: var(--ks-text-muted);
  font-size: 14px;
}
[data-ks-part='price-sale-label'] {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ks-primary);
  color: var(--ks-primary-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
[data-ks-island-content='product-purchase'] [data-ks-part='price'] {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
}
[data-ks-part='price-amount'] {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
[data-ks-island-content='product-purchase']
  [data-ks-part='price'][data-ks-reduced]
  [data-ks-part='price-amount'] {
  color: var(--ks-primary);
}
[data-ks-part='price-vat-label'],
[data-ks-part='price-unavailable'] {
  font-size: 13px;
  color: var(--ks-text-muted);
}
[data-ks-part='price-secondary'],
[data-ks-part='price-note'] {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ks-text-muted);
}
[data-ks-part='badge'] {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--ks-border);
  background: var(--ks-bg);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ks-text-muted);
}
[data-ks-island-content='product-purchase'] [data-ks-part='stock'] {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ks-text);
}
[data-ks-island-content='product-purchase'] [data-ks-part='stock']::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #16a34a;
}
[data-ks-island-content='product-purchase']
  [data-ks-part='stock'][data-ks-in-stock='false']::before {
  background: #d97706;
}
[data-ks-part='stock-alert'] {
  margin-top: 8px;
}
[data-ks-part='line-note'] {
  margin: 4px 0 16px;
}
[data-ks-part='line-note'] label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ks-text);
}
[data-ks-part='line-note'] label > span {
  display: block;
  margin-bottom: 6px;
}
[data-ks-part='line-note'] textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ks-border);
  border-radius: 10px;
  font: inherit;
  color: var(--ks-text);
  background: var(--ks-surface);
  resize: vertical;
}
[data-ks-part='volume-tiers']:empty {
  display: none;
}
[data-ks-part='volume-tiers'] {
  margin-top: 20px;
}

/* -- product-configurator -- */
[data-ks-part='sticky-summary'] {
  display: none;
}
@media (max-width: 768px) {
  [data-ks-part='sticky-summary'] {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 16px;
    padding: 10px 16px;
    border: 1px solid var(--ks-border);
    border-radius: 12px;
    background: var(--ks-surface);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    font-size: 14px;
  }
}
[data-ks-part='sticky-title'] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}
[data-ks-part='sticky-price'] {
  flex: none;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
[data-ks-part='sticky-stock'] {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ks-bg);
  color: var(--ks-text-muted);
  font-size: 12px;
}
[data-ks-part='sticky-summary'][data-ks-in-stock='false'] [data-ks-part='sticky-stock'] {
  color: #d97706;
}

[data-ks-part='configuration-grid'] {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 32px;
}
@media (min-width: 769px) {
  [data-ks-part='configuration-grid'] {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 40px;
  }
}
[data-ks-part='configuration-grid'] > * {
  min-width: 0;
}

[data-ks-part='gallery'] {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 769px) {
  [data-ks-part='gallery-frame'] {
    position: sticky;
    top: 90px;
  }
}
[data-ks-part='gallery-main'] {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--ks-border);
  border-radius: 16px;
  background: var(--ks-surface);
  object-fit: contain;
}
[data-ks-part='gallery-thumbs'] {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
[data-ks-part='gallery-thumb'] {
  flex: none;
  width: 72px;
  height: 72px;
  padding: 4px !important;
  border: 1.5px solid var(--ks-border) !important;
  border-radius: 10px !important;
  background: var(--ks-surface) !important;
  overflow: hidden;
}
[data-ks-part='gallery-thumb'] img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
[data-ks-part='gallery-thumb'][data-ks-active] {
  border-color: var(--ks-primary) !important;
}

[data-ks-part='price-stock'] {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 0 0 16px;
}
[data-ks-part='price-stock'] [data-ks-part='price'] {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
[data-ks-part='price-stock'] [data-ks-part='stock'] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 13px;
  color: var(--ks-text-muted);
}
[data-ks-part='price-stock'] [data-ks-part='stock']::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #16a34a;
}
[data-ks-part='price-stock'] [data-ks-part='stock'][data-ks-in-stock='false']::before {
  background: #d97706;
}

[data-ks-part='purchase-summary'] {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid var(--ks-border);
  border-radius: 12px;
  background: var(--ks-surface);
  font-size: 14px;
}
[data-ks-part='summary-line'] {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  color: var(--ks-text-muted);
}
[data-ks-part='summary-line-price'] {
  color: var(--ks-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
[data-ks-part='total'] {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--ks-border);
}
[data-ks-part='total-label'] {
  font-weight: 650;
}
[data-ks-part='total-price'] {
  font-size: 20px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  [data-ks-part='configurator'] [data-ks-part='purchase'] {
    position: sticky;
    bottom: 0;
    padding: 10px 0;
    background: var(--ks-bg);
  }
}

/* The islands bridge hides the no-JS fallback form once the real
   (Ragnar-backed) SearchAutocomplete portal mounts. Theme CSS that sets
   `display` on the form outranks the UA sheet's [hidden], so without this the
   fallback renders underneath the autocomplete as a second search box. */
[data-ks-search-autocomplete] form[hidden] {
  display: none;
}

/* The portaled autocomplete field is a daisyUI `.input`, which paints its own
   pill with a box-shadow. The theme rules above already style this input as
   the visible field, so that shadow lands as a second pill nested inside the
   first, clipping the placeholder. Reset the shadow only: border, radius and
   background stay under the theme's control, and the focus ring is untouched.
   This rule sits last on purpose — it ties on specificity with the theme's own
   `.xx-search input` rules, so anything more than the shadow would override
   them and leave the field with no chrome at all. */
[data-ks-search-autocomplete] input.input {
  box-shadow: none;
}
