/* ── Custom Properties ─────────────────────────────────── */
:root {
  --forest: #1B4332;
  --forest-700: #2D6A4F;
  --forest-500: #52B788;
  --forest-200: #95D5B2;
  --forest-100: #D8F3DC;
  --forest-50: #F0FBF4;

  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --surface-2: #F9F9F7;
  --border: rgba(0,0,0,0.07);
  --border-strong: rgba(0,0,0,0.12);

  --text-1: #111827;
  --text-2: #4B5563;
  --text-3: #9CA3AF;

  --green: #34C759;
  --green-dark: #248A3D;
  --red: #EF4444;
  --blue: #007AFF;

  --sidebar-w: 228px;
  --topbar-h: 52px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bottomnav-h: calc(56px + var(--safe-bottom));

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; height: 100%; }
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
img { display: block; }
.hidden { display: none !important; }

/* ── App Shell ─────────────────────────────────────────── */
@media (min-width: 1024px) {
  body { padding-left: var(--sidebar-w); }
  .topbar, .bottom-nav { display: none !important; }
}
@media (max-width: 1023px) {
  body { padding-top: var(--topbar-h); padding-bottom: var(--bottomnav-h); }
  .sidebar { display: none !important; }
}

/* Login overrides - full screen regardless of layout */
body.page-login-active { padding: 0 !important; }
body.page-login-active .sidebar,
body.page-login-active .topbar,
body.page-login-active .bottom-nav { display: none !important; }

/* Detail page overrides - hide topbar, remove top padding so back-bar sits flush */
@media (max-width: 1023px) {
  body.page-detail-active { padding-top: 0 !important; }
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--forest);
  display: flex;
  flex-direction: column;
  z-index: 300;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 20px 20px;
  cursor: pointer;
}
.sidebar-brand-text {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.62);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  text-align: left;
  width: 100%;
  line-height: 1;
}
.sidebar-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.sidebar-item:hover { background: rgba(255,255,255,0.09); color: rgba(255,255,255,0.9); }
.sidebar-item.active { background: rgba(255,255,255,0.15); color: #fff; font-weight: 600; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-user:hover { background: rgba(255,255,255,0.08); }
.sidebar-user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--forest-500); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-name {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}

/* ── Sidebar Google Login Button ────────────────────── */
.sidebar-google-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 16px 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.sidebar-google-login:hover { background: rgba(255,255,255,0.18); }

.sidebar-lang-btn {
  display: flex; align-items: center; justify-content: center;
  margin: 4px 12px 2px;
  padding: 7px 12px; border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.75);
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  cursor: pointer; transition: background 0.15s;
}
.sidebar-lang-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* ── Mobile Top Bar ────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 200;
}
.topbar-brand {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}
.topbar-action {
  width: 36px; height: 36px; border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.topbar-action svg { width: 19px; height: 19px; }

/* ── Mobile Bottom Nav ─────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-h);
  padding: 0 0 var(--safe-bottom);
  background: rgba(255,255,255,0.96);
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  align-items: stretch;
  z-index: 200;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  font-size: 10px; font-weight: 500;
  color: var(--text-3);
  transition: color 0.15s;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--forest); font-weight: 700; }

/* ── Page Layout ───────────────────────────────────────── */
.page { min-height: 100dvh; }

.page-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Page Header ───────────────────────────────────────── */
.page-head {
  padding: 32px 28px 22px;
}
@media (max-width: 1023px) {
  .page-head { padding: 18px 16px 14px; }
}

.page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.4px;
  line-height: 1.1;
}
@media (max-width: 1023px) {
  .page-title { font-size: 22px; }
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 3px;
}

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 9px 16px;
  margin-top: 14px;
  max-width: 480px;
}
.search-bar svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text-1);
}
.search-bar input::placeholder { color: var(--text-3); }

/* ── Home Page ─────────────────────────────────────────── */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 14px;
}
@media (max-width: 1023px) {
  .home-header { padding: 16px 16px 12px; }
}

.home-greeting { font-size: 13px; color: var(--text-3); font-weight: 500; margin-bottom: 3px; }
.home-title {
  font-size: 26px; font-weight: 700; letter-spacing: -0.4px;
  color: var(--text-1); line-height: 1.1;
}
@media (max-width: 1023px) {
  .home-title { font-size: 22px; }
}

.home-header-actions { display: flex; gap: 8px; align-items: center; padding-top: 4px; }

