/* ============================================================================
   MYINDIS — Public Storefront Design System
   Single CSS file for the entire public site (storefront, auth, customer and
   business dashboards share these core classes; admin has its own admin.css).
   Design language: premium Indian marketplace — white bg, purple #7C3AED,
   pink #EC4899, cream hero, pastel category tiles, soft shadows, 12-16px
   radii, 1280px container. Desktop = professional website; mobile = app-like
   with fixed bottom nav (<1024px).
   Breakpoints: 1280 / 1024 / 768 / 640. Vanilla CSS only.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* brand */
  --brand: #7C3AED;
  --brand-2: #EC4899;
  --brand-deep: #6B21A8;
  --brand-ink: #6D28D9;
  --brand-50: #F5F3FF;
  --brand-100: #EDE9FE;
  --brand-200: #DDD6FE;
  --brand-300: #C4B5FD;
  --brand-fade: rgba(124, 58, 237, 0.30);
  --brand-ring: rgba(124, 58, 237, 0.15);

  /* neutrals */
  --ink: #1E293B;
  --ink-2: #334155;
  --body: #475569;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --line: #E5E7EB;
  --line-soft: #F3F4F6;
  --bg: #FFFFFF;
  --bg-soft: #F9FAFB;

  /* semantic */
  --success: #059669;
  --success-bg: #ECFDF5;
  --success-line: #A7F3D0;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --danger-line: #FECACA;
  --info: #2563EB;
  --info-bg: #EFF6FF;
  --info-line: #BFDBFE;
  --amber: #F59E0B;
  --amber-bg: #FFFBEB;
  --wa: #16A34A;

  /* scene colors */
  --hero-cream: #FEF3E2;
  --promo-lav: #EDE9FE;

  /* pastel category tiles */
  --pastel-1: #F3E8FF;
  --pastel-2: #D1FAE5;
  --pastel-3: #FFEDD5;
  --pastel-4: #FCE7F3;
  --pastel-5: #FEF3C7;
  --pastel-6: #DBEAFE;
  --pastel-7: #EDE9FE;
  --pastel-8: #CCFBF1;

  /* shape + depth */
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --pill: 9999px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 12px 24px -8px rgba(0, 0, 0, 0.10);
  --shadow-brand: 0 4px 14px rgba(124, 58, 237, 0.35);
  --shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.20);
  --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

  /* type */
  --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ----------------------------------------------------------------------------
   2. RESET-LITE + BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, .site-main { display: block; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; border: 0; }

a { color: var(--brand); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--brand-deep); }

button, input, select, textarea { font-family: inherit; font-size: inherit; }

ul, ol { margin: 0; padding: 0; }

ul.clean, ol.clean { list-style: none; }

[hidden] { display: none !important; }

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand-100); color: var(--brand-deep); }

/* thin elegant scrollbars (WebKit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 999px;
  border: 2px solid #ffffff;
}
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ---------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   ------------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container { padding: 0 24px; }
}

.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }

.site-main {
  flex: 1;
  min-height: calc(100vh - 460px);
  padding: 24px 0 48px;
}

/* section header pattern: left title + right "View All →" */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.section-sub {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 2px;
}

.view-all svg { transition: transform 0.18s ease; }
.view-all:hover svg { transform: translateX(3px); }

/* grids */
.grid { display: grid; gap: 20px; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 768px) {
  .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

@media (min-width: 1024px) {
  .grid-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
}

/* category grid (v1.4): photo tiles — auto-fill from 100px, horizontal
   snap-scroll mobile with real breathing room between tiles */
.grid-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 24px 16px;
}

@media (max-width: 767px) {
  .grid-cats {
    grid-template-columns: none; /* kill the 6-col desktop template — all columns become implicit 112px */
    grid-auto-flow: column;
    grid-auto-columns: 112px;
    grid-auto-rows: auto;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 14px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    scrollbar-width: none;
  }
  .grid-cats::-webkit-scrollbar { display: none; }
}

/* ---------------------------------------------------------------------------
   4. SITE HEADER
   ------------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.logo:hover { color: var(--ink); }

.logo-img { height: 34px; width: auto; display: block; }

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--ink);
}

/* search pill */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--pill);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.header-search svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
  flex-shrink: 0;
}

.header-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--ink);
}

.header-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.header-search:focus-within {
  background: #ffffff;
  border-color: var(--brand-300);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

/* live suggest dropdown */
.search-suggest {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 20;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  max-height: 430px;
  overflow-y: auto;
}

.suggest-group-label {
  display: block;
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--faint);
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.suggest-item:hover,
.suggest-item.is-active {
  background: var(--brand-50);
  color: var(--brand-deep);
}

.suggest-ic {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--brand-100);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.suggest-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.suggest-ic svg { width: 18px; height: 18px; }

.suggest-txt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-meta {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.suggest-item.is-skeleton { pointer-events: none; }
.suggest-skel-line {
  height: 12px;
  border-radius: 6px;
  background: var(--line-soft);
}

/* location chip */
.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.location-chip:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
}

.location-chip svg { width: 16px; height: 16px; color: var(--brand); }

.loc-label {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }

.nav-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--pill);
  background: var(--danger);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* account dropdown */
.account-menu { position: relative; }

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  width: 220px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
}

.account-dropdown a,
.account-dropdown .dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.account-dropdown a:hover,
.account-dropdown .dd-item:hover {
  background: var(--bg-soft);
  color: var(--brand);
}

.account-dropdown a svg { width: 17px; height: 17px; color: var(--muted); }
.account-dropdown a:hover svg { color: var(--brand); }

.dd-divider {
  height: 1px;
  background: var(--line-soft);
  margin: 6px 4px;
}

