:root {
  --bg-primary: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --bg-card: #1e1e1e;
  --bg-input: #252525;
  --bg-hover: #2a2a2a;

  --text-primary: #f0ebe3;
  --text-secondary: #a89b8c;
  --text-muted: #6b5e50;

  --accent: #8B4513;
  --accent-light: #a0522d;
  --accent-dark: #6b3410;
  --accent-warm: #d4a574;
  --accent-glow: rgba(139, 69, 19, 0.4);

  --wood-light: #d4a574;
  --wood-medium: #8B4513;
  --wood-dark: #5c2d0e;
  --cream: #f5f0e8;
  --gold: #c9a96e;

  --border: #2d2520;
  --border-glow: rgba(212, 165, 116, 0.25);
  --card-glow: 0 0 15px rgba(139, 69, 19, 0.15), 0 0 30px rgba(139, 69, 19, 0.05);

  --success: #4a7c59;
  --error: #8b3a3a;
  --warning: #8b7335;
  --info: #4a6a8b;

  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;

  --nav-height: 64px;
  --max-width: 1200px;

  /* Text on photos (behind a dark overlay) stays light in both themes */
  --on-photo: #f5f0e8;
  --on-photo-muted: rgba(245, 240, 232, 0.8);

  /* Colors that change with the theme */
  --heading: #f5f0e8;
  --nav-bg: rgba(13, 13, 13, 0.95);
  --tone-green: #7bc88f;
  --tone-red: #d98b8b;
  --tone-gold: #e2c48a;
  --tone-blue: #8fb3d9;
  --tone-purple: #b49cf8;
  --tone-orange: #f0975a;
  color-scheme: dark;
}

/* Light theme: follows the phone or computer setting, unless the user picked one in settings */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-primary: #f7f3ec;
    --bg-secondary: #efe8dd;
    --bg-card: #fffdf9;
    --bg-input: #f4eee5;
    --bg-hover: #e9e0d2;
    --text-primary: #2b2118;
    --text-secondary: #5f5042;
    --text-muted: #85745f;
    --accent-warm: #9a5520;
    --accent-glow: rgba(139, 69, 19, 0.25);
    --gold: #a47a2c;
    --border: #e0d4c3;
    --border-glow: rgba(139, 69, 19, 0.28);
    --card-glow: 0 1px 3px rgba(60, 40, 20, 0.08), 0 4px 14px rgba(60, 40, 20, 0.06);
    --shadow: 0 4px 20px rgba(60, 40, 20, 0.12);
    --shadow-lg: 0 8px 40px rgba(60, 40, 20, 0.18);
    --heading: #2b1d12;
    --nav-bg: rgba(250, 247, 241, 0.94);
    --tone-green: #2f6b3e;
    --tone-red: #a33b3b;
    --tone-gold: #85621a;
    --tone-blue: #2f5f8f;
    --tone-purple: #6a46c9;
    --tone-orange: #b0501a;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg-primary: #f7f3ec;
  --bg-secondary: #efe8dd;
  --bg-card: #fffdf9;
  --bg-input: #f4eee5;
  --bg-hover: #e9e0d2;
  --text-primary: #2b2118;
  --text-secondary: #5f5042;
  --text-muted: #85745f;
  --accent-warm: #9a5520;
  --accent-glow: rgba(139, 69, 19, 0.25);
  --gold: #a47a2c;
  --border: #e0d4c3;
  --border-glow: rgba(139, 69, 19, 0.28);
  --card-glow: 0 1px 3px rgba(60, 40, 20, 0.08), 0 4px 14px rgba(60, 40, 20, 0.06);
  --shadow: 0 4px 20px rgba(60, 40, 20, 0.12);
  --shadow-lg: 0 8px 40px rgba(60, 40, 20, 0.18);
  --heading: #2b1d12;
  --nav-bg: rgba(250, 247, 241, 0.94);
  --tone-green: #2f6b3e;
  --tone-red: #a33b3b;
  --tone-gold: #85621a;
  --tone-blue: #2f5f8f;
  --tone-purple: #6a46c9;
  --tone-orange: #b0501a;
  color-scheme: light;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(139, 69, 19, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(212, 165, 116, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(92, 45, 14, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--accent-warm); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-warm); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--heading);
  font-weight: 600;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

img { max-width: 100%; height: auto; }

/* ============ ICONS ============ */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  flex-shrink: 0;
}

.success-icon { font-size: 3rem; color: var(--success); margin-bottom: 0.5rem; }

/* ============ NAV ============ */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
/* The blur sits on a layer behind the bar. On the bar itself it would make the phone menu
   (position: fixed) size itself to the bar instead of the screen, cutting it off. */
#main-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon { font-size: 1.5rem; color: var(--accent-warm); display: inline-flex; }
.brand-text { background: linear-gradient(135deg, var(--heading), var(--accent-warm)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.2s;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--heading);
  background: var(--bg-hover);
}

.nav-icon-link { position: relative; }
.nav-icon { font-size: 1.1rem; display: inline-flex; }

.nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  line-height: 1;
}
.nav-badge[hidden] { display: none; }
.nav-badge.inline { position: static; display: inline-flex; margin-left: 0.35rem; vertical-align: 1px; }
.nav-badge.inline[hidden] { display: none; }
/* Icon links show their name in the phone menu only */
.nav-icon-label { display: none; }

.nav-user-menu { position: relative; margin-left: 0.5rem; flex-shrink: 0; }

.nav-avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s;
}
.nav-avatar-btn:hover { border-color: var(--accent); }

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-input);
}

/* Long names stay on one line (with "...") instead of spilling over the buttons next to them */
.nav-username { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
}
.nav-dropdown.open { display: block; }
.nav-dropdown a, .nav-dropdown button {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  border: none;
  background: none;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--bg-hover); }
/* Seller panel and admin live at the top of the profile menu, so the top bar never overflows */
.nav-dropdown .nav-dropdown-main { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--accent-warm); }
.nav-dropdown-main .icon { width: 18px; height: 18px; }
.nav-dropdown-divider { height: 1px; background: var(--border); margin: 0.35rem 0.25rem; }
.nav-dropdown { min-width: 210px; }
/* Computers: avatar only in the bar (the name is at the top of its menu); the phone menu shows the name */
@media (min-width: 1025px) {
  .nav-username { display: none; }
  .nav-avatar-btn { padding: 4px; }
}
/* Narrow laptops: tighter links so everything stays on one line */
@media (min-width: 1025px) and (max-width: 1180px) {
  .nav-links { gap: 0.1rem; }
  .nav-link { padding: 0.5rem 0.55rem; }
  .nav-icon-link { padding: 0.5rem 0.45rem; }
  .location-chip { max-width: 140px; }
}
.nav-dropdown-name { padding: 0.5rem 1rem 0.4rem; font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1024px) { .nav-dropdown-name { display: none; } }

.btn-login {
  border: 1px solid var(--border) !important;
}
.btn-register {
  background: var(--accent) !important;
  color: white !important;
}
.btn-register:hover {
  background: var(--accent-light) !important;
}

/* The links fold into the menu button before they run out of room */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    overflow-y: auto;
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.75rem 1rem; font-size: 1rem; }
  .nav-user-menu { margin: 0; }
  .nav-avatar-btn { width: 100%; justify-content: flex-start; }
  .nav-dropdown { position: static; box-shadow: none; border: none; background: var(--bg-secondary); }
  .nav-dropdown.open { display: block; }
  .nav-icon-link { display: flex; align-items: center; gap: 0.75rem; }
  .nav-icon-label { display: inline; }
  .nav-icon-link .nav-badge { position: static; margin-left: auto; }
  .mode-switch { width: 100%; justify-content: center; padding: 0.75rem 1rem; font-size: 0.95rem; margin: 0.5rem 0; }
}

/* ============ MAIN ============ */
#app-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 1.5rem) 1rem 3rem;
  min-height: calc(100vh - var(--nav-height));
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0; }

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--card-glow);
}
.card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(139, 69, 19, 0.2), 0 0 40px rgba(139, 69, 19, 0.08);
  transform: translateY(-2px);
}

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-input);
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--heading);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.card-price {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-warm);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .card-body { padding: 0.75rem; }
  .card-title { font-size: 0.95rem; }
  .card-price { font-size: 1rem; }
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a89b8c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}
input[type="radio"] { accent-color: var(--accent); }
.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  box-shadow: 0 2px 10px rgba(139, 69, 19, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
  transform: translateY(-1px);
  color: white;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover { opacity: 0.9; color: white; }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { opacity: 0.9; color: white; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ============ HERO ============ */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--heading), var(--accent-warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; }
  .hero { padding: 2rem 0.5rem; }
}

/* ============ HERO BANNER ============ */
.hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 21/9;
  box-shadow: var(--card-glow);
  border: 1px solid var(--border);
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  gap: 0.75rem;
}

.hero-banner-overlay h1 {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--on-photo), var(--wood-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  line-height: 1.1;
}

.hero-banner-overlay p {
  font-size: 1.2rem;
  color: var(--on-photo-muted);
  max-width: 400px;
}

@media (max-width: 768px) {
  .hero-banner { aspect-ratio: 16/9; }
  .hero-banner-overlay { padding: 1.5rem; }
  .hero-banner-overlay h1 { font-size: 2rem; }
  .hero-banner-overlay p { font-size: 1rem; }
}

@media (max-width: 480px) {
  .hero-banner { aspect-ratio: 4/3; }
  .hero-banner-overlay h1 { font-size: 1.5rem; }
  .hero-banner-overlay p { font-size: 0.9rem; }
}

/* ============ CATEGORY SHOWCASE ============ */
.category-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
}

.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/2;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  box-shadow: var(--card-glow);
}

.category-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(139, 69, 19, 0.25);
  transform: translateY(-3px);
}

.category-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover .category-card-img {
  transform: scale(1.08);
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.15) 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem;
  gap: 0.2rem;
}

.category-card-icon {
  font-size: 1.4rem;
}

.category-card-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--on-photo);
  text-align: center;
  line-height: 1.2;
}

@media (max-width: 480px) {
  .category-showcase {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .category-card-name { font-size: 0.75rem; }
}

/* ============ FEATURE BANNER ============ */
.feature-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--card-glow);
}

.feature-banner-img {
  width: 100%;
  aspect-ratio: 21/7;
  object-fit: cover;
  display: block;
}

.feature-banner-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  padding: 2.5rem;
  gap: 0.5rem;
}

.feature-banner-content h2 {
  font-size: 1.6rem;
  color: var(--on-photo);
  max-width: 400px;
}

.feature-banner-content p {
  color: var(--on-photo-muted);
  max-width: 380px;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .feature-banner-img { aspect-ratio: 16/7; }
  .feature-banner-content { padding: 1.5rem; }
  .feature-banner-content h2 { font-size: 1.2rem; }
  .feature-banner-content p { font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .feature-banner-img { aspect-ratio: 4/3; }
  .feature-banner-content {
    align-items: flex-start;
    text-align: left;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%);
    justify-content: flex-end;
  }
}

/* ============ PAGE HERO BANNER ============ */
.page-hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 21/6;
  border: 1px solid var(--border);
  box-shadow: var(--card-glow);
}