.home-pills {
  display: flex;
  gap: 8px;
  padding: 14px 28px 20px;
  flex-wrap: wrap;
}
@media (max-width: 1023px) {
  .home-pills { padding: 12px 16px 14px; }
}
.home-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
  cursor: pointer;
  transition: background 0.15s;
}
.home-pill:hover { background: var(--forest-50); }
.home-pill svg { width: 13px; height: 13px; }



/* ── Admin Dashboard ──────────────────────────────────── */
.admin-shop-list { display: flex; flex-direction: column; gap: 8px; }
.admin-shop-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); cursor: pointer; transition: background 0.15s;
}
.admin-shop-card:hover { background: var(--surface-2); }
.admin-shop-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff; overflow: hidden;
}
.admin-shop-info { flex: 1; min-width: 0; }
.admin-shop-name { font-size: 14px; font-weight: 600; }
.admin-shop-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-3); margin-top: 4px; flex-wrap: wrap; }



.admin-actions-side { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.admin-action {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 14px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); transition: all 0.15s ease;
}
.admin-action svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-action:hover { background: var(--surface-2); border-color: var(--text-3); }
.admin-action:active { transform: translateY(1px); }
.admin-action--primary {
  background: var(--forest); border-color: var(--forest); color: #fff;
  box-shadow: 0 2px 8px rgba(27,67,50,0.25);
}
.admin-action--primary:hover { background: var(--forest-700); border-color: var(--forest-700); }
.admin-action--danger { color: var(--red); border-color: rgba(239,68,68,0.35); }
.admin-action--danger:hover { background: rgba(239,68,68,0.08); border-color: var(--red); }

.admin-section { margin-top: 24px; }
.admin-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

/* ── Image Library grid ──────────────────────────────────── */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 0 28px 40px;
}
@media (max-width: 1023px) {
  .lib-grid { padding: 0 16px 24px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
.lib-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lib-card-img {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--forest-50);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.lib-card-img img { width: 100%; height: 100%; object-fit: cover; }
.lib-card-img svg { width: 40px; height: 40px; color: var(--forest-200); }
.lib-card-name {
  font-size: 14px; font-weight: 600; color: var(--text-1);
  padding: 10px 12px 6px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-card-actions { display: flex; border-top: 1px solid var(--border); }
.lib-btn {
  flex: 1; padding: 10px 0; border: none; background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--forest); cursor: pointer;
  transition: background 0.15s;
}
.lib-btn:hover { background: var(--forest-50); }
.lib-btn--del { color: var(--red); border-left: 1px solid var(--border); }
.lib-btn--del:hover { background: rgba(239,68,68,0.08); }

/* ── Scrape Log (terminal panel) ─────────────────────────── */
.admin-log-card {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid #1e2530; background: #0d1117;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.admin-log-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: #161b22; border-bottom: 1px solid #1e2530;
}
.admin-log-dots { display: flex; gap: 6px; }
.admin-log-dots span { width: 11px; height: 11px; border-radius: 50%; display: block; }
.admin-log-dots span:nth-child(1) { background: #ff5f56; }
.admin-log-dots span:nth-child(2) { background: #ffbd2e; }
.admin-log-dots span:nth-child(3) { background: #27c93f; }
.admin-log-title {
  flex: 1; text-align: center; font-size: 12.5px; font-weight: 600;
  color: #8b949e; letter-spacing: 0.02em;
}
.admin-log-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: #3fb950;
}
.admin-log-live {
  width: 7px; height: 7px; border-radius: 50%; background: #3fb950;
  box-shadow: 0 0 0 0 rgba(63,185,80,0.6); animation: logPulse 1.6s infinite;
}
@keyframes logPulse {
  0% { box-shadow: 0 0 0 0 rgba(63,185,80,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(63,185,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,185,80,0); }
}

.admin-deal-list { display: flex; flex-direction: column; gap: 6px; }
.admin-deal-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px;
}
.admin-deal-img {
  width: 40px; height: 40px; border-radius: var(--radius); flex-shrink: 0;
  overflow: hidden; background: var(--forest-50);
  display: flex; align-items: center; justify-content: center;
}
.admin-deal-img img { width: 100%; height: 100%; object-fit: cover; }
.admin-deal-img svg { width: 18px; height: 18px; color: var(--forest-300); }
.admin-deal-product { flex: 1; font-weight: 500; }
.admin-deal-price { color: var(--forest); font-weight: 600; white-space: nowrap; }
.admin-deal-date { color: var(--text-3); font-size: 11px; white-space: nowrap; }

.admin-log {
  margin: 0; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 1.65; color: #c9d1d9; background: #0d1117;
  padding: 14px 16px; max-height: 420px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word; tab-size: 2;
}
.admin-log::-webkit-scrollbar { width: 8px; }
.admin-log::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
.admin-log::-webkit-scrollbar-track { background: transparent; }

.btn-sm {
  padding: 6px 14px; border-radius: var(--radius); font-size: 12px; font-weight: 600;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); cursor: pointer; transition: background 0.15s;
}
.btn-sm:hover { background: var(--surface-2); }

/* ── Feedback (settings) ─────────────────────────────────── */
.feedback-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
}
.feedback-intro {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 12px;
}
.feedback-intro svg { width: 18px; height: 18px; color: var(--forest-500); flex-shrink: 0; margin-top: 1px; }
.feedback-textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 90px;
  padding: 12px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); font-size: 14px; font-family: inherit;
  color: var(--text-1); background: var(--surface-2); transition: border-color 0.15s;
}
.feedback-textarea:focus { outline: none; border-color: var(--forest-500); background: var(--surface); }
.feedback-send {
  margin-top: 12px; width: 100%; padding: 12px; border: none;
  border-radius: var(--radius); background: var(--forest); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.feedback-send:hover { background: var(--forest-700); }
.feedback-send:disabled { opacity: 0.6; cursor: default; }
.feedback-status { margin-top: 10px; font-size: 13px; font-weight: 500; text-align: center; min-height: 18px; }
.feedback-status--ok { color: var(--forest-700); }
.feedback-status--err { color: var(--red); }

/* ── Admin feedback list ─────────────────────────────────── */
.admin-feedback-list { display: flex; flex-direction: column; gap: 10px; }
.admin-feedback-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.admin-feedback-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 12px; flex-wrap: wrap;
}
.admin-feedback-from { font-weight: 600; color: var(--text-1); }
.admin-feedback-email { color: var(--text-3); }
.admin-feedback-date { color: var(--text-3); margin-left: auto; }
.admin-feedback-del {
  border: none; background: transparent; cursor: pointer; color: var(--text-3);
  padding: 4px; border-radius: 6px; display: flex; transition: all 0.15s;
}
.admin-feedback-del svg { width: 16px; height: 16px; }
.admin-feedback-del:hover { background: rgba(239,68,68,0.1); color: var(--red); }
.admin-feedback-msg { font-size: 14px; line-height: 1.55; color: var(--text-1); white-space: pre-wrap; word-break: break-word; }
.admin-feedback-page { margin-top: 8px; font-size: 11px; color: var(--text-3); }

