/* ===== Kenya Ni Home Marketplace — Jumia-inspired Design ===== */
/* Scoped under .knh-marketplace to avoid conflicts with the news site */

.knh-marketplace .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.knh-marketplace {
  --orange: #f68b1e;
  --orange-hover: #e07e1b;
  --ink: #313133;
  --muted: #75757a;
  --line: #e4e6e8;
  --paper: #ffffff;
  --paper-alt: #f5f6f7;
  --bg: #f6f7f8;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-btn: 4px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
  --green: #009063;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.knh-marketplace *, .knh-marketplace *::before, .knh-marketplace *::after {
  box-sizing: border-box;
}

.knh-marketplace a { color: inherit; text-decoration: none; }
.knh-marketplace img { max-width: 100%; display: block; }
.knh-marketplace button, .knh-marketplace input, .knh-marketplace select {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== Container ===== */
.knh-marketplace .container,
.knh-marketplace .row {
  max-width: 1248px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 12px;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .knh-marketplace .container,
  .knh-marketplace .row { padding: 0 12px; }
}

/* ===== Header ===== */
.knh-marketplace .head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.knh-marketplace .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
  padding: 0;
  box-sizing: border-box;
}

.knh-marketplace .header .mobile-menu-toggle {
  display: none;
}

.knh-marketplace .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 22px;
  white-space: nowrap;
  color: var(--ink);
  flex-shrink: 0;
}

.knh-marketplace .logo img {
  max-height: 32px;
  max-width: 160px;
  object-fit: contain;
}

.knh-marketplace .logo small {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--orange);
  font-weight: 700;
}

.knh-marketplace .search {
  display: flex;
  flex: 1;
  height: 38px;
}

.knh-marketplace .search .search-icon {
  display: none;
}

.knh-marketplace .search input {
  flex: 1;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 0 16px;
  outline: none;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  background: var(--paper-alt);
  transition: all 0.2s ease;
}

.knh-marketplace .search input:focus {
  border-color: var(--orange);
  background: var(--paper);
  box-shadow: 0 0 0 2px rgba(246, 139, 30, 0.2);
}

.knh-marketplace .search button.search-submit {
  background: var(--orange);
  color: var(--paper);
  border: 1px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.knh-marketplace .search button.search-submit:hover {
  background: var(--orange-hover);
  border-color: var(--orange-hover);
}

/* ===== Account / Cart Buttons ===== */
.knh-marketplace .headbtn {
  background: none;
  border: none;
  padding: 4px 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius-btn);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.knh-marketplace .headbtn:hover {
  color: var(--orange);
}

.knh-marketplace .headbtn i {
  font-size: 15px;
}

/* ===== Dropdown Menus ===== */
.knh-marketplace .headbtn.dropdown {
  position: relative;
}

.knh-marketplace .dropdown-menu {
  position: absolute;
  top: 100%;
  z-index: 10;
  left: 0;
  min-width: 200px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  margin: 0;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.knh-marketplace .dropdown-menu.show {
  display: block;
}

.knh-marketplace .headbtn:hover .dropdown-menu,
.knh-marketplace .dropdown-menu:hover {
  display: block;
}

.knh-marketplace .dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: all 0.2s ease;
}

.knh-marketplace .dropdown a:hover {
  background: var(--orange);
  color: var(--paper);
}

.knh-marketplace .headbtn .badge {
  background: var(--orange);
  color: var(--paper);
  border-radius: 50%;
  padding: 2px 7px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.knh-marketplace .headbtn#whatsapp {
  color: #25d36e;
  padding: 4px 10px;
}
.knh-marketplace .headbtn#whatsapp:hover {
  background: rgba(37, 211, 108, 0.1);
  color: #1dd850;
}
.knh-marketplace .headbtn#whatsapp i {
  font-size: 16px;
}
.knh-marketplace .footlinks a.footlink-whatsapp {
  color: #25d36e;
  font-weight: 700;
}
.knh-marketplace .footlinks a.footlink-whatsapp:hover {
  text-decoration: underline;
}
.knh-marketplace .nav {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  box-sizing: border-box;
}