.page-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.page-hero-overlay h1 {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--on-photo), var(--wood-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 768px) {
  .page-hero-banner { aspect-ratio: 16/6; }
  .page-hero-overlay { padding: 1.25rem; }
  .page-hero-overlay h1 { font-size: 1.5rem; }
}

/* ============ RANGE SLIDER ============ */
.range-container {
  padding: 1rem 0;
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-input);
  outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
}
.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.range-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ============ FILTER BAR ============ */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.filter-bar .form-input,
.filter-bar .form-select {
  flex: 1;
  min-width: 150px;
}

@media (max-width: 600px) {
  .filter-bar { flex-direction: column; }
  .filter-bar .form-input,
  .filter-bar .form-select { width: 100%; }
}

/* ============ SECTION HEADERS ============ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-header h2 {
  font-size: 1.35rem;
}

/* ============ TABS ============ */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-body);
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  color: var(--accent-warm);
  border-bottom-color: var(--accent);
}

/* ============ PRODUCT DETAIL ============ */
.product-detail {
  display: grid;
  /* minmax(0, …): nothing inside (a long button, a long word) can push a column wider than the screen */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-gallery-main {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.product-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.product-gallery-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.product-gallery-thumb:hover,
.product-gallery-thumb.active {
  border-color: var(--accent);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-info h1 {
  font-size: 1.75rem;
  line-height: 1.3;
}

.product-info .price-tag {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-warm);
}

.price-unit {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.vendor-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s;
}
.vendor-link:hover { border-color: var(--accent); color: inherit; }

.vendor-link img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.vendor-link .vendor-info {
  flex: 1;
}

.vendor-link .vendor-info .name { font-weight: 600; color: var(--heading); }
.vendor-link .vendor-info .rating { color: var(--gold); font-size: 0.85rem; }

.stock-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}
.stock-badge.in-stock { background: rgba(74,124,89,0.2); color: var(--tone-green); }
.stock-badge.out-of-stock { background: rgba(139,58,58,0.2); color: var(--tone-red); }

.stock-alert { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-secondary); }
.stock-alert:empty { display: none; }
.stock-alert-text { flex-basis: 100%; margin: 0; color: var(--text-secondary); font-size: 0.92rem; }
.stock-alert .btn { white-space: normal; text-align: center; }
.stock-alert-on { display: flex; align-items: center; gap: 0.4rem; color: var(--tone-green); font-size: 0.9rem; }
.notif-link { cursor: pointer; }

.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}
.qty-selector button {
  padding: 0.5rem 1rem;
  background: var(--bg-input);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s;
}
.qty-selector button:hover { background: var(--bg-hover); }
.qty-selector span {
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: minmax(0, 1fr); }
}

/* ============ AUTH FORMS ============ */
.auth-container {
  max-width: 440px;
  margin: 2rem auto;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--card-glow);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.role-option {
  padding: 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.role-option:hover { border-color: var(--accent); }
.role-option.selected {
  border-color: var(--accent);
  background: rgba(139, 69, 19, 0.1);
}
.role-option .role-icon { font-size: 2rem; margin-bottom: 0.5rem; color: var(--accent-warm); }
.role-option .role-name { font-weight: 600; color: var(--heading); }
.role-option .role-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }

.auth-divider {
  text-align: center;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-notice {
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-warm);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.auth-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============ STAR RATING ============ */
.star-rating {
  display: flex;
  gap: 0.25rem;
}
.star-rating .star {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.15s;
  background: none; border: none; padding: 0.2rem; line-height: 0;
}
.star-rating .star .icon { width: 30px; height: 30px; }
.star-rating .star:active { transform: scale(0.9); }
.star-rating .star.active,
.star-rating .star:hover { color: var(--gold); }

.star-display { color: var(--gold); font-size: 0.9rem; }

/* ============ VENDOR DASHBOARD ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--card-glow);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading);
  font-family: var(--font-display);
  margin-top: 0.25rem;
}
.stat-card .stat-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ============ ORDER LIST ============ */
.order-list { display: flex; flex-direction: column; gap: 0.75rem; }

.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s;
  cursor: pointer;
}
.order-card:hover { border-color: var(--border-glow); }

.order-status {
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.order-status.pending { background: rgba(139,115,53,0.2); color: var(--tone-gold); }
.order-status.approved { background: rgba(74,124,89,0.2); color: var(--tone-green); }
.order-status.declined { background: rgba(139,58,58,0.2); color: var(--tone-red); }
.order-status.paid { background: rgba(74,106,139,0.2); color: var(--tone-blue); }
.order-status.completed { background: rgba(74,124,89,0.2); color: var(--tone-green); }
.order-status.claimed { background: rgba(139,58,58,0.2); color: var(--tone-red); }

/* ============ FORUM ============ */
.forum-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
  cursor: pointer;
}
.forum-post-card:hover { border-color: var(--border-glow); }

.forum-post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.forum-post-header img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.forum-post-header .author { font-weight: 600; color: var(--heading); font-size: 0.9rem; }
.forum-post-header .date { font-size: 0.75rem; color: var(--text-muted); }

.forum-post-title { font-size: 1.1rem; color: var(--heading); margin-bottom: 0.5rem; }
.forum-post-excerpt { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }
.forum-post-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.forum-reply {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  margin-left: 2rem;
}

@media (max-width: 600px) {
  .forum-reply { margin-left: 0.5rem; }
}

/* ============ RECIPE CARD ============ */
.recipe-card .vote-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.vote-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.vote-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.vote-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.vote-count { font-weight: 600; color: var(--heading); min-width: 20px; text-align: center; }

/* ============ MESSAGES ============ */
.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
  height: calc(100vh - var(--nav-height) - 6rem);
}

.conversation-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-y: auto;
  background: var(--bg-card);
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.conversation-item:hover, .conversation-item.active { background: var(--bg-hover); }
.conversation-item img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.conversation-item .conv-name { font-weight: 500; color: var(--heading); font-size: 0.9rem; }
.conversation-item .conv-preview { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.conversation-item .conv-text { flex: 1; min-width: 0; }
.conv-delete {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.4rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.conv-delete:hover, .conv-delete:focus-visible { color: var(--tone-red); background: rgba(139, 58, 58, 0.2); }

.chat-area {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
}
.chat-msg.sent {
  align-self: flex-end;
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-msg.received {
  align-self: flex-start;
  background: var(--bg-input);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-msg .msg-time {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 0.25rem;
}

.chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}
.chat-input input {
  flex: 1;
}

@media (max-width: 768px) {
  .messages-layout { grid-template-columns: 1fr; height: auto; }
  .conversation-list { max-height: 300px; }
}

/* ============ ADMIN ============ */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-sidebar-item {
  padding: 0.7rem 1rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  width: 100%;
}
.admin-sidebar-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.admin-sidebar-item.active { background: var(--accent); color: white; }

.admin-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.data-table tr:hover td { background: var(--bg-hover); }

@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { flex-direction: row; overflow-x: auto; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 0.5rem; }
}

/* ============ TOAST ============ */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.9rem;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 350px;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(0); }
.toast-info { background: var(--info); }
.toast-success { background: var(--success); }
.toast-error { background: var(--error); }
.toast-warning { background: var(--warning); }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

.modal-body { padding: 1.5rem; }

/* "Check your email" after signing up */
.email-sent { text-align: center; }
.email-sent-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(139, 69, 19, 0.12); color: var(--accent-warm); font-size: 1.75rem; }
.email-sent p { margin: 0 0 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.email-sent-spam { padding: 0.75rem 1rem; border-radius: var(--radius-sm); background: var(--bg-input); border: 1px solid var(--border);
  border-left: 3px solid var(--accent-warm); text-align: left; font-size: 0.9rem; }
.email-sent-spam:last-child { margin-bottom: 0; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ============ IN-APP NOTIF ============ */
.in-app-notif {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 1rem;
  z-index: 9998;
}

.in-app-notif-content {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  max-width: 350px;
  box-shadow: var(--card-glow);
  position: relative;
}

.in-app-notif-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ============ NOTIFICATION LIST ============ */
.notif-list { display: flex; flex-direction: column; gap: 0.5rem; }

.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s;
}
.notif-item:hover { border-color: var(--border-glow); }
.notif-item.unread { border-left: 3px solid var(--accent); }

.notif-item .notif-icon { font-size: 1.5rem; flex-shrink: 0; color: var(--accent-warm); display: inline-flex; }
.notif-item .notif-content { flex: 1; }
.notif-item .notif-title { font-weight: 600; font-size: 0.9rem; color: var(--heading); }
.notif-item .notif-message { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.15rem; }
.notif-item .notif-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ============ VENDOR PROFILE ============ */
.vendor-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--card-glow);
}

.vendor-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  flex-shrink: 0;
}

.vendor-header-info h1 { margin-bottom: 0.5rem; }
.vendor-header-info .vendor-desc { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; white-space: pre-line; }

.cert-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.cert-badge {
  padding: 0.3rem 0.8rem;
  background: rgba(139, 69, 19, 0.15);
  color: var(--accent-warm);
  border-radius: 50px;
  font-size: 0.8rem;
  border: 1px solid var(--accent-glow);
}

@media (max-width: 600px) {
  .vendor-header { flex-direction: column; align-items: center; text-align: center; }
}

/* ============ FOOTER ============ */
#main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--heading);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
}

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state p { font-size: 1rem; }

/* ============ LOADING ============ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ UTILITY ============ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.placeholder-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--bg-input), var(--bg-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.3;
}

/* ===== Offers & discounts ===== */
.card-badge.offer-badge {
  background: var(--error);
  margin-left: 0.3rem;
}

.price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.85em;
  font-weight: 400;
  margin-right: 0.3rem;
}

/* ===== Allergens ===== */
.allergen-filter {
  margin-bottom: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
}

.allergen-filter summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  user-select: none;
}

.allergen-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 0.6rem;
}

.allergen-option {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: capitalize;
  cursor: pointer;
}

.allergen-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.allergen-chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: rgba(139, 115, 53, 0.2);
  color: var(--tone-gold);
  border-radius: 50px;
  font-size: 0.75rem;
  text-transform: capitalize;
}

/* ===== Vendor product management ===== */
.vendor-product-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vendor-product-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
}

.vendor-product-row.inactive { opacity: 0.65; }

.vendor-product-thumb img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}

.vendor-product-info { flex: 1; min-width: 180px; }

.vendor-product-title {
  font-weight: 600;
  color: var(--heading);
}

.vendor-product-title:hover { color: var(--accent-warm); }

/* "Lager [ 69 ] Lagre" on one line, so the stock and the buttons beside it line up */
.vendor-product-stock { display: flex; align-items: center; gap: 0.5rem; }
.vendor-product-stock label { margin: 0; }

.vendor-product-stock .stock-input {
  width: 80px;
  padding: 0.35rem 0.5rem;
}

.vendor-product-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.live { background: rgba(74, 124, 89, 0.2); color: var(--tone-green); }
.status-badge.paused { background: rgba(139, 115, 53, 0.25); color: var(--tone-gold); }
.status-badge.sold-out { background: rgba(139, 58, 58, 0.2); color: var(--tone-red); }