/* ── Sort Bar ─────────────────────────────────────────── */
.sort-bar {
  display: flex;
  gap: 0;
  padding: 0 28px 16px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 1023px) {
  .sort-bar { padding: 0 16px 12px; }
}
.sort-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.sort-tab:hover { color: var(--text-2); }
.sort-tab.active {
  color: var(--forest);
  border-bottom-color: var(--forest);
}
.sort-tab svg { width: 15px; height: 15px; }



/* ── Shop group (home page "By Store" view) ───────────── */
.shop-group { margin-bottom: 8px; }

.shop-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 28px 12px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.shop-group-header:hover { opacity: 0.75; }
@media (max-width: 1023px) {
  .shop-group-header { padding: 14px 16px 10px; }
}
.shop-group-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-group-dist {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}
.shop-group-time {
  font-size: 12px;
  color: var(--text-3);
}
.shop-group-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--forest);
  background: var(--forest-50);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.shop-group-arrow {
  font-size: 18px;
  color: var(--text-3);
  flex-shrink: 0;
}
.shop-group + .shop-group {
  border-top: 1px solid var(--border);
  padding-top: 4px;
}

/* Flex-wrap row: cards left-aligned (no grid whitespace). Collapsed shows
   one row; "Show all" expands the rest in place (no navigation). */
.shop-row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 28px 4px;
}
.shop-row-wrap.collapsed {
  max-height: 222px;   /* exactly one card row — never reveals row 2 */
  overflow: hidden;
}
/* Uniform, fixed-height cards. flex-basis = exactly 6 per row (5 gaps of
   12px), so rows fill the width and a short last row stays left-aligned. */
.shop-row-wrap .deal-card { flex: 0 0 calc((100% - 60px) / 6); height: 216px; }
.shop-row-wrap .deal-card-img { aspect-ratio: auto; height: 118px; }
.shop-row-wrap .deal-card-body { padding: 8px 12px 12px; }
.shop-row-wrap .deal-card-name {
  -webkit-line-clamp: 1; min-height: 0; margin-bottom: 4px; font-size: 14px;
}
.shop-row-wrap .deal-card-meta { margin-bottom: 2px; }
@media (max-width: 1279px) { .shop-row-wrap .deal-card { flex-basis: calc((100% - 36px) / 4); } }
@media (max-width: 1023px) {
  .shop-row-wrap { padding: 0 16px 4px; }
  .shop-row-wrap .deal-card { flex-basis: calc((100% - 24px) / 3); }
}
@media (max-width: 639px)  { .shop-row-wrap .deal-card { flex-basis: calc((100% - 12px) / 2); } }

