/* Website của đội nhóm ở <slug>.gro1.net (static/site.html, static/js/site.js). Màu chủ đạo theo body.theme-<mã> (gro1/shop.py THEMES). */
body.theme-xanh { --brand: #13707D; } body.theme-duong { --brand: #1f5fbf; } body.theme-la { --brand: #2e7d32; } body.theme-cam { --brand: #c4570e; }
body.theme-do { --brand: #b3261e; } body.theme-hong { --brand: #c2185b; } body.theme-tim { --brand: #6a3fb5; } body.theme-nau { --brand: #7a4e2d; }
body { --accent: var(--brand); --accent-ink: #fff; }
@media (prefers-color-scheme: dark) { body { --accent: color-mix(in srgb, var(--brand) 55%, #fff); --accent-ink: #10181e; } }
.shopTop { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 3px solid var(--accent); }
.shopBrand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.shopLogo { flex: none; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 1.4rem; }
.shopLogo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shopName { display: block; font-weight: 800; font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
.shopTag { display: block; color: var(--muted); font-size: .88rem; line-height: 1.3; }
.shopAsk { flex: none; margin: 0; padding: 10px 14px; }
.shopWrap { max-width: 980px; margin: 0 auto; padding: 16px 16px 120px; }
.shopHero { padding: 28px 0 8px; }
.shopHero h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.2; }
.shopHero p { font-size: 1.1rem; color: var(--muted); max-width: 640px; }
.itemGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--soft); }
.itemNoPic { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--soft); font-size: 2.6rem; }
.itemBody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.itemName { font-weight: 700; font-size: 1.05rem; }
.itemPrice { color: var(--accent); font-weight: 700; }
.itemDesc { color: var(--muted); font-size: .95rem; flex: 1; }
.item button { align-self: flex-start; margin: 8px 0 0; }
.shopCard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 18px 0; }
.pre { white-space: pre-wrap; }
.faq { margin: 0 0 12px; } .faq b { display: block; }
.shopChat { position: fixed; z-index: 5; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 32px));
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.18); }
.chatHead { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.chatHead button { width: 36px; height: 36px; padding: 0; }
.chatLog { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.bubble { padding: 9px 12px; border-radius: 14px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.bubble.ai { align-self: flex-start; background: var(--soft); }
.bubble.done { border: 2px solid var(--ok); }
.chatForm { padding: 8px 12px 10px; border-top: 1px solid var(--line); }
.chatForm textarea { min-height: 52px; }
.chatForm button { margin: 6px 6px 0 0; }
.chatNote { font-size: .78rem; margin: 6px 0 0; }
.coMicOn { outline: 3px solid var(--warn); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) {
  .shopChat { right: 0; bottom: 0; width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .shopAsk { padding: 8px 10px; font-size: .9rem; }
  .shopLogo { width: 40px; height: 40px; }
  .itemGrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
}

/* Mã món, thông tin theo ngành (gro1/catalog.py) */
.itemCode { font-size: 0.8rem; opacity: 0.65; margin-top: 6px; }
.itemInfo { margin-top: 6px; font-size: 0.9rem; }
.itemInfo summary { cursor: pointer; }
.itemInfo ul { margin: 6px 0 0; padding-left: 18px; }
.itemBtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.itemBtns .ask { background: transparent; color: inherit; border: 1px solid currentColor; }

/* Giá khuyến mãi */
.itemSale { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.75rem; font-weight: 600; vertical-align: middle; }
.itemOld { opacity: 0.6; font-weight: 400; font-size: 0.9em; }
.itemUntil { font-size: 0.8rem; font-weight: 400; opacity: 0.75; }
