
/* =========================================================
 Background + Homepage Styles (Aligned with Supplier Page)
 ========================================================= */

/* ---- Tokens ---- */

/* =========================================================
   Design tokens (match supplier page)
   ========================================================= */

:root {
  --bg-page: #f4f5f7;
  --header-bg: #072908;

  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --surface-1: rgba(0,0,0,0.03);
  --surface-2: rgba(0,0,0,0.06);
  --surface-3: rgba(0,0,0,0.12);

  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;

  --accent: #072908;
  --accent-light: #0b4f2d;

  --radius-lg: 10px;
  --shadow-outer: 0 6px 16px rgba(0,0,0,.10);
}


/* ---- Full-page background (mimic supplier page) ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  height: 100%;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;

  background-color: var(--bg-page);

  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-secondary);
}


/* =========================================================
 Brand Header (matches supplier page)
 ========================================================= */
.brand-header {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0,0,0,.08);
  backdrop-filter: blur(6px);
  color: var(--text-primary);
  flex-wrap: wrap;
  gap: 8px;
}

.brand-logo {
  height: 65px; max-width: 250px; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
  cursor: pointer; transition: transform .25s ease;
}
.brand-logo:hover { transform: scale(1.02); }

.brand-actions {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-primary);
  flex-wrap: wrap;
}

.auth-status { font-weight: 600; }

/* Pill button */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 8px 14px; border-radius: 999px;
  font-weight: 600; border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer; line-height: 1;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .08s ease;
  text-decoration: none;
}
.btn-secondary { background: transparent; color: #fff; text-decoration: none; border: none; box-shadow: none; }
.btn-secondary:hover { background: transparent; color: rgba(255,255,255,0.75); transform: none; text-decoration: none; }

/* Beta feedback button — prominent in header */
.btn-feedback { background: #e8a020; color: #fff; border: none; font-size: 14px; text-decoration: none; }
.btn-feedback:hover { background: #d18f18; color: #fff; transform: none; text-decoration: none; }

/* Mobile label swap: show full label on desktop, short on mobile */
.btn-label-short { display: none; }

/* =========================================================
   Header Search Bar (compact + expanded)
   ========================================================= */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 300px;
  height: 38px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0 12px;
  transition: all 0.25s ease;
  margin-left: auto;
  margin-right: 16px;
}
.header-search-icon {
  flex-shrink: 0;
  color: rgba(255,255,255,0.7);
  margin-right: 8px;
}
.header-search-input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  min-width: 0;
}
.header-search-input::placeholder {
  color: rgba(255,255,255,0.55);
}
.header-search-clear,
.header-search-cancel,
.header-search-submit {
  display: none;
}

/* --- Expanded search state (popup dropdown) --- */
.header-search.expanded {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  z-index: 2000;
  flex: none;
  width: 720px;
  max-width: calc(100vw - 64px);
  height: 52px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 0 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.header-search.expanded .header-search-icon {
  color: #999;
}
.header-search.expanded .header-search-input {
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 500;
}
.header-search.expanded .header-search-input::placeholder {
  color: #999;
}
.header-search.expanded .header-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: none; background: rgba(0,0,0,0.08);
  border-radius: 50%;
  color: #666; font-size: 18px; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
  line-height: 1; padding: 0;
  margin-right: 8px;
  transition: background 0.15s ease;
}
.header-search.expanded .header-search-clear:hover {
  background: rgba(0,0,0,0.15);
}
.header-search.expanded .header-search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: none;
  background: #072908;
  border-radius: 8px;
  color: #fff;
  cursor: pointer; flex-shrink: 0;
  margin-right: 12px;
  transition: background 0.15s ease;
}
.header-search.expanded .header-search-submit:hover {
  background: #0b4f2d;
}
.header-search.expanded .header-search-cancel {
  display: flex;
  align-items: center;
  background: none; border: none;
  color: #1a1a1a;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer; flex-shrink: 0;
  padding: 4px 0;
  white-space: nowrap;
}
.header-search.expanded .header-search-cancel:hover {
  color: #072908;
}

/* Flatten search bar bottom corners so toolbar connects flush */
.brand-header.search-active .header-search.expanded {
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

/* Elevate header above overlay when search is expanded.
   Also drop backdrop-filter — it creates a containing block for fixed-positioned
   descendants in Chromium, which would otherwise pin the expanded search popup
   inside the header instead of to the viewport, leaving the toolbar to cover it. */
.brand-header.search-active {
  z-index: 2000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* --- Search overlay --- */
.search-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.45);
  z-index: 1500;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.search-overlay.active {
  opacity: 1; pointer-events: auto;
}

/* --- Autocomplete suggestions --- */
.search-suggestions {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 2001;
  padding: 16px 0;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 0 0 12px 12px;
}
.search-suggestions.visible {
  display: block;
}
.suggestions-heading {
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.8px; color: #1a1a1a;
  padding: 0 24px 12px;
}
.suggestion-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  font-size: 15px; color: #1a1a1a;
  cursor: pointer;
  transition: background 0.1s ease;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover {
  background: rgba(0,0,0,0.04);
}
.suggestion-icon {
  flex-shrink: 0;
  color: #999;
}

/* =========================================================
 Category Nav Bar (sticky below header)
 ========================================================= */
.category-nav {
  position: sticky; top: 85px; z-index: 999;
  background: #e8eaed;
  border-bottom: 1px solid #d1d5db;
  box-shadow: none;
}
.category-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 1500px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }

