/* KornSue Product Discovery — extends the original Warm Editorial Commerce system */
.ks-page-header {
  background: linear-gradient(180deg, var(--cream), var(--white));
  padding: 52px 0 42px;
}
.ks-page-header .lead {
  max-width: 760px;
}
.ks-search-large {
  position: relative;
  display: flex;
  gap: 10px;
  margin: 0 0 32px;
  max-width: 820px;
}
.ks-search-large input {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--charcoal);
  font: inherit;
  padding: 12px 18px;
  box-shadow: var(--shadow);
}
.ks-search-large input:focus {
  outline: 3px solid rgba(217, 108, 50, 0.26);
  border-color: var(--orange);
}
.ks-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 140px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.ks-suggestions a {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}
.ks-suggestions a:hover,
.ks-suggestions a:focus {
  background: var(--sage-tint);
}
.ks-home-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -16px;
}
.ks-home-shortcuts a {
  padding: 8px 14px;
  background: var(--sage-tint);
  border-radius: 999px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
}
.ks-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.ks-section-heading h2 {
  margin-bottom: 6px;
}
.ks-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.ks-product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.ks-product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.ks-product-media {
  position: relative;
  aspect-ratio: 1;
  background: var(--cream);
  overflow: hidden;
}
.ks-product-media > a,
.ks-product-media img {
  width: 100%;
  height: 100%;
}
.ks-product-media img {
  object-fit: contain;
  padding: 14px;
  background: #fff;
}
.ks-save {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-size: 24px;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}
.ks-save.is-saved {
  color: #b42318;
}
.ks-discount {
  position: absolute;
  left: 10px;
  top: 10px;
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}
.ks-card-platform {
  position: absolute;
  top: 62px;
  right: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(217, 108, 50, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--orange-dark);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 800;
}
.ks-product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.ks-product-body h3 {
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.55;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.ks-product-desc {
  font-size: 15px;
  color: var(--warm-gray);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ks-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ks-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--sage);
}
.ks-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8a6d2c;
  font-weight: 700;
  font-size: 14px;
}
.ks-rating small {
  color: var(--warm-gray);
  font-weight: 400;
}
.ks-social-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ks-social-proof span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--sage-tint);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}
.ks-seller {
  margin: 0;
  overflow: hidden;
  color: var(--warm-gray);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ks-platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ks-platform {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--sage-tint);
  color: var(--navy);
  border: 1px solid rgba(111, 143, 123, 0.25);
}
.ks-platform-lazada {
  background: #f3ecfb;
  color: #5b2a86;
}
.ks-platform-tiktok-shop {
  background: #f0f2f3;
  color: #252a2e;
}
.ks-platform-shopee {
  background: var(--orange-tint);
  color: var(--orange-dark);
}
.ks-price-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ks-price-row small {
  display: block;
  color: var(--warm-gray);
  font-size: 12px;
}
.ks-price-row strong {
  display: block;
  color: var(--navy);
  font-size: 21px;
}
.ks-price-row del,
.ks-offer-table del {
  color: var(--warm-gray);
  font-size: 13px;
}
.ks-product-cta {
  margin-top: 2px;
}
.ks-price-checked {
  display: block;
  color: var(--warm-gray);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}
.ks-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.ks-category-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px;
  box-shadow: var(--shadow);
  height: 100%;
}
.ks-category-card:hover {
  border-color: var(--sage);
  box-shadow: var(--shadow-md);
}
.ks-category-card h2,
.ks-category-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.ks-category-card p {
  font-size: 15px;
  color: var(--warm-gray);
}
.ks-category-card strong {
  color: var(--orange-dark);
  font-size: 14px;
}
.ks-category-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--sage-tint);
  color: var(--sage);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}