.shop-expand-btn {
  display: block;
  margin: 4px 28px 12px;
  padding: 8px 0;
  width: calc(100% - 56px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--forest);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.shop-expand-btn:hover { background: var(--forest-50); }
@media (max-width: 1023px) { .shop-expand-btn { margin: 4px 16px 12px; width: calc(100% - 32px); } }

/* ── WeChat Banner ────────────────────────────────────── */
.wechat-banner {
  margin: 0 28px 12px;
  padding: 10px 14px;
  background: #FFF3CD;
  border: 1px solid #FFECB5;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-size: 13px; color: #856404; flex-wrap: wrap;
}
@media (max-width: 1023px) {
  .wechat-banner { margin: 0 16px 10px; }
}

/* ── Login Banner ─────────────────────────────────────── */
.login-banner {
  margin: 0 28px 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--forest-50), #E8F5E9);
  border: 1px solid var(--forest-200);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 1023px) {
  .login-banner { margin: 0 16px 12px; }
}
.login-banner-text { font-size: 13px; color: var(--forest-700); font-weight: 500; flex: 1; }

.btn-google-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a73e8;
  color: #fff;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-google-sm:hover { opacity: 0.9; }

/* ── Sidebar Login Button ────────────────────────────── */
.sidebar-login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 8px 6px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--forest-200);
  text-decoration: none;
  transition: background 0.15s;
}
.sidebar-login-btn:hover { background: rgba(255,255,255,0.1); }

/* ── Deal Grid ─────────────────────────────────────────── */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 0 28px 40px;
}
@media (max-width: 1599px) { .deal-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1279px) { .deal-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1023px) { .deal-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px 24px; } }
@media (max-width: 639px)  { .deal-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* ── Deal Card ─────────────────────────────────────────── */
.deal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.14s, box-shadow 0.14s;
  display: flex;
  flex-direction: column;
}
.deal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.deal-card:active { transform: scale(0.99); transition: transform 0.08s; }

.deal-card-img {
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--forest-50);
  flex-shrink: 0;
}
.deal-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.deal-card-img-placeholder {
  width: 100%; height: 100%;
  background: var(--forest-50);
  display: flex; align-items: center; justify-content: center;
  color: var(--forest-300);
}
.deal-card-img-placeholder svg { width: 36px; height: 36px; }

.deal-card-body {
  padding: 10px 12px 12px;
  flex: 1; display: flex; flex-direction: column;
}
.deal-card-shop {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.deal-card-shop-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
}
.deal-card-shop-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.deal-card-shop-info { flex: 1; min-width: 0; }
.deal-card-shop-name-row {
  display: flex; align-items: center; gap: 5px;
  min-width: 0;
}
.deal-card-shop-name {
  font-size: 11px; font-weight: 700; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2; flex-shrink: 1; min-width: 0;
}
.deal-card-shop-badges {
  display: flex; align-items: center; gap: 3px; flex-shrink: 0;
}
.deal-card-open-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 1px 5px; border-radius: 8px; line-height: 1.5;
  white-space: nowrap; flex-shrink: 0;
}
.deal-card-open-badge--open { background: #D1FAE5; color: #065F46; }
.deal-card-open-badge--closed { background: #FEE2E2; color: #991B1B; }
.deal-card-dist {
  font-size: 9px; font-weight: 600; color: var(--text-3);
  white-space: nowrap; flex-shrink: 0;
}
.deal-card-name {
  font-size: 15px; font-weight: 700; color: var(--text-1);
  line-height: 1.2; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.deal-card-meta {
  font-size: 11px; color: var(--text-3);
  display: flex; align-items: center; gap: 3px;
  margin-top: 1px;
}
.deal-card-meta svg { width: 11px; height: 11px; flex-shrink: 0; }
.deal-card-price { font-size: 20px; font-weight: 800; color: var(--forest); white-space: nowrap; line-height: 1; }
.deal-card-price .unit { font-size: 12px; font-weight: 500; color: var(--text-3); }
.deal-card-price.special { font-size: 17px; font-weight: 700; }

/* Featured deal — spans all columns, horizontal layout */
.deal-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  min-height: 220px;
}
.deal-card--featured .deal-card-img {
  width: 45%; aspect-ratio: auto; flex-shrink: 0;
}
.deal-card--featured .deal-card-body {
  padding: 24px 24px; justify-content: space-between;
}
.deal-card--featured .deal-card-name {
  font-size: 22px; -webkit-line-clamp: 3; margin-bottom: 16px;
}
.deal-card--featured .deal-card-price { font-size: 24px; }
.deal-card--featured .deal-card-price .unit { font-size: 14px; }

.deal-card-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--forest); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-full);
  margin-bottom: 10px; width: fit-content;
}
.deal-card-badge svg { width: 12px; height: 12px; }

