@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  --ksmm-primary: #182940;
  --ksmm-accent: #BFA454;
  --ksmm-bg: #FAFAF8;
  --ksmm-text: #182940;
  --ksmm-text-light: #5a6a7a;
  --ksmm-border: rgba(24,41,64,0.08);
  --ksmm-radius: 12px;
  --ksmm-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#ksmm-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--ksmm-bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--ksmm-text);
  -webkit-font-smoothing: antialiased;
}

/* ========== HEADER ========== */
.ksmm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ksmm-border);
  background: #fff;
  flex-shrink: 0;
}

.ksmm-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.ksmm-close {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--ksmm-transition);
  color: var(--ksmm-primary);
  text-decoration: none;
}

.ksmm-close:hover,
.ksmm-close:active {
  background: rgba(24,41,64,0.06);
  color: var(--ksmm-accent);
}

.ksmm-close svg {
  width: 22px;
  height: 22px;
}

/* ========== SEARCH ========== */
.ksmm-search {
  padding: 12px 20px;
  border-bottom: 1px solid var(--ksmm-border);
  background: #fff;
  flex-shrink: 0;
}

.ksmm-search .asp_w_container,
.ksmm-search .asp_w {
  width: 100% !important;
  max-width: 100% !important;
}

/* ========== BACK ========== */
.ksmm-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(24,41,64,0.03);
  border-bottom: 1px solid var(--ksmm-border);
  cursor: pointer;
  transition: var(--ksmm-transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.ksmm-back:active {
  background: rgba(24,41,64,0.07);
}

.ksmm-back svg {
  width: 18px;
  height: 18px;
  color: var(--ksmm-accent);
  flex-shrink: 0;
}

.ksmm-back-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ksmm-text-light);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ========== PANELS ========== */
.ksmm-panels {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ksmm-panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 100px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  will-change: transform, opacity;
}

.ksmm-panel.active  { transform: translateX(0); opacity: 1; }
.ksmm-panel.left    { transform: translateX(-30%); opacity: 0; pointer-events: none; }
.ksmm-panel.right   { transform: translateX(100%); opacity: 0; pointer-events: none; }

/* ========== MENU ITEMS ========== */
.ksmm-item {
  display: flex;
  align-items: center;
  padding: 0 20px;
  min-height: 54px;
  text-decoration: none;
  color: var(--ksmm-text);
  transition: var(--ksmm-transition);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  border-bottom: 1px solid var(--ksmm-border);
  position: relative;
}

.ksmm-item:active,
.ksmm-item:hover {
  background: rgba(191,164,84,0.07);
  color: var(--ksmm-accent);
}

.ksmm-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(24,41,64,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  flex-shrink: 0;
  transition: var(--ksmm-transition);
}

.ksmm-item:hover .ksmm-item-icon,
.ksmm-item:active .ksmm-item-icon {
  background: rgba(191,164,84,0.12);
}

.ksmm-item-icon svg {
  width: 16px;
  height: 16px;
  color: var(--ksmm-primary);
  transition: var(--ksmm-transition);
}

.ksmm-item:hover .ksmm-item-icon svg,
.ksmm-item:active .ksmm-item-icon svg {
  color: var(--ksmm-accent);
}

.ksmm-item-text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.ksmm-item-arrow {
  width: 20px;
  height: 20px;
  color: rgba(24,41,64,0.25);
  flex-shrink: 0;
  margin-left: 8px;
  transition: var(--ksmm-transition);
}

.ksmm-item:hover .ksmm-item-arrow,
.ksmm-item:active .ksmm-item-arrow {
  color: var(--ksmm-accent);
  transform: translateX(2px);
}

.ksmm-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--ksmm-accent);
  color: #fff;
  margin-left: 8px;
  flex-shrink: 0;
}

/* ========== ANIMATIONS ========== */
@keyframes ksmmSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ksmm-panel.active .ksmm-item {
  animation: ksmmSlideIn 0.3s ease both;
}

.ksmm-panel.active .ksmm-item:nth-child(1)  { animation-delay: 0.02s; }
.ksmm-panel.active .ksmm-item:nth-child(2)  { animation-delay: 0.04s; }
.ksmm-panel.active .ksmm-item:nth-child(3)  { animation-delay: 0.06s; }
.ksmm-panel.active .ksmm-item:nth-child(4)  { animation-delay: 0.08s; }
.ksmm-panel.active .ksmm-item:nth-child(5)  { animation-delay: 0.10s; }
.ksmm-panel.active .ksmm-item:nth-child(6)  { animation-delay: 0.12s; }
.ksmm-panel.active .ksmm-item:nth-child(7)  { animation-delay: 0.14s; }
.ksmm-panel.active .ksmm-item:nth-child(8)  { animation-delay: 0.16s; }
.ksmm-panel.active .ksmm-item:nth-child(9)  { animation-delay: 0.18s; }
.ksmm-panel.active .ksmm-item:nth-child(10) { animation-delay: 0.20s; }
.ksmm-panel.active .ksmm-item:nth-child(11) { animation-delay: 0.22s; }
.ksmm-panel.active .ksmm-item:nth-child(12) { animation-delay: 0.24s; }

/* Scrollbar */
.ksmm-panel::-webkit-scrollbar { width: 3px; }
.ksmm-panel::-webkit-scrollbar-track { background: transparent; }
.ksmm-panel::-webkit-scrollbar-thumb { background: rgba(24,41,64,0.15); border-radius: 3px; }