.category-nav-link {
  display: inline-flex; align-items: center;
  padding: 14px 20px;
  font-size: 13px; font-weight: 600;
  color: #6b7280; text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.category-nav-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.category-nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

/* Make the 'Signed in as …' label readable on dark header */
.brand-header .auth-status {
  color: #fff;
  opacity: 0.85;     /* same feel as supplier page */
  margin-right: 12px;
  white-space: nowrap;
  font-weight: 600;  /* matches your existing weight */
}


/* =========================================================
 Toolbar: Filter + Sort (connected to search bar)
 ========================================================= */
.toolbar {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 20px;
  margin: 0;
}
/* Show toolbar when search results are active (normal flow) */
.search-area.search-active .toolbar {
  display: flex;
  position: relative;
  z-index: 1600;
}
/* When search overlay is expanded, pin toolbar directly under the search popup */
.brand-header.search-active ~ .search-area.search-active .toolbar {
  position: fixed;
  top: 132px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  width: 720px;
  max-width: calc(100vw - 64px);
  background: #fff;
  border-radius: 0 0 12px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.search-area.search-active .filter-overlay {
  z-index: 2100;
}
.search-area.search-active .filter-drawer {
  z-index: 2200;
}
.toolbar-left {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  flex: 1;
}
.toolbar-right {
  display: flex; align-items: center; gap: 12px;
}

/* Clear Search button */
.clear-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  background: none;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.clear-search-btn:hover {
  color: #d32f2f;
  border-color: #d32f2f;
  background: rgba(211,47,47,0.05);
}
.clear-search-btn svg {
  flex-shrink: 0;
}

/* Inline toolbar dropdowns (Sort, Price, Rating) */
.toolbar-select {
  padding: 8px 28px 8px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.12);
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.toolbar-select:hover { border-color: rgba(1,68,33,0.35); }
.toolbar-select:focus { outline: none; border-color: var(--accent); }

/* Filter toggle — pill button with icon */
.filter-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; font-weight: 700; font-size: 14px;
  background: #ffffff; color: #000000;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  cursor: pointer; transition: background-color 0.2s ease, transform 0.2s ease;
}
.filter-toggle svg { flex-shrink: 0; }
.filter-toggle:hover { background-color: #f4f4f4; transform: translateY(-1px); }
.filter-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: #072908; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
}

/* =========================================================
 Filter Drawer — slide-in from left
 ========================================================= */

/* Overlay that greys out the page */
.filter-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.filter-overlay.active {
  opacity: 1; pointer-events: auto;
}

/* The drawer itself */
.filter-drawer {
  position: fixed; top: 0; left: 0;
  width: 340px; max-width: 85vw; height: 100vh;
  background: #ffffff;
  z-index: 1200;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}
.filter-drawer.open {
  transform: translateX(0);
}

/* Drawer header */
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.drawer-header-left {
  display: flex; align-items: center; gap: 8px;
}
.drawer-title {
  font-size: 14px; font-weight: 800;
  letter-spacing: 1px; color: #1a1a1a;
}
.drawer-filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: #072908; color: #fff;
  font-size: 11px; font-weight: 700;
}
.drawer-filter-count:empty { display: none; }
.drawer-close {
  width: 32px; height: 32px; border: none; background: none;
  font-size: 24px; color: #666; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: background 0.15s ease;
}
.drawer-close:hover { background: rgba(0,0,0,0.06); color: #333; }

/* Drawer active pills (top of drawer, below header) */
.drawer-active-pills {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.drawer-active-pills-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px;
}
.drawer-pills-clear {
  background: none; border: none;
  color: #072908; font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: underline;
  padding: 0;
}

/* Drawer scrollable body */
.drawer-body {
  flex: 1; overflow-y: auto;
  padding: 4px 0;
}

/* Drawer sections */
.drawer-section {
  padding: 14px 20px;
}
.drawer-section-title {
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.8px; color: #1a1a1a;
  margin-bottom: 10px;
}
.drawer-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 0 20px;
}

/* Full-width selects in drawer */
.fp-select--full { width: 100%; }

/* Drawer footer (CLEAR + VIEW buttons) */
.drawer-footer {
  display: flex; gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  flex-shrink: 0;
}
.drawer-btn-clear {
  flex: 0 0 auto; padding: 12px 24px;
  border: 2px solid rgba(0,0,0,0.15); border-radius: 999px;
  background: #fff; color: #1a1a1a;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  cursor: pointer; transition: all 0.15s ease;
}
.drawer-btn-clear:hover { border-color: rgba(0,0,0,0.3); }
.drawer-btn-view {
  flex: 1; padding: 12px 24px;
  border: none; border-radius: 999px;
  background: #072908; color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  cursor: pointer; transition: all 0.15s ease;
}
.drawer-btn-view:hover { background: #0b4f2d; }

/* Active filter pill (used in both toolbar bar and drawer) */
.active-filter-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px;
  background: #f3f4f6; border: 1px solid rgba(1,68,33,0.2);
  font-size: 12px; font-weight: 600; color: #072908;
  white-space: nowrap;
}
.active-filter-pill .pill-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(1,68,33,0.15); border: none;
  color: #072908; font-size: 12px; font-weight: 700; line-height: 1;
  cursor: pointer; padding: 0; margin-left: 2px;
  transition: background 0.15s ease;
}
.active-filter-pill .pill-remove:hover { background: rgba(1,68,33,0.3); }

/* Active filters bar (inline, below toolbar) */
.active-filters-bar {
  display: flex; align-items: center; gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1000px; margin: 0 auto;
  padding: 8px 0 4px;
}
.active-filters-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center;
}
.active-filters-clear {
  background: none; border: none;
  color: #072908; font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: underline; padding: 2px 4px;
}

/* Brand value tags inside drawer */
.fp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Tag toggles (supplier attributes) */
.fp-tag {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  background: #ffffff;
  font-size: 12px !important;
  font-weight: 700;
  color: #374151 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 !important;
  user-select: none;
}
.fp-tag:hover {
  border-color: #072908;
  background: #f3f4f6;
}
.fp-tag:has(input:checked) {
  background: #072908;
  color: #fff !important;
  border-color: #072908;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.fp-tag input[type="checkbox"] {
  width: 0; height: 0;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}
.fp-tag--unavailable { display: none !important; }
.drawer-section--empty { display: none !important; }
.drawer-divider:has(+ .drawer-section--empty) { display: none !important; }