.knh-marketplace .nav::-webkit-scrollbar { height: 4px; }
.knh-marketplace .nav::-webkit-scrollbar-thumb { background: #d4d4d6; }

.knh-marketplace .nav button {
  background: none;
  border: none;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
}

.knh-marketplace .nav button:hover { color: var(--orange); }
.knh-marketplace .nav button.active {
  color: var(--orange);
  font-weight: 700;
}
.knh-marketplace .nav button.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--orange);
}

.knh-marketplace .nav button i { font-size: 16px; }

/* ===== Main Content ===== */
.knh-marketplace main {
  padding: 20px 0;
}

/* ===== Hero ===== */
.knh-marketplace .hero {
  position: relative;
  margin: 16px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #100c1b;
  box-shadow: none;
  min-height: 280px;
  aspect-ratio: 1740 / 520;
  cursor: default;
}

.knh-marketplace .hero-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.knh-marketplace .hero-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  position: relative;
}

.knh-marketplace .hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.knh-marketplace .hero .slide-text {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 40px 8%;
  width: 60%;
  color: white;
  z-index: 2;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7));
}

.knh-marketplace .hero .slide-text h1 {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 8px;
  color: white;
  font-family: 'Montserrat', sans-serif;
  animation: slideIn 0.6s ease-out;
}

.knh-marketplace .hero .slide-accent {
  color: var(--orange);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  display: block;
  margin: 4px 0 8px;
  animation: slideIn 0.6s ease-out 0.1s both;
}

.knh-marketplace .hero .slide-description {
  font-size: clamp(14px, 2.2vw, 17px);
  line-height: 1.4;
  font-weight: 400;
  margin: 0 0 16px;
  color: #e0e0e0;
  font-family: 'Montserrat', sans-serif;
  max-width: 90%;
  animation: slideIn 0.6s ease-out 0.1s both;
}

.knh-marketplace .hero .hero-cta {
  border-radius: 24px;
  padding: 10px 24px;
  font-weight: 700;
  background: white;
  color: var(--ink);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: slideIn 0.6s ease-out 0.2s both;
}

