/* Kairali shared public-site shell — academy + shop. */
:root {
  --ks-navy: #0b192c;
  --ks-navy-deep: #060e18;
  --ks-gold: #d4af37;
  --ks-light-gold: #f3e5ab;
  --ks-cream: #f8f4ec;
  --ks-line: rgba(212, 175, 55, 0.22);
  --ks-sans: "Outfit", "Manrope", system-ui, -apple-system, sans-serif;
  --ks-serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;
}

html { scroll-behavior: smooth; overflow-x: clip; }
body { min-width: 320px; overflow-x: clip; }
body.ks-menu-open { overflow: hidden; }
main, main > *, section, .container, .wrap { min-width: 0; }
img, video, iframe { max-width: 100%; }

.ks-shell, .ks-shell * { box-sizing: border-box; }
.ks-shell a { color: inherit; text-decoration: none; }
.ks-shell button { font: inherit; }
.ks-shell-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid var(--ks-line);
  background: rgba(6, 14, 24, 0.96);
  color: #fff;
  font-family: var(--ks-sans);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.ks-shop-shell .ks-shell-header { background: rgba(5, 5, 5, 0.96); }

/* Kairali Shop masthead: one shared editorial navigation and heritage seal. */
.ks-shop-editorial-header { background: rgba(5, 5, 5, 0.98) !important; }
.ks-shop-editorial-inner {
  width: min(100% - 40px, 1320px);
  min-height: 76px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}