/* ===== Vendor stats: revenue chart & top products ===== */
.rev-chart-wrap { overflow-x: auto; }

.rev-chart {
  width: 100%;
  min-width: 480px;
  height: auto;
  display: block;
}

.rev-chart .rev-grid {
  stroke: var(--border);
  stroke-width: 1;
}

.rev-chart .rev-baseline { stroke-width: 1.5; }

.rev-bar path { fill: var(--accent-warm); }
.rev-bar:hover path { fill: var(--gold); }
.rev-bar .rev-bar-empty { fill: var(--border); }

.rev-chart .rev-month {
  fill: var(--text-muted);
  font-size: 11px;
}

.rev-chart .rev-value {
  fill: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.top-products { display: flex; flex-direction: column; }

.top-product-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.top-product-row:last-child { border-bottom: none; }

.top-product-rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--accent-warm);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-product-title {
  flex: 1;
  color: var(--heading);
  font-weight: 500;
}

.top-product-title:hover { color: var(--accent-warm); }

.top-product-revenue {
  font-weight: 600;
  color: var(--accent-warm);
}

/* ===== Delivery ===== */
.delivery-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  width: fit-content;
  user-select: none;
}

.delivery-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: rgba(74, 106, 139, 0.25);
  color: var(--tone-blue);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ===== Location picker ===== */
.location-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.35rem 0.85rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  max-width: 220px;
  white-space: nowrap;
  transition: border-color 0.15s;
}

.location-chip:hover {
  border-color: var(--accent-warm);
  color: var(--heading);
}

.location-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-chip-caret {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.location-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s;
}

.location-option:hover { border-color: var(--accent-warm); color: var(--heading); }
.location-option.active { border-color: var(--accent-warm); color: var(--heading); }

.location-option-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.3rem;
}

.location-delete:hover { color: var(--error); }

.location-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0.75rem 0 0.4rem;
}

#loc-results { margin-top: 0.75rem; }

.location-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .location-chip { max-width: 140px; }
}

/* ===== Checkout delivery method ===== */
.delivery-method {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: border-color 0.15s;
}

.delivery-method:has(input:checked) {
  border-color: var(--accent-warm);
  color: var(--heading);
}

.delivery-method.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.delivery-method-label { flex: 1; }

.delivery-method-price {
  font-weight: 600;
  color: var(--accent-warm);
}

/* ===== Home hero search ===== */
.home-search {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  width: 100%;
  margin-top: 1rem;
}

.home-search .form-input {
  flex: 1;
  background: rgba(20, 15, 10, 0.85);
  border-color: rgba(212, 165, 116, 0.4);
  color: #f5f0e8;
}
.home-search .form-input::placeholder { color: rgba(245, 240, 232, 0.6); }

/* ===== Social links ===== */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.social-chip {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: border-color 0.15s;
}

.social-chip:hover {
  border-color: var(--accent-warm);
  color: var(--heading);
}

/* ===== Language toggle ===== */
.lang-toggle {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
}

.lang-toggle:hover { border-color: var(--accent-warm); color: var(--heading); }

/* ============ IMAGE PICKER ============ */
.image-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  max-width: 660px;
}
.image-tiles:empty { display: none; }
.image-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: zoom-in;
}
.image-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-tile.uploading img { opacity: 0.45; }
.image-tile-progress { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.image-tile-progress .spinner { width: 28px; height: 28px; }
.image-tile-main {
  position: absolute;
  left: 0.4rem;
  bottom: 0.4rem;
  padding: 0.15rem 0.55rem;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--on-photo);
  font-size: 0.7rem;
}
.image-tile-remove {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.image-tile-remove:hover, .image-tile-remove:focus-visible { background: var(--error); }

.modal:has(.image-viewer) { max-width: min(94vw, 1000px); width: 100%; }
.image-viewer img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
}
.image-viewer-info { margin-top: 0.5rem; }
.image-viewer-warning { color: var(--tone-gold); }

/* ============ FORUM (sections, threads, replies to replies) ============ */
.modal.modal-wide { max-width: min(94vw, 720px); }
.forum-page { max-width: 900px; margin: 0 auto; }
.forum-muted { color: var(--text-muted); font-size: 0.8rem; }
.forum-breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.forum-breadcrumb a { color: var(--text-secondary); }
.forum-breadcrumb a:hover { color: var(--accent-warm); }

.forum-toolbar { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin: 1.25rem 0; }
.forum-toolbar .form-input { flex: 1 1 260px; }
.forum-toolbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.forum-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.75rem; margin-bottom: 1.75rem; }
.forum-section-card {
  display: flex; gap: 0.85rem; align-items: flex-start; padding: 1rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-primary); transition: border-color 0.2s, transform 0.2s;
}
.forum-section-card:hover { border-color: var(--border-glow); transform: translateY(-1px); color: var(--text-primary); }
.forum-section-icon {
  flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(139, 69, 19, 0.18); color: var(--accent-warm);
}
.forum-section-icon .icon { width: 24px; height: 24px; }
.forum-section-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.forum-section-text strong { color: var(--heading); font-size: 0.95rem; }
.forum-section-text span { color: var(--text-secondary); font-size: 0.8rem; line-height: 1.4; }
.forum-section-text small { color: var(--text-muted); font-size: 0.75rem; }
.forum-section-head { display: flex; gap: 1rem; align-items: center; }
.forum-section-head h1 { font-size: 1.6rem; margin: 0; }
.forum-section-head .forum-section-icon { width: 52px; height: 52px; }
.forum-section-head .forum-section-icon .icon { width: 30px; height: 30px; }

.forum-list-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.forum-list-title { font-size: 1.15rem; margin: 0; }
.forum-chips, .forum-sort { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.forum-sort .text-muted { font-size: 0.8rem; margin-right: 0.2rem; }
.forum-chip {
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-secondary);
  padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.8rem; cursor: pointer; font-family: inherit;
}
.forum-chip:hover { color: var(--text-primary); border-color: var(--border-glow); }
.forum-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.forum-thread-row {
  display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.9rem 1rem; margin-bottom: 0.6rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color 0.2s;
}
.forum-thread-row:hover { border-color: var(--border-glow); }
.forum-thumb {
  flex: none; width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-secondary); display: grid; place-items: center; color: var(--accent-warm);
}
.forum-thumb img { width: 100%; height: 100%; object-fit: cover; }
.forum-thumb .icon { width: 34px; height: 34px; opacity: 0.8; }
.forum-thread-main { flex: 1; min-width: 0; }
.forum-thread-title { display: block; color: var(--heading); font-weight: 600; font-size: 1.02rem; line-height: 1.35; overflow-wrap: anywhere; }
.forum-thread-title:hover { color: var(--accent-warm); }
.forum-thread-excerpt {
  color: var(--text-secondary); font-size: 0.85rem; margin: 0.3rem 0 0; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.forum-thread-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; align-items: center; margin-top: 0.45rem; font-size: 0.78rem; color: var(--text-muted); }
.forum-section-tag { color: var(--text-secondary); background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 999px; padding: 0.05rem 0.55rem; }
.forum-hero-text { flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 0.25rem; }
.forum-hero-text p { color: var(--on-photo-muted); margin: 0; }
.forum-badge-pinned { background: rgba(212, 165, 116, 0.18); color: var(--accent-warm); }
.forum-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.1rem 0.45rem; border-radius: 4px; margin-right: 0.4rem; vertical-align: 2px;
  background: rgba(168, 155, 140, 0.15); color: var(--text-secondary);
}

.forum-author {
  background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; overflow-wrap: anywhere; text-align: left;
}
.forum-author:hover { color: var(--accent-warm); text-decoration: underline; }
.forum-avatar-btn { background: none; border: none; padding: 0; cursor: pointer; border-radius: 50%; flex: none; }
.forum-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; background: var(--bg-secondary); }
.forum-avatar.lg { width: 52px; height: 52px; }
.forum-avatar.xl { width: 72px; height: 72px; }
/* Banners next to a name. Solid colours with fixed text colours, so they read the same in the
   light and the dark theme. */