@media (max-width: 767px) {
  .deal-card--featured { flex-direction: column; }
  .deal-card--featured .deal-card-img { width: 100%; aspect-ratio: 4/3; }
  .deal-card--featured .deal-card-body { padding: 14px 15px; }
  .deal-card--featured .deal-card-name { font-size: 17px; }
  .deal-card--featured .deal-card-price { font-size: 19px; }
}

/* ── No-follow empty state ─────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  padding: 72px 20px; text-align: center; gap: 8px;
}
.empty-state-icon { font-size: 44px; margin-bottom: 4px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text-1); }
.empty-state p { font-size: 14px; color: var(--text-3); max-width: 280px; line-height: 1.4; }
.btn-empty {
  margin-top: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  background: var(--forest);
  color: #fff;
  font-size: 14px; font-weight: 600;
  transition: opacity 0.15s;
}
.btn-empty:hover { opacity: 0.88; }

/* ── Location Banner ───────────────────────────────────── */
.loc-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; margin-top: 10px;
}
.loc-banner svg { width: 15px; height: 15px; flex-shrink: 0; }
.loc-banner--ask { background: var(--forest-50); color: var(--forest); border: 1px solid var(--forest-100); }
.loc-banner--denied { background: #FFF0EF; color: var(--red); border: 1px solid #FFD5D2; }

/* ── Stores Page ───────────────────────────────────────── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 0 28px 40px;
}
@media (max-width: 1199px) { .store-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1023px) { .store-grid { padding: 0 16px 24px; grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 640px)  { .store-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* Store card — clean tile */
.store-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 14px 14px;
  gap: 10px;
  cursor: pointer;
  position: relative;
  transition: transform 0.13s, box-shadow 0.13s, border-color 0.13s;
}
.store-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  border-color: var(--border-strong);
}
.store-card:active { transform: scale(0.99); }

/* Top row: logo + deals chip */
.store-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.store-card-logo {
  width: 64px; height: 64px;
  flex-shrink: 0;
}
.store-avatar {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.store-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Big visible "Today's deals" chip */
.store-card-deals-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--forest-50);
  color: var(--forest);
  font-size: 11px; font-weight: 800;
  padding: 5px 9px;
  border-radius: var(--radius-full);
  line-height: 1;
  white-space: nowrap;
}
.store-card-deals-chip svg { width: 12px; height: 12px; }
.store-card-deals-chip strong { font-size: 13px; }
.store-card-deals-chip.zero {
  background: var(--surface-2);
  color: var(--text-3);
}

