.page {
  max-width: var(--w-page); min-height: 100vh; margin: 0 auto;
  background: var(--c-bg); padding-bottom: var(--sp-6);
}
@media (min-width: 520px) {
  body { background: var(--c-surface-2); }
  .page { box-shadow: var(--sh-card); }
}

/* Header: tổng chiều cao <= 2/5 màn 9:16 (~0.71 x chiều rộng) */
.hero { position: relative; background: var(--c-surface); border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: var(--sh-card); }
.hero__cover {
  height: clamp(72px, 22vw, 110px); background: var(--g-header) center 30% / cover no-repeat;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.hero__cover.has-image::after {
  content: ""; display: block; height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,.12), rgba(0,0,0,0) 45%);
  border-radius: inherit;
}
.hero__share {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  width: 34px; min-height: 34px; padding: 0;
  background: rgba(255,255,255,.85); color: var(--c-text); border-color: transparent;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hero__share:hover { background: #fff; }
.hero__body { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); padding: 0 var(--sp-4) var(--sp-2); text-align: center; }
.hero__avatar {
  width: 72px; height: 72px; margin-top: -36px; border-radius: 50%;
  border: 3px solid var(--c-surface); background: var(--c-primary-soft) center / cover no-repeat;
  box-shadow: var(--sh-card); position: relative;
}
.hero__name { margin: 2px 0 0; font-size: var(--fs-lg); font-weight: 700; line-height: 1.3; }
.hero__desc {
  margin: 0; color: var(--c-text-muted); font-size: var(--fs-sm); line-height: 1.45; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Link mạng xã hội: dạng link chữ có màu + icon, cách nhau 12px (không dùng dấu ngăn vì treo đầu dòng khi xuống hàng) */
.hero__links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: var(--sp-3); row-gap: 2px; max-width: 100%; margin-top: var(--sp-1); }
.hero__links a {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  color: var(--c-primary-strong); font-size: var(--fs-sm); font-weight: 600; text-decoration: none;
}
.hero__links a:hover, .hero__links a:active { text-decoration: underline; }
.hero__links a svg { width: 14px; height: 14px; flex: none; }
.hero__links a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Search */
.search { position: sticky; top: 0; z-index: 5; padding: var(--sp-3) var(--sp-4); background: var(--c-bg); }
.search__icon { position: absolute; left: calc(var(--sp-4) + 12px); top: 50%; transform: translateY(-50%); color: var(--c-text-muted); }
.search__input { padding-left: 40px; border-radius: var(--r-pill); }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); padding: 0 var(--sp-4); }
.product { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.product__img { position: relative; aspect-ratio: 1 / 1; background: var(--c-surface-2); }
.product__img img { width: 100%; height: 100%; object-fit: cover; }
.product__img .badge { position: absolute; top: var(--sp-2); left: var(--sp-2); }
.product__info { display: flex; flex-direction: column; gap: var(--sp-1); flex: 1; padding: var(--sp-2) var(--sp-3) var(--sp-3); }
.product__name {
  margin: 0; font-size: var(--fs-sm); font-weight: 500; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product__rating { display: flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-xs); color: var(--c-text-muted); }
.product__rating strong { color: var(--c-text); font-weight: 600; }
.product__stars { position: relative; display: inline-block; flex: none; color: var(--c-border); font-size: 12px; line-height: 1; letter-spacing: 1px; white-space: nowrap; }
.product__stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--c-star); white-space: nowrap; }
.product__cta { margin-top: auto; padding-top: var(--sp-2); }
.product__cta .btn { width: 100%; min-height: 34px; }