.forum-roles { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; vertical-align: 1px; }
.forum-role {
  display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; line-height: 1.5; padding: 0.05rem 0.45rem; border-radius: 4px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.forum-role .icon { width: 0.85em; height: 0.85em; }
.forum-role-team { background: #c62828; color: #fff; }
.forum-role-admin { background: #f2c230; color: #3b2a00; }
.forum-role-moderator { background: linear-gradient(180deg, #eef0f3, #b8bec6); color: #23272d; }
.forum-role-forum_mod { background: #2e7d32; color: #fff; }
.forum-role-company {
  background: #2f5d8a; color: #fff; text-transform: none; letter-spacing: 0; font-size: 0.7rem;
  max-width: 16rem; text-decoration: none;
}
.forum-role-company span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.forum-role-company:hover { background: #24496e; color: #fff; }

.forum-vote { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; flex: none; min-width: 36px; }
.forum-vote button {
  background: none; border: 1px solid transparent; color: var(--text-muted); width: 30px; height: 26px;
  border-radius: 6px; cursor: pointer; font-size: 0.8rem; line-height: 1;
}
.forum-vote button:hover { background: var(--bg-hover); color: var(--text-primary); }
.forum-vote .forum-vote-up.active { color: var(--tone-orange); background: rgba(255, 107, 53, 0.14); }
.forum-vote .forum-vote-down.active { color: var(--tone-blue); background: rgba(107, 138, 255, 0.14); }
.forum-vote-score { font-weight: 700; color: var(--heading); font-size: 0.9rem; }
.forum-thread-actions .forum-vote, .forum-reply-actions .forum-vote { flex-direction: row; gap: 0.3rem; }

.forum-thread-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.forum-thread-heading { font-size: 1.55rem; line-height: 1.3; margin: 0 0 1rem; overflow-wrap: anywhere; }
.forum-author-block { display: flex; gap: 0.85rem; align-items: center; margin-bottom: 1.1rem; }
.forum-text { color: var(--text-primary); line-height: 1.7; overflow-wrap: anywhere; }
.forum-body { font-size: 1rem; }
.forum-text img.forum-img {
  display: block; max-width: min(100%, 420px); max-height: 320px; border-radius: var(--radius-sm);
  margin: 0.6rem 0; cursor: zoom-in; object-fit: cover; border: 1px solid var(--border);
}
.forum-reply-card .forum-text img.forum-img { max-width: min(100%, 300px); max-height: 220px; }
.forum-thread-actions, .forum-reply-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-top: 1rem; }
.forum-reply-actions { margin-top: 0.5rem; }
.forum-action {
  display: inline-flex; align-items: center; gap: 0.35rem; background: none; border: 1px solid transparent;
  color: var(--text-secondary); padding: 0.35rem 0.65rem; border-radius: var(--radius-sm); font: inherit;
  font-size: 0.8rem; cursor: pointer;
}
.forum-action:hover { background: var(--bg-hover); color: var(--text-primary); }
.forum-action .icon { width: 15px; height: 15px; }
.forum-action.on { color: var(--accent-warm); border-color: var(--border-glow); }
.forum-action.danger:hover { color: var(--tone-red); }

.forum-replies-title { margin: 1.75rem 0 0.75rem; font-size: 1.1rem; }
.forum-reply-item { margin-top: 0.6rem; }
.forum-reply-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem;
  transition: box-shadow 0.3s;
}
.forum-reply-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.forum-reply-deleted { color: var(--text-muted); font-style: italic; margin: 0; }
.forum-children { margin-left: 1.25rem; padding-left: 0.9rem; border-left: 2px solid var(--border); }
.forum-children.flat { margin-left: 0; padding-left: 0; border-left: none; }
.forum-inline-editor:not(:empty) { margin-top: 0.75rem; }
@keyframes forum-highlight {
  0%, 60% { box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.75); border-color: var(--accent-warm); }
  100% { box-shadow: 0 0 0 0 rgba(212, 165, 116, 0); }
}
.forum-highlight { animation: forum-highlight 2.4s ease-out; }

.forum-composer { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.forum-composer h4 { margin-bottom: 0.6rem; }
.forum-editor .form-textarea { width: 100%; min-height: 0; resize: vertical; }
.forum-editor-images { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.forum-editor-images:not(:empty) { margin-top: 0.6rem; }
.forum-editor-tile {
  position: relative; width: 104px; height: 104px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-secondary); display: grid; place-items: center; border: 1px solid var(--border);
}
.forum-editor-tile img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.forum-editor-tile .image-tile-remove { top: 4px; right: 4px; width: 26px; height: 26px; }
.forum-editor-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
.forum-editor-photo { cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; }
.forum-editor-photo .icon { width: 16px; height: 16px; }
.forum-format { display: inline-flex; gap: 0.25rem; }
.forum-format-btn {
  min-width: 34px; height: 32px; padding: 0 0.55rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); font-size: 0.85rem; cursor: pointer;
}
.forum-format-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.forum-format-link { text-decoration: underline; text-underline-offset: 2px; }
.forum-editor-buttons { margin-left: auto; display: flex; gap: 0.5rem; }

.forum-zoom { overflow: auto; max-height: 70vh; display: grid; place-items: center; background: var(--bg-secondary); border-radius: var(--radius-sm); }
.forum-zoom img { max-width: 100%; max-height: 68vh; transition: transform 0.2s; transform-origin: center; }
.forum-zoom-bar { display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.75rem; }
.modal:has(.forum-zoom) { max-width: min(94vw, 1000px); }

.forum-profile-head { display: flex; gap: 1rem; align-items: center; }
.forum-profile-head h3 { margin: 0 0 0.2rem; overflow-wrap: anywhere; }
.forum-profile-shop { font-size: 0.85rem; }
.forum-profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin: 1.1rem 0; }
.forum-profile-stats div { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 0.65rem 0.4rem; text-align: center; }
.forum-profile-stats strong { display: block; font-size: 1.2rem; color: var(--heading); }
.forum-profile-stats span { font-size: 0.72rem; color: var(--text-muted); }
.forum-profile-actions { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.forum-profile-posts { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.forum-profile-posts a { display: block; padding: 0.6rem 0.75rem; background: var(--bg-secondary); border-radius: var(--radius-sm); color: var(--text-primary); }
.forum-profile-posts a:hover { background: var(--bg-hover); }
.forum-profile-posts strong { display: block; font-size: 0.9rem; overflow-wrap: anywhere; }
.forum-profile-posts small { color: var(--text-muted); font-size: 0.75rem; }

.forum-rules { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.forum-rules p { color: var(--text-secondary); font-size: 0.88rem; margin: 0.15rem 0 0; }
.forum-share-link { display: flex; gap: 0.5rem; }
.forum-share-link .form-input { flex: 1; min-width: 0; }
.forum-share-targets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.forum-admin-sections { display: flex; flex-direction: column; gap: 0.4rem; }
.forum-admin-section { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; background: var(--bg-secondary); border-radius: var(--radius-sm); }
.forum-admin-section .forum-section-text { flex: 1; }
.forum-admin-section .icon { width: 18px; height: 18px; }
.forum-icon-choices { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.forum-icon-choice {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary);
}
.forum-icon-choice .icon { width: 22px; height: 22px; }
.forum-icon-choice.active { border-color: var(--accent-warm); color: var(--accent-warm); background: rgba(139, 69, 19, 0.2); }

@media (max-width: 600px) {
  .forum-thread-row { padding: 0.75rem; gap: 0.6rem; }
  .forum-thumb { width: 56px; height: 56px; }
  .forum-thread-card { padding: 1.1rem; }
  .forum-thread-heading { font-size: 1.3rem; }
  .forum-children { margin-left: 0.4rem; padding-left: 0.6rem; }
  .forum-editor-hint { display: none; }
  .forum-profile-stats { grid-template-columns: repeat(2, 1fr); }
  .forum-list-head { flex-direction: column; align-items: flex-start; }
  /* Sections as a compact two-column grid so the threads aren't pushed far down */
  .forum-sections { grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1.25rem; }
  .forum-section-card { flex-direction: column; gap: 0.5rem; padding: 0.75rem; }
  .forum-section-card .forum-section-icon { width: 34px; height: 34px; }
  .forum-section-card .forum-section-icon .icon { width: 20px; height: 20px; }
  .forum-section-card .forum-section-text span { display: none; }
  .forum-section-text strong { font-size: 0.85rem; line-height: 1.3; }
}

/* ============ ABOUT, TERMS, PRIVACY ============ */
.legal-page { max-width: 1000px; margin: 0 auto; }
.legal-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.legal-tabs a {
  padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.85rem; color: var(--text-secondary);
  background: var(--bg-input); border: 1px solid var(--border);
}
.legal-tabs a:hover { color: var(--text-primary); border-color: var(--border-glow); }
.legal-tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.legal-head { max-width: 720px; margin-bottom: 2rem; }
.legal-head h1 { font-size: 2.1rem; margin-bottom: 0.4rem; }
.legal-updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.legal-intro { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; }
.legal-layout { display: grid; grid-template-columns: 230px 1fr; gap: 2.5rem; align-items: start; }
.legal-toc {
  position: sticky; top: calc(var(--nav-height) + 1.5rem); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem;
}
.legal-toc strong { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.5rem; }
.legal-toc ol { padding-left: 1.1rem; margin: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.legal-toc li { color: var(--text-muted); font-size: 0.85rem; }
.legal-toc button {
  display: block; background: none; border: none; padding: 0.15rem 0; color: var(--text-secondary); font: inherit;
  cursor: pointer; text-align: left; line-height: 1.4;
}
.legal-toc button:hover { color: var(--accent-warm); }
.legal-body, .legal-modal { max-width: 720px; }
.legal-section { padding-bottom: 1.75rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--nav-height) + 1.5rem); }
.legal-section:last-child { border-bottom: none; }
.legal-section h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.legal-modal .legal-section h2 { font-size: 1.05rem; }
.legal-num { color: var(--accent-warm); margin-right: 0.2rem; }
.legal-section p, .legal-section li { color: var(--text-secondary); line-height: 1.75; }
.legal-section p + p, .legal-section ul + p, .legal-section p + ul { margin-top: 0.75rem; }
.legal-section ul { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.legal-table-wrap { overflow-x: auto; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border); line-height: 1.6; }
.legal-table thead th { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.legal-table tbody th { color: var(--heading); font-weight: 600; width: 32%; }
.legal-table td { color: var(--text-secondary); }
.legal-contact { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.85rem 1rem; line-height: 1.7; display: inline-block; }

.about-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; border: 1px solid var(--border); }
.about-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-hero-text { position: relative; padding: 2.5rem; background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0)); width: 100%; }
.about-hero-text h1 { font-size: 2.4rem; margin-bottom: 0.5rem; color: var(--on-photo); }
.about-hero-text p { font-size: 1.15rem; color: var(--on-photo-muted); max-width: 640px; line-height: 1.6; }
.about-story { max-width: 720px; margin: 2.25rem 0; }
.about-story p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; }
.about-story p + p { margin-top: 1rem; }
.about-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.about-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.about-card h2 { font-size: 1.3rem; margin-bottom: 1.1rem; }
.about-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.about-step { display: flex; gap: 0.9rem; align-items: flex-start; }
.about-step strong { color: var(--heading); }
.about-step p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; margin-top: 0.15rem; }
.about-step-icon {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(139, 69, 19, 0.18); color: var(--accent-warm);
}
.about-step-icon .icon { width: 22px; height: 22px; }
.about-step-num {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700;
}
.about-values-title { font-size: 1.4rem; margin: 2.5rem 0 1rem; }
.about-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.about-value { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.about-value strong { display: block; color: var(--heading); font-size: 1.05rem; margin: 0.6rem 0 0.25rem; }
.about-value p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }
.about-value-icon { color: var(--accent-warm); }
.about-value-icon .icon { width: 30px; height: 30px; }
.about-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin: 2.5rem 0 1rem; padding: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.about-contact { margin-top: 2rem; }
.about-contact h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.about-contact > p { color: var(--text-secondary); margin-bottom: 1rem; }

/* Kontakt oss */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.5rem; align-items: start; }
.contact-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.contact-form .form-textarea { min-height: 170px; resize: vertical; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.contact-actions p { margin: 0; flex: 1 1 240px; line-height: 1.5; }
.contact-error { margin: 0 0 1rem; padding: 0.65rem 0.9rem; border-radius: var(--radius-sm); background: rgba(139, 58, 58, 0.15); color: var(--tone-red); font-size: 0.9rem; }
/* Only robots fill this in: off screen, not just hidden, so they still find it */
.contact-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-aside { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.6; display: flex; flex-direction: column; gap: 0.9rem; }
.contact-aside p { margin: 0; }
.contact-aside .legal-contact { display: block; }
.contact-sent { text-align: center; padding: 1.5rem 0.5rem; }
.contact-sent h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.contact-sent p { color: var(--text-secondary); line-height: 1.6; margin: 0 auto 1.25rem; max-width: 440px; overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr; }
  .contact-card { padding: 1.25rem; }
}

/* Admin: messages from the contact form */
.contact-message { background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--accent-warm); border-radius: var(--radius-sm); padding: 1rem 1.15rem; margin-bottom: 0.75rem; }
.contact-message.handled { border-left-color: var(--border); opacity: 0.75; }
.contact-message header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; align-items: baseline; }
.contact-message header > div { display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; align-items: baseline; min-width: 0; }
.contact-message header a { overflow-wrap: anywhere; }
.contact-message-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; margin: 0.6rem 0 0.8rem; }
.contact-message footer { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; }

@media (max-width: 768px) {
  .legal-layout { grid-template-columns: 1fr; gap: 1.25rem; }
  .legal-toc { position: static; }
  .legal-head h1 { font-size: 1.7rem; }
  .about-columns, .about-values { grid-template-columns: 1fr; }
  .about-hero { min-height: 240px; }
  .about-hero-text { padding: 1.5rem; }
  .about-hero-text h1 { font-size: 1.8rem; }
  .about-hero-text p { font-size: 1rem; }
  .legal-table tbody th { width: auto; }
}
.legal-modal .legal-intro { margin-bottom: 1.5rem; }