.knh-marketplace .hero .hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.knh-marketplace .hero .arrow {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.knh-marketplace .hero .arrow:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.knh-marketplace .hero .arrow.prev { left: 8px; }
.knh-marketplace .hero .arrow.next { right: 8px; left: auto; }

.knh-marketplace .hero .dots {
  display: flex;
  gap: 6px;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.knh-marketplace .hero .dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 100%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.knh-marketplace .hero .dots button.on {
  background: var(--orange);
  transform: scale(1.2);
}

@media (max-width: 1024px) {
  .knh-marketplace .hero { min-height: 200px; }
}
/* ===== Section Layout ===== */
.knh-marketplace section.category-section,
.knh-marketplace section.mint,
.knh-marketplace section.flash,
.knh-marketplace section.results {
  margin: 20px 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: none;
}

/* Section background colors by category (applied to entire section) */
.knh-marketplace section.section-top    { background: #e8f5e9; }
.knh-marketplace section.section-flash  { background: #e6f4ea; }
.knh-marketplace section.section-official   { background: #e8f5e9; }
.knh-marketplace section.section-phones     { background: #e2f5f1; }
.knh-marketplace section.section-audio      { background: #e5f3f7; }
.knh-marketplace section.section-appliances { background: #f0f7e8; }
.knh-marketplace section.section-beauty     { background: #e8f7ef; }
.knh-marketplace section.section-home       { background: #eaf4e2; }
.knh-marketplace section.section-fashion    { background: #e0f5ea; }
.knh-marketplace section.section-computing  { background: #e6f2f0; }
.knh-marketplace section.section-cars       { background: #f5f0e6; }
.knh-marketplace section.results,
.knh-marketplace section.results.show       { background: var(--paper); }

.knh-marketplace section.category-section.empty,
.knh-marketplace section.mint.empty,
.knh-marketplace section.flash.empty,
.knh-marketplace section.results.empty {
  display: none;
}

/* ===== Section Head ===== */
.knh-marketplace .sectionhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 12px 16px;
  gap: 12px;
  flex-wrap: nowrap;
  margin: 0;
}

.knh-marketplace .sectionhead h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.knh-marketplace .sectionhead h2 i {
  font-size: 20px;
}

/* Distinct colors for section titles */
.knh-marketplace .section-top .sectionhead h2,
.knh-marketplace .section-official .sectionhead h2 { color: #2e7d32; }
.knh-marketplace .section-flash .sectionhead h2 { color: #ffffff; }
.knh-marketplace .section-phones .sectionhead h2 { color: #00695c; }
.knh-marketplace .section-audio .sectionhead h2 { color: #0277bd; }
.knh-marketplace .section-appliances .sectionhead h2 { color: #558b2f; }
.knh-marketplace .section-beauty .sectionhead h2 { color: #2e7d32; }
.knh-marketplace .section-home .sectionhead h2 { color: #558b2f; }
.knh-marketplace .section-fashion .sectionhead h2 { color: #2e7d32; }
.knh-marketplace .section-computing .sectionhead h2 { color: #00695c; }
.knh-marketplace .section-cars .sectionhead h2 { color: #6d4c41; }

.knh-marketplace .sectionhead h2 i { color: inherit; }

.knh-marketplace .sectionhead .timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  background: var(--paper);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  flex-shrink: 0;
}

.knh-marketplace .sectionhead .seeall {
  background: transparent;
  border: 1px solid var(--line);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 24px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.knh-marketplace .sectionhead .seeall:hover {
  color: var(--orange);
  background: var(--bg);
  border-color: var(--orange);
}

.knh-marketplace .sectionhead .seeall i {
  font-size: 14px;
  color: var(--muted);
}

/* ===== Products Horizontal Scroll (all breakpoints) ===== */
.knh-marketplace .products {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  margin: 0;
  box-sizing: border-box;
  scroll-snap-type: x proximity;
  -ms-overflow-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
  -webkit-overflow-scrolling: touch;
}

.knh-marketplace .products::-webkit-scrollbar {
  height: 4px;
}

.knh-marketplace .products::-webkit-scrollbar-track {
  background: transparent;
}

.knh-marketplace .products::-webkit-scrollbar-thumb {
  background-color: var(--muted);
  border-radius: 2px;
}

.knh-marketplace .products .product {
  flex: 0 0 185px;
  width: 185px;
  height: auto;
  min-height: 0;
  scroll-snap-align: start;
  align-self: stretch;
}

/* ===== Product Row Wrapper ===== */
.knh-marketplace .products-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

/* ===== Prev/Next Arrows ===== */
.knh-marketplace .products-wrap .arrow {
  position: sticky;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.knh-marketplace .products-wrap .arrow:hover:not(:disabled) {
  background: var(--orange);
  color: var(--paper);
  transform: translateY(-50%) scale(1.1);
}

.knh-marketplace .products-wrap .arrow:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.knh-marketplace .products-wrap .arrow.next {
  left: auto;
  right: 0;
}

.knh-marketplace .products .product {
  flex: 0 0 auto;
  width: 185px;
}

/* ===== Product Card ===== */
.knh-marketplace .product {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 0 0 185px;
  width: 185px;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  box-shadow: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  align-self: stretch;
}

.knh-marketplace .product .photo {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  display: block;
  border: 0;
  border-radius: 12px 12px 0 0;
  background-color: #f8f9fa;
  overflow: hidden;
  flex-shrink: 0;
}

.knh-marketplace .product .photo img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.knh-marketplace .product .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 42px;
  color: var(--muted);
}

.knh-marketplace .product .details {
  padding: 8px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0;
  min-height: 0;
}

.knh-marketplace .product .name {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  color: var(--ink);
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.2s ease;
  min-height: 0;
  max-height: 36px;
}

.knh-marketplace .product .name:hover {
  color: var(--orange);
}

.knh-marketplace .product .rating {
  font-size: 11px;
  line-height: 16px;
  color: #f68b1e;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}

.knh-marketplace .product .rating span {
  color: var(--muted);
  font-weight: 500;
}

.knh-marketplace .product .price {
  font-weight: 700;
  font-size: 15px;
  line-height: 20px;
  color: var(--ink);
  margin-top: 6px;
}

.knh-marketplace .product .price-old-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.knh-marketplace .product .old {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
}

.knh-marketplace .product .discount {
  background: #11843b;
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
}

.knh-marketplace .product .add {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  background: #303030;
  color: var(--paper);
  border-radius: 50%;
  font-size: 20px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.2s ease;
}

.knh-marketplace .product .add:hover {
  background: var(--orange);
  transform: scale(1.1);
}

/* ===== Categories Grid ===== */
.knh-marketplace .categories {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 12px 0;
}

.knh-marketplace .categories button.cat {
  padding: 12px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: var(--ink);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.knh-marketplace .categories button.cat:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  box-shadow: var(--shadow-card);
}

.knh-marketplace .categories .cat .photo {
  border-radius: var(--radius-sm);
  aspect-ratio: 1.5 / 1;
  margin-bottom: 8px;
  background: var(--paper-alt);
}

/* ===== Promo Banners ===== */
.knh-marketplace .promos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 0;
}

.knh-marketplace .promo {
  padding: 24px;
  text-align: left;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #e62020, #ff6500);
  color: white;
  position: relative;
  min-height: 160px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.knh-marketplace .promo:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.knh-marketplace .promo strong {
  font-size: 26px;
  line-height: 1.1;
  display: block;
  max-width: 70%;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.knh-marketplace .promo span {
  display: block;
  font-size: 13px;
  opacity: 0.9;
}

.knh-marketplace .promo:nth-child(2) {
  background: linear-gradient(120deg, #d93025, #e65100);
}

.knh-marketplace .promo:nth-child(3) {
  background: linear-gradient(120deg, #1a73e8, #4285f4);
}

.knh-marketplace .promo:nth-child(4) {
  background: linear-gradient(120deg, #f68b1e, #ffb347);
}

.knh-marketplace .promo b {
  position: absolute;
  right: 16px;
  top: 24px;
  font-size: 40px;
  opacity: 0.2;
}

/* ===== Flash Sales ===== */
.knh-marketplace .flash {
  margin: 16px 0;
}

.knh-marketplace .section-flash .sectionhead {
  background: linear-gradient(90deg, #c62828, #f68b1e);
  color: white;
  border-radius: 14px 14px 0 0;
  padding: 14px 20px;
  margin: 0;
  flex-wrap: nowrap;
  gap: 12px;
}

.knh-marketplace .section-flash .sectionhead h2 {
  color: white;
  font-size: 20px;
  margin: 0;
}

.knh-marketplace .section-flash .sectionhead small {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.95;
}

.knh-marketplace .section-flash .sectionhead .seeall {
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.knh-marketplace .section-flash .sectionhead .seeall:hover {
  background: rgba(255, 255, 255, 0.15);
}

.knh-marketplace .section-flash .timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  background: white;
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
}

.knh-marketplace .flash {
  display: none;
}

/* ===== Footer ===== */
.knh-marketplace .footer {
  background: #232a32;
  color: rgba(255, 255, 255, 0.72);
  padding: 28px 0 20px;
  margin-top: 24px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
}

.knh-marketplace .footer .wrap {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0;
}

.knh-marketplace .footer .logo {
  display: flex;
  align-items: center;
  font-weight: 900;
  font-size: 22px;
  color: var(--paper);
}

.knh-marketplace .footer .logo img {
  max-height: 32px;
  max-width: 150px;
  object-fit: contain;
}

.knh-marketplace .footer .logo small {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--orange);
}

.knh-marketplace .footlinks {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.knh-marketplace .footlinks a {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  padding: 6px 12px;
  border-radius: var(--radius-btn);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.knh-marketplace .footlinks a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.knh-marketplace .note {
  font-size: 12px;
  color: #75757a;
  max-width: 1248px;
  margin: 24px auto 0;
  padding: 0 12px;
}

/* ===== Modal ===== */
.knh-marketplace dialog {
  border: none;
  border-radius: var(--radius);
  padding: 26px;
  max-width: 540px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.25);
}

.knh-marketplace dialog::backdrop {
  background: rgba(16, 24, 39, 0.6);
  backdrop-filter: blur(4px);
}

.knh-marketplace dialog .close {
  float: right;
  background: var(--paper-alt);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 22px;
  border: none;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.knh-marketplace dialog .close:hover {
  background: var(--orange);
  color: var(--paper);
  transform: scale(1.1);
}

.knh-marketplace dialog .modalphoto {
  max-width: 260px;
  margin: 20px auto;
}

.knh-marketplace dialog .price {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  margin: 16px 0;
}

.knh-marketplace dialog .old {
  color: var(--muted);
}

.knh-marketplace dialog .demotext {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.knh-marketplace dialog .full {
  width: 100%;
  margin-top: 15px;
}

/* ===== Toast ===== */
.knh-marketplace .toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 14px 25px;
  border-radius: var(--radius-sm);
  z-index: 2000;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.18);
  display: none;
  max-width: 90%;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.knh-marketplace .toast.show {
  display: block;
}

/* ===== Search Results ===== */
.knh-marketplace .results {
  display: none;
}

.knh-marketplace .results.show {
  display: block;
}

.knh-marketplace .empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

body.knh-marketplace.filtered .browse { display: none; }

/* ===== Actions Wrapper ===== */
.knh-marketplace .header .actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== Mobile Drawer Navigation ===== */
.knh-marketplace .drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.knh-marketplace .drawer-overlay.show {
  opacity: 1;
  visibility: visible;
}

.knh-marketplace .mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: 88vw;
  max-width: 380px;
  background: #ffffff;
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.knh-marketplace .mobile-drawer.open {
  transform: translateX(0);
}

.knh-marketplace .mobile-drawer[aria-hidden="true"] {
  pointer-events: none;
}

.knh-marketplace .drawer-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  border-bottom: 1px solid #eeeeee;
  flex-shrink: 0;
  background: #ffffff;
  z-index: 2;
}

.knh-marketplace .drawer-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
}

.knh-marketplace .drawer-logo img {
  max-height: 36px;
  max-width: 140px;
  width: auto;
}

.knh-marketplace .drawer-content {
  overflow-y: auto;
  flex: 1;
  background: #ffffff;
}

.knh-marketplace .drawer-section {
  border-bottom: 1px solid #eeeeee;
}

.knh-marketplace .drawer-section-head {
  width: 100%;
  min-height: 48px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: #ffffff;
  border: none;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}

.knh-marketplace .drawer-section-head:focus {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.knh-marketplace .drawer-section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: #555;
}

.knh-marketplace .drawer-chevron {
  font-size: 16px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.knh-marketplace .drawer-section-head[aria-expanded="true"] .drawer-chevron {
  transform: rotate(90deg);
}

.knh-marketplace .drawer-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #ffffff;
}

.knh-marketplace .drawer-sub.expanded {
  max-height: 2000px;
}

.knh-marketplace .drawer-sub a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px 14px 28px;
  font-size: 16px;
  font-weight: 400;
  color: #333;
  text-decoration: none;
  border: none;
  background: none;
  font-family: 'Montserrat', sans-serif;
  min-height: 56px;
}

.knh-marketplace .drawer-sub a i {
  font-size: 24px;
  width: 24px;
  min-width: 24px;
  color: var(--ink);
  flex-shrink: 0;
}

.knh-marketplace .drawer-divider {
  height: 1px;
  background: #eeeeee;
  margin: 0;
}

.knh-marketplace .drawer-categories-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 10px;
}

.knh-marketplace .drawer-see-all {
  color: var(--orange);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.knh-marketplace .drawer-cat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px 14px 28px;
  font-size: 16px;
  font-weight: 400;
  color: #333;
  text-decoration: none;
  border: none;
  background: none;
  font-family: 'Montserrat', sans-serif;
  min-height: 56px;
  width: 100%;
  text-align: left;
}

.knh-marketplace .drawer-cat i {
  font-size: 24px;
  width: 24px;
  min-width: 24px;
  color: var(--ink);
  flex-shrink: 0;
}

.knh-marketplace .drawer-cat.active {
  background: rgba(246, 139, 30, 0.08);
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 768px) {
  /* Mobile: cards shrink to 160px, horizontal scroll stays */
  .knh-marketplace .products {
    gap: 10px;
    padding: 12px 12px;
    -webkit-overflow-scrolling: touch;
  }
  .knh-marketplace .products .product {
    flex: 0 0 160px;
    width: 160px;
    height: 100%;
  }
  .knh-marketplace .products-wrap {
    align-items: stretch;
  }

  /* --- Header --- */
  .knh-marketplace .header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    height: auto;
    min-height: 88px;
    padding: 10px 12px;
    box-sizing: border-box;
  }
  .knh-marketplace .header .mobile-menu-toggle {
    display: inline-flex;
  }
  .knh-marketplace .header .logo {
    flex: 0 0 auto;
    margin: 0;
    max-width: 140px;
  }
  .knh-marketplace .header .logo img {
    height: 36px;
    max-width: 100%;
  }
  .knh-marketplace .header .headbtn#help,
  .knh-marketplace .header .headbtn#livechat,
  .knh-marketplace .header .headbtn#whatsapp {
    display: none;
  }
  .knh-marketplace .header .account-text,
  .knh-marketplace .header .cart-text {
    display: none;
  }
  .knh-marketplace .header .headbtn .badge {
    display: inline-flex;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 50%;
    margin-left: 2px;
  }
  .knh-marketplace .nav {
    display: none;
  }

  /* --- Search: 48px rounded field below nav row --- */
  .knh-marketplace .header .search {
    flex-basis: 100%;
    order: 2;
    min-width: 0;
    width: 100%;
    margin: 8px 0 0;
    padding: 0 8px 0 0;
    height: 48px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .knh-marketplace .header .search .search-icon {
    flex: 0 0 auto;
    margin: 0 2px 0 12px;
    font-size: 18px;
    color: #313133;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .knh-marketplace .header .search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    font-size: 16px;
    background: transparent;
    border: 0;
    outline: 0;
    box-shadow: none;
    font-family: 'Montserrat', sans-serif;
    color: var(--ink);
  }
  .knh-marketplace .header .search input::placeholder {
    color: #8c8c94;
  }
  .knh-marketplace .header .search input:focus {
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .knh-marketplace .header .search button.search-submit {
    display: none;
  }

  /* --- Icon-only header controls --- */
  .knh-marketplace .header .headbtn,
  .knh-marketplace .header .headbtn.dropdown {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 0;
    gap: 0;
    min-width: 38px;
    min-height: 38px;
    justify-content: center;
    border-radius: var(--radius-sm);
  }
  .knh-marketplace .header .headbtn i {
    font-size: 18px;
  }
  .knh-marketplace .header .headbtn .badge {
    font-size: 10px;
  }
  .knh-marketplace .header .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 190px;
  }

  /* --- Hero --- */
  .knh-marketplace .hero {
    min-height: 200px;
    aspect-ratio: auto;
    height: 210px;
    margin: 12px 0;
  }
  .knh-marketplace .hero .slide-text {
    padding: 16px 12px;
    width: 100%;
    max-width: 100%;
  }
  .knh-marketplace .hero .slide-text h1 { font-size: 20px; line-height: 1.15; }
  .knh-marketplace .hero .slide-accent { font-size: 16px; }
  .knh-marketplace .hero .slide-description { font-size: 13px; margin-bottom: 12px; }
  .knh-marketplace .hero .hero-cta { padding: 8px 18px; font-size: 13px; }
  .knh-marketplace .hero .arrow { display: none; }
  .knh-marketplace .hero .dots { bottom: 6px; }

  /* --- Section spacing on mobile --- */
  .knh-marketplace section.category-section,
  .knh-marketplace section.flash,
  .knh-marketplace section.results {
    margin: 16px 0;
    border-radius: 12px;
  }
  .knh-marketplace .sectionhead {
    padding: 10px 12px;
    gap: 8px;
    margin: 0;
  }
  .knh-marketplace .sectionhead h2 { font-size: 16px; }
  .knh-marketplace .sectionhead .seeall {
    font-size: 12px;
    padding: 8px 16px;
  }
  .knh-marketplace .section-flash .sectionhead { padding: 10px 12px; }
  .knh-marketplace .section-flash .sectionhead h2 { font-size: 16px; }
  .knh-marketplace .section-flash .sectionhead small { font-size: 12px; }
  .knh-marketplace .section-flash .timer {
    font-size: 11px;
    padding: 4px 8px;
    white-space: nowrap;
  }
  .knh-marketplace .categories { grid-template-columns: repeat(3, 1fr); }
  .knh-marketplace .promos { grid-template-columns: repeat(2, 1fr); }
  .knh-marketplace .promo { min-height: 110px; padding: 14px; }
  .knh-marketplace .promo strong { font-size: 18px; }
  .knh-marketplace .nav { gap: 12px; }
  .knh-marketplace .nav button { font-size: 12px; }
}

@media (max-width: 430px) {
  .knh-marketplace .products {
    gap: 8px;
    padding: 12px 8px;
    -webkit-overflow-scrolling: touch;
  }
  .knh-marketplace .product {
    flex: 0 0 160px;
    width: 160px;
    height: 100%;
  }
  .knh-marketplace .products-wrap {
    align-items: stretch;
  }
  .knh-marketplace .products-wrap .arrow {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .knh-marketplace .product .name {
    font-size: 13px;
    line-height: 18px;
  }
  .knh-marketplace .product .price { font-size: 15px; }
  .knh-marketplace .container,
  .knh-marketplace .row { padding: 0 12px; box-sizing: border-box; }
  .knh-marketplace .header { height: auto; min-height: 88px; }
  .knh-marketplace .header .logo { max-width: 140px; }
  .knh-marketplace .header .logo img { height: 36px; }
  .knh-marketplace .hero { height: 190px; min-height: 190px; }
  .knh-marketplace .hero .slide-text h1 { font-size: 18px; }
  .knh-marketplace .hero .slide-accent { font-size: 15px; }
  .knh-marketplace .sectionhead h2 { font-size: 16px; }
  .knh-marketplace .sectionhead .seeall {
    font-size: 11px;
    padding: 8px 16px;
  }
  .knh-marketplace .flash .timer { font-size: 10px; padding: 3px 6px; }
  .knh-marketplace .promo { min-height: 96px; padding: 12px; }
  .knh-marketplace .promo strong { font-size: 16px; }
  .knh-marketplace .promo span { font-size: 11px; }
}