/* secondary nav under the header */
.header-nav {
  background: #ffffff;
  border-top: 1px solid var(--line-soft);
}

.header-nav-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 9px 24px;
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  padding: 4px 0;
  white-space: nowrap;
}

.nav-link:hover { color: var(--brand); }

.nav-link.is-active {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--brand);
}

.nav-spacer { flex: 1; }

.nav-highlight {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--pill);
  background: var(--brand-50);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-highlight:hover { background: var(--brand-100); color: var(--brand-deep); }
.nav-highlight svg { width: 15px; height: 15px; }

/* mobile header (below 768px): row 1 = logo + location + actions, row 2 = search */
@media (max-width: 767px) {
  .header-inner {
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    padding: 10px 0;
  }

  .logo { grid-column: 1; grid-row: 1; }
  .location-chip { grid-column: 2; grid-row: 1; padding: 0 10px; }
  .header-actions { grid-column: 3; grid-row: 1; }
  .header-search { grid-column: 1 / -1; grid-row: 2; }

  .logo-text { font-size: 18px; }
  .logo-img { height: 30px; }
  .loc-label { max-width: 84px; }
  .header-nav, .account-menu { display: none; }
}
.hdr-wish { display: none; }

/* swap the bell for a wishlist icon on BOTH mobile AND tablet (≤1023px) —
   customers/guests. Businesses keep the bell (no wishlist). */
@media (max-width: 1023px) {
  .hdr-wish { display: inline-flex !important; }
  .hdr-hide-mobile { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .header-inner { grid-template-columns: 132px minmax(0, 1fr) auto auto; gap: 12px; }
  .loc-label { max-width: 96px; }
}

/* ---------------------------------------------------------------------------
   5. BUTTONS
   ------------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--pill);
  background: var(--line-soft);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, color 0.18s ease, filter 0.18s ease;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { color: inherit; }

.btn:disabled,
.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.42);
  color: #ffffff;
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--brand-fade);
  color: var(--brand);
}

.btn-secondary:hover {
  background: var(--brand-50);
  color: var(--brand-deep);
  border-color: var(--brand-300);
}

.btn-ghost {
  background: transparent;
  color: var(--body);
}

.btn-ghost:hover { background: var(--line-soft); color: var(--ink); }

.btn-violet {
  background: var(--brand);
  color: #ffffff;
}

.btn-violet:hover { background: var(--brand-deep); color: #ffffff; }

.btn-wa {
  background: var(--wa);
  color: #ffffff;
}

.btn-wa:hover { background: #15803D; color: #ffffff; }

.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; gap: 6px; }
.btn-sm svg { width: 15px; height: 15px; }

.btn-lg { height: 52px; padding: 0 30px; font-size: 16px; }
.btn-lg svg { width: 20px; height: 20px; }

.btn-block { width: 100%; }

/* small icon pill button used in contact rows / share rows */
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: #ffffff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.chip-btn svg { width: 17px; height: 17px; }
.chip-btn:hover { border-color: var(--brand-300); color: var(--brand); background: var(--brand-50); }

.chip-btn.chip-wa { border-color: rgba(22, 163, 74, 0.35); color: #15803D; }
.chip-btn.chip-wa:hover { background: #F0FDF4; border-color: var(--wa); color: var(--wa); }

/* ---------------------------------------------------------------------------
   6. FORMS
   ------------------------------------------------------------------------ */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.form-control {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

textarea.form-control {
  height: auto;
  min-height: 104px;
  padding: 11px 14px;
  resize: vertical;
  line-height: 1.5;
}

select.form-control { cursor: pointer; }

.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.form-control::placeholder { color: var(--faint); }

.form-control.is-invalid,
.form-control[aria-invalid="true"] {
  border-color: var(--danger);
}

.form-control.is-invalid:focus,
.form-control[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* --- visible validation errors on storefront forms (v1.2) --- */
.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--danger);
}

.field-error::before {
  content: "!";
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--danger);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
}

.form-group.has-error .form-label { color: var(--danger); }

.form-check input[aria-invalid="true"] { accent-color: var(--danger); }
.form-group.has-error .form-check span { color: var(--danger); }

/* consolidated error summary above a form */
.form-error-summary {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 13.5px;
}

.form-error-summary strong { display: block; margin-bottom: 4px; font-size: 14px; color: #991B1B; }

.form-error-summary ul { margin: 0; padding-left: 18px; }

.form-error-summary li { margin: 2px 0; font-weight: 500; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 639px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

.input-pill { border-radius: var(--pill); }

.form-hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
   7. BADGES, PILLS, CHIPS
   ------------------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.3;
  white-space: nowrap;
}

.badge-purple { background: var(--brand); color: #ffffff; }
.badge-green { background: var(--success); color: #ffffff; }
.badge-gold { background: var(--amber); color: #78350F; }
.badge-red { background: var(--danger); color: #ffffff; }
.badge-blue { background: var(--info); color: #ffffff; }

.badge-purple-soft { background: var(--pastel-1); color: var(--brand); }
.badge-green-soft { background: var(--pastel-2); color: #047857; }
.badge-gold-soft { background: var(--pastel-5); color: #B45309; }
.badge-red-soft { background: var(--danger-bg); color: #B91C1C; }
.badge-blue-soft { background: var(--pastel-6); color: #1D4ED8; }

/* generic filter chip / tag pill */
.pill-chip,
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: #ffffff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pill-chip:hover,
.tag-pill:hover {
  border-color: var(--brand-300);
  color: var(--brand);
}

.pill-chip.is-active,
.tag-pill.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* verified markers */
.verified-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.verified-mini svg { width: 14px; height: 14px; }

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 8px;
  background: var(--pastel-6);
  color: #2563EB;
  font-size: 12px;
  font-weight: 700;
}

.verified-badge svg { width: 15px; height: 15px; }

/* rating */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.rating svg { width: 14px; height: 14px; color: var(--amber); fill: var(--amber); }
.rating em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; }

.stars { display: inline-flex; gap: 2px; }

.stars .st { color: #D1D5DB; }
.stars .st.is-on { color: var(--amber); fill: var(--amber); }

.stars-lg .st { width: 22px; height: 22px; }

/* distance pill */
.distance-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 2;
}

.distance-pill svg { width: 12px; height: 12px; color: var(--brand); }

.distance-pill.inline { position: static; display: inline-flex; }

/* v1.4: distance pills link to Google Maps directions (exact route) */
.distance-pill.is-link {
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.distance-pill.is-link:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
  transform: translateY(-1px);
}

.distance-pill.is-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* open / closed indicator */
.open-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.open-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(5, 150, 105, 0.35);
  animation: openPulse 2s ease-out infinite;
}

.open-dot.is-closed { background: var(--danger); }
.open-dot.is-closed::after { display: none; }

/* ---------------------------------------------------------------------------
   8. PRODUCT CARD
   ------------------------------------------------------------------------ */
.product-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--brand-200);
}

.p-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--bg-soft), var(--brand-50));
  overflow: hidden;
}

.p-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: transform 0.35s ease;
}

.product-card:hover .p-media > img { transform: scale(1.04); }

.p-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  z-index: 2;
}

.wish-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: color 0.18s ease, transform 0.18s ease;
}

.wish-btn svg { width: 18px; height: 18px; transition: fill 0.18s ease; }
.wish-btn:hover { color: var(--danger); transform: scale(1.08); }

.wish-btn.is-active,
[data-wish].is-active { color: var(--danger); }

.wish-btn.is-active svg,
[data-wish].is-active svg { fill: var(--danger); stroke: var(--danger); }

.wish-btn-lg.is-active { border-color: rgba(239, 68, 68, 0.35); background: var(--danger-bg); }

.p-body { padding: 13px 15px 15px; display: flex; flex-direction: column; flex: 1; }

.p-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.p-title a { color: inherit; }
.p-title a:hover { color: var(--brand); }

.p-biz {
  margin: 5px 0 9px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.p-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.p-price { font-size: 18px; font-weight: 700; color: var(--ink); }
.p-mrp { font-size: 13px; color: var(--faint); text-decoration: line-through; }
.p-off { font-size: 12px; font-weight: 600; color: var(--success); }

.p-meta { margin-top: auto; padding-top: 9px; }

/* ---------------------------------------------------------------------------
   9. CATEGORY TILE (v1.4 — photo tiles with icon fallback)
   ------------------------------------------------------------------------ */
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--ink-2);
  scroll-snap-align: start;
}

