/* Kazuekids storefront catalog (beranda = katalog, filter di kanan) */
.kz-shop-page {
  box-sizing: border-box;
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 5vw 96px;
  color: var(--kz-ink, #222724);
  font-family: 'DM Sans', Arial, sans-serif;
}
.kz-shop-page *,
.kz-shop-page *::before,
.kz-shop-page *::after { box-sizing: border-box; }

.kz-shop-head { margin: 0 0 28px; }
.kz-shop-head h1 {
  margin: 12px 0 10px;
  font: 600 clamp(32px, 4.2vw, 54px)/1.02 'Fredoka', sans-serif;
  letter-spacing: -1.8px;
}
.kz-shop-head h1 em { font-style: normal; color: var(--kz-coral, #ff705e); }
.kz-shop-head p {
  max-width: 620px;
  margin: 0;
  color: #6b7168;
  font-size: 13px;
  line-height: 1.7;
}

.kz-shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 34px;
  align-items: start;
}

/* ---------------------------------------------------------------- produk */
.kz-shop-main { min-width: 0; }
.kz-shop-count {
  min-height: 18px;
  margin: 0 0 16px;
  color: #7d847a;
  font-size: 12px;
  font-weight: 600;
}
.kz-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 16px;
}
.kz-shop-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #efebe2;
  border-radius: 14px;
  background: #fff;
  color: var(--kz-ink, #222724);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.kz-shop-card:hover,
.kz-shop-card:focus-visible {
  transform: translateY(-3px);
  border-color: #ffd9cd;
  box-shadow: 0 16px 32px rgba(34, 39, 36, .09);
  color: var(--kz-ink, #222724);
  text-decoration: none;
}
.kz-shop-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f4efe5;
}
.kz-shop-card-media.is-empty { background: #f1ece2; }
.kz-shop-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.kz-shop-card:hover .kz-shop-card-media img { transform: scale(1.045); }
.kz-shop-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #4d4d4d;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.kz-shop-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 13px 14px;
}
.kz-shop-card-cat {
  overflow: hidden;
  color: #a0a69b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.kz-shop-card-body h3 {
  display: -webkit-box;
  min-height: 40px;
  margin: 0;
  overflow: hidden;
  font: 600 16px/1.25 'Fredoka', sans-serif;
  letter-spacing: -.2px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.kz-shop-card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.kz-shop-card-foot strong {
  color: var(--kz-coral, #ff705e);
  font-size: 15px;
  font-weight: 800;
}
.kz-shop-card-foot span { color: #989e94; font-size: 10px; }

.kz-shop-status {
  min-height: 20px;
  margin: 18px 0 0;
  color: #7d847a;
  font-size: 12px;
  text-align: center;
}
.kz-shop-more-wrap { margin-top: 26px; text-align: center; }
.kz-shop-more {
  min-height: 44px;
  padding: 0 26px;
  border: 1px solid #e7e2d8;
  border-radius: 99px;
  background: #fff;
  color: var(--kz-ink, #222724);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.kz-shop-more:hover { border-color: var(--kz-coral, #ff705e); color: var(--kz-coral, #ff705e); }
.kz-shop-more[hidden] { display: none; }
.kz-shop-more:disabled { opacity: .55; cursor: wait; }

/* ---------------------------------------------------------------- filter */
.kz-shop-filter {
  position: sticky;
  top: 96px;
  padding: 20px 18px;
  border: 1px solid var(--kz-line, #eae8df);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(34, 39, 36, .05);
}
.kz-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.kz-filter-heading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--kz-ink, #222724);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.kz-filter-heading .bi { color: var(--kz-coral, #ff705e); font-size: 15px; }
.kz-filter-reset {
  color: var(--kz-coral, #ff705e);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.kz-filter-reset:hover { color: #d94d3c; text-decoration: underline; }
.kz-filter-group + .kz-filter-group {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #f2efe8;
}
.kz-filter-title {
  display: block;
  margin: 0 0 9px;
  color: #596157;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.kz-filter-search { position: relative; }
.kz-filter-search input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 13px;
  border: 1px solid #e7e2d8;
  border-radius: 10px;
  outline: none;
  background: #fffdf7;
  color: var(--kz-ink, #222724);
  font-family: inherit;
  font-size: 13px;
  transition: border-color .18s, box-shadow .18s;
}
.kz-filter-search input:focus {
  border-color: var(--kz-coral, #ff705e);
  box-shadow: 0 0 0 3px rgba(255, 112, 94, .13);
}
.kz-filter-search button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  place-items: center;
  background: var(--kz-ink, #222724);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.kz-filter-search button:hover { background: var(--kz-coral, #ff705e); }

.kz-filter-cats {
  display: flex;
  max-height: 314px;
  margin: 0 -5px;
  padding: 0 5px;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.kz-filter-cats a {
  display: block;
  padding: 8px 10px;
  overflow: hidden;
  border-radius: 9px;
  color: #545c53;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: background .15s, color .15s;
}
.kz-filter-cats a:hover { background: #fff4ec; color: var(--kz-coral, #ff705e); }
.kz-filter-cats a.is-active {
  background: var(--kz-coral, #ff705e);
  color: #fff;
  font-weight: 800;
}
.kz-filter-select {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid #e7e2d8;
  border-radius: 10px;
  outline: none;
  background: #fffdf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23545c53' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center;
  color: var(--kz-ink, #222724);
  font-family: inherit;
  font-size: 13px;
  appearance: none;
  cursor: pointer;
}
.kz-filter-select:focus {
  border-color: var(--kz-coral, #ff705e);
  box-shadow: 0 0 0 3px rgba(255, 112, 94, .13);
}
.kz-filter-apply {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border: 1px solid var(--kz-ink, #222724);
  border-radius: 9px;
  background: var(--kz-ink, #222724);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.kz-filter-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #f2efe8;
  color: #8a9187;
  font-size: 11px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- responsif */
@media (max-width: 1180px) {
  .kz-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
}
@media (max-width: 980px) {
  .kz-shop-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .kz-shop-filter { position: static; order: -1; padding: 16px; }
  .kz-shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kz-filter-head { margin-bottom: 12px; }
  .kz-filter-group + .kz-filter-group { margin-top: 14px; padding-top: 14px; }
  .kz-filter-cats {
    max-height: none;
    margin: 0 -4px;
    padding: 0 4px 3px;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .kz-filter-cats::-webkit-scrollbar { display: none; }
  .kz-filter-cats a {
    flex: none;
    padding: 8px 12px;
    border: 1px solid #ece7dc;
    border-radius: 99px;
    background: #fff;
    font-size: 12px;
  }
  .kz-filter-cats a.is-active { border-color: var(--kz-coral, #ff705e); }
  .kz-filter-note { margin-top: 14px; padding-top: 13px; }
}
@media (max-width: 840px) {
  .kz-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .kz-shop-page { padding: 24px 16px 58px; }
  .kz-shop-head { margin-bottom: 20px; }
  .kz-shop-head h1 { margin: 9px 0 8px; font-size: 34px; letter-spacing: -1.1px; }
  .kz-shop-head p { font-size: 12px; line-height: 1.6; }
  .kz-shop-filter { padding: 14px; border-radius: 14px; }
  .kz-filter-search input,
  .kz-filter-select { height: 44px; }
  .kz-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .kz-shop-card { border-radius: 12px; }
  .kz-shop-card-body { padding: 10px 10px 12px; }
  .kz-shop-card-body h3 { min-height: 37px; font-size: 14.5px; }
  .kz-shop-card-foot strong { font-size: 14px; }
  .kz-shop-card-foot span { font-size: 9.5px; }
  .kz-shop-count { margin-bottom: 12px; }
}
@media (max-width: 380px) {
  .kz-shop-page { padding-left: 13px; padding-right: 13px; }
  .kz-shop-grid { gap: 14px 8px; }
  .kz-shop-card-body { padding: 9px 8px 11px; }
  .kz-shop-card-body h3 { font-size: 13.5px; }
  .kz-shop-card-foot strong { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .kz-shop-card,
  .kz-shop-card-media img { transition: none; }
}

/* ---------------------------------------------------------------- detail produk */
.kz-detail-shop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 36px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 5vw 90px;
  color: var(--kz-ink, #222724);
  font-family: 'DM Sans', Arial, sans-serif;
}
.kz-detail-shop *,
.kz-detail-shop *::before,
.kz-detail-shop *::after { box-sizing: border-box; }
.kz-product-dialog .kz-detail-shop { padding: 0; width: 100%; gap: 26px; }

.kz-detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}
.kz-detail-photo {
  display: block;
  overflow: hidden;
  border: 1px solid #efebe2;
  border-radius: 14px;
  background: #f4efe5;
  aspect-ratio: 1 / 1;
}
.kz-detail-photo.is-main { grid-column: 1 / -1; aspect-ratio: 4 / 5; }
.kz-detail-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.kz-detail-photo:hover img { transform: scale(1.03); }
.kz-detail-photo.is-empty { display: grid; place-items: center; color: #9aa195; font-size: 12px; }

.kz-detail-copy { min-width: 0; }
.kz-detail-copy h1 {
  margin: 8px 0 18px;
  font: 600 clamp(26px, 3.4vw, 40px)/1.08 'Fredoka', sans-serif;
  letter-spacing: -1px;
}
.kz-detail-price { margin: 0 0 16px; color: var(--kz-coral, #ff705e); font-size: 24px; font-weight: 800; }

.kz-price-groups {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}
.kz-price-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #f0ebe1;
  border-radius: 12px;
  background: #fffdf7;
}
.kz-price-group strong { display: block; font-size: 13.5px; }
.kz-price-group small { display: block; margin-top: 2px; color: #8a9187; font-size: 10.5px; }
.kz-price-group b { color: var(--kz-coral, #ff705e); font-size: 16px; white-space: nowrap; }
.kz-price-group b em { font-size: 10px; font-style: normal; font-weight: 600; color: #9aa195; }

.kz-min-note {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff5e6;
  color: #8a6420;
  font-size: 12px;
  line-height: 1.6;
}
.kz-min-note .bi { margin-right: 4px; }

.kz-add-form { margin: 0 0 22px; }
.kz-variant-groups { display: grid; gap: 12px; }
.kz-variant-group {
  overflow: hidden;
  border: 1px solid #eee9df;
  border-radius: 14px;
  background: #fff;
}
.kz-variant-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #f3efe6;
  background: #fffdf7;
}
.kz-variant-group-head b { display: block; font-size: 13px; }
.kz-variant-group-head span { display: block; margin-top: 2px; color: #8b9287; font-size: 10.5px; }
.kz-variant-group-head strong { color: var(--kz-coral, #ff705e); font-size: 15px; white-space: nowrap; }
.kz-variant-group-head strong small { color: #9aa195; font-size: 9.5px; font-weight: 600; }

.kz-variant-list { display: grid; }
.kz-variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.kz-variant-row + .kz-variant-row { border-top: 1px solid #f5f1e9; }
.kz-variant-row.is-sold-out { opacity: .55; }
.kz-variant-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kz-variant-color {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 99px;
  background: #f2eee5;
  color: #424a41;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.kz-variant-size { color: #656d63; font-size: 12px; white-space: nowrap; }
.kz-variant-info small { color: #a0a69b; font-size: 10px; white-space: nowrap; }
.kz-sold-out-label { color: #b04a4a; font-size: 11px; font-weight: 700; }

.kz-qty-spinner {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e5e0d6;
  border-radius: 99px;
  background: #fff;
}
.kz-qty-spinner button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: #f6f2ea;
  color: #3e453d;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.kz-qty-spinner button:hover { background: #ffe9df; color: var(--kz-coral, #ff705e); }
.kz-qty-input {
  width: 40px;
  height: 30px;
  padding: 0;
  border: 0;
  background: #fff;
  color: #222724;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.kz-qty-input::-webkit-outer-spin-button,
.kz-qty-input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

.kz-add-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff0f0;
  color: #b23a48;
  font-size: 12px;
  line-height: 1.55;
}
.kz-add-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid #eee9df;
  border-radius: 14px;
  background: #fffdf7;
}
.kz-add-summary span { display: block; color: #7d847a; font-size: 11px; }
.kz-add-summary b { color: #222724; }
.kz-add-summary strong { display: block; margin-top: 2px; color: var(--kz-coral, #ff705e); font-size: 20px; }
.kz-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 99px;
  background: var(--kz-ink, #222724);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, transform .18s;
}
.kz-add-button:hover { background: var(--kz-coral, #ff705e); transform: translateY(-1px); }
.kz-add-button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.kz-detail-description {
  padding-top: 18px;
  border-top: 1px solid #eee9df;
  color: #62685f;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.kz-detail-description h2 {
  margin: 0 0 8px;
  color: #222724;
  font: 600 16px 'Fredoka', sans-serif;
}
.kz-detail-description img { max-width: 100%; height: auto; border-radius: 8px; }
.kz-detail-copy .kz-text-link { display: inline-block; margin-top: 14px; }

@media (max-width: 900px) {
  .kz-detail-shop { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 26px 18px 76px; }
  .kz-detail-photo.is-main { aspect-ratio: 1 / 1; }
  .kz-product-dialog .kz-detail-shop { gap: 20px; }
}
@media (max-width: 560px) {
  .kz-detail-shop { padding: 20px 16px 64px; }
  .kz-detail-copy h1 { font-size: 27px; }
  .kz-price-group { padding: 10px 12px; }
  .kz-variant-row { padding: 9px 11px; }
  .kz-variant-info { gap: 6px; }
  .kz-variant-info small { display: none; }
  .kz-add-summary { flex-direction: column; align-items: stretch; }
  .kz-add-button { width: 100%; }
}

/* ---------------------------------------------------------------- header cart */
.kz-header-cart { position: relative; }
.kz-cart-badge {
  position: absolute;
  top: 0;
  right: -2px;
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  place-items: center;
  background: var(--kz-coral, #ff705e);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 253, 247, .96);
}
.kz-add-summary strong { white-space: nowrap; }
.kz-add-summary strong span { display: inline; }

/* ---------------------------------------------------------------- compact sticky topbar (kategori atas, cari bawah) */
.kz-shop-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 0 96px !important;
}
.kz-shop-head { display: none !important; }
.kz-shop-topbar {
  position: sticky;
  top: 78px; /* default header height */
  z-index: 39;
  margin: 0;
  padding: 0 max(12px, 5vw) 10px;
  border-bottom: 1px solid #eee9df;
  background: rgba(255, 253, 247, .98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.kz-shop-cats-wrap { margin: 0 -2px; }
.kz-filter-cats-top {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 10px 2px 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.kz-filter-cats-top::-webkit-scrollbar { display: none; }
.kz-filter-cats-top a {
  flex: none !important;
  display: inline-flex !important;
  align-items: center;
  min-height: 34px;
  padding: 0 13px !important;
  border: 1px solid #e7e2d8 !important;
  border-radius: 99px !important;
  background: #fff !important;
  color: #545c53 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
.kz-filter-cats-top a.is-active {
  border-color: #ff705e !important;
  background: #ff705e !important;
  color: #fff !important;
}
.kz-shop-toprow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.kz-top-search { min-width: 0; margin: 0; }
.kz-top-search .kz-filter-search input,
.kz-top-sort .kz-filter-select {
  height: 42px !important;
  font-size: 16px !important; /* prevent iOS zoom */
}
.kz-top-sort { width: 148px; margin: 0; }
.kz-shop-main { padding: 10px max(12px, 5vw) 0; }
.kz-shop-grid { gap: 14px 10px; }

/* align sticky offset with header breakpoints */
@media (max-width: 850px) {
  .kz-shop-topbar { top: 68px; }
}
@media (max-width: 560px) {
  .kz-shop-topbar { top: 92px; } /* header inner + mobile nav */
  .kz-shop-toprow { grid-template-columns: minmax(0, 1fr) 126px; }
  .kz-top-sort { width: 126px; }
  .kz-top-sort .kz-filter-select { padding-left: 10px !important; font-size: 14px !important; }
}
@media (max-width: 640px) {
  .kz-shop-topbar { padding-bottom: 8px; }
  .kz-shop-main { padding-top: 8px; }
}

/* category select + sort icon */
.kz-shop-toprow-cat {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  gap: 8px !important;
  align-items: center;
  padding-top: 10px;
}
.kz-top-cat { min-width: 0; }
.kz-cat-select {
  width: 100% !important;
  height: 42px !important;
  padding: 0 34px 0 12px !important;
  border: 1px solid #e7e2d8 !important;
  border-radius: 10px !important;
  background-color: #fff !important;
  color: #222724 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}
.kz-top-sort {
  width: 42px !important;
  margin: 0 !important;
}
.kz-sort-icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e7e2d8;
  border-radius: 10px;
  background: #fff;
  color: #222724;
  cursor: pointer;
}
.kz-sort-icon-btn > .bi {
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
}
.kz-sort-icon-btn:hover {
  border-color: #ff705e;
  color: #ff705e;
  background: #fff8f3;
}
/* native select overlays the icon so options work; visually hidden */
.kz-sort-select {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}
.kz-top-search-full { margin-top: 8px; }
@media (max-width: 560px) {
  .kz-cat-select { font-size: 16px !important; }
}

/* ---------------------------------------------------------------- Shopee-style product detail */
.sp-detail {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 calc(var(--kz-nav-h, 58px) + env(safe-area-inset-bottom, 0px) + 16px);
  background: #fff;
  font-family: 'DM Sans', Arial, sans-serif;
  color: #222724;
}
.sp-detail *, .sp-detail *::before, .sp-detail *::after { box-sizing: border-box; }

.sp-gallery { background: #fff; }
.sp-gallery-main {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #fff;
  aspect-ratio: 1 / 1;
}
.sp-gallery-main::-webkit-scrollbar { display: none; }
.sp-gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  background: #fff;
}
.sp-gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: min(100vw, 560px);
  object-fit: contain;
  background: #fff;
}
.sp-gallery-slide.is-empty {
  min-height: 280px;
  color: #9aa195;
  font-size: 13px;
}
.sp-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 8px 12px 0;
  background: #fff;
}
.sp-gallery-dot {
  width: 6px; height: 6px;
  border-radius: 99px;
  background: #ddd6ca;
  transition: transform .18s, background .18s;
}
.sp-gallery-dot.is-active { background: #ff705e; transform: scale(1.2); }
.sp-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #fff;
}
.sp-gallery-thumbs::-webkit-scrollbar { display: none; }
.sp-gallery-thumb {
  flex: 0 0 58px;
  width: 58px; height: 58px;
  padding: 0;
  border: 2px solid #ece7dc;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sp-gallery-thumb.is-active { border-color: #ff705e; }
.sp-gallery-thumb img { display:block; width:100%; height:100%; object-fit:cover; }

.sp-info { display: grid; gap: 8px; padding: 8px 0 0; }
.sp-info-card {
  padding: 14px 12px;
  background: #fff;
}
.sp-price {
  margin: 0 0 6px;
  color: #ff705e;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}
.sp-name {
  margin: 0;
  color: #222724;
  font: 600 17px/1.35 'DM Sans', Arial, sans-serif;
  letter-spacing: -.2px;
}
.sp-min-note {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff6e5;
  color: #8a6420;
  font-size: 12px;
  line-height: 1.45;
}
.sp-group-prices { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.sp-group-chip {
  display:inline-flex; align-items:center; gap:6px;
  min-height: 28px; padding: 0 10px;
  border: 1px solid #f0d9c8; border-radius: 99px;
  background: #fffaf7; color: #6b4a3a; font-size: 11.5px;
}
.sp-group-chip b { color:#222724; }

.sp-section-title {
  margin: 0 0 10px;
  color: #222724;
  font: 700 14px/1.2 'DM Sans', Arial, sans-serif;
}
.sp-description {
  color: #4b5249;
  font-size: 13.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.sp-description p { margin: 0 0 10px; }
.sp-description p:last-child { margin-bottom: 0; }
.sp-description img { max-width:100%; height:auto; border-radius:8px; }
.sp-description ul, .sp-description ol { margin: 0 0 10px 1.2em; padding: 0; }

.sp-add-form { margin: 0; }
.sp-add-summary {
  position: sticky;
  bottom: calc(var(--kz-nav-h, 58px) + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  margin: 12px -12px -14px !important;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  border: 0 !important;
  border-top: 1px solid #ece7dc !important;
  border-radius: 0 !important;
  background: rgba(255,253,247,.98) !important;
  backdrop-filter: blur(10px);
}
.sp-add-button { min-height: 44px !important; border-radius: 12px !important; }

@media (min-width: 768px) {
  .sp-detail {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: 0 16px;
    align-items: start;
    padding: 16px 16px 40px;
    background: transparent;
  }
  .sp-gallery {
    position: sticky;
    top: 92px;
    border: 1px solid #ece7dc;
    border-radius: 16px;
    overflow: hidden;
  }
  .sp-gallery-main { aspect-ratio: 1 / 1; }
  .sp-gallery-slide img { max-height: 460px; }
  .sp-info { gap: 12px; padding-top: 0; }
  .sp-info-card { border: 1px solid #ece7dc; border-radius: 16px; }
  .sp-price { font-size: 28px; }
  .sp-name { font-size: 20px; }
  .sp-add-summary {
    position: static;
    margin: 14px 0 0 !important;
    padding: 13px 14px !important;
    border: 1px solid #eee9df !important;
    border-radius: 14px !important;
  }
}

/* detail: buy bar + add-to-cart sheet (Shopee-like popup) */
.sp-detail-compact { padding-bottom: calc(var(--kz-nav-h, 58px) + env(safe-area-inset-bottom, 0px) + 74px); }
.sp-buy-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--kz-nav-h, 58px) + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,253,247,.98);
  border-top: 1px solid #ece7dc;
  backdrop-filter: blur(10px);
}
.sp-buy-open {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 46px;
  border: 0; border-radius: 12px;
  background: #ff705e; color: #fff;
  font: 700 15px/1 'DM Sans', Arial, sans-serif;
  cursor: pointer;
}
.sp-buy-open:disabled { background: #d4cec3; color: #7a8176; cursor: not-allowed; }

.sp-buy-dialog {
  width: min(100%, 680px);
  max-width: 100%;
  max-height: none;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: transparent;
  overflow: visible;
}
.sp-buy-dialog::backdrop { background: rgba(34,39,36,.46); }
.sp-buy-sheet {
  display: flex; flex-direction: column;
  max-height: min(88vh, 760px);
  background: #fffdf7;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  font-family: 'DM Sans', Arial, sans-serif;
  color: #222724;
}
.sp-buy-sheet-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #ece7dc;
  background: #fffdf7;
}
.sp-buy-sheet-product { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.sp-buy-thumb {
  width: 72px; height: 72px; flex: 0 0 72px;
  border-radius: 10px; object-fit: cover; background: #fff;
  border: 1px solid #ece7dc;
}
.sp-buy-sheet-price { color: #ff705e; font-size: 20px; font-weight: 800; line-height: 1.1; }
.sp-buy-sheet-name { margin-top: 4px; color: #4b5249; font-size: 13px; line-height: 1.35; }
.sp-buy-close {
  width: 36px; height: 36px; flex: 0 0 36px;
  border: 0; border-radius: 10px; background: #f3eee4; color: #222724;
  display: grid; place-items: center; cursor: pointer; font-size: 18px;
}
.sp-buy-sheet-body {
  overflow: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
}
.sp-buy-group-prices {
  display: grid; gap: 6px;
  margin: 0 0 12px; padding: 10px 12px;
  border: 1px solid #f0d9c8; border-radius: 12px; background: #fffaf7;
}
.sp-buy-group-price { display:flex; justify-content:space-between; gap:10px; font-size:13px; color:#6b4a3a; }
.sp-buy-group-price b { color:#ff705e; }
.sp-buy-min { margin-top:2px; font-size:11.5px; color:#8a6420; }
.sp-buy-submit-bar {
  position: sticky; bottom: 0; z-index: 2;
  margin: 12px -14px calc(-14px - env(safe-area-inset-bottom, 0px)) !important;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  border: 0 !important; border-top: 1px solid #ece7dc !important;
  border-radius: 0 !important;
  background: rgba(255,253,247,.98) !important;
  backdrop-filter: blur(10px);
}
@media (min-width: 768px) {
  .sp-detail-compact { padding-bottom: 40px; }
  .sp-buy-bar {
    position: sticky; bottom: 16px;
    left: auto; right: auto;
    grid-column: 1 / -1;
    margin: 0 16px;
    border: 1px solid #ece7dc; border-radius: 14px;
  }
  .sp-buy-dialog {
    margin: auto; border-radius: 18px;
    width: min(680px, calc(100% - 32px));
  }
  .sp-buy-sheet { border-radius: 18px; max-height: min(86vh, 760px); }
}