/* --- Shared select style --- */
.fp-select {
  padding: 9px 32px 9px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.fp-select:hover {
  border-color: rgba(0, 0, 0, 0.35);
}
.fp-select:focus {
  outline: none;
  border-color: #072908;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
}

/* Pills in drawer */
.fp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Pill toggle (materials + features) */
.fp-pill {
  display: inline-flex !important;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  font-size: 11px !important;
  font-weight: 600;
  color: #555 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 !important;
  user-select: none;
  line-height: 1.4;
}
.fp-pill:hover {
  border-color: #072908;
  color: #072908 !important;
  background: #f9fafb;
}
.fp-pill:has(input:checked) {
  background: #072908;
  color: #fff !important;
  border-color: #072908;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.fp-pill input[type="checkbox"] {
  width: 0; height: 0;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

/* =========================================================
 Greeting Banner
 ========================================================= */
.greeting-banner {
  background: var(--header-bg);
  color: #fff;
  padding: 0 24px;
}
.greeting-banner-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  gap: 24px;
}
.greeting-text {
  flex: 1;
  min-width: 0;
}
.greeting-headline {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}
.greeting-subtitle {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}
/* Tip fade transition */
.greeting-text {
  transition: opacity 0.5s ease;
}
.greeting-text.tip-visible { opacity: 1; }
.greeting-text.tip-hidden  { opacity: 0;
  white-space: nowrap;
}

/* =========================================================
 Extension Announcement Bar
 ========================================================= */
.ext-bar {
  background: var(--accent-light);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}
.ext-bar[hidden] { display: none !important; }
.ext-bar-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
}
.ext-bar-icon {
  flex-shrink: 0;
  color: rgba(255,255,255,0.85);
}
.ext-bar-msg {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ext-bar-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, transform .08s ease;
}
.ext-bar-cta:hover {
  background: rgba(255,255,255,0.88);
  transform: translateY(-1px);
}
.ext-bar-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .15s ease, background .15s ease;
}
.ext-bar-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

/* =========================================================
 Extension Contextual Card (in "Recommended for You" grid)
 ========================================================= */
/* =========================================================
 Section Titles
 ========================================================= */
.section-title {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  text-align: center;
}

/* =========================================================
 Shop by Values Section (replaces Featured Brands)
 ========================================================= */
.shop-by-values-section {
  /* Full-bleed: break out of the centered .home (max-width 1500) so the cream
     band spans the whole page width (like the "Just for Logie" band). Must be
     width:100vw — a width:100% box only shifts under negative margins, it
     doesn't stretch. body/html have overflow-x:hidden, so 100vw can't add a
     horizontal scrollbar. Inner .shop-by-values-wrap (max-width:1500; margin
     auto) re-centers the chips, aligned with the rest of the page. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 16px 0 14px;
  background: #f0ebe1;
  box-sizing: border-box;
}

.shop-by-values-wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 16px;
}

.shop-by-values-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 10px;
  padding: 0 0 0 14px;
  border-left: 3px solid var(--accent);
  text-align: left;
}

.shop-by-values-header .section-title {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.3px;
}

.shop-by-values-header .section-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

.shop-by-values-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  /* Spread all 12 chips across the full band so they all show without
     scrolling. overflow-x stays as a fallback for narrow windows. */
  justify-content: space-between;
  padding: 8px 2px 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shop-by-values-grid::-webkit-scrollbar { display: none; }

.value-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  /* Fixed width so long labels wrap (instead of widening the chip) and all
     12 fit on one row. */
  width: 84px;
  flex: 0 0 auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  line-height: 1.3;
  /* ~7 chips fill the visible row + the 8th peeks (signals the carousel);
     remaining chips overflow into the horizontal scroll. */
  flex: 0 0 calc((100% - 7 * 24px) / 7.5);
  min-width: 96px;
  scroll-snap-align: start;
}

.value-chip-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--chip-bg, #2e8b3e);
  border: 2px solid var(--chip-bg, #2e8b3e);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  overflow: hidden;
}

.value-chip-icon svg {
  width: 30px;
  height: 30px;
  color: #ffffff;
  opacity: 1;
}