/* ============ PRODUCT CARDS, EMPTY STATES ============ */
/* Badges sit on the photo and are cut short with "…" instead of wrapping over it */
.card-media { position: relative; }
.card-media .card-image { display: block; }
.card-badges {
  position: absolute; top: 0.6rem; left: 0.6rem; right: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.3rem;
  pointer-events: none;
}
.card-badges .card-badge {
  margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
/* Sold out: still listed, but greyed and marked so nobody has to open it to find out */
.card-badges .card-badge.sold-out { background: #6b2f2f; color: #f3d6d6; }
.card.is-sold-out .card-image { filter: grayscale(0.85) brightness(0.7); }
.card.is-sold-out .card-price { color: var(--text-muted); }
.card-price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.3rem; }
.card-price .price-unit { white-space: nowrap; }
@media (max-width: 600px) {
  .card-badges { top: 0.4rem; left: 0.4rem; right: 0.4rem; }
  .card-badges .card-badge { font-size: 0.62rem; padding: 0.15rem 0.45rem; }
  .card-subtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.empty-card {
  grid-column: 1 / -1; display: flex; gap: 1rem; align-items: flex-start; padding: 1.5rem;
  background: var(--bg-card); border: 1px dashed var(--border-glow); border-radius: var(--radius-lg);
}
.empty-card-icon {
  flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(139, 69, 19, 0.18); color: var(--accent-warm);
}
.empty-card-icon .icon { width: 28px; height: 28px; }
.empty-card strong { color: var(--heading); font-size: 1.05rem; }
.empty-card p { color: var(--text-secondary); margin: 0.3rem 0 0; line-height: 1.6; max-width: 620px; }
.empty-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; }
.feature-banner-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) {
  .empty-card { flex-direction: column; padding: 1.1rem; }
  .feature-banner-actions { justify-content: flex-start; }
}

/* ============ FILTER BAR (products, services) ============ */
.section-header .result-count { color: var(--text-muted); font-size: 0.9rem; }
.filter-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 0.75rem; margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem;
}
.filter-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.filter-row .form-select { flex: 0 1 220px; }
.search-field { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.search-field .icon { position: absolute; left: 0.85rem; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.search-field .form-input { padding-left: 2.5rem; width: 100%; }
.filter-chips { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
/* The distance chips sit in the row like the others (the group only marks where they go): on a
   phone the row scrolls sideways, and a group of its own would squeeze them into a column */
.filter-chip-group { display: contents; }
.filter-label { color: var(--text-muted); font-size: 0.8rem; margin-right: 0.15rem; }
.filter-sep { width: 1px; height: 22px; background: var(--border); margin: 0 0.3rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-secondary);
  padding: 0.38rem 0.8rem; border-radius: 999px; font: inherit; font-size: 0.82rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip .icon { width: 15px; height: 15px; }
.chip:hover { color: var(--text-primary); border-color: var(--border-glow); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-panel .allergen-options { margin: 0; padding-top: 0.6rem; border-top: 1px solid var(--border); gap: 0.4rem; }
.filter-panel .allergen-options.hidden { display: none; }
.filter-hint { width: 100%; margin: 0 0 0.2rem; color: var(--text-muted); font-size: 0.8rem; }
.filter-panel .allergen-option {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.7rem;
}
.filter-panel .allergen-option:has(input:checked) { border-color: var(--error); color: var(--tone-red); background: rgba(139, 58, 58, 0.18); }
.filter-panel .allergen-option input { accent-color: var(--error); }
@media (max-width: 600px) {
  .filter-panel { padding: 0.6rem; border-radius: var(--radius); }
  .filter-row .form-select { flex: 1 1 140px; }
  /* One row you can swipe through instead of several wrapped lines */
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -0.6rem; padding: 0 0.6rem 0.2rem; scrollbar-width: none; }
  .filter-chips::-webkit-scrollbar { display: none; }
}

/* ============ PICKUP CARD, MAP, ALLERGENS ============ */
.pickup-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; margin-top: 1.25rem;
}
.pickup-card h3 { display: flex; align-items: center; gap: 0.45rem; font-size: 1.1rem; margin-bottom: 0.6rem; }
.pickup-card h3 .icon { width: 18px; height: 18px; color: var(--accent-warm); }
.pickup-address { color: var(--heading); font-weight: 500; margin-bottom: 0.4rem; }
.pickup-next { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; color: var(--text-secondary); margin-bottom: 0.4rem; }
.pickup-next strong { color: var(--heading); font-weight: 600; }
.pickup-open { background: rgba(74, 124, 89, 0.25); color: var(--tone-green); border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.75rem; font-weight: 600; }
.pickup-week summary { cursor: pointer; color: var(--accent-warm); font-size: 0.85rem; margin: 0.2rem 0; }
.pickup-hours { list-style: none; padding: 0; margin: 0.4rem 0; max-width: 360px; }
.pickup-hours li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; border-bottom: 1px dashed var(--border); font-size: 0.9rem; color: var(--text-secondary); }
.pickup-hours li.closed { color: var(--text-muted); }
.pickup-hours li.today { color: var(--heading); font-weight: 600; }
.pickup-note { color: var(--text-secondary); font-style: italic; margin: 0.5rem 0; white-space: pre-line; }
.pickup-delivery { display: flex; align-items: center; gap: 0.4rem; color: var(--tone-blue); font-size: 0.9rem; margin: 0.5rem 0; }
.pickup-delivery .icon { width: 16px; height: 16px; }
.pickup-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.8rem; }
.pickup-map { height: 260px; border-radius: var(--radius); overflow: hidden; margin-top: 0.8rem; border: 1px solid var(--border); }
.pickup-map.hidden { display: none; }
.vendor-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.allergen-box {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; margin: 0.75rem 0;
  border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border);
}
.allergen-box.has-allergens { background: rgba(139, 115, 53, 0.14); border-color: rgba(201, 169, 110, 0.45); }
.allergen-box-icon { color: var(--gold); flex: none; }
.allergen-box-icon .icon { width: 22px; height: 22px; }
.allergen-box strong { color: var(--heading); }
.allergen-box-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0; }
.allergen-box small { color: var(--text-muted); font-size: 0.78rem; }
.allergen-box .allergen-chip { font-size: 0.85rem; font-weight: 600; text-transform: capitalize; }

/* Seller form: address search and weekly hours */
.address-search { position: relative; }
.address-results {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 0.3rem; max-height: 260px; overflow-y: auto;
}
.address-results.hidden { display: none; }
.address-results button {
  display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text-primary);
  padding: 0.55rem 0.7rem; border-radius: 6px; font: inherit; font-size: 0.88rem; cursor: pointer;
}
.address-results button:hover { background: var(--bg-hover); }
.address-results p { padding: 0.5rem 0.7rem; margin: 0; }
.hours-editor { display: flex; flex-direction: column; gap: 0.4rem; }
.hours-row { display: grid; grid-template-columns: 150px 1fr auto 1fr; gap: 0.5rem; align-items: center; }
.hours-row .form-input { padding: 0.45rem 0.6rem; }
.hours-row .form-input:disabled { opacity: 0.4; }
@media (max-width: 480px) {
  .hours-row { grid-template-columns: 1fr 1fr auto 1fr; }
  .hours-row .form-checkbox span { font-size: 0.85rem; }
}

/* ============ ORDERS: timeline, details, payouts ============ */
.order-status { white-space: nowrap; }
.order-status.awaiting_payment, .order-status.pending { background: rgba(139,115,53,0.2); color: var(--tone-gold); }
.order-status.approved, .order-status.ready { background: rgba(74,106,139,0.22); color: var(--tone-blue); }
.order-status.delivered, .order-status.completed { background: rgba(74,124,89,0.2); color: var(--tone-green); }
.order-status.declined, .order-status.cancelled, .order-status.refunded { background: rgba(139,58,58,0.2); color: var(--tone-red); }
.order-status.claimed, .order-status.disputed { background: rgba(201,169,110,0.22); color: var(--tone-gold); }

.order-group-title { font-size: 1rem; margin: 1.5rem 0 0.6rem; }
.order-list { display: flex; flex-direction: column; gap: 0.5rem; }
.order-card-v2 { width: 100%; text-align: left; font: inherit; color: inherit; align-items: flex-start; }
.order-card-main { flex: 1; min-width: 0; }
.order-card-title { font-weight: 600; color: var(--heading); overflow-wrap: anywhere; }
.order-card-sub { color: var(--text-secondary); font-size: 0.88rem; margin-top: 0.15rem; overflow-wrap: anywhere; }
.order-card-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; color: var(--text-muted); font-size: 0.78rem; margin-top: 0.35rem; }
.order-card-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.order-card-meta .icon { width: 14px; height: 14px; }
.order-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; flex: none; }
.order-card-total { font-weight: 700; color: var(--accent-warm); }

.order-timeline { list-style: none; padding: 0; margin: 1rem 0; display: flex; gap: 0; }
.order-timeline li { flex: 1; position: relative; padding-top: 1.4rem; text-align: center; min-width: 0; }
.order-timeline li::before {
  content: ''; position: absolute; top: 0.45rem; left: -50%; width: 100%; height: 2px; background: var(--border);
}
.order-timeline li:first-child::before { display: none; }
.order-timeline li.done::before, .order-timeline li.warn::before, .order-timeline li.bad::before { background: var(--accent-warm); }
.order-timeline-dot {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg-input); border: 2px solid var(--border); z-index: 1;
}
.order-timeline li.done .order-timeline-dot { background: var(--accent-warm); border-color: var(--accent-warm); }
.order-timeline li.current .order-timeline-dot { border-color: var(--accent-warm); box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.18); }
.order-timeline li.warn .order-timeline-dot { background: var(--gold); border-color: var(--gold); }
.order-timeline li.bad .order-timeline-dot { background: var(--tone-red); border-color: var(--tone-red); }
.order-timeline strong { display: block; font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; line-height: 1.3; padding: 0 0.15rem; }
.order-timeline li.done strong, .order-timeline li.current strong { color: var(--heading); }
.order-timeline small { display: block; font-size: 0.68rem; color: var(--text-muted); margin-top: 0.1rem; }

.order-detail-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.order-next {
  background: rgba(139, 69, 19, 0.12); border: 1px solid var(--border-glow); border-radius: var(--radius);
  padding: 0.75rem 1rem; color: var(--text-primary); line-height: 1.55; margin: 0.5rem 0 1rem;
}
.order-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.order-detail-grid section { background: var(--bg-secondary); border-radius: var(--radius); padding: 0.85rem 1rem; }
.order-detail-grid h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.4rem; font-family: var(--font-body); }
.order-detail-grid p { margin: 0.2rem 0; overflow-wrap: anywhere; }
.order-detail-grid .btn { margin-top: 0.4rem; }
.order-lines { border-top: 1px solid var(--border); padding-top: 0.5rem; }
.order-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; color: var(--text-secondary); }
.order-line.total { color: var(--heading); font-weight: 700; border-top: 1px solid var(--border); margin-top: 0.3rem; padding-top: 0.6rem; }
.order-line.refund { color: var(--tone-red); }
.order-line.muted { color: var(--text-muted); font-size: 0.88rem; }
.order-line > span:last-child { white-space: nowrap; flex-shrink: 0; }
.order-payment-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }
.order-quote { background: var(--bg-secondary); border-left: 3px solid var(--border-glow); padding: 0.6rem 0.85rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 0.6rem 0; color: var(--text-secondary); overflow-wrap: anywhere; white-space: pre-line; }
.order-quote.warn { border-left-color: var(--gold); }
.order-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.order-actions:empty { display: none; }
.order-page { max-width: 760px; margin: 0 auto; }