/* Body */
.store-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.store-card-name {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.store-card-meta {
  font-size: 12px; color: var(--text-3);
  display: flex; gap: 5px; align-items: center;
}
.store-card-status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.store-card-status-dot.open  { background: var(--forest-500); }
.store-card-status-dot.closed { background: var(--red); }

/* Follow toggle — full-width text button */
.store-card-follow {
  width: 100%;
  padding: 9px 0;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.15s;
  margin-top: 4px;
}
.store-card-follow svg { width: 14px; height: 14px; flex-shrink: 0; }
.store-card-follow:hover {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--forest-50);
}
.store-card-follow.following {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.store-card-follow.following:hover {
  background: var(--forest-700);
  border-color: var(--forest-700);
}
.store-card-meta svg { width: 12px; height: 12px; color: var(--forest-700); flex-shrink: 0; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: var(--radius-full);
}
.badge-open { background: var(--forest-50); color: var(--forest-700); }
.badge-closed { background: #FFF0EF; color: var(--red); }

/* Follow button */
.btn-follow {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 12px; font-weight: 600;
  background: var(--forest); color: #fff;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-follow:hover { opacity: 0.88; }
.btn-follow.following { background: var(--forest-50); color: var(--forest); }

/* ── Store Detail ──────────────────────────────────────── */
.detail-back-bar {
  padding: 16px 28px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 1023px) {
  .detail-back-bar { padding: 12px 16px 8px; }
}
.btn-back {
  display: flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 600; color: var(--forest);
  padding: 6px 0;
}
.btn-back svg { width: 18px; height: 18px; }
.btn-back:hover { opacity: 0.75; }

.store-profile-card {
  margin: 0 28px 20px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
}
@media (max-width: 1023px) {
  .store-profile-card { margin: 0 16px 14px; }
}

.store-profile-banner { display: none; }

.store-profile-body { padding: 18px 20px 20px; }

.store-profile-avatar-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.store-profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px; color: var(--forest);
}
.store-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.store-profile-info { flex: 1; min-width: 0; }
.store-profile-name { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 4px; }
.store-profile-address {
  font-size: 13px; color: var(--text-3);
  display: flex; align-items: center; gap: 4px; margin-bottom: 8px;
}
.store-profile-address svg { width: 13px; height: 13px; color: var(--forest-500); flex-shrink: 0; }
.store-profile-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius);
  background: var(--forest); color: #fff;
  font-size: 14px; font-weight: 600;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary.following { background: var(--forest-50); color: var(--forest); }
.btn-primary svg { width: 15px; height: 15px; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--radius);
  background: var(--surface-2); color: var(--text-2);
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--border-strong);
  transition: background 0.15s;
}
.btn-secondary:hover { background: #EBEBEB; }
.btn-secondary svg { width: 15px; height: 15px; }

/* Store detail two-col layout */
.store-detail-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  padding: 0 28px 40px;
  align-items: start;
}
@media (max-width: 1199px) {
  .store-detail-content {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 16px 24px;
  }
}

.store-detail-side { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1200px) {
  .store-detail-side { position: sticky; top: 24px; }
}

.info-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.info-card-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.info-card-title { font-size: 14px; font-weight: 700; color: var(--text-1); }

.hours-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 16px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.hours-row:last-child { border-bottom: none; }
.hours-row.today { background: var(--forest-50); }
.hours-row.today .hours-day { font-weight: 700; color: var(--forest); }
.hours-row.today .hours-val { font-weight: 600; color: var(--forest); }
.hours-day { color: var(--text-2); }
.hours-val { color: var(--text-3); }

.action-links { display: flex; }
.action-link {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px;
  font-size: 12px; font-weight: 600; color: var(--forest);
  border-right: 1px solid var(--border);
  transition: background 0.15s;
}
.action-link:last-child { border-right: none; }
.action-link:hover { background: var(--forest-50); }
.action-link svg { width: 18px; height: 18px; }

/* Specials list */
.section-title { font-size: 16px; font-weight: 700; color: var(--text-1); }
.section-title-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.section-updated { font-size: 12px; color: var(--text-3); }

.deals-day-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 0 6px;
}
.deals-day-label:first-child { padding-top: 4px; }

.specials-list { display: flex; flex-direction: column; gap: 8px; }
.special-item {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 11px 13px;
  display: flex; align-items: center; gap: 11px;
  cursor: pointer;
  transition: background 0.12s;
}
.special-item:hover { background: var(--surface-2); }
.special-item:active { transform: scale(0.995); }
.special-item--new {
  border-color: var(--forest-300);
  background: var(--forest-50);
}
.special-item--new:hover { background: var(--forest-100); }
.special-thumb {
  width: 58px; height: 48px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--forest-100); flex-shrink: 0;
}
.special-thumb-placeholder {
  width: 58px; height: 48px; border-radius: var(--radius-sm);
  background: var(--forest-100); flex-shrink: 0;
}
.special-body { flex: 1; min-width: 0; }
.special-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.special-new-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--forest); color: #fff;
  padding: 2px 6px; border-radius: 4px;
  flex-shrink: 0;
}
.special-sub { font-size: 12px; color: var(--text-3); }
.special-price { text-align: right; flex-shrink: 0; }
.special-price-amount { font-size: 15px; font-weight: 700; color: var(--forest); }
.special-price-unit { font-size: 11px; color: var(--text-3); }