.ks-category-icon img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.ks-listing-section {
  padding-top: 34px;
}
.ks-listing-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.ks-filter-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 96px;
}
.ks-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ks-filter-head h2 {
  font-size: 20px;
}
.ks-filter-close {
  display: none;
}
.ks-filter-group {
  border: 0;
  border-top: 1px solid var(--border);
  padding: 18px 0 8px;
  margin: 0;
}
.ks-filter-group legend {
  font-weight: 700;
  color: var(--navy);
  padding: 0;
  margin-bottom: 8px;
}
.ks-check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  font-size: 15px;
  cursor: pointer;
}
.ks-check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}
.ks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.ks-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ks-toolbar select {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  padding: 7px 10px;
  color: var(--charcoal);
  font: inherit;
  font-size: 15px;
}
.ks-filter-open {
  display: none;
}
.ks-view-switch {
  display: flex;
}
.ks-view-switch button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-size: 20px;
}
.ks-view-switch button:first-child {
  border-radius: 8px 0 0 8px;
}
.ks-view-switch button:last-child {
  border-radius: 0 8px 8px 0;
}
.ks-view-switch button.is-active {
  background: var(--sage-tint);
}
.ks-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ks-active-chip {
  font-size: 12px;
  border: 1px solid var(--sage);
  color: var(--navy);
  border-radius: 999px;
  padding: 3px 8px;
}
.ks-load-more-wrap {
  text-align: center;
  margin-top: 30px;
}
.ks-results .ks-product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ks-product-grid.is-list {
  grid-template-columns: 1fr;
}
.ks-product-grid.is-list .ks-product-card {
  display: grid;
  grid-template-columns: 220px 1fr;
}
.ks-product-grid.is-list .ks-product-media {
  height: 100%;
  aspect-ratio: auto;
  min-height: 220px;
}
.ks-skeleton {
  height: 390px;
  border-radius: var(--radius);
  background: linear-gradient(
    90deg,
    var(--border),
    var(--white),
    var(--border)
  );
  background-size: 200% 100%;
  animation: ks-shimmer 1.3s infinite;
}
@keyframes ks-shimmer {
  to {
    background-position: -200% 0;
  }
}
.ks-state {
  grid-column: 1/-1;
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 54px 24px;
}
.ks-state-icon {
  font-size: 50px;
  color: var(--sage);
}
.ks-state-error {
  border-color: #b42318;
}
.ks-toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 400;
  display: grid;
  gap: 8px;
}
.ks-toast {
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  max-width: 360px;
}
.ks-toast-error {
  background: #8f1d18;
}
.ks-product-hero {
  background: linear-gradient(180deg, var(--cream), var(--white));
  padding: 26px 0 56px;
}
.ks-product-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}
.ks-gallery-main {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  background: var(--white);
  cursor: zoom-in;
}
.ks-gallery-main img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.ks-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  overflow: auto;
}
.ks-thumbs button {
  border: 2px solid transparent;
  border-radius: 9px;
  padding: 0;
  background: var(--white);
  overflow: hidden;
}
.ks-thumbs button.is-active {
  border-color: var(--orange);
}
.ks-thumbs img {
  width: 86px;
  height: 64px;
  object-fit: cover;
}
.ks-product-summary h1 {
  font-size: clamp(30px, 4vw, 44px);
}
.ks-summary-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.ks-highlight-list {
  list-style: none;
  padding: 0;
}
.ks-highlight-list li {
  position: relative;
  padding-left: 28px;
}
.ks-highlight-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 800;
}
.ks-affiliate-note {
  background: var(--gold-tint);
  border-left: 4px solid var(--gold);
  padding: 15px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  margin: 20px 0;
}
.ks-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ks-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 24px;
}
.ks-offer-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}
.ks-offer-table th,
.ks-offer-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  font-size: 15px;
}
.ks-offer-table thead th {
  background: var(--navy);
  color: #fff;
}
.ks-offer-table tbody tr:last-child > * {
  border-bottom: 0;
}
.ks-offer-price {
  color: var(--navy);
  display: block;
  font-size: 20px;
}
.ks-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
  align-items: start;
}
.ks-spec-list {
  display: grid;
  grid-template-columns: minmax(140px, 0.4fr) 1fr;
  border-top: 1px solid var(--border);
}
.ks-spec-list dt,
.ks-spec-list dd {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.ks-spec-list dt {
  font-weight: 700;
  color: var(--navy);
}
.ks-image-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 34, 54, 0.86);
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
}
.ks-image-modal img {
  max-width: min(960px, 90vw);
  max-height: 82vh;
  background: #fff;
  border-radius: var(--radius);
}
.ks-modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--navy);
  font-size: 30px;
}
@media (max-width: 1080px) {
  .ks-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ks-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ks-results .ks-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .ks-listing-layout {
    grid-template-columns: 1fr;
  }
  .ks-filter-panel {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(340px, 92vw);
    z-index: 300;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    overflow: auto;
  }
  .ks-filter-opened .ks-filter-panel {
    transform: none;
  }
  .ks-filter-close,
  .ks-filter-open {
    display: inline-flex;
  }
  .ks-product-hero-grid,
  .ks-detail-grid {
    grid-template-columns: 1fr;
  }
  .ks-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .ks-search-large {
    display: grid;
    grid-template-columns: 1fr;
  }
  .ks-search-large .btn {
    width: 100%;
  }
  .ks-suggestions {
    right: 0;
    top: 58px;
  }
  .ks-product-grid,
  .ks-results .ks-product-grid,
  .ks-category-grid {
    grid-template-columns: 1fr;
  }
  .ks-section-heading,
  .ks-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .ks-toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .ks-product-grid.is-list .ks-product-card {
    grid-template-columns: 112px 1fr;
  }
  .ks-product-grid.is-list .ks-product-media {
    min-height: 170px;
  }
  .ks-product-body {
    padding: 16px;
  }
  .ks-product-actions .btn {
    width: 100%;
  }
  .ks-product-hero {
    padding-top: 12px;
  }
  .ks-page-header {
    padding: 38px 0 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ks-product-card,
  .ks-filter-panel,
  .ks-skeleton {
    animation: none;
    transition: none;
  }
}
.ks-price-filter {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  font-size: 14px;
  color: var(--warm-gray);
}
.ks-price-filter input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--charcoal);
  padding: 8px 10px;
  font: inherit;
}
.ks-related-article {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.ks-related-article:last-child {
  border-bottom: 0;
}
.ks-related-article small {
  color: var(--sage);
  font-weight: 700;
}
.ks-related-article h3 {
  margin: 5px 0;
}
.ks-related-article p {
  color: var(--warm-gray);
  font-size: 15px;
}