.checkout-note { display: flex; gap: 0.65rem; align-items: flex-start; margin-top: 1rem; padding: 0.75rem; border-radius: var(--radius-sm); background: var(--bg-secondary); }
.checkout-note .icon { flex: none; width: 18px; height: 18px; color: var(--accent-warm); margin-top: 0.15rem; }
.checkout-note p { margin: 0; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; }
.checkout-warning { color: var(--tone-gold); background: rgba(201,169,110,0.12); border: 1px solid rgba(201,169,110,0.35); border-radius: var(--radius-sm); padding: 0.65rem 0.85rem; margin-top: 0.75rem; font-size: 0.9rem; }
.pickup-slots { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.4rem; scrollbar-width: thin; }
.pickup-slot {
  flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.55rem 0.8rem;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary);
  font: inherit; font-size: 0.82rem; cursor: pointer; text-align: left;
}
.pickup-slot strong { color: var(--heading); font-size: 0.92rem; }
.pickup-slot span::first-letter { text-transform: uppercase; }
.pickup-slot.active { border-color: var(--accent-warm); background: rgba(139, 69, 19, 0.22); }
#pickup-section.hidden { display: none; }

.payout-banner, .payout-account {
  background: var(--bg-card); border: 1px solid rgba(201,169,110,0.4); border-radius: var(--radius-lg); padding: 1rem 1.25rem; margin: 1rem 0;
}
.payout-banner p, .payout-account p { color: var(--text-secondary); margin: 0.3rem 0 0.7rem; line-height: 1.55; }
.payout-account { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.payout-account > div { flex: 1 1 320px; }
.payout-account p { margin-bottom: 0; }
.payout-account.ready { border-color: rgba(74,124,89,0.5); }
.payout-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1rem 0; }
.payout-totals div { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem; }
.payout-totals span { display: block; color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.payout-totals strong { font-size: 1.35rem; color: var(--heading); }
.payout-list { display: flex; flex-direction: column; gap: 0.35rem; }
.payout-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; text-align: left; font: inherit; color: var(--text-primary);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.65rem 0.9rem; cursor: pointer;
}
.payout-row:hover { border-color: var(--border-glow); }
.payout-when { color: var(--text-muted); font-size: 0.85rem; }
.dispute-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem; }
.dispute-card p { color: var(--text-secondary); margin: 0.4rem 0; overflow-wrap: anywhere; }
.dispute-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; color: var(--text-primary); }

@media (max-width: 600px) {
  .order-detail-grid, .payout-totals { grid-template-columns: 1fr; }
  .order-timeline strong { font-size: 0.68rem; }
  .order-timeline small { display: none; }
  .payout-row { grid-template-columns: 1fr auto; }
  .payout-when { grid-column: 1 / -1; grid-row: 2; }
}

/* Product form: the seller's pickup and delivery, which apply to every product */
.pf-delivery { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-secondary); }
.pf-delivery p { margin: 0 0 0.75rem; }
.pf-delivery-list { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 0 0 0.9rem; font-size: 0.92rem; }
.pf-delivery-list dt { display: flex; align-items: center; gap: 0.4rem; color: var(--text-muted); white-space: nowrap; }
.pf-delivery-list dd { margin: 0; color: var(--text-primary); }
@media (max-width: 480px) { .pf-delivery-list { grid-template-columns: 1fr; } .pf-delivery-list dd { margin-bottom: 0.4rem; } }

/* Rating the seller: in the order window, on the seller's page and in the order list */
.order-rating { margin-top: 1rem; padding: 1rem; border: 1px solid var(--accent); border-radius: var(--radius); background: rgba(212, 165, 116, 0.06); }
.order-rating.done { border-color: var(--border); background: var(--bg-secondary); }
.order-rating h4 { margin: 0 0 0.4rem; }
.order-rating p { margin: 0 0 0.5rem; }
.order-rating-given { display: flex; align-items: center; gap: 0.75rem; }
.order-card-rate { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; color: var(--gold); white-space: nowrap; }
.order-card-rate .icon { width: 14px; height: 14px; }
.rating-cta { margin-bottom: 1.25rem; padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-secondary); }
.rating-cta.open { border-color: var(--accent); }
.rating-cta h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.rating-cta p { margin: 0; display: flex; gap: 0.5rem; align-items: flex-start; color: var(--text-secondary); font-size: 0.92rem; }
.rating-cta p .icon { flex-shrink: 0; margin-top: 0.15rem; color: var(--gold); }
.vendor-header .star-display { cursor: pointer; }

/* Buyer / seller mode */
.mode-switch {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--accent); background: transparent; color: var(--accent-warm);
  font-size: 0.8rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background 0.2s;
}
.mode-switch:hover { background: rgba(212, 165, 116, 0.12); }
/* On computers the marketplace bar is full, so there the switch is first in the profile menu;
   seller mode has fewer links and room for it in the bar. The phone menu always shows it. */
@media (min-width: 1025px) { .nav-inner:not(.seller-mode) .mode-switch { display: none; } }
.mode-switch .icon { width: 16px; height: 16px; }
.nav-mode-tag {
  margin-left: 0.5rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--accent); color: #fff;
  font-family: var(--font-body, inherit); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
}
.nav-link-badged { display: inline-flex; align-items: center; }

/* Home: shortcut to purchases under way */
.home-orders {
  display: flex; align-items: center; gap: 0.9rem; margin-top: 1.25rem; padding: 0.9rem 1.1rem;
  border: 1px solid var(--accent); border-radius: var(--radius); background: rgba(212, 165, 116, 0.08); color: var(--text-primary);
}
.home-orders:hover { background: rgba(212, 165, 116, 0.14); }
.home-orders-icon .icon { width: 26px; height: 26px; color: var(--accent-warm); }
.home-orders-text { flex: 1; font-weight: 600; }
.home-orders-go { color: var(--accent-warm); font-size: 0.9rem; white-space: nowrap; }

/* Following sellers */
.follow-btn .icon { width: 15px; height: 15px; }
.follow-count { align-self: center; font-size: 0.82rem; color: var(--text-muted); }
.vendor-actions { align-items: center; }

/* In season now */
.season-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Recipe: ingredients from local sellers */
.recipe-shop { margin-top: 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-secondary); }
.recipe-shop h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.25rem; font-size: 1.05rem; }
.recipe-shop h3 .icon { width: 20px; height: 20px; color: var(--accent-warm); }
.recipe-shop-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.6rem; }
.recipe-shop-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0; border-top: 1px solid var(--border); }
.recipe-shop-ingredient { color: var(--text-secondary); font-size: 0.88rem; }
.recipe-shop-product { display: flex; align-items: center; gap: 0.6rem; min-width: 0; color: var(--text-primary); }
.recipe-shop-product img { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.recipe-shop-product span { display: flex; flex-direction: column; min-width: 0; }
.recipe-shop-product strong, .recipe-shop-product small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipe-shop-product small { color: var(--text-muted); font-size: 0.78rem; }
.recipe-shop-price { white-space: nowrap; font-size: 0.9rem; color: var(--accent-warm); }
.recipe-shop-row .btn .icon { width: 16px; height: 16px; }
@media (max-width: 600px) {
  .recipe-shop-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .recipe-shop-ingredient { grid-column: 1 / -1; }
}

/* Forum reports */
.forum-report-reasons { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; }
.forum-report-reason { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.report-card { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-secondary); margin-bottom: 0.75rem; }
.report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.report-count { padding: 0.1rem 0.55rem; border-radius: 999px; background: rgba(200, 123, 123, 0.18); color: var(--tone-red); font-size: 0.75rem; font-weight: 700; }
.report-content { margin: 0.6rem 0; padding: 0.6rem 0.8rem; border-left: 3px solid var(--border); color: var(--text-secondary); font-size: 0.9rem; white-space: pre-line; }
.report-reasons { margin: 0 0 0.6rem 1rem; padding: 0; font-size: 0.85rem; color: var(--text-secondary); }
.report-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Theme switch in the footer */
.footer-theme { background: none; border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.75rem; color: var(--text-secondary); font: inherit; font-size: 0.85rem; cursor: pointer; }
.footer-theme:hover { color: var(--text-primary); border-color: var(--accent-warm); }

/* Seller: delivery on or paused */
.vendor-dash-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap; }
.delivery-control { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0.5rem 0.45rem 0.9rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--bg-card); }
.delivery-control[hidden] { display: none; }
.delivery-control.paused { border-color: var(--tone-gold); background: rgba(201, 169, 110, 0.12); }
.delivery-control-state { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; color: var(--text-secondary); }
.delivery-control.paused .delivery-control-state { color: var(--tone-gold); font-weight: 600; }
.delivery-control-state .icon { width: 18px; height: 18px; }
.pause-choices { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.9rem; }
.pause-choice { text-align: left; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-secondary);
  color: var(--text-primary); font: inherit; cursor: pointer; }
.pause-choice:hover { border-color: var(--accent-warm); background: var(--bg-hover); }
.delivery-badge.paused { background: rgba(201, 169, 110, 0.15); color: var(--tone-gold); }
.pickup-delivery.paused { color: var(--tone-gold); }
@media (max-width: 600px) { .delivery-control { width: 100%; justify-content: space-between; border-radius: var(--radius); } }

/* ============ ADMIN: insights, users, IP bans ============ */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
/* Email status above user management */
.admin-email { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; justify-content: space-between; padding: 0.85rem 1rem; margin-bottom: 1rem;
  border: 1px solid var(--border); border-left: 3px solid var(--text-muted); border-radius: var(--radius-sm); background: var(--bg-card); }