/* Source card */
.source-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 13px 15px;
  margin-top: 12px;
}
.source-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.source-card-label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.source-card-link { font-size: 13px; color: var(--blue); font-weight: 500; }
.source-preview {
  display: flex; gap: 10px; align-items: center;
}
.source-preview img { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.source-preview-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.source-preview-excerpt { font-size: 12px; color: var(--text-3); }

/* ── Deal Detail ───────────────────────────────────────── */
.deal-detail-page {
  max-width: 680px;
  margin: 0 auto;
}

.deal-detail-topbar { display: none; } /* replaced by img overlay buttons */

/* Image wrapper with overlaid back/fav buttons */
.deal-detail-img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.deal-img-btn {
  position: absolute;
  top: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
  transition: background 0.15s, transform 0.1s;
  z-index: 2;
}
.deal-img-btn:hover { background: rgba(255,255,255,0.98); }
.deal-img-btn:active { transform: scale(0.94); }
.deal-img-btn svg { width: 18px; height: 18px; }
.deal-img-btn--left  { left: 12px; }
.deal-img-btn--right { right: 12px; }
.deal-img-btn.on { color: #F59E0B; }

.btn-icon {
  width: 38px; height: 38px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-2); transition: background 0.15s;
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--surface-2); }
.btn-icon svg { width: 19px; height: 19px; }
.btn-icon.on { color: #F59E0B; }

.deal-detail-wrap { padding: 16px 16px 40px; }

.deal-detail-img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; border-radius: var(--radius-lg);
  background: var(--forest-100); display: block;
}
.deal-detail-img-fallback {
  width: 100%; aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--forest-100), var(--forest-200));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--forest-500); text-decoration: none;
  transition: background 0.15s;
}
.deal-detail-img-fallback:hover { background: linear-gradient(135deg, var(--forest-200), var(--forest-500)); color: #fff; }
.deal-detail-img-fallback svg { width: 56px; height: 56px; opacity: 0.5; }
.deal-detail-img-fallback span { font-size: 13px; font-weight: 600; opacity: 0.7; }

.deal-detail-title-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-top: 18px;
}
.deal-detail-title {
  font-size: 24px; font-weight: 700; letter-spacing: -0.3px;
  line-height: 1.2; flex: 1; color: var(--text-1);
}
.deal-detail-price-block { text-align: right; flex-shrink: 0; }
.deal-detail-price { font-size: 28px; font-weight: 700; color: var(--forest); line-height: 1; }
.deal-detail-unit { font-size: 13px; color: var(--text-3); font-weight: 500; margin-top: 2px; }

.deal-detail-shop {
  margin-top: 14px;
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 11px;
  cursor: pointer; transition: background 0.12s;
}
.deal-detail-shop:hover { background: var(--surface-2); }
.deal-detail-shop-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--forest); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; overflow: hidden; flex-shrink: 0;
}
.deal-detail-shop-avatar img { width: 100%; height: 100%; object-fit: cover; }
.deal-detail-shop-info { flex: 1; }
.deal-detail-shop-name { font-size: 14px; font-weight: 600; }
.deal-detail-shop-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.deal-detail-stats {
  margin-top: 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.deal-detail-stat {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.deal-detail-stat-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--forest-50); color: var(--forest-700);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.deal-detail-stat-icon svg { width: 16px; height: 16px; }
.deal-detail-stat-label { font-size: 14px; font-weight: 600; color: var(--text-1); }
.deal-detail-stat-sub { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.deal-detail-cta {
  margin-top: 14px; width: 100%;
  padding: 14px; background: var(--forest); color: #fff;
  border-radius: var(--radius-lg);
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: opacity 0.15s;
}
.deal-detail-cta:hover { opacity: 0.88; }
.deal-detail-cta svg { width: 17px; height: 17px; }

.deal-detail-footnote {
  margin-top: 18px; display: flex; align-items: center; gap: 10px;
}
.deal-detail-footnote .line { flex: 1; height: 1px; background: var(--border); }
.deal-detail-footnote .msg {
  font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; gap: 4px;
}
.deal-detail-footnote .msg svg { width: 13px; height: 13px; color: var(--forest-500); }

/* ── Disclaimers ───────────────────────────────────────── */
.deal-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-3);
}
.deal-disclaimer svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--text-3); }

.feed-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  padding: 8px 28px 32px;
  line-height: 1.5;
}
@media (max-width: 1023px) { .feed-disclaimer { padding: 8px 16px 24px; } }

/* ── Saved / Alerts ────────────────────────────────────── */
.saved-list {
  display: flex; flex-direction: column; gap: 9px;
  padding: 0 28px 40px;
}
@media (max-width: 1023px) {
  .saved-list { padding: 0 16px 24px; }
}