.category-tile:hover { color: var(--brand-deep); }

.cat-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover .cat-icon {
  transform: scale(1.06);
  box-shadow: var(--shadow-card);
}

/* photo tile: square photo, soft ring, gentle hover zoom */
.cat-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: 0 0 0 1px var(--line-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile.has-image { align-items: stretch; }

.cat-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.category-tile.has-image:hover .cat-photo {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(30, 41, 59, 0.28);
}

.category-tile.has-image:hover .cat-photo img {
  transform: scale(1.08);
}

.category-tile.has-image:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 18px;
}

.category-tile.has-image .cat-label {
  margin-top: 9px;
  font-weight: 600;
  color: var(--ink);
}

.cat-label {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 767px) {
  .cat-icon { width: 68px; height: 68px; border-radius: 17px; }
  .category-tile.has-image .cat-label { margin-top: 8px; }
}

/* categories.php — big photo cards (v1.4) */
.grid-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.category-tile-big {
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--ink);
  gap: 8px;
}

.category-tile-big:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -12px rgba(30, 41, 59, 0.25);
}

.category-tile-big .cat-photo {
  border-radius: 12px;
}

.cat-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84px;
  color: var(--brand-deep);
}

.cat-tile-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-tile-count {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

@media (max-width: 767px) {
  .grid-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .category-tile-big { padding: 10px; }
  .category-tile-big .cat-photo { border-radius: 10px; }
  .cat-tile-name { font-size: 14px; }
}

/* ---------------------------------------------------------------------------
   10. BUSINESS CARD
   ------------------------------------------------------------------------ */
.biz-card {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.biz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--brand-200);
}

.biz-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #1E293B, var(--brand-deep));
}

.biz-cover > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.biz-card:hover .biz-cover > img { transform: scale(1.04); }

.biz-logo {
  width: 64px;
  height: 64px;
  margin: -32px 16px 0;
  position: relative;
  z-index: 2;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.biz-logo > img { width: 100%; height: 100%; object-fit: cover; display: block; }

.biz-logo-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
}

.biz-body { padding: 10px 16px 16px; }

.biz-name {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.biz-name a { color: inherit; }
.biz-name a:hover { color: var(--brand); }

.biz-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.biz-meta svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--faint); }
.biz-meta .open-dot { margin-right: 2px; }
.biz-meta .biz-open { color: var(--ink-2); font-weight: 500; }

/* ---------------------------------------------------------------------------
   11. HERO BANNER
   ------------------------------------------------------------------------ */
.hero-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--hero-cream);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 48px;
  max-width: 620px;
}

.hero-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin-bottom: 16px;
}

.grad-text {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  max-width: 460px;
  margin-bottom: 26px;
}

.hero-cta { display: inline-flex; }

.hero-media {
  position: relative;
  min-height: 260px;
  overflow: hidden;
}

.hero-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--hero-cream) 0%, rgba(254, 243, 226, 0) 55%);
}

