/* =============================================================
   JSHOP DESIGN SYSTEM
   Crafted with precision for a premium shopping experience
   ============================================================= */

/* ── TOKENS ───────────────────────────────────────────────── */
:root {
  /* Brand greens */
  --g-50:  #f0faf4;
  --g-100: #d9f2e3;
  --g-200: #b2e5c8;
  --g-300: #7fcfa8;
  --g-400: #4cbb7f;
  --g-500: #2fa862;   /* primary */
  --g-600: #228a4e;   /* primary dark */
  --g-700: #1a6e3d;
  --g-900: #0d3d21;

  /* Neutrals */
  --n-0:   #ffffff;
  --n-25:  #fafcfa;
  --n-50:  #f4f7f5;
  --n-100: #e8eeea;
  --n-200: #d1ddd4;
  --n-300: #a8bfad;
  --n-400: #7a9381;
  --n-500: #566a5b;
  --n-600: #3d4f42;
  --n-700: #28362b;
  --n-800: #18221b;
  --n-900: #0e1610;

  /* Semantic */
  --bg:       var(--n-25);
  --surface:  var(--n-0);
  --surface2: var(--n-50);
  --border:   var(--n-100);
  --border2:  var(--n-200);
  --text:     var(--n-800);
  --text2:    var(--n-500);
  --text3:    var(--n-400);
  --accent:   var(--g-500);
  --accent-d: var(--g-600);
  --accent-bg:var(--g-50);

  /* Status */
  --red:    #e53e3e;
  --amber:  #d69e2e;
  --blue:   #3182ce;

  /* Type */
  --serif: 'Newsreader', Georgia, serif;
  --sans:  'Hanken Grotesk', system-ui, sans-serif;

  /* Elevation */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.06), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.06), 0 4px 6px -2px rgba(0,0,0,.04);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.08), 0 10px 10px -5px rgba(0,0,0,.04);

  /* Radii */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full:9999px;

  /* Motion */
  --ease-out:    cubic-bezier(0.0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:  120ms;
  --dur-base:  220ms;
  --dur-slow:  380ms;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:       var(--n-900);
    --surface:  var(--n-800);
    --surface2: var(--n-700);
    --border:   var(--n-700);
    --border2:  var(--n-600);
    --text:     #e8f5e3;
    --text2:    var(--n-300);
    --text3:    var(--n-400);
    --accent:   var(--g-400);
    --accent-d: var(--g-300);
    --accent-bg:rgba(79,187,127,.12);
    --shadow-xs:  0 1px 2px rgba(0,0,0,.25);
    --shadow-sm:  0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,.3), 0 2px 4px -1px rgba(0,0,0,.2);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.35), 0 4px 6px -2px rgba(0,0,0,.2);
    --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.4), 0 10px 10px -5px rgba(0,0,0,.2);
  }
}

/* ── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: clamp(20px, 3vw, 26px); }

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
ul { padding-left: 20px; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes popIn {
  0%   { transform: scale(0.8); opacity: 0; }
  70%  { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── UTILITY ───────────────────────────────────────────────── */
.hidden   { display: none !important; }
.muted    { color: var(--text2); }
.err      { color: var(--red); }
.right    { margin-left: auto; }
.grow     { flex: 1; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── INPUTS ────────────────────────────────────────────────── */
input, select, textarea {
  width: 100%;
  padding: 13px 16px;
  margin: 4px 0 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text3); }
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
textarea { resize: vertical; min-height: 80px; }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--text);
  color: var(--surface);
  border: 0;
  border-radius: var(--r-full);
  padding: 11px 22px;
  font: 600 14px/1 var(--sans);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}
.btn:hover  { background: var(--accent-d); color: #fff; box-shadow: var(--shadow-md); }
.btn:active { transform: scale(0.97); box-shadow: var(--shadow-xs); }

.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-d); }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border2);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--surface2); border-color: var(--border2); box-shadow: var(--shadow-xs); }