.saved-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.saved-card-main {
  flex: 1; min-width: 0;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center; gap: 11px; cursor: pointer;
}
.saved-card-thumb {
  width: 56px; height: 48px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--forest-100); flex-shrink: 0; display: block;
}
.saved-card-thumb-placeholder {
  width: 56px; height: 48px; border-radius: var(--radius-sm);
  background: var(--forest-100); flex-shrink: 0;
}
.saved-card-body { min-width: 0; }
.saved-card-shop {
  font-size: 11px; font-weight: 700; color: var(--forest-700);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px;
}
.saved-card-name {
  font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.saved-card-time { font-size: 12px; color: var(--text-3); }
.saved-card-price { font-size: 16px; font-weight: 700; color: var(--forest); white-space: nowrap; text-align: right; }
.saved-card-price .unit { font-size: 11px; color: var(--text-3); font-weight: 500; display: block; }
.btn-delete {
  width: 34px; height: 34px; border-radius: 50%;
  background: #FFF0EF; color: var(--red);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s;
}
.btn-delete:hover { background: #FFE0DE; }
.btn-delete svg { width: 15px; height: 15px; }

/* ── Notifications ─────────────────────────────────────── */
.notif-group { padding: 0 28px; }
@media (max-width: 1023px) { .notif-group { padding: 0 16px; } }
.notif-group-label {
  font-size: 12px; font-weight: 700; color: var(--text-3);
  padding: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.06em;
}
.notif-card {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: opacity 0.12s;
}
.notif-card:last-child { border-bottom: none; }
.notif-card:hover { opacity: 0.75; }
.notif-avatar {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0; background: var(--forest);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
}
.notif-avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif-body { flex: 1; min-width: 0; }
.notif-shop { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.notif-deal { font-size: 13px; color: var(--text-2); margin-bottom: 2px; }
.notif-time { font-size: 11px; color: var(--text-3); }
.notif-thumb {
  width: 44px; height: 38px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--forest-100); flex-shrink: 0; display: block;
}

/* ── Settings ──────────────────────────────────────────── */
.settings-wrap {
  max-width: 600px; margin: 0 auto;
  padding: 0 28px 40px;
}
@media (max-width: 1023px) { .settings-wrap { padding: 0 16px 24px; } }

.settings-profile {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 20px; display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.settings-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--forest);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff;
  overflow: hidden; flex-shrink: 0;
}
.settings-avatar img { width: 100%; height: 100%; object-fit: cover; }
.settings-user-name { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.settings-user-email { font-size: 13px; color: var(--text-3); }

.settings-menu {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); overflow: hidden; margin-bottom: 12px;
}
.settings-row {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  text-align: left; transition: background 0.12s;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--surface-2); }
.settings-row-icon {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--forest-50); color: var(--forest-700);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.settings-row-icon svg { width: 17px; height: 17px; }
.settings-row-content { flex: 1; }
.settings-row-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.settings-row-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.settings-row-chev { color: var(--text-3); }
.settings-row-chev svg { width: 15px; height: 15px; }

.settings-signout {
  display: block; width: 100%;
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 14px; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--red);
  cursor: pointer; font-family: inherit;
  transition: background 0.12s;
}
.settings-signout:hover { background: #FFF0EF; }

/* ── Login ─────────────────────────────────────────────── */
#page-login {
  position: fixed; inset: 0; z-index: 500;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
#page-login.hidden { display: none !important; }

.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 44px 36px;
  text-align: center;
  max-width: 380px; width: 100%;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 480px) { .login-card { padding: 32px 24px; } }

.login-brand {
  font-size: 26px; font-weight: 700; margin-bottom: 8px;
  color: var(--text-1); letter-spacing: -0.4px;
}
.login-brand .green { color: var(--forest); }
.login-tagline { font-size: 14px; color: var(--text-3); margin-bottom: 28px; line-height: 1.4; }

.btn-google {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 12px 24px; border-radius: var(--radius);
  background: var(--forest); color: #fff;
  font-size: 15px; font-weight: 600; gap: 8px;
  transition: opacity 0.15s;
}
.btn-google:hover { opacity: 0.88; }

/* ── Loading ────────────────────────────────────────────── */
.loading-placeholder {
  display: flex; align-items: center; justify-content: center;
  padding: 80px 20px; color: var(--text-3);
  font-size: 14px; gap: 8px;
}

/* ── Language toggle ────────────────────────────────────── */
.lang-toggle { display: flex; gap: 6px; }
.lang-toggle button {
  padding: 6px 16px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-2);
}
.lang-toggle button.active {
  background: var(--forest); color: #fff; border-color: var(--forest);
}

.settings-section {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.settings-label {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px;
}

/* Topbar lang button */
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar-lang {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 9px; border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: #fff; cursor: pointer; line-height: 1;
  transition: background 0.15s;
}
.topbar-lang:hover { background: rgba(255,255,255,0.22); }