.admin-email.ok { border-left-color: var(--success); }
.admin-email.failing, .admin-email.off { border-left-color: var(--error); }
.admin-email-text { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; flex: 1 1 320px; }
.admin-email-text p { margin: 0; line-height: 1.5; }
.admin-email-error { display: block; padding: 0.4rem 0.6rem; border-radius: 6px; background: var(--bg-input); font-size: 0.8rem; color: var(--tone-red); overflow-wrap: anywhere; white-space: normal; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.5rem 0 1rem; }
.admin-filters .form-input[type="search"] { flex: 1 1 260px; }
.admin-user { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); padding: 1rem; margin-bottom: 0.75rem; }
.admin-user.banned { border-color: var(--tone-red); }
.admin-user-main { display: flex; gap: 0.9rem; align-items: flex-start; }
.admin-user-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-input); }
.admin-user-info { min-width: 0; flex: 1; }
.admin-user-name { font-weight: 600; color: var(--heading); }
.admin-user-email { color: var(--text-secondary); font-size: 0.9rem; overflow-wrap: anywhere; }
.admin-user-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.admin-badge { padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: var(--bg-hover); color: var(--text-secondary); }
.admin-badge.role-vendor { background: rgba(74, 124, 89, 0.18); color: var(--tone-green); }
.admin-user-badges .forum-role { font-size: 0.65rem; }
.admin-flags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; border: 1px solid var(--border);
  border-radius: 10px; padding: 0.45rem 0.75rem 0.55rem; margin: 0.75rem 0 0;
}
.admin-flags legend { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); padding: 0 0.3rem; }
.admin-flag { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.admin-flag input { width: 1rem; height: 1rem; accent-color: var(--accent); }
.admin-flag.locked { cursor: not-allowed; opacity: 0.6; }
.admin-badge.bad { background: rgba(139, 58, 58, 0.2); color: var(--tone-red); }
.admin-badge.warn { background: rgba(201, 169, 110, 0.18); color: var(--tone-gold); }
.admin-tag { font-size: 0.7rem; padding: 0.05rem 0.4rem; border-radius: 4px; background: var(--accent); color: #fff; vertical-align: 2px; }
.admin-user-reason { margin-top: 0.35rem; font-size: 0.85rem; color: var(--tone-red); }
.admin-user-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-top: 0.45rem; font-size: 0.8rem; color: var(--text-muted); }
.admin-commission { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--border); font-size: 0.9rem; }
.admin-commission input { width: 80px; padding: 0.35rem 0.5rem; }
.admin-user-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.8rem; }
.admin-user-actions .form-select { width: auto; padding: 0.35rem 2rem 0.35rem 0.6rem; }
.admin-pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; }
.danger-text { color: var(--tone-red) !important; }

/* ---------- Who you buy from, and what the seller states ---------- */
.seller-type {
  display: flex; align-items: flex-start; gap: 0.4rem; margin-top: 0.6rem; font-size: 0.85rem; color: var(--text-secondary); line-height: 1.45;
}
.seller-type .icon { flex: none; width: 15px; height: 15px; margin-top: 0.12rem; color: var(--tone-green); }
.seller-type a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.seller-type.private .icon { color: var(--tone-gold); }
.cert-note { display: flex; align-items: flex-start; gap: 0.35rem; margin: 0.45rem 0 0; font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
.cert-note .icon { flex: none; width: 13px; height: 13px; margin-top: 0.12rem; }
.checkout-note > div { min-width: 0; }
.checkout-note > div p + p, .checkout-note .seller-type { margin-top: 0.45rem; }
.checkout-note a { color: var(--accent-warm); }

.seller-type-field { border: none; padding: 0; margin-left: 0; margin-right: 0; min-width: 0; }
.seller-type-field .form-checkbox { margin-top: 0.35rem; }
.legal-link { color: var(--accent-warm); font-weight: 600; }
.form-checkbox input[type="radio"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.checkout-note .seller-type + p { margin-top: 0.45rem; }

/* ---------- First-time shop setup ---------- */
.setup-page { max-width: 760px; margin: 0 auto; }
.setup-head { margin-bottom: 1.25rem; }
.setup-kicker { color: var(--accent-warm); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.3rem; }
.setup-head h1 { margin: 0 0 0.4rem; }
.setup-head p { color: var(--text-secondary); margin: 0; }
.setup-steps { list-style: none; display: flex; gap: 0.35rem; padding: 0; margin: 0 0 1rem; overflow-x: auto; scrollbar-width: none; }
.setup-steps::-webkit-scrollbar { display: none; }
.setup-steps li {
  flex: 1 0 auto; display: flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.7rem; border-radius: 999px;
  background: var(--bg-secondary); color: var(--text-muted); font-size: 0.82rem; cursor: pointer; white-space: nowrap;
}
.setup-step-num {
  width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-hover); font-weight: 700; font-size: 0.75rem; flex: none;
}
.setup-steps li.current { background: var(--accent); color: #fff; }
.setup-steps li.current .setup-step-num { background: rgba(255, 255, 255, 0.22); }
.setup-steps li.done { color: var(--text-secondary); }
.setup-steps li.done .setup-step-num { background: var(--tone-green); color: #fff; }
.setup-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.setup-section h2 { margin: 0 0 0.3rem; font-size: 1.35rem; }
.setup-lead { color: var(--text-secondary); margin: 0 0 1.25rem; }
.setup-subhead { font-size: 1rem; margin: 1.25rem 0 0.75rem; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.setup-grid.three { grid-template-columns: repeat(3, 1fr); }
.setup-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--bg-secondary); }
.setup-note { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.86rem; color: var(--text-secondary); background: var(--bg-secondary); padding: 0.7rem 0.85rem; border-radius: var(--radius-sm); }
.setup-note .icon { flex: none; width: 16px; height: 16px; color: var(--tone-gold); margin-top: 0.1rem; }
.setup-points { list-style: none; padding: 0; margin: 0.75rem 0 1.1rem; display: grid; gap: 0.55rem; }
.setup-points li { display: flex; gap: 0.55rem; align-items: flex-start; color: var(--text-secondary); line-height: 1.5; }
.setup-points .icon { flex: none; width: 16px; height: 16px; margin-top: 0.2rem; color: var(--tone-green); }
.setup-accept { padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-secondary); }
.setup-accept a, .setup-section a { color: var(--accent-warm); }
.setup-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.setup-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.setup-nav [hidden] { display: none; }
.setup-nav #setup-next { margin-left: auto; }
.setup-public-warning {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 1rem; margin-bottom: 1.25rem; border-radius: var(--radius-sm);
  background: rgba(201, 169, 110, 0.12); border: 1px solid rgba(201, 169, 110, 0.45);
}
.setup-public-warning .icon { flex: none; width: 20px; height: 20px; color: var(--tone-gold); margin-top: 0.1rem; }
.setup-public-warning strong { display: block; margin-bottom: 0.2rem; }
.setup-public-warning p { margin: 0; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; }
.setup-profile { max-width: 720px; }
.setup-profile .setup-section { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.setup-profile .setup-section h3 { margin: 0 0 1rem; }
.setup-save { position: sticky; bottom: 0; padding: 0.85rem 0; background: linear-gradient(transparent, var(--bg-primary) 35%); }

/* Documents: the seller's list and the public list on the shop page */
.doc-list { list-style: none; padding: 0; margin: 0.6rem 0; display: grid; gap: 0.45rem; }
.doc-item {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-secondary); min-width: 0;
}
.doc-item > .icon { flex: none; width: 18px; height: 18px; color: var(--accent-warm); }
.doc-item a { color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.doc-item a:hover { color: var(--accent-warm); }
.doc-item .text-sm { flex: none; }
.doc-item button { flex: none; }
.doc-upload { padding: 0.9rem; border: 1px dashed var(--border-glow, var(--border)); border-radius: var(--radius-sm); }
.vendor-docs { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 1rem 0 1.5rem; }
.vendor-docs h2 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.15rem; margin: 0 0 0.3rem; }
.vendor-docs h2 .icon { width: 18px; height: 18px; color: var(--accent-warm); }

@media (max-width: 640px) {
  .setup-card { padding: 1.1rem; border-radius: var(--radius-sm); }
  .setup-grid, .setup-grid.three { grid-template-columns: 1fr; }
  .setup-steps li .setup-step-label { display: none; }
  .setup-steps li.current .setup-step-label { display: inline; }
  .setup-nav #setup-count { display: none; }
  .setup-nav .btn { padding-left: 1rem; padding-right: 1rem; }
  .setup-nav #setup-next { white-space: normal; text-align: center; min-width: 0; }
  .doc-item { flex-wrap: wrap; }
  .doc-item a { flex-basis: calc(100% - 2rem); }
}

/* Rows and cards that open a page from anywhere on them */
[data-open] { cursor: pointer; }
.vendor-product-row[data-open]:hover, .top-product-row[data-open]:hover, .cart-row[data-open]:hover, .recipe-shop-row[data-open]:hover { background: var(--bg-hover); }
.cart-row { border-radius: var(--radius-sm); }

/* Turning notifications on for this device */
.push-panel { display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: var(--bg-secondary); border: 1px solid var(--border); flex-wrap: wrap; }
.push-panel > .icon { flex: none; width: 22px; height: 22px; color: var(--accent-warm); }
.push-panel.push-on > .icon { color: var(--tone-green); }
.push-panel-text { flex: 1; min-width: 200px; }
.push-panel-text p { margin: 0 0 0.25rem; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }
.push-panel-text strong { display: block; color: var(--heading); font-size: 0.95rem; }
.push-panel-text .text-sm { margin-top: 0.3rem; }
.push-panel-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.push-panel-actions:empty { display: none; }
.seller-push-prompt { margin-top: 1rem; }

/* ---------- Front page: search first ---------- */
.home-finder { padding: 1.5rem 0 0.5rem; }
.home-finder h1 {
  font-family: var(--font-display); font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -0.02em;
  color: var(--heading); margin: 0 0 0.5rem;
}
.home-lead { color: var(--text-secondary); font-size: 1.05rem; margin: 0 0 1.25rem; }
.home-lead b { color: var(--heading); font-weight: 650; }
.home-search {
  display: flex; align-items: stretch; gap: 0.4rem; padding: 0.4rem; max-width: 940px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.home-where {
  display: flex; align-items: center; gap: 0.6rem; padding: 0 0.9rem; min-width: 210px; text-align: left;
  background: none; border: none; border-right: 1px solid var(--border); color: inherit; font: inherit; cursor: pointer;
}
.home-where .icon { color: var(--accent-warm); width: 18px; height: 18px; flex: none; }
.home-where small { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.home-where strong { display: block; color: var(--heading); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.home-what { flex: 1; display: flex; align-items: center; gap: 0.6rem; padding: 0 0.75rem; color: var(--text-muted); min-width: 0; }
.home-what .icon { width: 18px; height: 18px; flex: none; }
.home-what input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--text-primary); font: inherit; font-size: 1rem; padding: 0.85rem 0; outline: none; }
.home-what input::placeholder { color: var(--text-muted); }
.home-mode { display: flex; align-self: center; background: var(--bg-secondary); border-radius: 11px; padding: 4px; }
.home-mode button, .home-view button {
  background: none; border: none; padding: 0.5rem 0.9rem; border-radius: 8px; font: inherit; font-size: 0.86rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
}
.home-mode button[aria-pressed="true"], .home-view button[aria-pressed="true"] { background: var(--bg-card); color: var(--heading); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.home-view button .icon { width: 14px; height: 14px; }
.home-go { padding: 0 1.5rem; border-radius: 12px; min-height: 50px; }
.home-quick { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; }
.home-quick .chip { text-decoration: none; }

/* Categories as round pictures */
.home-cats { display: flex; gap: 1.1rem; padding: 1.5rem 0 0.25rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.home-cats::-webkit-scrollbar { display: none; }
.home-cat { flex: none; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; scroll-snap-align: start; }
.home-cat-ring { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 3px solid var(--bg-card); box-shadow: 0 0 0 1px var(--border), 0 6px 16px rgba(0, 0, 0, 0.18); transition: box-shadow 0.15s, transform 0.15s; }
.home-cat-ring img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-cat:hover .home-cat-ring { box-shadow: 0 0 0 2px var(--accent-warm), 0 6px 16px rgba(0, 0, 0, 0.18); transform: translateY(-2px); }
.home-cat-name { font-size: 0.82rem; font-weight: 600; color: var(--heading); text-align: center; line-height: 1.25; }

.home-section { margin-top: 2.25rem; }
.home-section .section-header { margin-bottom: 1rem; gap: 0.75rem; flex-wrap: wrap; }
.home-section .section-header h2 { font-family: var(--font-display); font-size: 1.6rem; color: var(--heading); margin: 0; }
.section-sub { font-family: var(--font-body); font-size: 0.85rem; font-weight: 400; color: var(--text-muted); margin-left: 0.5rem; }
.section-link { font-size: 0.9rem; font-weight: 600; color: var(--accent-warm); text-decoration: none; white-space: nowrap; }
.home-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; }
.home-view { display: flex; background: var(--bg-secondary); border-radius: 11px; padding: 4px; }

/* Sellers near you */
.home-sellers-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.home-sellers-list > .empty-card, .home-sellers-list > p { grid-column: 1 / -1; }
.seller-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem;
  transition: border-color 0.15s, transform 0.15s;
}
.seller-card:hover, .seller-card:focus-visible { border-color: var(--border-glow); transform: translateY(-2px); }
.seller-card-head { display: flex; gap: 0.75rem; align-items: center; min-width: 0; }
.seller-card-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-secondary); }
.seller-card-name { min-width: 0; }
.seller-card-name strong { display: block; color: var(--heading); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seller-card-name span { font-size: 0.82rem; color: var(--text-muted); }
.seller-card-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.seller-tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 6px; background: var(--bg-secondary); color: var(--text-secondary); }
.seller-tag.open { background: rgba(74, 124, 89, 0.18); color: var(--tone-green); }
.seller-tag .icon { width: 13px; height: 13px; }
.seller-card-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.seller-card-product { display: flex; flex-direction: column; gap: 0.3rem; text-decoration: none; min-width: 0; }
.seller-card-product img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--bg-secondary); }
.seller-card-product span { font-size: 0.76rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-map { height: 460px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg-secondary); z-index: 0; }
.home-map-note { font-size: 0.8rem; color: var(--text-muted); margin: 0.5rem 0 0; }
.map-popup { display: flex; flex-direction: column; gap: 0.3rem; min-width: 180px; font-family: var(--font-body); }
.map-popup-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.15rem; }
/* Always a circle: a fixed square box, the picture cropped to fill it (Leaflet's own img rules
   don't get to change its size) */