.value-chip:nth-child(1)  .value-chip-icon { --chip-bg: #2e8b3e; }
.value-chip:nth-child(2)  .value-chip-icon { --chip-bg: #5b8a72; }
.value-chip:nth-child(3)  .value-chip-icon { --chip-bg: #6e7f8a; }
.value-chip:nth-child(4)  .value-chip-icon { --chip-bg: #8a6e6e; }
.value-chip:nth-child(5)  .value-chip-icon { --chip-bg: #7a6e8a; }
.value-chip:nth-child(6)  .value-chip-icon { --chip-bg: #5b8a72; }
.value-chip:nth-child(7)  .value-chip-icon { --chip-bg: #8a7a5b; }
.value-chip:nth-child(8)  .value-chip-icon { --chip-bg: #6e8a7a; }
.value-chip:nth-child(9)  .value-chip-icon { --chip-bg: #5a7a8a; }
.value-chip:nth-child(10) .value-chip-icon { --chip-bg: #7a8a5b; }
.value-chip:nth-child(11) .value-chip-icon { --chip-bg: #8a5b6e; }
.value-chip:nth-child(12) .value-chip-icon { --chip-bg: #6e7a8a; }

.value-chip:hover .value-chip-icon {
  box-shadow: 0 6px 16px rgba(0,0,0,0.28);
  transform: translateY(-2px);
}

.value-chip:active .value-chip-icon {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.value-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.value-chip-label {
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  max-width: 100%;
  color: var(--text-secondary);
}

/* =========================================================
 Featured Brands Section (Partner tier — affiliate brands)
 ========================================================= */
.featured-brands-section {
  width: 100%;
  margin: 0;
  padding: 28px 0 16px;
  background: transparent;
  box-sizing: border-box;
}
.featured-brands-wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 4px;
}
.featured-brands-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 16px;
  padding: 0 0 0 14px;
  border-left: 3px solid #c47e34;
  text-align: left;
}
.featured-brands-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.featured-brands-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #c47e34;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.partner-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #c47e34;
  display: inline-block;
}
.featured-brands-section .section-title {
  font-size: 22px;
  color: var(--text-primary, #1a2e1c);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.3px;
}
.featured-brands-subtitle {
  font-size: 14px;
  color: var(--text-muted, #6b7280);
  margin: 0;
  font-weight: 400;
}
.featured-brands-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.featured-brand-card {
  --brand-accent: #5b8a72;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e4ddd0;
  border-top: 4px solid var(--brand-accent);
  border-radius: 12px;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.featured-brand-card:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  border-color: color-mix(in srgb, var(--brand-accent) 45%, transparent);
  border-top-color: var(--brand-accent);
}

/* Per-card accent — mirrors the muted palette used by the Good-stuff-sorted
   value icons. Cycles every 5 cards so the row reads as a coordinated set. */
.featured-brands-grid .featured-brand-card:nth-child(4n+1) { --brand-accent: #2e8b3e; }
.featured-brands-grid .featured-brand-card:nth-child(4n+2) { --brand-accent: #6e7f8a; }
.featured-brands-grid .featured-brand-card:nth-child(4n+3) { --brand-accent: #8a6e6e; }
.featured-brands-grid .featured-brand-card:nth-child(4n+4) { --brand-accent: #7a6e8a; }
.featured-brand-monogram {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.featured-brand-info {
  flex: 1;
  min-width: 0;
}
.featured-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.featured-brand-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* Tier pill — black oval matching the product-card score pill. No numeric
   score here (these are Likely tiers), so it reads "Likely Good" with a
   tier-colored dot. */
.featured-brand-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0,0,0,0.82);
  color: #fff;
  line-height: 1;
}
.featured-brand-tier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.featured-brand-tier-word {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.featured-brand-count {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}
.featured-brand-network {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.featured-brand-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--brand-accent);
  color: var(--brand-accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.featured-brand-cta svg {
  width: 12px;
  height: 12px;
}
.featured-brand-card:hover .featured-brand-cta {
  background: var(--brand-accent);
  color: #fff;
}

/* Placeholder "Coming Soon" cards — fill empty Partner slots so the grid
   always shows 4 tiles. Visually muted, non-interactive — no accent strip. */
.featured-brand-card--placeholder {
  background: transparent;
  border: 1px dashed #cdc4b2;
  box-shadow: none;
  cursor: default;
  opacity: 0.9;
}
.featured-brand-card--placeholder:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
  border-color: #cdc4b2;
}
.featured-brand-monogram--placeholder {
  background: #e4ddd0;
  color: #9b9079;
  box-shadow: none;
}
.featured-brand-monogram--placeholder svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}
.featured-brand-name--placeholder {
  color: #7a7060;
  font-weight: 600;
}
.featured-brand-card--placeholder .featured-brand-count,
.featured-brand-card--placeholder .featured-brand-network {
  color: #9b9079;
  font-style: italic;
}

@media (max-width: 500px) {
  .featured-brand-card {
    flex-wrap: wrap;
  }
  .featured-brand-cta {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
}

/* =========================================================
 Top Products for You Section (Carousel)
 ========================================================= */
.top-products-section {
  margin: 8px auto 0;
  padding: 16px 0 0;
  border-top: none;
}
#topProductsForYou {
  border-top: none;
  padding-top: 8px;
}

.top-products-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 20px;
  padding: 0 0 0 14px;
  border-left: 3px solid var(--accent);
  text-align: left;
}

.top-products-header .section-title {
  font-size: 22px;
  color: var(--text-primary);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.3px;
}

.section-subtitle {
  display: none;
}

/* Section title row with View All button */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 12px;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #072908;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.08s ease;
  white-space: nowrap;
}

.view-all-btn:hover {
  background: #0b4f2d;
  transform: translateY(-1px);
}

/* =========================================================
   Section Hero Banners
   ========================================================= */

/* SVG icon next to titles */
.section-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
}

/* Section hero – full-width banner on all viewports */
.section-hero {
  display: flex;
  padding: 14px 18px;
  margin-bottom: 16px;
  border: none;
}

.section-hero .top-products-header {
  border-left: none;
  padding: 0;
  margin-bottom: 0;
}

.section-hero .section-subtitle {
  display: none;
}

/* ── Per-category hero colors (matching category pill palette) ── */

/* View-all buttons inherit hero color */
.section-hero--recommended {
  background: rgba(46, 139, 62, 0.10);
  color: #1a5a28;
}
.section-hero--recommended .section-icon { color: #2e8b3e; }
.section-hero--recommended .section-title { color: #1a5a28; }

.section-hero--apparel {
  background: rgba(138, 110, 110, 0.10);
  color: #6a4e4e;
}
.section-hero--apparel .section-icon { color: #8a6e6e; }
.section-hero--apparel .section-title { color: #5a4a3a; }
.section-hero--apparel .view-all-btn { background: #8a6e6e; }
.section-hero--apparel .view-all-btn:hover { background: #6a4e4e; }

.section-hero--electronics {
  background: rgba(90, 106, 138, 0.10);
  color: #3a4a6a;
}
.section-hero--electronics .section-icon { color: #5a6a8a; }
.section-hero--electronics .section-title { color: #3a4a6a; }
.section-hero--electronics .view-all-btn { background: #5a6a8a; }
.section-hero--electronics .view-all-btn:hover { background: #3a4a6a; }

.section-hero--beauty {
  background: rgba(138, 90, 110, 0.10);
  color: #6a4a5a;
}
.section-hero--beauty .section-icon { color: #8a5a6e; }
.section-hero--beauty .section-title { color: #6a4a5a; }
.section-hero--beauty .view-all-btn { background: #8a5a6e; }
.section-hero--beauty .view-all-btn:hover { background: #6a4a5a; }

.section-hero--home {
  background: rgba(138, 126, 90, 0.10);
  color: #5a4e3a;
}
.section-hero--home .section-icon { color: #8a7e5a; }
.section-hero--home .section-title { color: #5a4e3a; }
.section-hero--home .view-all-btn { background: #8a7e5a; }
.section-hero--home .view-all-btn:hover { background: #5a4e3a; }

.section-hero--sports {
  background: rgba(106, 138, 90, 0.10);
  color: #3a5a28;
}
.section-hero--sports .section-icon { color: #6a8a5a; }
.section-hero--sports .section-title { color: #3a5a28; }
.section-hero--sports .view-all-btn { background: #6a8a5a; }
.section-hero--sports .view-all-btn:hover { background: #3a5a28; }

.section-hero--pets {
  background: rgba(184, 122, 74, 0.10);
  color: #6a3e1a;
}
.section-hero--pets .section-icon { color: #b87a4a; }
.section-hero--pets .section-title { color: #6a3e1a; }
.section-hero--pets .view-all-btn { background: #b87a4a; }
.section-hero--pets .view-all-btn:hover { background: #8a5a2a; }

.section-hero--grocery {
  background: rgba(63, 158, 122, 0.10);
  color: #2f6b46;
}
.section-hero--grocery .section-icon { color: #3f9e7a; }
.section-hero--grocery .section-title { color: #2f6b46; }
.section-hero--grocery .view-all-btn { background: #3f9e7a; }
.section-hero--grocery .view-all-btn:hover { background: #2f6b46; }

.section-hero--baby {
  background: rgba(96, 150, 200, 0.12);
  color: #2f5a82;
}
.section-hero--baby .section-icon { color: #6096c8; }
.section-hero--baby .section-title { color: #2f5a82; }
.section-hero--baby .view-all-btn { background: #6096c8; }
.section-hero--baby .view-all-btn:hover { background: #2f5a82; }

/* =========================================================
   Section separation (page-level only — never touches cards)
   Vertical rhythm + slightly larger headers. No section-wide
   background bands (bodies stay white); the colored header strip
   comes from the shared .section-hero rule below.
   ========================================================= */
.home > .top-products-section {
  margin-top: 34px;
  padding: 20px 14px 6px;
}
.home > .top-products-section:first-child {
  margin-top: 10px;
}

/* Headers: larger + a touch more presence */
.top-products-header .section-title,
.section-hero .section-title {
  font-size: 25px;
  letter-spacing: -0.4px;
}
.section-hero {
  /* Full-bleed: the colored band spans the entire page width (edge to edge)
     instead of reading as a rounded box. The element is blown out to 100vw and
     re-centered on the viewport (robust to ancestor padding), while its inner
     content is padded back to the 1500px content column so the title/See-More
     stay aligned with the product grid below. body has overflow-x:hidden, so
     100vw never introduces a horizontal scrollbar. */
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  /* 768px = half the 1500px content column (750) + the grid's 18px inset
     (.home 4px + .top-products-section 14px), so the title lines up with the
     first product card. */
  padding: 16px max(20px, calc(50vw - 768px));
  margin-bottom: 18px;
  border-radius: 0;
  box-sizing: border-box;
}

/* Section Grid (replaces carousel) */
.section-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 8px;
}

/* =========================================================
 Results Grid
 ========================================================= */
.results-section { margin-top: 24px; padding: 0 0 14px; }
.results-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px; margin: 0 auto;
}

/* Hide pagination */
.ais-Pagination,
[class*="pagination"],
.pagination {
  display: none !important;
}

/* Load More button */
.load-more-btn {
  display: block;
  margin: 32px auto 16px;
  padding: 12px 36px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.load-more-btn:hover {
  background: var(--accent-light);
}

/* Product Card styles are in ../styles/product-card.css */

/* =========================================================
 Modal (Supplier Preview)
 ========================================================= */
.product-modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.product-modal .modal-content {
  background: #fff; border-radius: 12px; padding: 24px;
  max-width: 600px; width: 90%;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3); animation: fadeIn 0.3s ease forwards;
}
.product-modal .modal-content--supplier-preview {
  max-width: 900px; width: 94vw; height: 86vh;
  display: flex; flex-direction: column; padding: 0;
  position: relative; border: 8px solid #fff;
}

.btn-primary {
  background: #072908; color: #fff; border-color: rgba(1,68,33,0.35);
}
.btn-primary:hover {
  background: #0b4f2d; box-shadow: 0 2px 8px rgba(0,0,0,0.18); transform: translateY(-1px);
}
.btn-primary:focus-visible { outline: 2px solid #57b58c; outline-offset: 2px; }

.btn-secondary {
  background: var(--surface-2); color: #111; border-color: rgba(0,0,0,0.14);
}
.btn-secondary:hover { background: #e7eaee; box-shadow: 0 2px 8px rgba(0,0,0,0.12); transform: translateY(-1px); }
.btn-secondary:focus-visible { outline: 2px solid #b6c2d1; outline-offset: 2px; }

.modal-frame { display: block; width: 100%; height: 100%; border: 0; border-radius: 12px; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* =========================================================
 Page grid (content area) + Hero
 ========================================================= */
.search-area {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 4px;
  position: relative;
  box-sizing: border-box;
}
.search-area:not(.search-active) {
  position: absolute;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}
.home {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 4px 80px;
  position: relative;
  box-sizing: border-box;
}

/* Hero/tagline */
.hero {
  text-align: center;
  color: #000000;
  margin: 10px auto 16px;
}
.hero h1 {
  font-size: 36px;
  line-height: 1.2;
  margin: 0 0 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  color: #000; /* black headline */
}
.hero-sub {
  margin: 0 0 12px;
  font-weight: 600;
  opacity: .9;
  color: #333;
}
.hero-arrows { font-size: 18px; opacity: .8; }

/* =========================================================
 Site Footer
 ========================================================= */
.site-footer {
  background: var(--header-bg);
  color: #fff;
  margin-top: 40px;
  width: 100%;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 40px 32px;
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.footer-brand {
  flex: 0 0 220px;
}

.footer-logo {
  height: 48px;
  margin-bottom: 12px;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.footer-columns {
  flex: 1;
  display: flex;
  gap: 40px;
  justify-content: space-between;
}

.footer-col-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.footer-social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 20px 40px;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}
.footer-bottom .affiliate-disclosure {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Global text fallback */
body { color: var(--text-secondary); }

/* Optional: when results appear, tighten hero spacing */
body.has-results .hero { margin-bottom: 4px; }

/* =========================================================
   Homepage header buttons — plain white text
   ========================================================= */

.brand-header .btn-secondary {
  background: transparent;
  color: #fff;
  border: none;
  box-shadow: none;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.brand-header .btn-secondary:hover {
  background: transparent;
  color: rgba(255,255,255,0.75);
  transform: none;
  text-decoration: none;
}

.brand-header .btn-secondary:focus-visible {
  outline: 2px solid #9bd3b5;
  outline-offset: 2px;
}

/* =========================================================
   Lockscreen (Website Only)
   ========================================================= */
.lockscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #072908 0%, #0f3d1a 50%, #1a4d2e 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lockscreen-content {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 48px 40px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  animation: slideUp 0.4s ease;
}

.lockscreen-header {
  margin-bottom: 32px;
}

.lockscreen-logo {
  height: 80px;
  max-width: 200px;
  object-fit: contain;
  margin-bottom: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.lockscreen-title {
  color: #072908;
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.lockscreen-subtitle {
  color: #6f6f6f;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.lockscreen-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lockscreen-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  background: #f9fafb;
  color: #2c2c2c;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.lockscreen-input:focus {
  outline: none;
  border-color: #072908;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
}

.lockscreen-input::placeholder {
  color: #9ca3af;
}

.lockscreen-button {
  width: 100%;
  padding: 14px 24px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lockscreen-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.lockscreen-button:active {
  transform: translateY(0);
}

.lockscreen-error {
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  margin: -8px 0 0;
  padding: 10px;
  background: #fee2e2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

/* Shake animation for incorrect password */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.lockscreen-form.shake {
  animation: shake 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 640px) {
  .lockscreen-content {
    padding: 36px 24px;
  }

  .lockscreen-title {
    font-size: 24px;
  }

  .lockscreen-subtitle {
    font-size: 14px;
  }

  .lockscreen-logo {
    height: 60px;
  }
}

/* --- Scoring mode switch --- */
.score-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  font-size: 14px;
  user-select: none;
}

/* White label when inside the dark header */
.brand-actions .score-mode__label {
  color: #fff;
  opacity: 1;
  font-weight: 600;
  font-size: 13px;
}

.score-mode__label {
  color: var(--text, #222);
  opacity: 0.9;
}

/* Basic “iOS-style” checkbox switch */
.score-switch {
  --w: 42px;
  --h: 24px;
  --p: 3px;
  appearance: none;
  width: var(--w);
  height: var(--h);
  background: #c9c9c9;
  border-radius: var(--h);
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 120ms ease;
}
.score-switch::after {
  content: '';
  position: absolute;
  top: var(--p);
  left: var(--p);
  width: calc(var(--h) - 2*var(--p));
  height: calc(var(--h) - 2*var(--p));
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: transform 120ms ease;
}
.score-switch:checked {
  background: #0b4f2d; /* your green */
}
.score-switch:checked::after {
  transform: translateX(calc(var(--w) - var(--h)));
}

/* =========================================================
   Mobile Overflow Menu (hamburger → dropdown)
   ========================================================= */
.mobile-menu-wrap {
  display: none;          /* hidden on desktop */
  position: relative;
}
.mobile-menu-btn {
  padding: 6px !important;
}
.mobile-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 3000;
  min-width: 180px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 6px 0;
  flex-direction: column;
}
.mobile-menu-dropdown.open {
  display: flex;
}
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease;
}
.mobile-menu-item:hover {
  background: #f3f4f6;
}
.mobile-menu-score {
  border-top: 1px solid #e5e7eb;
  margin-top: 2px;
  padding-top: 10px;
}
.mobile-menu-score .score-mode__label {
  color: #1a1a1a;
  font-size: 14px;
}

/* =========================================================
   RESPONSIVE — All breakpoints consolidated at end of file
   so they correctly override the default rules above.
   ========================================================= */

/* --- Tablet (max 900px) --- */
@media (max-width: 900px) {
  .search-area { padding: 0 8px; }
  .home {
    padding: 0 8px 60px;
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shop-by-values-grid {
    gap: 16px;
  }
  .shop-by-values-section {
    padding: 24px 0 28px;
  }
  .shop-by-values-wrap {
    padding: 0 12px;
  }

  .section-title {
    font-size: 20px;
  }

  .section-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .featured-brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .featured-brands-wrap {
    padding: 0 8px;
  }
  .top-products-header .section-title {
    font-size: 18px;
  }
  .top-products-section {
    padding-top: 24px;
  }

  .header-search {
    flex: 0 1 220px;
    margin-right: 10px;
  }

  .category-nav-link {
    padding: 12px 14px;
    font-size: 12px;
  }
}

/* --- Small tablet (max 768px) --- */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 32px;
    padding: 36px 24px 24px;
  }
  .footer-brand {
    flex: none;
    width: 100%;
  }
  .footer-columns {
    flex-wrap: wrap;
    gap: 24px;
  }
  .footer-col {
    flex: 0 0 calc(50% - 12px);
  }
}

/* --- Mobile (max 640px) --- */
@media (max-width: 640px) {
  /* Category nav */
  .category-nav { top: auto; position: sticky; }
  .category-nav-inner { justify-content: flex-start; padding: 0 8px; }
  .category-nav-link { padding: 10px 12px; font-size: 11px; }

  /* ---- Header: two-row layout for mobile ---- */
  .brand-header {
    padding: 10px 12px;
    gap: 0;
    flex-wrap: wrap;
  }

  /* Row 1: logo + action buttons */
  .brand-logo {
    height: 42px;
    max-width: 110px;
    order: 1;
  }
  .brand-actions {
    order: 2;
    margin-left: auto;
    gap: 6px;
    flex-wrap: nowrap;
  }

  /* Hide secondary items on mobile — they live in the hamburger menu */
  .brand-header .auth-status { display: none; }
  .brand-header .btn-feedback { display: none; }
  .brand-header .score-mode { display: none; }
  .brand-header #tutorialBtn { display: none; }

  /* Icon-only buttons on mobile */
  .btn-label-full { display: none; }
  .btn-label-short { display: none; }
  .cart-label { display: none !important; }

  /* Compact pill buttons */
  .brand-header .btn-secondary {
    padding: 6px;
    font-size: 0;
    gap: 0;
    white-space: nowrap;
  }
  .brand-header .btn-secondary svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
  .cart-btn { padding: 6px !important; }
  .cart-btn svg { width: 18px !important; height: 18px !important; }
  #userProfileBtn { padding: 6px !important; }

  /* Show mobile hamburger menu */
  .mobile-menu-wrap { display: block; }

  /* Row 2: search bar stretches full width below */
  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: calc(100vw - 24px);
    height: 36px;
    padding: 0 10px;
    margin: 8px 0 0;
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
  }
  .header-search-input {
    font-size: 14px;
  }
  .header-search.expanded {
    width: calc(100vw - 32px);
    left: 50%;
    transform: translateX(-50%);
    height: 48px;
    padding: 0 12px;
    top: 12px;
    border-radius: 12px 12px 0 0;
  }
  .header-search.expanded .header-search-input {
    font-size: 16px;
  }
  .suggestion-item {
    padding: 10px 16px;
    font-size: 14px;
  }
  .suggestions-heading {
    padding: 0 16px 10px;
  }

  /* Page container */
  .search-area { padding: 0 12px; }
  .home {
    padding: 0 12px 60px;
  }

  /* Toolbar — reposition under mobile search bar */
  .brand-header.search-active ~ .search-area.search-active .toolbar {
    top: 60px;
    width: calc(100vw - 32px);
  }
  .toolbar {
    padding: 8px 12px;
    gap: 8px;
  }
  .toolbar-left { flex-wrap: wrap; }
  .toolbar-select { font-size: 12px; padding: 6px 24px 6px 10px; }
  .toolbar .filter-toggle {
    align-self: center;
  }
  .clear-search-btn { font-size: 12px; padding: 6px 10px; }

  /* Results grid: 2 columns on mobile */
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Product card mobile overrides are in ../styles/product-card.css */

  /* Greeting banner mobile */
  .greeting-banner { padding: 0 12px; }
  .greeting-banner-inner { padding: 8px 0; gap: 6px; }
  .greeting-headline { font-size: 12px; }
  .greeting-subtitle { font-size: 10px; line-height: 1.4; }

  /* Extension bar mobile */
  .ext-bar { font-size: 12px; }
  .ext-bar-inner { gap: 8px; padding: 8px 12px; }
  .ext-bar-icon { display: none; }
  .ext-bar-msg { white-space: normal; font-size: 11px; }
  .ext-bar-cta { font-size: 11px; padding: 5px 12px; }
  .ext-bar-close { font-size: 18px; padding: 2px 6px; }

  /* Extension card mobile */

  /* Shop by values mobile */
  .shop-by-values-section {
    padding: 10px 0 12px;
    margin-bottom: 0;
    border-bottom: none;
  }
  .shop-by-values-wrap {
    padding: 0 12px;
  }
  .shop-by-values-header {
    margin-bottom: 8px;
    padding-left: 10px;
    gap: 2px;
  }
  .shop-by-values-header .section-title {
    font-size: 15px;
  }
  .shop-by-values-grid {
    gap: 14px;
    justify-content: flex-start;
    padding: 2px 4px 4px;
    scroll-padding: 0 16px;
  }
  .value-chip {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
    gap: 5px;
  }
  .value-chip-icon {
    width: 76px;
    height: 76px;
  }
  .value-chip-icon svg {
    width: 34px;
    height: 34px;
  }
  .value-chip-label {
    font-size: 12px;
    max-width: 86px;
    white-space: normal;
    line-height: 1.15;
  }
  .shop-by-values-header .section-subtitle {
    font-size: 11px;
  }

  /* Featured Brands mobile — match the compact cream-band rhythm */
  .featured-brands-section {
    padding: 4px 0 14px;
  }
  .featured-brands-wrap {
    padding: 0 12px;
  }
  .featured-brands-header {
    margin-bottom: 10px;
    padding-left: 10px;
    gap: 2px;
  }
  .featured-brands-section .section-title {
    font-size: 15px;
  }
  .featured-brands-subtitle {
    font-size: 11px;
  }
  .featured-brands-eyebrow {
    font-size: 10px;
  }
  /* Horizontal swipe carousel ("roladex") — keeps the section short so
     people can flick through brands instead of scrolling past a tall grid.
     Cards are sized to ~80% so the next one peeks, signalling it scrolls. */
  .featured-brands-grid {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* bleed to the screen edges so the first/last card sit flush */
    margin: 0 -12px;
    padding: 2px 12px 8px;
    scroll-padding-left: 12px;
    scrollbar-width: none;
  }
  .featured-brands-grid::-webkit-scrollbar {
    display: none;
  }
  .featured-brand-card {
    flex: 0 0 80%;
    max-width: 300px;
    scroll-snap-align: start;
    padding: 12px 14px;
    gap: 12px;
  }
  .featured-brand-monogram {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  /* Connect first product section to shop-by-values */
  .home {
    padding-top: 0;
  }
  .top-products-section:first-child {
    margin-top: 0;
    padding-top: 0;
  }

  /* Section grids — 2 columns on mobile */
  .section-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .top-products-header .section-title {
    font-size: 16px;
  }
  .top-products-section {
    margin-top: 0;
    padding-top: 12px;
  }

  /* Footer mobile */
  .footer-inner {
    flex-direction: column;
    gap: 24px;
    padding: 28px 16px 20px;
  }
  .footer-brand {
    flex: none;
    width: 100%;
    text-align: center;
  }
  .footer-columns {
    flex-wrap: wrap;
    gap: 20px;
  }
  .footer-col {
    flex: 0 0 calc(50% - 10px);
  }
  .footer-socials {
    justify-content: flex-start;
  }
  .footer-bottom {
    padding: 16px;
  }

  /* Filter drawer mobile */
  .filter-drawer {
    width: 100%; max-width: 100%;
  }
  .fp-tag {
    font-size: 11px !important;
    padding: 5px 10px;
  }
  .fp-pill {
    font-size: 10px !important;
    padding: 3px 8px;
  }

  /* Lockscreen */
  .lockscreen-content {
    padding: 36px 24px;
  }
  .lockscreen-title {
    font-size: 24px;
  }
  .lockscreen-subtitle {
    font-size: 14px;
  }
  .lockscreen-logo {
    height: 60px;
  }

  /* Heart button mobile overrides are in ../styles/product-card.css */

  /* Active filters left-align */
  .active-filters-bar { justify-content: flex-start; padding: 8px 12px 4px; }

  /* Search suggestions height */
  .search-suggestions { max-height: calc(100vh - 200px); }

  /* Section title row – keep inline on mobile */
  .section-title-row { flex-direction: row; align-items: center; gap: 8px; flex-wrap: nowrap; }

  /* Mobile View All button – small pill next to title */
  .view-all-btn {
    width: auto;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
  }

  /* Mobile hero – bleed to screen edges (resets the desktop 100vw breakout) */
  .section-hero {
    position: static;
    left: auto;
    transform: none;
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
    padding: 10px 16px;
    margin-bottom: 10px;
    margin-top: 0;
  }

  .section-icon {
    width: 18px;
    height: 18px;
  }

  /* Cart modal */
  .cart-modal {
    width: calc(100vw - 24px);
    max-height: 85vh;
  }

  /* Modal */
  .modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .modal-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* --- Very narrow mobile (max 414px) --- */
@media (max-width: 414px) {
  .brand-actions { gap: 4px; }
}


/* =========================================================
   Shopping Cart Button (Header)
   ========================================================= */
/* Hide "Cart" label on desktop — text is in the button already */
.cart-label { display: none; }
.cart-btn {
  position: relative;
  padding: 8px 12px !important;
  transition: transform 0.3s ease, background-color 0.15s ease;
}
.cart-btn svg {
  transition: transform 0.3s ease;
}
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Cart pulse animation when item is added */
@keyframes cartPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.cart-btn.cart-pulse {
  animation: cartPulse 0.6s ease;
}
.cart-btn.cart-pulse svg {
  stroke: #f39c12;
}


/* Heart button styles are in ../styles/product-card.css */

/* =========================================================
   Shopping Cart Modal
   ========================================================= */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
  transition: opacity 0.25s ease;
  opacity: 0;
}
.cart-overlay.open {
  display: block;
  opacity: 1;
}

.cart-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 9999;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  flex-direction: column;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  overflow: hidden;
}
.cart-modal.open {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #eee;
  background: #f9fafb;
  border-radius: 16px 16px 0 0;
}
.cart-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #2c2c2c;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-modal-title svg {
  stroke: #072908;
}
.cart-modal-count {
  background: #072908;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.cart-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}
.cart-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.cart-modal-body {
  overflow-y: auto;
  padding: 16px 24px 24px;
  flex: 1;
}

/* Empty state */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 0;
  color: #999;
}
.cart-empty p {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: #666;
}
.cart-empty span {
  font-size: 13px;
  color: #aaa;
}

/* Cart item rows */
.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cart-item:last-child {
  border-bottom: none;
}

@keyframes cartItemRemove {
  to {
    opacity: 0;
    transform: translateX(30px);
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }
}
.cart-item.removing {
  animation: cartItemRemove 0.3s ease forwards;
}

.cart-item-image {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 4px;
  flex-shrink: 0;
  background: #fff;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #2c2c2c;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-title a {
  color: inherit;
  text-decoration: none;
}
.cart-item-title a:hover {
  text-decoration: underline;
  color: #072908;
}
.cart-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #888;
}
.cart-item-price {
  font-weight: 700;
  color: #111;
  font-size: 14px;
}
.cart-item-score {
  background: #072908;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  color: #ccc;
  transition: color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}
.cart-item-remove:hover {
  color: #e74c3c;
  background: #fef0f0;
}
.cart-item-remove svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   Onboarding Banner (injected by homepage.auth.js)
   ========================================================= */
.onboarding-banner {
  background: linear-gradient(135deg, #f0f4f1 0%, #f4f5f7 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  animation: onboardingBannerIn 0.4s ease;
}
@keyframes onboardingBannerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.onboarding-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.onboarding-banner-text {
  flex: 1;
  min-width: 200px;
}
.onboarding-banner-text strong {
  display: block;
  color: #072908;
  font-size: 14px;
}
.onboarding-banner-text span {
  font-size: 12px;
  color: #6f6f6f;
}
.onboarding-banner-cta {
  padding: 6px 18px !important;
  font-size: 12px !important;
  white-space: nowrap;
  cursor: pointer;
}
.onboarding-banner-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #6f6f6f;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 50%;
  transition: background 0.15s ease;
}
.onboarding-banner-close:hover {
  background: rgba(0,0,0,0.06);
}
@media (max-width: 640px) {
  .onboarding-banner-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 8px;
  }
}
