/* ============================================================
   GLOBAL MARKET v2 — giao diện "Thương Châu · Vietnamese Marketplace"
   Nạp SAU global.css: đổi bảng màu (đỏ thương hiệu + vàng + tím), đầu trang 2 tầng (thanh tìm kiếm, menu),
   trang chủ dạng lưới như bản phác thảo, chân trang. Mọi class cũ vẫn dùng được.
   ============================================================ */
:root {
  --g-primary: #c8102e;
  --g-primary-dark: #a30d25;
  --g-primary-soft: #fdecef;
  --g-gold: #c8941a;
  --g-gold-2: #e5b53d;
  --g-gold-dark: #9a6f0e;
  --g-purple: #4c1d95;
  --g-purple-2: #6d28d9;
  --g-purple-dark: #2e1065;
  --g-cream: #fff8ee;
  --g-bg: #fbf6ef;
  --g-line: #eadfce;
  --g-ink: #241a2e;
  --g-ink-soft: #6b6275;
  --g-radius: 16px;
  --g-shadow: 0 1px 3px rgba(76, 29, 149, .06), 0 6px 18px rgba(120, 80, 20, .08);
  --g-shadow-lg: 0 14px 38px rgba(76, 29, 149, .16);
  --g-grad-gold: linear-gradient(135deg, #e5b53d 0%, #c8941a 100%);
  --g-grad-purple: linear-gradient(135deg, #3b1280 0%, #6d28d9 100%);
}
body { background: var(--g-bg); }

/* ── Đầu trang 2 tầng ──────────────────────────────────── */
.g-header { box-shadow: 0 2px 14px rgba(76, 29, 149, .07); border-bottom: 0; }
.g-header-top { display: none; }
.g-header-main { padding: 10px 20px; gap: 18px; max-width: 1360px; }
.g-logo { gap: 10px; color: var(--g-primary); font-size: 22px; letter-spacing: .3px; }
.g-logo img { width: 52px; height: 52px; object-fit: contain; }
.g-logo .g-logo-txt { display: flex; flex-direction: column; line-height: 1.05; text-transform: uppercase; }
.g-logo small { color: var(--g-gold-dark); font-size: 9.5px; letter-spacing: 1.6px; margin-top: 3px; }
.g-search { max-width: 620px; border-radius: 999px; box-shadow: 0 2px 10px rgba(120, 80, 20, .12); border: 1.5px solid var(--g-line); background: #fff; overflow: hidden; }
.g-search input { border: 0; border-radius: 0; padding: 12px 20px; background: transparent; }
.g-search button { background: var(--g-grad-gold); border-radius: 0; padding: 0 26px; font-size: 18px; transition: filter .15s; }
.g-search button:hover { filter: brightness(1.08); }
.g-hact { font-size: 12px; font-weight: 600; color: var(--g-ink); }
.g-hact:hover { background: var(--g-cream); color: var(--g-primary); }
.g-cart-badge { background: var(--g-primary); top: -1px; right: 0; }
.g-lang-select { border-color: var(--g-line); border-radius: 999px; padding: 8px 12px; }

.g-nav { border-top: 1px solid var(--g-line); background: #fff; }
.g-nav-inner { max-width: 1360px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 6px; position: relative; }
.g-allcat { position: relative; flex: 0 0 auto; }
.g-allcat > button {
  display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 999px; padding: 10px 20px;
  background: var(--g-grad-gold); color: #fff; font-weight: 800; font-size: 14.5px; box-shadow: 0 4px 12px rgba(200, 148, 26, .35);
}
.g-allcat-menu {
  display: none; position: absolute; left: 0; top: calc(100% + 8px); min-width: 250px; max-height: 70vh; overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: var(--g-shadow-lg); padding: 8px; z-index: 120; border: 1px solid var(--g-line);
}
.g-allcat.open .g-allcat-menu { display: block; }
.g-allcat-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.g-allcat-menu a:hover { background: var(--g-cream); color: var(--g-primary); }
.g-allcat-menu a img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.g-allcat-menu a em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--g-ink-soft); font-weight: 500; }
.g-allcat-menu .empty { padding: 12px; color: var(--g-ink-soft); font-size: 13px; }
.g-nav-links { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.g-nav-links::-webkit-scrollbar { display: none; }
.g-nav-links a { flex: 0 0 auto; padding: 10px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--g-ink); white-space: nowrap; }
.g-nav-links a:hover { background: var(--g-cream); color: var(--g-primary); }
.g-nav-links a.on { color: var(--g-primary); font-weight: 800; box-shadow: inset 0 -3px 0 var(--g-gold); border-radius: 0; }

/* ── Nút ───────────────────────────────────────────────── */
.g-btn-gold { background: var(--g-grad-gold); color: #fff; box-shadow: 0 4px 12px rgba(200, 148, 26, .32); }
.g-btn-gold:hover { filter: brightness(1.07); }
.g-btn-purple { background: var(--g-grad-purple); color: #fff; box-shadow: 0 6px 16px rgba(76, 29, 149, .35); }
.g-btn-purple:hover { filter: brightness(1.1); }
.g-btn-red { background: linear-gradient(135deg, #e0183a, #b50d28); color: #fff; box-shadow: 0 6px 16px rgba(200, 16, 46, .35); }
.g-btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: 10px; }

/* ── Hero trang chủ ────────────────────────────────────── */
.gh-hero {
  position: relative; overflow: hidden; color: var(--g-purple-dark);
  background:
    radial-gradient(900px 380px at 12% 0%, rgba(255, 214, 160, .75), transparent 60%),
    radial-gradient(800px 420px at 92% 10%, rgba(255, 180, 190, .6), transparent 60%),
    linear-gradient(180deg, #fff3e3 0%, #fde7e4 55%, #f6e4f2 100%);
}
.gh-hero-inner { max-width: 1360px; margin: 0 auto; padding: 38px 20px 74px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: center; position: relative; z-index: 1; }
.gh-hero h1 { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 800; font-size: clamp(30px, 4.4vw, 54px); line-height: 1.12; color: var(--g-purple); }
.gh-hero h1 em { color: var(--g-primary); font-style: italic; }
.gh-hero .gh-sub { margin-top: 14px; font-size: clamp(15px, 1.7vw, 19px); font-weight: 600; color: var(--g-ink); }
.gh-cta { margin-top: 20px; }
.gh-hero-art { position: relative; min-height: 270px; display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.gh-art-card {
  width: clamp(104px, 13vw, 168px); aspect-ratio: .82; border-radius: 18px; background: #fff; box-shadow: var(--g-shadow-lg);
  overflow: hidden; transform: translateY(var(--dy, 0)) rotate(var(--rot, 0deg)); border: 3px solid #fff; display: block;
}
.gh-art-card img { width: 100%; height: 100%; object-fit: cover; }
.gh-art-card:nth-child(1) { --dy: 14px; --rot: -5deg; }
.gh-art-card:nth-child(2) { --dy: -6px; --rot: 2deg; }
.gh-art-card:nth-child(3) { --dy: 10px; --rot: -2deg; }
.gh-art-card:nth-child(4) { --dy: -10px; --rot: 5deg; }
.gh-art-fallback { text-align: center; padding: 20px; color: var(--g-purple); }
.gh-art-fallback b { display: block; font-family: Georgia, serif; font-style: italic; font-size: 26px; }

.gh-search {
  max-width: 1040px; margin: -52px auto 0; position: relative; z-index: 3; padding: 0 20px;
}
.gh-search-card { background: #fff; border-radius: 22px; box-shadow: var(--g-shadow-lg); padding: 8px 12px 14px; border: 1px solid var(--g-line); }
.gh-tabs { display: flex; gap: 6px; padding: 4px 4px 10px; }
.gh-tab {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border: 0; border-radius: 12px;
  background: transparent; font-weight: 700; font-size: 14.5px; color: var(--g-ink-soft);
}
.gh-tab.on { background: var(--g-grad-purple); color: #fff; box-shadow: 0 4px 12px rgba(76, 29, 149, .3); }
.gh-form { display: flex; gap: 10px; align-items: stretch; }
.gh-input { flex: 1; min-width: 0; display: flex; align-items: center; border: 1.5px solid var(--g-line); border-radius: 14px; padding: 0 14px; background: #fff; }
.gh-input input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 14px 4px; background: transparent; }
.gh-input:focus-within { border-color: var(--g-purple-2); box-shadow: 0 0 0 3px rgba(109, 40, 217, .12); }
.gh-help { text-align: center; font-size: 12.5px; color: var(--g-ink-soft); margin-top: 8px; }

/* ── Dải số liệu thật ──────────────────────────────────── */
.gh-wrap { max-width: 1360px; margin: 0 auto; padding: 0 20px; }
.gh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; background: linear-gradient(180deg, #fff, var(--g-cream)); border: 1px solid var(--g-line); border-radius: 18px; box-shadow: var(--g-shadow); margin: 22px auto 0; max-width: 1040px; }
.gh-stat { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-left: 1px solid var(--g-line); }
.gh-stat:first-child { border-left: 0; }
.gh-stat .ico { font-size: 30px; }
.gh-stat b { display: block; font-size: 22px; line-height: 1.1; color: var(--g-ink); }
.gh-stat span { font-size: 12.5px; color: var(--g-ink-soft); }

/* ── Lưới 3 cột: danh mục · bán chạy · ưu đãi ─────────── */
@media (min-width: 1101px) { .gh-grid.no-cats { grid-template-columns: minmax(0, 2.4fr) minmax(270px, .9fr); } }
@media (max-width: 1100px) { .gh-grid.no-cats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 700px) { .gh-grid.no-cats { grid-template-columns: 1fr; } }
.gh-grid { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 2.4fr) minmax(270px, .9fr); gap: 18px; margin-top: 22px; align-items: start; }
.gh-panel { background: #fff; border-radius: 20px; box-shadow: var(--g-shadow); border: 1px solid var(--g-line); padding: 18px; }
.gh-panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 14px; }
.gh-panel-head h2 { font-size: 18px; white-space: nowrap; font-weight: 800; color: var(--g-ink); display: flex; align-items: center; gap: 9px; }
.gh-panel-head a.more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--g-primary); white-space: nowrap; }
.gh-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gh-cat { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 6px 12px; border-radius: 14px; background: var(--g-cream); border: 1px solid transparent; transition: transform .15s, box-shadow .15s, border-color .15s; text-align: center; }
.gh-cat:hover { transform: translateY(-3px); box-shadow: var(--g-shadow); border-color: var(--g-gold-2); }
.gh-cat .pic { width: 100%; aspect-ratio: 1.25; border-radius: 12px; overflow: hidden; background: #f3e9d9; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.gh-cat .pic img { width: 100%; height: 100%; object-fit: cover; }
.gh-cat span.n { font-size: 13px; font-weight: 700; line-height: 1.25; }
.gh-cat span.c { font-size: 11.5px; color: var(--g-ink-soft); }

.gh-best { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 14px; }
.gh-pc { background: #fff; border: 1px solid var(--g-line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; position: relative; }
.gh-pc:hover { transform: translateY(-3px); box-shadow: var(--g-shadow-lg); }
.gh-pc .img { aspect-ratio: 1; background: #f6efe3; position: relative; display: block; }
.gh-pc .img img { width: 100%; height: 100%; object-fit: cover; }
.gh-pc .tag { position: absolute; top: 10px; left: 10px; background: var(--g-primary); color: #fff; font-size: 11px; font-weight: 800; border-radius: 7px; padding: 3px 8px; }
.gh-pc .tag.ws { background: var(--g-purple-2); }
.gh-pc .body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.gh-pc .nm { font-size: 14px; font-weight: 700; line-height: 1.3; height: 2.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gh-pc .rt { font-size: 12px; display: flex; gap: 5px; align-items: center; }
.gh-pc .rt .st { color: #f5a30a; letter-spacing: 1px; }
.gh-pc .sold { font-size: 12px; color: var(--g-ink-soft); }
.gh-pc .pr { font-size: 20px; font-weight: 900; color: var(--g-primary); }
.gh-pc .pr s { font-size: 12.5px; font-weight: 600; color: var(--g-ink-soft); margin-left: 4px; }
.gh-pc .add { margin-top: auto; width: 100%; border: 0; border-radius: 10px; padding: 11px 8px; font-weight: 800; font-size: 14px; background: var(--g-grad-gold); color: #fff; display: flex; gap: 8px; align-items: center; justify-content: center; }
.gh-pc .add:hover { filter: brightness(1.07); }
.gh-pc .add:disabled { opacity: .6; cursor: wait; }

.gh-side { display: flex; flex-direction: column; gap: 18px; }
.gh-gb { background: var(--g-grad-purple); color: #fff; border-radius: 20px; padding: 20px; box-shadow: var(--g-shadow-lg); position: relative; overflow: hidden; }
.gh-gb h3 { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.gh-gb p { font-size: 13px; opacity: .9; margin-top: 2px; }
.gh-gb .name { margin-top: 12px; font-size: 14px; font-weight: 700; }
.gh-gb .bar { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .25); margin-top: 10px; overflow: hidden; }
.gh-gb .bar i { display: block; height: 100%; background: var(--g-grad-gold); border-radius: 99px; }
.gh-gb .row { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 7px; opacity: .95; }
.gh-gb .btn { margin-top: 14px; }
.gh-gb img.pic { position: absolute; right: -10px; bottom: -10px; width: 112px; height: 112px; object-fit: cover; border-radius: 22px; opacity: .95; transform: rotate(8deg); box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.gh-ws { background: linear-gradient(135deg, #fff1d4, #ffe2a6); border: 1px solid #f1cf86; border-radius: 20px; padding: 20px; box-shadow: var(--g-shadow); }
.gh-ws h3 { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 10px; color: var(--g-purple-dark); }
.gh-ws p { font-size: 13px; color: var(--g-ink-soft); margin-top: 2px; }
.gh-ws .tier { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-top: 8px; color: var(--g-ink); }
.gh-ws .tier b { color: var(--g-primary); }
.gh-ws .btn { margin-top: 14px; width: 100%; }

/* ── Đánh giá + cam kết ────────────────────────────────── */
.gh-trust { display: grid; grid-template-columns: minmax(280px, 1.15fr) minmax(0, 1.4fr) minmax(0, 1.6fr); gap: 0; margin-top: 18px; background: #fff; border-radius: 20px; box-shadow: var(--g-shadow); border: 1px solid var(--g-line); overflow: hidden; }
.gh-trust > div { padding: 20px 24px; border-left: 1px solid var(--g-line); }
.gh-trust > div:first-child { border-left: 0; }
.gh-rev .score { display: flex; align-items: center; gap: 12px; }
.gh-rev .score b { font-size: 38px; line-height: 1; }
.gh-rev .score .st { color: #f5a30a; font-size: 20px; letter-spacing: 2px; }
.gh-rev .dist { margin-top: 10px; display: grid; gap: 4px; }
.gh-rev .dist div { display: grid; grid-template-columns: 22px 1fr 36px; gap: 8px; align-items: center; font-size: 12px; }
.gh-rev .dist .tr { height: 7px; background: #f1e7d6; border-radius: 9px; overflow: hidden; }
.gh-rev .dist .tr i { display: block; height: 100%; background: var(--g-grad-gold); }
.gh-quote { display: flex; gap: 16px; align-items: center; }
.gh-quote .av { flex: 0 0 64px; height: 64px; border-radius: 50%; background: var(--g-grad-purple); color: #fff; font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.gh-quote q { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--g-ink); quotes: "“" "”"; }
.gh-quote .by { margin-top: 8px; font-size: 13px; color: var(--g-ink-soft); }
.gh-badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; text-align: center; }
.gh-badge { padding: 4px 6px; }
.gh-badge .ico { font-size: 30px; display: block; }
.gh-badge b { display: block; font-size: 13px; margin-top: 5px; line-height: 1.25; }
.gh-badge span { display: none; }

.gh-banner { margin: 24px 0 0; background: linear-gradient(90deg, #2e1065 0%, #4c1d95 55%, #6d28d9 100%); color: #fff; }
.gh-banner-inner { max-width: 1360px; margin: 0 auto; padding: 22px 20px; display: flex; align-items: center; gap: 22px; }
.gh-banner img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.gh-banner .brand { font-weight: 900; font-size: 22px; letter-spacing: .4px; color: #fff; text-transform: uppercase; }
.gh-banner .sep { width: 1px; align-self: stretch; background: rgba(255, 255, 255, .35); }
.gh-banner .slogan { font-family: Georgia, serif; font-style: italic; font-size: clamp(18px, 2.4vw, 30px); color: #ffe7a8; }

.gh-empty { padding: 26px 10px; text-align: center; color: var(--g-ink-soft); font-size: 14px; }

/* ── Yêu cầu báo giá (RFQ) ─────────────────────────────── */
.gh-modal { position: fixed; inset: 0; background: rgba(36, 26, 46, .55); display: none; align-items: center; justify-content: center; z-index: 400; padding: 16px; }
.gh-modal.open { display: flex; }
.gh-modal-card { background: #fff; border-radius: 20px; width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 22px; box-shadow: var(--g-shadow-lg); }
.gh-modal-card h3 { font-size: 20px; font-weight: 800; color: var(--g-purple); }
.gh-modal-card label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 5px; }
.gh-modal-card input, .gh-modal-card textarea, .gh-modal-card select { width: 100%; border: 1.5px solid var(--g-line); border-radius: 11px; padding: 11px 12px; outline: none; background: #fff; }
.gh-modal-card textarea { min-height: 96px; resize: vertical; }
.gh-modal-card input:focus, .gh-modal-card textarea:focus, .gh-modal-card select:focus { border-color: var(--g-purple-2); box-shadow: 0 0 0 3px rgba(109, 40, 217, .12); }
.gh-modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gh-modal-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
.gh-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Chân trang v2 ─────────────────────────────────────── */
.g-footer { background: #1d1230; color: #d9d0e6; margin-top: 0; }
.g-footer a { color: #b8aacb; }
.g-footer h4 { color: #ffe7a8; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .gh-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gh-grid .gh-cats-panel { grid-column: 1 / -1; }
  .gh-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gh-side { grid-column: 1 / -1; flex-direction: row; }
  .gh-side > * { flex: 1 1 0; }
  .gh-trust { grid-template-columns: 1fr 1fr; }
  .gh-trust > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--g-line); }
}
@media (max-width: 820px) {
  .g-header-main { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .g-logo img { width: 42px; height: 42px; }
  .g-search { order: 3; flex: 1 1 100%; max-width: none; }
  .g-header-actions { margin-left: auto; }
  .g-hact .txt { display: none; }
  .g-nav-inner { padding: 6px 12px; }
  .g-allcat > button { padding: 9px 14px; font-size: 13.5px; }
  .gh-hero-inner { grid-template-columns: 1fr; padding: 26px 16px 70px; }
  .gh-hero-art { min-height: 150px; gap: 8px; }
  .gh-art-card { width: 27vw; max-width: 130px; }
  .gh-art-card:nth-child(n+4) { display: none; }
  .gh-search { padding: 0 12px; margin-top: -50px; }
  .gh-tab { font-size: 12px; padding: 8px 4px; flex-direction: column; gap: 2px; line-height: 1.2; text-align: center; min-width: 0; }
  .gh-tab .lbl-long { display: none; }
  .gh-form { flex-direction: column; }
  .gh-stats { grid-template-columns: 1fr 1fr; margin: 18px 12px 0; }
  .gh-stat { padding: 12px 14px; border-left: 0; border-top: 1px solid var(--g-line); }
  .gh-stat:nth-child(-n+2) { border-top: 0; }
  .gh-wrap { padding: 0 12px; }
  .gh-grid { grid-template-columns: 1fr; }
  .gh-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gh-best { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gh-side { flex-direction: column; }
  .gh-trust { grid-template-columns: 1fr; }
  .gh-trust > div { border-left: 0; border-top: 1px solid var(--g-line); }
  .gh-trust > div:first-child { border-top: 0; }
  .gh-banner-inner { gap: 12px; padding: 16px 14px; }
  .gh-banner .sep { display: none; }
  .gh-banner img { width: 44px; height: 44px; }
  .gh-banner .brand { font-size: 16px; }
}
@media (max-width: 480px) {
  .gh-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gh-modal-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .gh-pc, .gh-cat { transition: none; } }

/* ══ Yêu thích (tim) + trang chi tiết sản phẩm nâng cấp (3/12) ══ */
.g-heart { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: #9ca3af; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: transform .15s, color .15s; z-index: 2; }
.g-heart:hover { transform: scale(1.08); color: #e11d48; }
.g-heart.on { color: #e11d48; }
.g-heart:focus-visible { outline: 2px solid var(--g-primary); outline-offset: 2px; }
.g-wl-item { display: flex; flex-direction: column; gap: 8px; }
.g-wl-actions { display: flex; gap: 8px; }
.g-wl-actions .g-btn { flex: 1; padding: 9px 10px; font-size: 13px; }
.g-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--g-ink-soft); margin-top: 16px; }
.g-crumbs a { color: var(--g-ink-soft); text-decoration: none; }
.g-crumbs a:hover { color: var(--g-primary); text-decoration: underline; }
.g-crumbs .cur { color: var(--g-ink); font-weight: 600; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-pd-gallery .main { position: relative; }
.g-pd-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(0,0,0,.18); font-size: 20px; color: var(--g-ink); display: none; align-items: center; justify-content: center; }
.g-pd-nav.prev { left: 10px; } .g-pd-nav.next { right: 10px; }
.g-pd-gallery.multi .g-pd-nav { display: flex; }
.g-pd-count { position: absolute; right: 10px; bottom: 10px; background: rgba(17,24,39,.7); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 999px; display: none; }
.g-pd-gallery.multi .g-pd-count { display: block; }
.g-pd-tools { display: flex; gap: 8px; margin-top: 10px; }
.g-pd-tool { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--g-line); border-radius: 999px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: var(--g-ink); cursor: pointer; min-height: 40px; }
.g-pd-tool:hover { border-color: var(--g-primary); color: var(--g-primary); }
.g-pd-tool.on { color: #e11d48; border-color: #fda4af; background: #fff1f2; }
.g-pd-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.g-pd-trust div { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--g-ink-soft); background: #fff; border: 1px solid var(--g-line); border-radius: 11px; padding: 9px 11px; }
.g-pd-trust span { font-size: 18px; }
.g-ws-tiers { margin-top: 10px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 12px; padding: 10px 12px; }
.g-ws-tiers h4 { font-size: 13px; margin: 0 0 6px; color: #92400e; }
.g-ws-tiers .row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 3px 0; }
.g-ws-tiers .row b { color: var(--g-primary); }
.g-ws-tiers a { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--g-purple, #4c1d95); }
.g-sticky-buy { display: none; }
@media (max-width: 760px) {
  .g-pd-trust { grid-template-columns: 1fr; }
  .g-sticky-buy { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 110; display: flex; gap: 8px; align-items: center; padding: 8px 12px;
    background: #fff; border-top: 1px solid var(--g-line); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
  .g-sticky-buy .p { flex: 1; font-weight: 900; color: var(--g-primary); font-size: 18px; line-height: 1.1; min-width: 0; }
  .g-sticky-buy .p small { display: block; font-size: 11px; font-weight: 600; color: var(--g-ink-soft); }
  .g-sticky-buy .g-btn { padding: 12px 16px; min-height: 46px; }
  body.has-sticky-buy .g-main { padding-bottom: 76px; }
}
.g-toast.error { background: var(--g-primary); }
@media (max-width: 760px) {
  /* trang có thanh mua cố định: đẩy nút chat nổi lên trên thanh đó để không che nút "Mua ngay" */
  body.has-sticky-buy .g-chat-fab { bottom: calc(138px + env(safe-area-inset-bottom)); }
}

/* ── Tìm bằng hình ảnh (tab thứ 3 ở trang chủ) ── */
.gh-img { padding: 6px 4px 4px; }
.gh-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; border: 2px dashed #d6c8a0; border-radius: 14px; background: #fffdf6;
  padding: 22px 14px; cursor: pointer; transition: background .15s, border-color .15s; }
.gh-drop:hover, .gh-drop.over, .gh-drop:focus-within { background: #fff7e0; border-color: var(--g-gold, #d4a017); }
.gh-drop .ico { font-size: 30px; }
.gh-drop small { color: var(--g-ink-soft); max-width: 46ch; }
.gh-img-prev { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.gh-img-prev img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--g-line); }
.gh-img-status { color: var(--g-ink-soft); font-size: 14px; padding: 4px 2px 10px; }

/* ── Hero dạng ảnh do admin tải lên (ảnh đã chuẩn hóa: desktop 3:1, mobile 9:10) ── */
.gh-hero.has-photo { background: #2b1a3d; }
.gh-hero-media, .gh-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gh-hero-media { z-index: 0; }
.gh-hero-media img { object-fit: cover; object-position: var(--hx, 50%) var(--hy, 50%); }
.gh-hero-scrim { position: absolute; inset: 0; z-index: 0; background: rgba(15, 8, 25, var(--scrim, 0)); pointer-events: none; }
.gh-hero.has-photo .gh-hero-inner { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; align-content: center;
  /* cao bằng đúng khung ảnh 3:1 (giới hạn 520 px ở màn siêu rộng) + phần chừa cho thẻ tìm kiếm đè lên cạnh dưới */
  min-height: clamp(300px, 33.4vw, 520px); padding-top: 28px; padding-bottom: 84px; }
.gh-hero.has-photo .gh-hero-art { display: none; }
.gh-hero.has-photo.theme-light h1, .gh-hero.has-photo.theme-light .gh-sub { color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .55); }
.gh-hero.has-photo.theme-light h1 em { color: #ffd98a; }
.gh-hero.has-photo.theme-dark h1, .gh-hero.has-photo.theme-dark .gh-sub { text-shadow: 0 1px 10px rgba(255, 255, 255, .7); }
@media (max-width: 700px) {
  /* ảnh mobile 9:10: khung cao bằng đúng tỷ lệ ảnh để không bị cắt xén */
  .gh-hero.has-photo .gh-hero-inner { min-height: clamp(340px, 111vw, 560px); padding: 24px 16px 78px; }
}

/* Ô Popular Categories hẹp: tiêu đề + 'View all' không được cắt chữ */
.gh-cats-panel .gh-panel-head h2 { font-size: 16px; }