.btn.danger {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
  box-shadow: none;
}
.btn.danger:hover { background: var(--red); color: #fff; box-shadow: var(--shadow-md); }

.btn.sm { padding: 7px 15px; font-size: 13px; }
.btn.lg { padding: 15px 28px; font-size: 16px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* ── CARD ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}

/* ── BADGE ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--accent);
  color: #fff;
  font: 700 11px/1 var(--sans);
  border-radius: var(--r-full);
  margin-left: 4px;
  transition: transform var(--dur-fast) var(--ease-spring);
}

/* ── STATUS TAGS ───────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 3px 11px;
  border-radius: var(--r-full);
  font: 600 12px/1.6 var(--sans);
  letter-spacing: 0.01em;
  text-transform: capitalize;
  background: #fef3c7; color: #92400e;
}
.tag.confirmed, .tag.preparing { background: #dbeafe; color: #1e40af; }
.tag.ready, .tag.completed     { background: #d1fae5; color: #065f46; }
.tag.cancelled                 { background: #fee2e2; color: #991b1b; }
.tag.pending                   { background: #fef3c7; color: #92400e; }

/* ── HEADER ────────────────────────────────────────────────── */
header#siteHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(18px, 4vw, 48px);
  height: 66px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(0,0,0,.03);
}

.brand {
  font: 500 26px/1 var(--serif);
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}
.brand::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

header#siteHeader nav {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}
header#siteHeader nav a {
  padding: 8px 14px;
  border-radius: var(--r-full);
  font: 500 14px var(--sans);
  color: var(--text2);
  transition: background var(--dur-fast), color var(--dur-fast);
}
header#siteHeader nav a:hover { background: var(--surface2); color: var(--text); }

/* ── MAIN ──────────────────────────────────────────────────── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 80px;
}

/* ── MODAL ─────────────────────────────────────────────────── */
#modal {
  position: fixed; inset: 0;
  background: rgba(14, 22, 16, 0.55);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 200;
  animation: fadeIn var(--dur-fast) var(--ease-out);
}
#modal .card {
  width: 100%; max-width: 440px;
  margin: 0; padding: 32px;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  animation: popIn var(--dur-base) var(--ease-spring);
}

/* ── TOAST ─────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 120px);
  background: var(--n-800);
  color: #e8f5e3;
  padding: 13px 24px;
  border-radius: var(--r-full);
  font: 600 14px/1 var(--sans);
  white-space: nowrap;
  transition: transform var(--dur-base) var(--ease-spring);
  z-index: 300;
  box-shadow: var(--shadow-xl);
  max-width: calc(100vw - 40px);
}
#toast.show { transform: translate(-50%, 0); }
#toast.bad  { background: var(--red); }

/* ── ROW / LAYOUT HELPERS ──────────────────────────────────── */
.row  { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.logo { width: 80px; height: 80px; border-radius: var(--r-md); object-fit: cover; }
.th   { width: 58px; height: 58px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface2); flex-shrink: 0; }
.ph   {
  display: flex; align-items: center; justify-content: center;
  font: 400 80px/1 var(--serif); color: var(--text2);
  background: var(--tone, var(--surface2));
}

/* ── SEARCH BAR ────────────────────────────────────────────── */
.home-toolbar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 28px 0 22px;
}

.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 20px;
  color: var(--text3);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.search-input {
  width: 100%;
  padding: 15px 48px 15px 52px;
  margin: 0;
  border: 1.5px solid var(--border2);
  border-radius: var(--r-full);
  font-size: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent),
              var(--shadow-md);
}
.search-clear {
  position: absolute; right: 16px;
  background: var(--surface2);
  border: 0;
  color: var(--text3);
  cursor: pointer;
  padding: 0;
  width: 26px; height: 26px;
  display: none;
  align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.search-clear:hover { background: var(--border2); color: var(--text); }
.search-clear.show  { display: flex; }

/* ── SHOPS STRIP ───────────────────────────────────────────── */
.shops-strip-section { margin-bottom: 4px; }
.strip-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.strip-title {
  font: 700 11px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
}
.shops-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 3px 2px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shops-strip::-webkit-scrollbar { display: none; }

.shop-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  white-space: nowrap;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-fast);
  flex-shrink: 0;
}
.shop-pill:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(47,168,98,.15), var(--shadow-md);
}
.shop-pill-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-bg);
  display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 var(--sans);
  color: var(--accent-d);
  border: 1.5px solid color-mix(in srgb, var(--accent) 20%, transparent);
  flex-shrink: 0;
}
.shop-pill-info { display: flex; flex-direction: column; gap: 2px; }
.shop-pill-name { font: 600 13px/1.2 var(--sans); color: var(--text); }
.shop-pill-city { font-size: 11px; color: var(--text3); }