.mandala {
  position: absolute;
  top: -52px;
  left: -52px;
  width: 280px;
  height: 280px;
  color: var(--ink);
  opacity: 0.06;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 767px) {
  .hero-banner { grid-template-columns: 1fr; }
  .hero-copy { padding: 28px 22px; }
  .hero-media { min-height: 225px; order: 2; }
  .hero-media::after {
    background: linear-gradient(0deg, var(--hero-cream) 0%, rgba(254, 243, 226, 0) 45%);
  }
  .hero-text { font-size: 14px; margin-bottom: 20px; }
}

/* ---------------------------------------------------------------------------
   11b. HERO CAROUSEL (sliding banner — config "slides" or default)
   --------------------------------------------------------------------------- */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hc-track {
  display: flex;
  height: 100%;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.hero-carousel.no-anim .hc-track { transition: none; }

.hc-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  min-width: 0;
}

.hc-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hc-slide-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
}

.hc-slide-link img { position: absolute; inset: 0; }

.hc-caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 28px);
  padding: 8px 14px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 6px 18px -6px rgba(30, 41, 59, .35);
  backdrop-filter: blur(4px);
}

.hc-caption svg { width: 14px; height: 14px; color: var(--brand); flex-shrink: 0; }

/* controls sit above the ::after cream blend */
.hc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(30, 41, 59, .4);
  transition: background .18s ease, transform .18s ease, opacity .18s ease;
  padding: 0;
}

.hc-arrow svg { width: 17px; height: 17px; }

.hc-arrow:hover { background: #fff; }
.hc-arrow:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hc-arrow.prev { left: 12px; }
.hc-arrow.next { right: 12px; }

.hc-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  gap: 7px;
  padding: 6px 10px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px -6px rgba(30, 41, 59, .4);
}

.hc-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(30, 41, 59, .28);
  cursor: pointer;
  transition: background .18s ease, width .25s ease, transform .18s ease;
}

.hc-dot:hover { background: rgba(30, 41, 59, .5); }
.hc-dot:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hc-dot.is-active {
  width: 20px;
  border-radius: var(--pill);
  background: var(--brand);
}

/* single slide → hide controls */
.hero-carousel.is-single .hc-arrow,
.hero-carousel.is-single .hc-dots { display: none; }

@media (max-width: 767px) {
  .hc-caption { left: 10px; bottom: 44px; font-size: 11.5px; padding: 6px 11px; }
  .hc-arrow { width: 34px; height: 34px; }
  .hc-arrow.prev { left: 8px; }
  .hc-arrow.next { right: 8px; }
  .hc-dots { bottom: 8px; padding: 5px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .hc-track { transition: none; }
}

/* ---------------------------------------------------------------------------
   12. PROMO BANNER
   ------------------------------------------------------------------------ */
.promo-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.promo-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-width: 100%;
}

.promo-banner {
  display: grid;
  grid-template-columns: 3fr 2fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--promo-lav);
}

.promo-copy { padding: 36px 40px; }

.promo-heading {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-ink);
  margin-bottom: 10px;
}

.promo-text {
  font-size: 14px;
  line-height: 1.6;
  color: #4C1D95;
  margin-bottom: 22px;
  max-width: 480px;
}

.promo-media {
  position: relative;
  min-height: 200px;
  overflow: hidden;
}

.promo-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(237, 233, 254, 0.55) 0%, rgba(237, 233, 254, 0) 40%);
}

.promo-banner.is-solo { grid-template-columns: 1fr; }
.promo-banner.is-solo .promo-media { display: none; }

.promo-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.promo-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--pill);
  background: var(--brand-300);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.promo-dot.is-active { width: 22px; background: var(--brand); }

@media (max-width: 767px) {
  .promo-banner { grid-template-columns: 1fr; }
  .promo-media { min-height: 180px; order: 2; }
  .promo-media::after {
    background: linear-gradient(0deg, rgba(237, 233, 254, 0.5) 0%, rgba(237, 233, 254, 0) 40%);
  }
  .promo-copy { padding: 26px 22px; }
  .promo-heading { font-size: 20px; }
}

/* offers page top strip of small banners */
.banner-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  margin-bottom: 28px;
}

.strip-banner {
  position: relative;
  flex: 0 0 300px;
  height: 138px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--brand-deep);
  scroll-snap-align: start;
}

.strip-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.72) 0%, rgba(30, 41, 59, 0.08) 75%);
}

.strip-copy {
  position: absolute;
  left: 18px;
  bottom: 14px;
  right: 18px;
  z-index: 2;
  color: #ffffff;
}

