:root {
  --pink: #ff5a8a;
  --pink-deep: #e23c70;
  --orange: #ff8a3d;
  --teal: #16c4a8;
  --teal-deep: #0e9e88;
  --ink: #2a2540;
  --ink-soft: #6b6480;
  --bg: #fff6f9;
  --card: #ffffff;
  --line: #f0e3ea;
  --good: #16a87a;
  --good-bg: #e3f8f0;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(226, 60, 112, 0.10);
  --shadow-lift: 0 16px 40px rgba(226, 60, 112, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Sans Thai", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hero {
  background: linear-gradient(135deg, #ff5a8a 0%, #ff8a3d 100%);
  padding: 28px 20px 64px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 0; right: 0; height: 40px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero__inner { max-width: 920px; margin: 0 auto; position: relative; z-index: 1; }

.brand { display: flex; align-items: baseline; gap: 8px; }
.brand__mark { font-size: 30px; }
.brand__name { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.brand__sub { font-size: 18px; font-weight: 500; opacity: 0.92; }
.hero__tagline { font-size: 16px; opacity: 0.95; margin: 4px 0 20px; font-weight: 500; }

.search {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border-radius: 999px;
  padding: 4px 18px;
  box-shadow: 0 8px 24px rgba(180, 30, 70, 0.22);
}
.search__icon { font-size: 18px; }
.search input {
  flex: 1; border: 0; outline: 0;
  font-family: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 0; background: transparent;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  border: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  padding: 8px 16px; border-radius: 999px;
  transition: transform 0.12s ease, background 0.12s ease;
}
.chip:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.34); }
.chip.is-active { background: #fff; color: var(--pink-deep); font-weight: 700; }

.wrap { max-width: 920px; margin: 0 auto; padding: 8px 20px 40px; }
.meta { color: var(--ink-soft); font-size: 14px; margin: 4px 2px 18px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.card__top {
  display: flex; gap: 14px; align-items: center;
  padding: 16px 16px 12px;
}
.card__thumb {
  width: 60px; height: 60px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  background: linear-gradient(135deg, #fff0f5, #fff4ec);
  border-radius: 16px;
}
.card__head { flex: 1; min-width: 0; }
.card__name { font-size: 15px; font-weight: 700; line-height: 1.4; }
.card__cat { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.best {
  margin: 0 16px 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff0f5, #ffece2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.best__label { font-size: 12px; color: var(--ink-soft); }
.best__price { font-size: 24px; font-weight: 800; color: var(--pink-deep); line-height: 1.1; }
.best__where { font-size: 12px; color: var(--ink-soft); }
.badge-good {
  font-size: 12px; font-weight: 700; color: var(--good);
  background: var(--good-bg); padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}

.deals { padding: 0 16px 8px; display: flex; flex-direction: column; gap: 8px; }
.deal {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color 0.12s ease;
}
.deal.is-best { border-color: var(--teal); background: #f3fdfa; }
.deal__logo {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.deal__info { flex: 1; min-width: 0; }
.deal__plat { font-size: 14px; font-weight: 500; }
.deal__note { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal__price { font-size: 16px; font-weight: 700; white-space: nowrap; }
.deal__btn {
  flex-shrink: 0; text-decoration: none;
  font-family: inherit; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  padding: 8px 14px; border-radius: 10px;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.deal__btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.deal__btn:active { transform: scale(0.97); }

.range { padding: 4px 16px 16px; font-size: 12px; color: var(--ink-soft); }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty p { font-size: 18px; }
.empty__hint { font-size: 14px; margin-top: 6px; }

.foot { max-width: 920px; margin: 0 auto; padding: 24px 20px 48px; text-align: center; }
.foot__disclose {
  font-size: 13px; color: var(--ink-soft);
  background: #fff; border: 1.5px dashed var(--line);
  border-radius: 14px; padding: 12px 16px; margin-bottom: 12px;
}
.foot__copy { font-size: 12px; color: var(--ink-soft); }

.logo-shopee { background: #ffe7df; color: #d8430f; }
.logo-lazada { background: #e7ecff; color: #1a3fb8; }
.logo-aliexpress { background: #ffe2e2; color: #d62b2b; }
.logo-amazon { background: #fff0d6; color: #b66f00; }
.logo-default { background: #eee; color: #555; }