.ks-shop-editorial-left,
.ks-shop-editorial-right { display: flex; align-items: center; }
.ks-shop-editorial-left { justify-self: start; gap: clamp(15px, 1.6vw, 26px); }
.ks-shop-editorial-right { justify-self: end; gap: 9px; }
.ks-shop-editorial-left a,
.ks-shop-academy-link {
  position: relative;
  padding: 28px 0 26px;
  color: rgba(248, 241, 231, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ks-shop-editorial-left a::after,
.ks-shop-academy-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 19px;
  width: 0;
  height: 1px;
  background: var(--ks-gold);
  transition: width 0.2s ease;
}
.ks-shop-editorial-left a:hover,
.ks-shop-academy-link:hover { color: #fff; }
.ks-shop-editorial-left a:hover::after,
.ks-shop-academy-link:hover::after { width: 100%; }
.ks-shop-editorial-brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ks-light-gold);
}
.ks-shop-emblem {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(243, 229, 171, 0.72);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #16365a 0 57%, #071727 58% 100%);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2), inset 0 0 18px rgba(212, 175, 55, 0.16);
}
.ks-shop-emblem img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: saturate(1.06) contrast(1.03);
}
.ks-shop-wordmark {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 6px;
  line-height: 1;
  white-space: nowrap;
}
.ks-shop-wordmark > span,
.ks-shop-wordmark > strong {
  font-family: var(--ks-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.ks-shop-wordmark > span { color: var(--ks-gold); }
.ks-shop-wordmark > strong { color: var(--ks-cream); }
.ks-shop-wordmark > small {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: rgba(248, 241, 231, 0.5);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

/* Keep the shop landing media inside its isolated hero stacking context. */
.ks-shop-shell body.shop-editorial .editorial-hero {
  min-height: clamp(680px, calc(100svh - 78px), 820px);
}
.ks-shop-shell body.shop-editorial .editorial-hero-media { z-index: 0; }
.ks-shop-shell body.shop-editorial .editorial-hero-shade { z-index: 1; }
.ks-shop-shell body.shop-editorial .editorial-hero-copy { z-index: 2; }
.ks-shop-shell body.shop-editorial .editorial-hero-note,
.ks-shop-shell body.shop-editorial .editorial-scroll { z-index: 3; }
.ks-header-inner {
  width: min(100% - 40px, 1280px);
  min-height: 78px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 24px;
}
.ks-brand { display: inline-flex; align-items: center; gap: 13px; justify-self: start; min-width: 0; }
.ks-brand img { width: auto; height: 52px; object-fit: contain; }
.ks-brand-copy { display: grid; gap: 1px; line-height: 1.05; }
.ks-brand-copy strong { color: var(--ks-light-gold); font-family: var(--ks-serif); font-size: 17px; font-weight: 600; }
.ks-brand-copy span { color: rgba(255,255,255,.62); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.ks-primary-nav { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2vw, 30px); }
.ks-primary-nav a {
  position: relative;
  padding: 29px 0 27px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .035em;
  white-space: nowrap;
}
.ks-primary-nav a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 18px;
  width: 0; height: 1px;
  transform: translateX(-50%);
  background: var(--ks-gold);
  transition: width .2s ease;
}
.ks-primary-nav a:hover, .ks-primary-nav a[aria-current="page"] { color: #fff; }
.ks-primary-nav a:hover::after, .ks-primary-nav a[aria-current="page"]::after { width: 100%; }
.ks-header-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.ks-pill, .ks-icon-button, .ks-menu-button {
  min-height: 40px;
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ks-light-gold);
  background: rgba(255,255,255,.04);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.ks-pill { padding: 0 17px; background: var(--ks-gold); color: var(--ks-navy); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.ks-icon-button, .ks-menu-button { width: 40px; padding: 0; font-size: 15px; }
.ks-pill:hover, .ks-icon-button:hover, .ks-menu-button:hover { transform: translateY(-1px); background: var(--ks-light-gold); color: var(--ks-navy); }
.ks-menu-button { display: none; cursor: pointer; }

.ks-mobile-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  padding: 94px 24px 30px;
  overflow-y: auto;
  background: rgba(6,14,24,.99);
  color: #fff;
  font-family: var(--ks-sans);
}
.ks-shop-shell .ks-mobile-panel { background: rgba(5,5,5,.99); }
.ks-mobile-panel[data-open="true"] { display: block; }
.ks-mobile-close { position: absolute; top: 23px; right: 22px; width: 44px; height: 44px; border: 1px solid var(--ks-line); border-radius: 50%; color: var(--ks-gold); background: transparent; font-size: 25px; cursor: pointer; }
.ks-mobile-brand { position: absolute; top: 22px; left: 22px; color: var(--ks-light-gold); font-family: var(--ks-serif); font-size: 18px; }
.ks-mobile-links { width: min(100%, 460px); margin-inline: auto; display: grid; }
.ks-mobile-links a { padding: 15px 2px; border-bottom: 1px solid rgba(255,255,255,.1); font-family: var(--ks-serif); font-size: 24px; }
.ks-mobile-links a:hover { color: var(--ks-gold); }
.ks-mobile-contact { width: min(100%, 460px); margin: 26px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ks-mobile-contact a { padding: 13px 15px; border: 1px solid var(--ks-line); border-radius: 999px; text-align: center; color: var(--ks-light-gold); font-size: 12px; font-weight: 700; }

.ks-backbar {
  position: relative;
  z-index: 20;
  width: 100%;
  border-bottom: 1px solid rgba(212,175,55,.18);
  background: var(--ks-cream);
  color: var(--ks-navy);
  font-family: var(--ks-sans);
}
.ks-shop-shell .ks-backbar { background: #0b0a08; color: #f8f1e7; }
.ks-backbar-inner {
  width: min(100% - 40px, 1280px);
  min-height: 47px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.ks-back-link { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.ks-back-link span:first-child { color: var(--ks-gold); font-size: 18px; line-height: 1; }
.ks-crumb { min-width: 0; overflow: hidden; color: rgba(11,25,44,.58); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ks-shop-shell .ks-crumb { color: rgba(248,241,231,.55); }

.ks-shell-footer {
  margin-top: auto;
  border-top: 1px solid var(--ks-line);
  background: var(--ks-navy-deep);
  color: rgba(255,255,255,.72);
  font-family: var(--ks-sans);
}
.ks-shop-shell .ks-shell-footer { background: #050505; }
.ks-footer-inner { width: min(100% - 40px, 1280px); margin-inline: auto; padding: 58px 0 26px; }
.ks-footer-grid { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 1fr)); gap: clamp(28px, 4vw, 64px); }
.ks-footer-brand img { width: auto; height: 52px; margin-bottom: 17px; }
.ks-shop-footer-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.ks-shop-footer-lockup .ks-shop-emblem { width: 60px; height: 60px; }
.ks-shop-footer-lockup .ks-shop-wordmark > span,
.ks-shop-footer-lockup .ks-shop-wordmark > strong { font-size: 24px; }
.ks-shop-footer-lockup .ks-shop-wordmark > small { font-size: 8px; }
.ks-footer-brand p { max-width: 410px; margin: 0; color: rgba(255,255,255,.62); font-size: 13px; line-height: 1.7; }
.ks-footer-title { display: block; margin: 4px 0 15px; color: var(--ks-light-gold); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.ks-footer-links { display: grid; gap: 10px; }
.ks-footer-links a { width: fit-content; color: rgba(255,255,255,.67); font-size: 13px; }
.ks-footer-links a:hover { color: var(--ks-gold); }
.ks-footer-bottom { margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.09); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: rgba(255,255,255,.43); font-size: 11px; }
.ks-footer-bottom div { display: flex; flex-wrap: wrap; gap: 16px; }
.ks-footer-bottom a:hover { color: var(--ks-gold); }

/* Context-aware discovery: fills weak subpage endings with useful internal routes. */
.ks-discovery {
  border-top: 1px solid var(--ks-line);
  background: linear-gradient(135deg, #f8f4ec 0%, #fff 62%, #f3e5ab 160%);
  color: var(--ks-navy);
  font-family: var(--ks-sans);
}
.ks-shop-shell .ks-discovery { background: #0b0a08; color: #f8f1e7; }
.ks-discovery-inner { width: min(100% - 40px, 1280px); margin-inline: auto; padding: clamp(54px, 7vw, 88px) 0; }
.ks-discovery-head { display: grid; grid-template-columns: minmax(220px,.72fr) minmax(0,1.28fr); column-gap: clamp(28px,6vw,82px); align-items: end; margin-bottom: 30px; }
.ks-discovery-head > span { grid-row: 1 / span 2; align-self: start; color: #8c6a15; font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.ks-shop-shell .ks-discovery-head > span { color: var(--ks-gold); }
.ks-discovery-head h2 { margin: 0; font-family: var(--ks-serif); font-size: clamp(32px,4.2vw,54px); font-weight: 600; line-height: 1.02; letter-spacing: -.025em; }
.ks-discovery-head p { max-width: 660px; margin: 11px 0 0; color: rgba(11,25,44,.62); font-size: 14px; line-height: 1.65; }
.ks-shop-shell .ks-discovery-head p { color: rgba(248,241,231,.58); }
.ks-discovery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid rgba(11,25,44,.16); }
.ks-shop-shell .ks-discovery-grid { border-color: var(--ks-line); }
.ks-discovery-card { min-width: 0; min-height: 250px; padding: clamp(24px,3vw,34px); display: flex; flex-direction: column; border-right: 1px solid rgba(11,25,44,.16); color: inherit; background: rgba(255,255,255,.34); transition: background .2s ease, transform .2s ease; }
.ks-shop-shell .ks-discovery-card { border-color: var(--ks-line); background: rgba(255,255,255,.018); }
.ks-discovery-card:last-child { border-right: 0; }
.ks-discovery-card:hover { background: #fff; transform: translateY(-3px); }
.ks-shop-shell .ks-discovery-card:hover { background: rgba(212,175,55,.08); }
.ks-discovery-card small { color: #8c6a15; font-size: 9px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.ks-shop-shell .ks-discovery-card small { color: var(--ks-gold); }
.ks-discovery-card strong { display: block; margin: 34px 0 12px; font-family: var(--ks-serif); font-size: clamp(22px,2.2vw,29px); font-weight: 600; line-height: 1.12; }
.ks-discovery-card p { margin: 0; color: rgba(11,25,44,.64); font-size: 13px; line-height: 1.65; }
.ks-shop-shell .ks-discovery-card p { color: rgba(248,241,231,.58); }
.ks-discovery-card > span { margin-top: auto; padding-top: 28px; color: #7b5b12; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ks-shop-shell .ks-discovery-card > span { color: var(--ks-light-gold); }
.ks-discovery-card > span b { margin-left: 7px; font-size: 16px; }

/* Shared layout guardrails: tidy rows, equal-height items, no accidental voids. */
main :is(.grid, [class*="grid-cols-"]) > * { min-width: 0; }
main :is(.grid, [class*="grid-cols-"]) { align-items: stretch; }
main :is(.card, [class*="-card"], [class*="card-"]) { height: 100%; }
main > section:empty, main > div:empty { display: none !important; }

@media (max-width: 1080px) {
  .ks-header-inner { grid-template-columns: 1fr auto; min-height: 70px; }
  .ks-primary-nav, .ks-header-actions .ks-pill { display: none; }
  .ks-header-actions { grid-column: 2; }
  .ks-menu-button { display: inline-flex; }
  .ks-brand img { height: 46px; }
  .ks-footer-grid { grid-template-columns: 1.4fr repeat(2, 1fr); }
  .ks-footer-grid > :last-child { grid-column: 2 / -1; }
  .ks-shop-editorial-inner { width: min(100% - 28px, 1320px); min-height: 68px; grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .ks-shop-editorial-left { display: none; }
  .ks-shop-editorial-brand { grid-column: 2; }
  .ks-shop-editorial-brand { gap: 8px; }
  .ks-shop-emblem { width: 44px; height: 44px; }
  .ks-shop-wordmark > span,
  .ks-shop-wordmark > strong { font-size: 17px; }
  .ks-shop-editorial-right { grid-column: 3; }
  .ks-shop-editorial-right .ks-shop-academy-link,
  .ks-shop-editorial-right .ks-pill { display: none; }
}

@media (max-width: 720px) {
  .ks-header-inner, .ks-backbar-inner, .ks-footer-inner { width: min(100% - 28px, 1280px); }
  .ks-header-inner { min-height: 64px; gap: 10px; }
  .ks-brand { gap: 8px; }
  .ks-brand img { height: 40px; max-width: 138px; }
  .ks-brand-copy strong { font-size: 14px; }
  .ks-brand-copy span { display: none; }
  .ks-header-actions { gap: 6px; }
  .ks-icon-button, .ks-menu-button { width: 38px; min-height: 38px; }
  .ks-header-actions .ks-call { display: none; }
  .ks-backbar-inner { min-height: 44px; }
  .ks-crumb { max-width: 52%; }
  .ks-footer-inner { padding-top: 42px; }
  .ks-footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 22px; }
  .ks-footer-brand { grid-column: 1 / -1; }
  .ks-footer-grid > :last-child { grid-column: auto; }
  .ks-footer-bottom { align-items: flex-start; flex-direction: column; }
  .ks-shop-shell body.shop-editorial .editorial-hero { min-height: clamp(640px, calc(100svh - 64px), 760px); }
  .ks-shop-editorial-inner { width: min(100% - 24px, 1320px); min-height: 64px; }
  .ks-shop-editorial-brand { gap: 7px; }
  .ks-shop-emblem { width: 40px; height: 40px; }
  .ks-shop-wordmark > span,
  .ks-shop-wordmark > strong { font-size: 15px; }
  .ks-shop-wordmark > small { font-size: 6px; letter-spacing: 0.13em; }
  .ks-shop-editorial-right .ks-icon-button,
  .ks-shop-editorial-right .ks-menu-button { width: 36px; min-height: 36px; }
  .ks-discovery-inner { width: min(100% - 28px, 1280px); padding: 48px 0; }
  .ks-discovery-head { grid-template-columns: 1fr; margin-bottom: 22px; }
  .ks-discovery-head > span { grid-row: auto; margin-bottom: 10px; }
  .ks-discovery-grid { grid-template-columns: 1fr; }
  .ks-discovery-card { min-height: 0; padding: 24px; border-right: 0; border-bottom: 1px solid rgba(11,25,44,.16); }
  .ks-shop-shell .ks-discovery-card { border-bottom-color: var(--ks-line); }
  .ks-discovery-card:last-child { border-bottom: 0; }
  .ks-discovery-card strong { margin: 15px 0 9px; font-size: 24px; }
  .ks-discovery-card > span { padding-top: 18px; }
  /* Keep the shop's fixed WhatsApp action useful without masking discovery cards. */
  .ks-shop-shell .sticky-wa {
    left: auto;
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 50%;
  }
  .ks-shop-shell .sticky-wa span { display: none; }
}

@media (max-width: 430px) {
  .ks-brand-copy { display: none; }
  .ks-mobile-contact { grid-template-columns: 1fr; }
  .ks-footer-grid { grid-template-columns: 1fr; }
  .ks-footer-brand, .ks-footer-grid > :last-child { grid-column: auto; }
  .ks-crumb { display: none; }
  .ks-backbar-inner { justify-content: flex-start; }
  .ks-shop-wordmark > small { display: none; }
}

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