.strip-copy h3 { font-size: 16px; font-weight: 700; color: #ffffff; }
.strip-copy p { margin: 3px 0 0; font-size: 12px; opacity: 0.85; }

/* ---------------------------------------------------------------------------
   13. FEATURE STRIP + TESTIMONIALS
   ------------------------------------------------------------------------ */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 1024px) {
  .feature-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-item h3 { font-size: 15px; font-weight: 700; }
.feature-item p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .testimonial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .testimonial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.testimonial-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.t-quote { color: var(--brand-300); }
.t-quote svg { width: 26px; height: 26px; }

.t-head { display: flex; align-items: center; gap: 12px; }

.t-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

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

.t-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.t-city { font-size: 12px; color: var(--muted); }

.t-stars { display: inline-flex; gap: 2px; }
.t-stars .st { width: 15px; height: 15px; color: #D1D5DB; }
.t-stars .st.is-on { color: var(--amber); fill: var(--amber); }

.t-text { font-size: 14px; line-height: 1.65; color: var(--body); }

/* rich-text blocks (CMS pages, descriptions, about) */
.prose { font-size: 14.5px; line-height: 1.7; color: var(--body); }
.prose h1, .prose h2, .prose h3 { margin: 20px 0 8px; }
.prose h1 { font-size: 22px; }
.prose h2 { font-size: 19px; }
.prose h3 { font-size: 16px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose a { text-decoration: underline; }
.prose img { border-radius: var(--radius-sm); }
.prose strong { color: var(--ink); }

.custom-html { font-size: 14.5px; color: var(--body); }
.custom-html h2 { font-size: 20px; margin: 16px 0 8px; }
.custom-html p { margin: 0 0 12px; }

/* ---------------------------------------------------------------------------
   14. SEARCH LAYOUT + FILTERS
   ------------------------------------------------------------------------ */
.search-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 1023px) {
  .search-layout { grid-template-columns: 1fr; gap: 20px; }
}

.search-side { min-width: 0; }

.filters-toggle { display: none; }

@media (max-width: 1023px) {
  .filters-toggle { display: inline-flex; margin-bottom: 14px; }
  .filter-card { display: none; }
  .filter-card.is-open { display: block; }
}

.filter-card {
  position: sticky;
  top: 130px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
}

@media (max-width: 1023px) {
  .filter-card { position: static; }
}

.filter-block + .filter-block { margin-top: 20px; }

.filter-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-2);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.radio-pill {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.radio-pill span {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: #ffffff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.16s ease;
}

.radio-pill:hover span { border-color: var(--brand-300); color: var(--brand); }

.radio-pill input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.radio-pill input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 2px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}

.check-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.check-item:hover { color: var(--brand); }

.check-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--faint);
}

.check-list { max-height: 300px; overflow-y: auto; padding-right: 4px; }

.range-inputs { display: flex; gap: 10px; }

.range-inputs .form-control { height: 38px; padding: 0 10px; font-size: 13px; }

.filter-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.5;
}

.filter-clear {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
}

.filter-clear:hover { color: var(--danger); }

/* results header */
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.results-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.results-meta { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.results-note { font-weight: 500; color: var(--brand); }

.sort-form { display: flex; align-items: center; gap: 8px; }

.sort-form label { font-size: 13px; font-weight: 600; color: var(--ink-2); }

.sort-form select { width: auto; min-width: 168px; height: 40px; }

/* discovery controls (businesses.php) */
.discover-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.discover-controls .form-control { width: auto; }

.discover-controls .grow { flex: 1; min-width: 180px; }

.discover-controls select { min-width: 150px; }

.suggest-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; justify-content: center; }

/* ---------------------------------------------------------------------------
   15. PRODUCT DETAIL PAGE
   ------------------------------------------------------------------------ */
.product-layout {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 1023px) {
  .product-layout { grid-template-columns: 1fr; gap: 28px; }
}

.product-gallery { position: sticky; top: 130px; }

@media (max-width: 1023px) {
  .product-gallery { position: static; }
}

.gallery-main {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--bg-soft);
  overflow: hidden;
}

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

.gallery-empty {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
}

.thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  position: relative;
}

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

.thumb:hover { border-color: var(--brand-300); }

.thumb.is-active { border-color: var(--brand); }

/* right column */
.pd-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin: 8px 0 6px;
}

.pd-biz-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.pd-biz-row a { color: var(--ink-2); font-weight: 600; }
.pd-biz-row a:hover { color: var(--brand); }

.pd-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
  font-size: 14px;
}

.pd-rating-row .rating { font-size: 15px; }

.pd-pricing {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}

.pd-price { font-size: 28px; font-weight: 800; color: var(--ink); }
.pd-mrp { font-size: 16px; color: var(--faint); text-decoration: line-through; }
.pd-off {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.stock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.stock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stock-dot.is-in { background: var(--success); }
.stock-dot.is-out { background: var(--danger); }

.stock-row.is-in { color: var(--success); }
.stock-row.is-out { color: var(--danger); }

.meta-table {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 7px 16px;
  margin: 18px 0 0;
  font-size: 13.5px;
}

.meta-table dt { color: var(--muted); }
.meta-table dd { margin: 0; color: var(--ink-2); font-weight: 500; }

.pd-form { margin-top: 20px; }

.pd-variants { display: grid; gap: 14px; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
  margin-top: 16px;
}

.qty-step {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.qty-step:hover { background: var(--line-soft); }

.qty-stepper input {
  width: 48px;
  height: 40px;
  border: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; background: var(--brand-50); }

.pd-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.pd-actions .btn { flex: 1; min-width: 150px; }

.pd-secondary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* delivery info strip */
.delivery-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  padding: 16px 20px;
  margin-top: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.delivery-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--body);
  font-weight: 500;
}

.delivery-item svg { width: 18px; height: 18px; color: var(--brand); flex-shrink: 0; }

.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.pay-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

/* tabs */
.tabs-container { margin-top: 40px; }

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab {
  padding: 12px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.tab:hover { color: var(--brand); }

.tab.is-active {
  color: var(--brand);
  border-color: var(--brand);
}

.tab-panel { padding: 26px 0; }

/* specs */
.spec-table { width: 100%; border-collapse: collapse; max-width: 640px; }

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  vertical-align: top;
}

.spec-table th {
  width: 34%;
  font-weight: 500;
  color: var(--muted);
}

.spec-table td { color: var(--ink-2); font-weight: 500; }

/* reviews */
.reviews-summary {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 8px;
}

.rating-big {
  font-size: 42px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.rating-bars { flex: 1; min-width: 250px; }

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.rating-bar {
  flex: 1;
  height: 8px;
  border-radius: var(--pill);
  background: var(--line-soft);
  overflow: hidden;
}

.rating-bar-fill {
  display: block;
  height: 100%;
  border-radius: var(--pill);
  background: var(--amber);
}

.review-card { padding: 20px 0; border-bottom: 1px solid var(--line-soft); }

.review-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-300), var(--brand-2));
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

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