.leaflet-container .map-popup-logo { width: 40px !important; height: 40px !important; max-width: none; flex: none; border-radius: 50%; object-fit: cover; background: #eee; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }
.map-popup strong { font-size: 0.95rem; color: #22180f; }
.map-popup span { font-size: 0.8rem; color: #6b5e50; }
.map-popup .btn { margin-top: 0.4rem; color: #fff; }

.home-join {
  margin-top: 2.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.4rem 1.6rem; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border);
}
.home-join h2 { font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 0.25rem; color: var(--heading); }
.home-join p { margin: 0; color: var(--text-secondary); }

@media (max-width: 760px) {
  .home-finder { padding-top: 0.75rem; }
  .home-lead { font-size: 0.95rem; margin-bottom: 0.9rem; }
  .home-search { flex-direction: column; padding: 0.5rem; border-radius: 14px; }
  .home-where { border-right: none; border-bottom: 1px solid var(--border); padding: 0.5rem 0.5rem 0.75rem; min-width: 0; }
  .home-where strong { max-width: none; }
  .home-what { padding: 0 0.5rem; }
  .home-mode { align-self: stretch; } .home-mode button { flex: 1; justify-content: center; }
  .home-go { min-height: 46px; width: 100%; }
  .home-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .home-quick::-webkit-scrollbar { display: none; }
  .home-cats { gap: 0.75rem; padding-top: 1.1rem; margin-right: -16px; }
  .home-cat { width: 72px; } .home-cat-ring { width: 62px; height: 62px; } .home-cat-name { font-size: 0.74rem; }
  .home-section { margin-top: 1.75rem; }
  .home-section .section-header h2 { font-size: 1.3rem; }
  .section-sub { display: none; }
  .home-map { height: 380px; }
}

/* ---------- Vipps: login and payment ---------- */
/* Vipps' own button draws itself; the fallback below is only seen until it has loaded */
vipps-mobilepay-button.vipps-button { display: block; width: 100%; }
.vipps-fallback { display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; min-height: 46px; padding: 0 1.25rem; border: none; border-radius: 999px; background: #ff5b24; color: #fff; font: 600 1rem/1 var(--font-body); cursor: pointer; }
.vipps-fallback:hover { background: #db460f; }
.vipps-fallback .vipps-logo { height: 0.95em; width: auto; margin-top: 0.2em; }
.auth-or { display: flex; align-items: center; gap: 0.75rem; margin: 1.1rem 0; color: var(--text-muted); font-size: 0.85rem; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Checkout: Vipps and card as two separate buttons */
.pay-choice { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.pay-choice h3 { margin: 0 0 0.35rem; font-size: 1rem; }
/* One button per way to pay, each with the brand's own logo */
.pay-choice .pay-method { min-height: 46px; border-radius: 999px; font-size: 1rem; font-weight: 600; gap: 0.75rem; flex-wrap: wrap; row-gap: 0.25rem; }
.pay-method-label { display: inline-flex; align-items: center; gap: 0.5rem; }
.pay-logos { display: inline-flex; align-items: center; gap: 0.3rem; }
.pay-logos img { height: 22px; width: auto; display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22); }
.pay-choice .pay-card { background: var(--heading); color: var(--bg-card); }
.pay-choice .pay-card:hover:not(:disabled) { opacity: 0.88; }
.pay-choice .pay-card .icon { width: 22px; height: 22px; }
.pay-choice .pay-klarna { background: var(--bg-card); color: var(--heading); border: 1px solid var(--border); }
.pay-choice .pay-klarna:hover:not(:disabled) { border-color: var(--border-glow); }
.pay-klarna-badge { height: 26px; width: auto; display: block; }
.pay-secure { margin: 0.2rem 0 0; text-align: center; font-size: 0.78rem; color: var(--text-muted); }
.pay-choice-hint { margin: 0 0 0.55rem; text-align: center; font-size: 0.8rem; color: var(--text-muted); }
.pay-choice.disabled { opacity: 0.55; pointer-events: none; }
.pay-choice.busy { pointer-events: none; }

/* Profile → Security */
.vipps-link .vipps-button { max-width: 320px; margin-top: 0.75rem; }
.vipps-link p { margin: 0.25rem 0 0.5rem; }

/* ---------- Maps: seller dots and the search area ---------- */
/* Dots are drawn by Leaflet as SVG; these rules win over its colour attributes */
.seller-dot { fill: var(--accent-warm); fill-opacity: 1; stroke: #fff; stroke-width: 2; transition: fill 0.2s, fill-opacity 0.2s; }
.seller-dot.empty { fill-opacity: 0.45; }
.seller-dot.outside { fill: #8c8c8c; fill-opacity: 0.55; }
.area-circle { stroke: var(--accent-warm); stroke-width: 2; stroke-dasharray: 6 5; fill: var(--accent-warm); fill-opacity: 0.08; }

/* Products: choose the area on a map */
.area-panel { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1rem; margin: 0 0 1.25rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); }
.area-panel.hidden { display: none; }
.area-map-wrap { position: relative; min-width: 0; }
.area-map { height: 380px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-secondary); z-index: 0; }
/* The middle of the map: the pin's point sits on it */
.area-crosshair { position: absolute; left: 50%; top: 50%; z-index: 500; pointer-events: none; transform: translate(-50%, -100%); color: var(--accent-warm); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.area-crosshair .icon { width: 34px; height: 34px; display: block; }
.area-locate { position: absolute; right: 10px; bottom: 26px; z-index: 500; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); background: #fff; color: #22180f; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.area-locate .icon { width: 20px; height: 20px; }
.area-controls { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.25rem 0.25rem 0.25rem 0; }
.area-radius-row { display: flex; justify-content: space-between; align-items: baseline; }
.area-radius-row label { font-weight: 600; color: var(--heading); }
.area-radius-row strong { font-size: 1.15rem; color: var(--accent-warm); }
.area-controls input[type="range"] { width: 100%; accent-color: var(--accent-warm); }
.area-summary { margin: 0; color: var(--text-primary); font-size: 0.92rem; line-height: 1.45; }
@media (max-width: 760px) {
  .area-panel { grid-template-columns: 1fr; padding: 0.5rem; }
  .area-map { height: 300px; }
}

/* ============ ADMIN: Fride's own shop (BigBuy) ============ */
.bb-checks { margin-top: 0; }
.admin-flag input.bb-small-input { width: 90px; height: auto; padding: 0.35rem 0.5rem; }
.bb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.bb-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer; font: inherit; color: inherit;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}
.bb-card:hover, .bb-card:focus-visible { border-color: var(--accent-warm); }
.bb-card-image { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: #fff; color: var(--text-muted); }
.bb-card-image img { width: 100%; height: 100%; object-fit: contain; }
.bb-card-image .icon { width: 40px; height: 40px; }
.bb-card-body { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.7rem 0.8rem 0.8rem; min-width: 0; }
.bb-card-name { font-weight: 600; color: var(--heading); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bb-card-meta { font-size: 0.78rem; color: var(--text-muted); overflow-wrap: anywhere; }
.bb-card-price { font-size: 0.85rem; }
.bb-card-suggested { font-size: 0.85rem; font-weight: 700; color: var(--tone-green); }
.bb-card-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.bb-card-badges:empty { display: none; }
.modal.bb-modal { max-width: 640px; }
.bb-modal .modal-actions { padding: 1rem 0 0; }
.bb-gallery { display: flex; gap: 0.5rem; overflow-x: auto; margin-bottom: 1rem; }
.bb-gallery img { width: 110px; height: 110px; flex: none; object-fit: contain; background: #fff; border-radius: var(--radius-sm); }
.bb-product-name { margin-bottom: 0.25rem; overflow-wrap: anywhere; }
.bb-breakdown td { padding: 0.45rem 0.6rem; font-size: 0.88rem; }
.bb-breakdown td:not(:first-child) { text-align: right; white-space: nowrap; }
.bb-breakdown-total td { font-weight: 700; color: var(--heading); border-top: 2px solid var(--border); }
.bb-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.75rem; }
.bb-item.hidden-item { opacity: 0.7; }
.bb-item-image { width: 64px; height: 64px; flex: none; border-radius: var(--radius-sm); object-fit: contain; background: #fff;
  display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.bb-price-edit { margin-top: 0; padding-top: 0; border-top: 0; }
.bb-panel { padding: 1.25rem; }
.bb-sync { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; }
.bb-sync > div { min-width: 0; flex: 1 1 260px; }
.bb-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.45rem 1rem; }
.bb-category { align-items: center; flex-wrap: wrap; }
@media (max-width: 600px) {
  .bb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .bb-form-row { grid-template-columns: 1fr; }
}