/* ── FILTER CHIPS & SORT ───────────────────────────────────── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  margin: 0;
  flex: 1;
}
.chips::-webkit-scrollbar { display: none; }
.chips button {
  white-space: nowrap;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  border-radius: var(--r-full);
  padding: 7px 16px;
  font: 500 13px/1 var(--sans);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  display: inline-flex; align-items: center; gap: 5px;
  box-shadow: var(--shadow-xs);
}
.chips button:hover { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-d); }
.chips button.on   {
  background: var(--text); color: var(--surface);
  border-color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.chip-count { font-size: 11px; opacity: 0.7; }

.sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text2);
  white-space: nowrap;
  flex-shrink: 0;
}
.sort-select {
  width: auto; margin: 0;
  padding: 7px 28px 7px 14px;
  font-size: 13px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1.5px solid var(--border2);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a9381' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ── SECTION HEADING ───────────────────────────────────────── */
.section-meta-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 0 16px;
  gap: 12px;
}
.section-meta-head h2 { margin: 0; font-size: clamp(20px, 3vw, 27px); }
.section-meta-head .muted { font-size: 13px; flex-shrink: 0; }

/* ── PRODUCT GRID ──────────────────────────────────────────── */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}

/* ── PRODUCT CARD ──────────────────────────────────────────── */
.prod-card {
  margin: 0; padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
  animation: fadeUp var(--dur-slow) var(--ease-out) both;
}
.prod-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow:
    0 16px 32px -6px rgba(47,168,98,.12),
    0 8px 16px -4px rgba(0,0,0,.06),
    var(--shadow-sm);
}

.prod-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface2);
  overflow: hidden;
}
.prod-img-box img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
  display: block;
}
.prod-card:hover .prod-img-box img { transform: scale(1.06); }

.prod-img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--accent-bg) 100%);
}

.prod-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}
.prod-badge.cat {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--border2) 60%, transparent);
}
.prod-badge.sold {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(229,62,62,.3);
}

/* Wishlist / quick-add overlay */
.prod-img-box::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.08) 0%, transparent 40%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.prod-card:hover .prod-img-box::after { opacity: 1; }

.prod-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.prod-shop-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent-d);
  text-decoration: none;
  margin-bottom: 7px;
  width: fit-content;
  padding: 3px 8px 3px 5px;
  background: var(--accent-bg);
  border-radius: var(--r-full);
  transition: background var(--dur-fast);
}
.prod-shop-tag:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.prod-shop-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.prod-title {
  font: 600 14px/1.4 var(--sans);
  margin: 0 0 5px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prod-desc-text {
  font-size: 12px;
  color: var(--text2);
  margin: 0 0 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.prod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}
.price {
  font: 600 16px/1 var(--serif);
  color: var(--text);
  letter-spacing: -0.01em;
}
.prod-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  font: 600 12px/1 var(--sans);
  border-radius: var(--r-full);
  transition: all var(--dur-fast) var(--ease-out);
}
.prod-add-btn.added {
  background: var(--g-600) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(34,138,78,.3) !important;
}

/* ── EMPTY STATE ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  background: var(--surface);
  border: 1.5px dashed var(--border2);
  border-radius: var(--r-xl);
  margin: 20px 0;
  animation: fadeIn var(--dur-base) var(--ease-out);
}
.empty-state-icon { font-size: 44px; margin-bottom: 14px; line-height: 1; }
.empty-state h3   { font-size: 20px; margin: 0 0 6px; }
.empty-state p    { color: var(--text2); margin: 0 0 18px; font-size: 14px; max-width: 280px; margin-inline: auto; }

/* ── SHOP PAGE ─────────────────────────────────────────────── */
.shop-header-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.shop-logo {
  width: 72px; height: 72px;
  border-radius: var(--r-md);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.shop-logo-ph {
  width: 72px; height: 72px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font: 400 36px/1 var(--serif);
  background: var(--accent-bg);
  color: var(--accent-d);
  border: 2px solid color-mix(in srgb, var(--accent) 20%, transparent);
  flex-shrink: 0;
}

/* ── CART PAGE ─────────────────────────────────────────────── */
.cart-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-fast);
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border-radius: var(--r-full);
  padding: 2px;
}
.qty-ctrl button {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
  box-shadow: var(--shadow-xs);
}
.qty-ctrl button:hover { background: var(--text); color: var(--surface); }
.qty-ctrl b { font-size: 14px; min-width: 22px; text-align: center; }

/* ── ORDERS ────────────────────────────────────────────────── */
.order-card { border-radius: var(--r-lg); padding: 18px; }
.order-card ul { margin: 10px 0; }
.order-card li { font-size: 14px; padding: 2px 0; color: var(--text2); }