.review-name { font-size: 14px; font-weight: 700; color: var(--ink); }

.review-time { font-size: 12px; color: var(--faint); }

.review-title { font-size: 15px; font-weight: 700; margin: 10px 0 4px; }

.review-text { font-size: 14px; line-height: 1.65; color: var(--body); }

.reviews-cta { margin-top: 20px; }

/* related products */
.related-wrap { margin-top: 48px; }

/* ---------------------------------------------------------------------------
   16. BUSINESS PROFILE PAGE
   ------------------------------------------------------------------------ */
.biz-hero {
  position: relative;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #1E293B, var(--brand-deep));
}

.biz-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.biz-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0) 30%, rgba(30, 41, 59, 0.5));
}

@media (max-width: 767px) {
  .biz-hero { height: 176px; }
}

.biz-head {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  margin-top: -48px;
  position: relative;
  z-index: 2;
  padding: 0 10px;
}

@media (max-width: 767px) {
  .biz-head { gap: 14px; margin-top: -36px; }
}

.biz-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .biz-avatar { width: 68px; height: 68px; border-width: 3px; }
}

.biz-avatar > img { width: 100%; height: 100%; object-fit: cover; display: block; }

.biz-avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
}

.biz-head-info { padding: 8px 14px; min-width: 0; background: rgba(255, 255, 255, 0.92); border-radius: 12px; }

.biz-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.biz-title-row h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }

@media (max-width: 767px) {
  .biz-title-row h1 { font-size: 19px; }
}

.biz-info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.biz-info-row .rating { font-size: 13.5px; }

.biz-open-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  font-weight: 500;
}

.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 34px;
}

.stat-box {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
}

.stat-box-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1.1;
}

.stat-box-label { margin-top: 4px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 639px) {
  .stats-row { gap: 10px; }
  .stat-box { padding: 14px 10px; }
  .stat-box-value { font-size: 18px; }
}

.biz-section { margin-top: 34px; }

.inquiry-form { max-width: 560px; }

/* ---------------------------------------------------------------------------
   17. CATEGORY PAGE
   ------------------------------------------------------------------------ */
.cat-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 30px;
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
}

.cat-banner-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-banner-title { font-size: 24px; font-weight: 800; color: var(--ink); }

.cat-banner-sub { margin: 3px 0 0; font-size: 14px; color: var(--ink-2); }

.sub-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

@media (max-width: 639px) {
  .cat-banner { padding: 20px; gap: 14px; }
  .cat-banner-icon { width: 56px; height: 56px; }
  .cat-banner-title { font-size: 20px; }
}

/* ---------------------------------------------------------------------------
   18. PAGINATION
   ------------------------------------------------------------------------ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 34px 0 8px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.16s ease, color 0.16s ease;
}

.pagination a:hover { background: var(--brand-50); color: var(--brand); }

.pagination .is-active,
.pagination a.is-active,
.pagination span.is-active {
  background: var(--brand);
  color: #ffffff;
  pointer-events: none;
}

.pagination .is-disabled,
.pagination span.is-disabled {
  color: var(--faint);
  pointer-events: none;
}

.pagination .is-gap { pointer-events: none; color: var(--faint); }

/* ---------------------------------------------------------------------------
   19. EMPTY STATES / FEEDBACK
   ------------------------------------------------------------------------ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  max-width: 460px;
  margin: 0 auto;
}

.empty-icon { color: #D1D5DB; }
.empty-icon svg { width: 64px; height: 64px; }

.empty-state h3 { font-size: 18px; font-weight: 700; margin: 16px 0 8px; }
.empty-state p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

.empty-inline {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* flash messages (rendered by render_flashes()) */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.flash-success { background: var(--success-bg); color: #047857; border-color: var(--success-line); }
.flash-error { background: var(--danger-bg); color: #B91C1C; border-color: var(--danger-line); }
.flash-info { background: var(--info-bg); color: #1D4ED8; border-color: var(--info-line); }

.flash-close,
.flash button.flash-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
}

.flash-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.06); }
.flash-close svg { width: 15px; height: 15px; }

.flash.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* toasts */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 1023px) {
  .toast-stack { bottom: 84px; right: 16px; left: 16px; }
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 380px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  animation: toastIn 0.3s ease;
}

@media (max-width: 1023px) {
  .toast { max-width: none; width: 100%; }
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-info { border-left-color: var(--brand); }

.toast.is-leaving {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---------------------------------------------------------------------------
   20. MODALS
   ------------------------------------------------------------------------ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: modalPop 0.22s ease;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-head h3 { font-size: 17px; font-weight: 700; }

.modal-body { padding: 24px; }

.modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.16s ease, color 0.16s ease;
}

.modal-close:hover { background: var(--line-soft); color: var(--ink); }
.modal-close svg { width: 17px; height: 17px; }

/* location picker bits */
.loc-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px dashed var(--brand-fade);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.loc-option:hover { background: var(--brand-50); border-color: var(--brand); }

.loc-option svg { width: 18px; height: 18px; flex-shrink: 0; }

.loc-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
}

.loc-divider::before,
.loc-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------------------------------------------------------------------------
   21. MOBILE BOTTOM NAV (<1024px only)
   ------------------------------------------------------------------------ */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1023px) {
  body { padding-bottom: 74px; }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line-soft);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mbn-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 0 7px;
    color: var(--faint);
    text-decoration: none;
  }

  .mbn-item svg { width: 22px; height: 22px; }
  .mbn-item span { font-size: 11px; font-weight: 500; }

  .mbn-item:hover { color: var(--faint); }

  .mbn-item.is-active { color: var(--brand); }
  .mbn-item.is-active span { font-weight: 600; }

  .mbn-item .nav-badge {
    top: 3px;
    left: calc(50% + 10px);
  }
}