/* ── AUTH PAGES (MODERN & LUXURY REDESIGN) ───────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.auth-page header#siteHeader .brand::after { display: none; }

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 60px) 16px 80px;
  position: relative;
  background:
    radial-gradient(ellipse 65% 50% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 70%),
    radial-gradient(circle 300px at 90% 20%, color-mix(in srgb, var(--accent) 8%, transparent) 0%, transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 42px) clamp(22px, 5vw, 36px);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow:
    0 24px 48px -12px rgba(0, 0, 0, .08),
    0 12px 24px -8px rgba(47, 168, 98, .06),
    0 0 0 1px color-mix(in srgb, var(--border) 80%, transparent);
  position: relative;
  overflow: hidden;
  animation: popIn var(--dur-base) var(--ease-spring);
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-d), var(--g-300));
}

.auth-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: var(--accent-bg);
  color: var(--accent-d);
  font: 700 11px/1 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.auth-card h2 {
  font-size: clamp(26px, 4vw, 32px);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--text);
}

.auth-card .subtitle {
  color: var(--text2);
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}
.form-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 13px/1 var(--sans);
  color: var(--text);
  margin-bottom: 7px;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .input-icon {
  position: absolute;
  left: 16px;
  color: var(--text3);
  font-size: 15px;
  pointer-events: none;
  transition: color var(--dur-fast);
}
.input-wrap input {
  padding-left: 44px;
  padding-right: 44px;
  margin: 0;
  height: 48px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border2);
  font-size: 14.5px;
  background: var(--surface);
  color: var(--text);
  transition: all var(--dur-fast) var(--ease-out);
}
.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
.input-wrap:focus-within .input-icon {
  color: var(--accent-d);
}
.pw-toggle-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text3);
  font-size: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur-fast);
}
.pw-toggle-btn:hover { color: var(--text); }

.auth-submit-btn {
  width: 100%;
  margin-top: 8px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: all var(--dur-fast) var(--ease-out);
}
.auth-submit-btn:hover {
  background: var(--accent-d);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-1px);
}
.auth-submit-btn:active {
  transform: scale(0.98);
}

.auth-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--text2);
}
.auth-footer a {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast);
}
.auth-footer a:hover { color: var(--accent-d); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 13px/1 var(--sans);
  color: var(--text3);
  margin-bottom: 20px;
  transition: color var(--dur-fast);
}
.back-link:hover { color: var(--text); }

.auth-trust-strip {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.auth-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text2);
}
.auth-trust-item i {
  color: var(--accent);
  font-size: 11px;
}

.portal-switch-box {
  margin-top: 16px;
  text-align: center;
  padding: 12px;
  background: var(--surface2);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text2);
}
.portal-switch-box a {
  color: var(--accent-d);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.portal-switch-box a:hover { color: var(--text); }

.alert-box {
  padding: 13px 16px;
  border-radius: var(--r-md);
  margin-bottom: 18px;
  font-size: 14px;
  display: none;
  line-height: 1.45;
  border: 1px solid;
}
.alert-box.show    { display: flex; align-items: center; gap: 8px; animation: fadeIn var(--dur-fast) var(--ease-out); }
.alert-box.error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-box.success { background: #f0fdf4; color: #065f46; border-color: #a7f3d0; }
@media (prefers-color-scheme: dark) {
  .alert-box.error   { background: rgba(127,29,29,.3); color: #fca5a5; border-color: rgba(127,29,29,.5); }
  .alert-box.success { background: rgba(6,78,59,.3);   color: #86efac; border-color: rgba(6,78,59,.5); }
}

/* ── GRID (old, used by shop page) ─────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ── CHIPS (shop page compat) ──────────────────────────────── */
.chips-wrap {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 0 6px; scrollbar-width: none;
}
.chips-wrap::-webkit-scrollbar { display: none; }

/* ── PRICE ─────────────────────────────────────────────────── */
.price { font: 600 18px/1 var(--serif); letter-spacing: -0.01em; }

/* ═══════════════════════════════════════════════════════════
   MOBILE TAB BAR
═══════════════════════════════════════════════════════════ */
@media (min-width: 561px) {
  #tabBar { display: none !important; }
}

#tabBar {
  display: flex;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 68px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-top: 1px solid color-mix(in srgb, var(--border2) 50%, transparent);
  z-index: 100;
  padding: 0 6px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -1px 0 var(--border), 0 -12px 40px rgba(0,0,0,.07);
}