/* ---------------------------------------------------------------------------
   22. FOOTER
   ------------------------------------------------------------------------ */
.site-footer {
  margin-top: 48px;
  background: var(--ink);
  color: #CBD5E1;
  padding: 56px 0 0;
  flex-shrink: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #ffffff;
}

.footer-logo:hover { color: #ffffff; }
.footer-logo img { height: 30px; width: auto; display: block; }

.footer-logo-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #ffffff;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
  max-width: 330px;
}

.footer-social { display: flex; gap: 10px; margin-top: 18px; }

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #CBD5E1;
  transition: all 0.18s ease;
}

.footer-social a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.footer-social svg { width: 16px; height: 16px; }

.footer-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.footer-col a:hover { color: #ffffff; }

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin: 7px 0;
}

.footer-contact svg { width: 15px; height: 15px; color: var(--brand-300); flex-shrink: 0; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 767px) {
  .site-footer { padding-top: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 567px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   23. AUTH PAGES
   ------------------------------------------------------------------------ */
.auth-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 36px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.auth-brand img { height: 44px; width: auto; }

/* Auth-page logo mark (login / register). Shows the real site logo; if the
   logo image is missing it gracefully falls back to the brand-gradient "M". */
.auth-logo-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  line-height: 64px;
  text-align: center;
  box-shadow: 0 12px 26px -8px rgba(124, 58, 237, .42);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-logo-mark .auth-logo-letter { display: inline-block; }
.auth-logo-mark .auth-logo-img {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-fit: contain;
  display: block;
}
.auth-logo-mark .auth-logo-img.is-broken { display: none; }

.auth-title { font-size: 24px; font-weight: 800; text-align: center; }
.auth-sub { font-size: 14px; color: var(--muted); text-align: center; margin: 4px 0 24px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--line-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.auth-tabs button {
  padding: 10px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.auth-tabs button.is-active {
  background: var(--brand);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.auth-alt {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 18px;
}

.auth-alt a { font-weight: 600; }

/* ---------------------------------------------------------------------------
   24. DASHBOARD (shared by customer + business layouts; admin uses admin.css)
   ------------------------------------------------------------------------ */
.dash-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-soft);
}

.dash-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  transition: transform 0.25s ease;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.dash-brand:hover { color: #ffffff; }
.dash-brand img { height: 30px; width: auto; }

.dash-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.dash-nav a,
.dash-nav .dash-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.16s ease;
}

.dash-nav a:hover,
.dash-nav .dash-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.dash-nav a.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.dash-nav svg { width: 18px; height: 18px; flex-shrink: 0; }

.dash-nav .nav-badge { position: static; margin-left: auto; }

.dash-section-label {
  display: block;
  padding: 16px 14px 7px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(255, 255, 255, 0.38);
}

.dash-sidebar-foot {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-sidebar-foot a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 500;
}

.dash-sidebar-foot a:hover { background: rgba(239, 68, 68, 0.16); color: #FCA5A5; }
.dash-sidebar-foot svg { width: 18px; height: 18px; }

.dash-main {
  flex: 1;
  margin-left: 250px;
  padding: 26px;
  min-width: 0;
}

.dash-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 65;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line-soft);
}

.dash-burger {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
}

.dash-burger svg { width: 20px; height: 20px; }

.dash-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 66;
  background: rgba(15, 23, 42, 0.5);
}

@media (max-width: 1023px) {
  /* Stack the topbar above the main content on mobile. The business
     dashboard renders .dash-topbar as a SIBLING of .dash-main (the customer
     dashboard puts it inside main); without column direction the two flex
     items sit side-by-side and the page breaks on phones. */
  .dash-layout { flex-direction: column; }
  .dash-main { margin-left: 0; padding: 18px 14px 88px; width: 100%; }
  .dash-topbar { display: flex; width: 100%; }
  .dash-sidebar { transform: translateX(-100%); }
  .dash-sidebar.open,
  .dash-layout.sidebar-open .dash-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .dash-sidebar.open + .dash-overlay,
  .dash-layout.sidebar-open .dash-overlay { display: block; }
}

/* extra-small phones: tighter dashboard padding so panels don't overflow */
@media (max-width: 480px) {
  .dash-main { padding: 14px 10px; }
  .dash-topbar { padding: 10px 12px; gap: 8px; }
  .biz-topbar-name { font-size: 14px; }
  .biz-page-head h1 { font-size: 20px; }
  .biz-panel { padding: 16px; }
  .biz-stat-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* stat cards */
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-value { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* data tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--ink-2);
  vertical-align: middle;
}

.data-table tbody tr { transition: background 0.14s ease; }
.data-table tbody tr:hover { background: #FAFAFC; }

.data-table-wrap {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow-x: auto;
}

/* status chips */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-chip.is-green { background: #ECFDF5; color: #059669; }
.status-chip.is-orange { background: #FFF7ED; color: #C2410C; }
.status-chip.is-red { background: #FEF2F2; color: #DC2626; }
.status-chip.is-purple { background: #F5F3FF; color: #6D28D9; }
.status-chip.is-gray { background: #F3F4F6; color: #4B5563; }
.status-chip.is-blue { background: #EFF6FF; color: #2563EB; }

/* filter bar for dashboard lists */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.filter-bar .form-control { width: auto; }
.filter-bar .spacer { flex: 1; }

/* ---------------------------------------------------------------------------
   25. SKELETONS + SPINNER
   ------------------------------------------------------------------------ */
.skeleton {
  background: linear-gradient(90deg, #F3F4F6 25%, #EBEDF2 37%, #F3F4F6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}

.sk-card { width: 210px; height: 260px; border-radius: var(--radius); }
.sk-line { height: 14px; border-radius: 7px; margin-bottom: 10px; }
.sk-avatar { width: 44px; height: 44px; border-radius: 50%; }
.sk-thumb { width: 40px; height: 40px; border-radius: 8px; }

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

/* ---------------------------------------------------------------------------
   26. ANIMATIONS
   ------------------------------------------------------------------------ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.anim-up { animation: fadeUp 0.5s ease both; }

.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.10s; }
.d3 { animation-delay: 0.15s; }
.d4 { animation-delay: 0.20s; }

@keyframes openPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

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

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------------
   27. UTILITIES
   ------------------------------------------------------------------------ */
.text-muted { color: var(--muted); }
.text-primary-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.w-100 { width: 100%; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* search/quiz page top spacing polish */
.page-head { margin-bottom: 24px; }

.page-head h1 { font-size: 24px; font-weight: 800; }
.page-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

/* star rating input (radio stars used by review forms) */
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }

.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.stars-input label {
  cursor: pointer;
  padding: 2px;
  color: #D1D5DB;
  transition: color 0.12s ease, transform 0.12s ease;
}

.stars-input label svg { width: 26px; height: 26px; display: block; }

.stars-input label:hover,
.stars-input label:hover ~ label,
.stars-input label.is-on,
.stars-input input:checked ~ label {
  color: var(--amber);
  fill: var(--amber);
}

.stars-input label:hover svg,
.stars-input label.is-on svg,
.stars-input input:checked ~ label svg { fill: var(--amber); }

/* ---------------------------------------------------------------------------
   28. FOUNDATION ALIGNMENT (classes emitted by layout/header.php + footer.php)
   ------------------------------------------------------------------------ */

/* flash messages: icon + message + close button, printed right after <body> */
.flash { display: flex; align-items: center; gap: 12px; }

.flash-icon { flex-shrink: 0; }
.flash-icon svg { width: 18px; height: 18px; }

.flash-msg { flex: 1; min-width: 0; font-weight: 600; }

.flash-close { flex-shrink: 0; }

body > .flash {
  width: calc(100% - 32px);
  max-width: 1248px;
  margin: 16px auto 0;
}

/* account dropdown greeting + logout row */
.account-head {
  padding: 10px 12px 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--faint);
}

.account-dropdown .dd-logout,
.account-dropdown a.dd-logout { color: #B91C1C; }
.account-dropdown .dd-logout:hover { background: var(--danger-bg); color: #B91C1C; }
.account-dropdown .dd-logout svg { color: #DC2626; }

/* footer classes used by layout/footer.php */
.footer-text {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
  max-width: 330px;
}

.footer-socials { display: flex; gap: 10px; margin-top: 18px; }

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #CBD5E1;
  transition: all 0.18s ease;
}

.footer-socials a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.footer-socials svg { width: 16px; height: 16px; }

.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 14px;
}

.footer-col a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.footer-col a:hover { color: #ffffff; }

.footer-col a svg {
  width: 15px;
  height: 15px;
  color: var(--brand-300);
  flex-shrink: 0;
}

.footer-contact-line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.footer-contact-line svg {
  width: 15px;
  height: 15px;
  color: var(--brand-300);
  flex-shrink: 0;
}

/* location modal form */
.loc-search-form .form-row { margin-top: 4px; }
.loc-search-form .btn { margin-top: 6px; }

/* ---------------------------------------------------------------------------
   WRITE A REVIEW PAGE (/write-review) — product · business · platform
   --------------------------------------------------------------------------- */
.section-narrow { max-width: 720px; margin: 0 auto; }

.wr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.wr-target {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.wr-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  flex-shrink: 0;
}

.wr-thumb-txt,
.wr-thumb-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--brand);
  background: #F3E8FF;
}

.wr-thumb-brand { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.wr-thumb-brand svg { width: 26px; height: 26px; }

.wr-kicker {
  margin: 0 0 2px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}

.wr-title {
  margin: 0;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--ink);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.wr-sub { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }

.wr-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px -14px rgba(30, 41, 59, .18);
  overflow: hidden;
}

.wr-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.wr-card-head h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wr-card-body { padding: 22px; }

.wr-card-body .stars-input { margin-top: 4px; }

.wr-center { text-align: center; padding: 36px 26px; }
.wr-center h2 { font-size: 20px; font-weight: 800; color: var(--ink); margin: 12px 0 8px; }
.wr-muted { font-size: 14px; line-height: 1.65; color: var(--muted); max-width: 460px; margin: 0 auto 18px; }
.wr-center .empty-icon { color: var(--success, #059669); }

.wr-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--pill);
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #047857;
  font-size: 12px;
  font-weight: 800;
}

.wr-chip svg { width: 13px; height: 13px; }

.wr-orderline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.wr-orderline svg { width: 15px; height: 15px; color: var(--brand); flex-shrink: 0; }

.wr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.wr-review-title { margin: 12px 0 6px; font-size: 16px; font-weight: 800; color: var(--ink); }
.wr-review-text { margin: 0; font-size: 14px; line-height: 1.65; color: var(--body, #475569); }

@media (max-width: 560px) {
  .wr-head { flex-direction: column; }
  .wr-card-body { padding: 18px 16px; }
}

/* testimonials — real platform review extras (v1.5) */
.t-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.t-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 10px 0 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #047857;
}

.t-verified svg { width: 13px; height: 13px; }