.tab-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  padding: 8px 4px 10px;
  text-decoration: none;
  color: var(--text3);
  background: none; border: none;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  border-radius: var(--r-md);
  margin: 5px 2px;
  transition: color var(--dur-base) var(--ease-out);
  font: inherit;
}
.tab-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tab-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur-base) var(--ease-spring);
}
.tab-icon svg { width: 24px; height: 24px; transition: stroke var(--dur-base); }
.tab-icon i { font-size: 19px; line-height: 1; transition: color var(--dur-base); }

.tab-label {
  font: 600 9.5px/1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity var(--dur-base), color var(--dur-base);
}

.tab-active-bar {
  position: absolute;
  top: 0;
  width: 28px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-base) var(--ease-spring);
}

.tab-item.active { color: var(--accent-d); }
.tab-item.active .tab-icon { transform: translateY(-2px) scale(1.12); }
.tab-item.active .tab-label { opacity: 1; color: var(--accent-d); font-weight: 700; }
.tab-item.active .tab-active-bar { transform: scaleX(1); }
.tab-item:not(.tab-cart):active .tab-icon { transform: scale(0.86); }

/* Raised cart button */
.tab-cart { position: relative; }
.tab-icon-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 40px;
}
.tab-cart .tab-icon {
  width: 50px; height: 50px;
  background: linear-gradient(145deg, var(--accent), var(--accent-d));
  border-radius: 17px;
  color: #fff;
  box-shadow:
    0 6px 16px rgba(47,168,98,.35),
    0 2px 4px rgba(47,168,98,.2),
    inset 0 1px 0 rgba(255,255,255,.15);
  margin-top: -20px;
  border: 2.5px solid var(--bg);
  transition:
    transform var(--dur-base) var(--ease-spring),
    box-shadow var(--dur-base) var(--ease-out);
}
.tab-cart .tab-icon svg { stroke: #fff; width: 22px; height: 22px; }
.tab-cart .tab-icon i { color: #fff; font-size: 20px; line-height: 1; }
.tab-cart.active .tab-icon {
  background: linear-gradient(145deg, var(--accent-d), var(--g-700));
  box-shadow:
    0 8px 24px rgba(47,168,98,.45),
    0 3px 6px rgba(47,168,98,.25),
    inset 0 1px 0 rgba(255,255,255,.15);
  transform: translateY(-5px) scale(1.06);
}
.tab-cart:active .tab-icon { transform: translateY(-2px) scale(0.93); }

.tab-cart-badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--red);
  color: #fff;
  font: 700 9px/1 var(--sans);
  border-radius: var(--r-full);
  min-width: 17px; height: 17px;
  padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  transition: transform var(--dur-fast) var(--ease-spring);
  box-shadow: 0 2px 6px rgba(229,62,62,.4);
}
.tab-cart-badge.pop  { transform: scale(1.45); }
.tab-cart-badge[data-n="0"] { display: none; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
═══════════════════════════════════════════════════════════ */
@media (max-width: 560px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  header#siteHeader { display: none !important; }
  main { padding-inline: 14px; padding-bottom: 24px; }
  #toast { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }

  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .prod-img-box { aspect-ratio: 1; }
  .prod-body   { padding: 10px; }
  .prod-title  { font-size: 12.5px; }
  .prod-footer { padding-top: 8px; }
  .prod-footer .price { font-size: 13px; }
  .prod-add-btn { padding: 6px 10px; font-size: 11.5px; }
  .prod-shop-tag { font-size: 10px; padding: 2px 6px 2px 4px; }
  .prod-shop-dot { width: 4px; height: 4px; }

  .home-toolbar  { margin: 14px 0 14px; gap: 12px; }
  .search-input  { padding: 13px 42px 13px 46px; font-size: 14px; }
  .search-icon   { left: 16px; }

  .filters-bar   { flex-direction: column; align-items: stretch; gap: 8px; }
  .sort-wrap     { align-self: flex-end; }
  .chips         { flex-wrap: nowrap; }

  .section-meta-head { margin: 14px 0 12px; }
  .section-meta-head h2 { font-size: 20px; }

  .shops-strip   { padding-bottom: 8px; }

  .card { padding: 16px; border-radius: var(--r-md); }
  .auth-card { padding: 24px 18px; }

  .row { gap: 8px; }
  .logo { width: 64px; height: 64px; }
}
