:root {
  --bg: #F8F7F4;
  --surface: #FFFFFF;
  --surface-2: #F0EEE8;
  --ink: #1C1F23;
  --muted: #6B7280;
  --faint: #9AA1AB;
  --line: #E7E4DD;
  --accent: #D9622B;
  --accent-tint: #FBEDE4;
  --accent-ink: #B44A18;
  --olive: #1E9E62;
  --olive-tint: #E6F5EE;
  --danger: #C43D3D;
  --danger-tint: #FBEAEA;
  color-scheme: light;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: "Plus Jakarta Sans", "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Plus Jakarta Sans", "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html[lang="ar"] {
  --font-display: "Cairo", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-sans: "Cairo", "Plus Jakarta Sans", system-ui, sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12110F;
  --surface: #1B1A17;
  --surface-2: #24221E;
  --ink: #ECEEF1;
  --muted: #9CA3AE;
  --faint: #6B7280;
  --line: #2E2B26;
  --accent: #EF7B41;
  --accent-tint: #3A241A;
  --accent-ink: #FFB08A;
  --olive: #34C77B;
  --olive-tint: #143024;
  --danger: #E36A6A;
  --danger-tint: #381D1D;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; color: var(--ink); }

/* Header */
.site-header {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  background: var(--surface); position: sticky; top: 0; z-index: 500;
  direction: ltr;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.logo { font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.logo-accent { color: var(--accent); }
.tagline { font-family: var(--font-display); font-style: italic; font-size: 13px; color: var(--muted); margin-top: 2px; }
.search { flex: 1; }
.search input {
  width: 100%; padding: 10px 16px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 14px; background: var(--bg); color: var(--ink);
  font-family: var(--font-sans);
}
.search input::placeholder { color: var(--faint); }
.lang { display: flex; gap: 4px; margin: 0; }
.lang form { margin: 0; display: flex; }
.lang button {
  font-family: var(--font-sans); font-size: 13px; padding: 5px 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; color: var(--muted);
}
.lang button.active { color: var(--ink); border-color: var(--ink); }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color .15s, border-color .15s; }
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: block; }
html[data-theme="dark"] .theme-toggle .moon { display: none; }

.nav-cart, .nav-sell { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 14px; font-weight: 500; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; transition: color .15s, border-color .15s; }
.nav-cart i, .nav-sell i { font-size: 18px; color: var(--accent); }
.nav-cart:hover, .nav-sell:hover { border-color: var(--accent); color: var(--accent); }
.cart-badge {
  position: absolute; top: -7px; inset-inline-end: -7px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}

.container { max-width: 1040px; margin: 0 auto; padding: 24px 22px; }
.eyebrow { font-size: 12px; letter-spacing: .12em; color: var(--faint); text-transform: uppercase; margin-bottom: 12px; }
.page-title { font-size: 28px; margin: 4px 0 18px; }
.back { font-size: 13px; color: var(--muted); }
html[dir="rtl"] .back i { display: inline-block; transform: scaleX(-1); }

/* Flash messages */
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.flash { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; }
.flash a { text-decoration: underline; }
.flash-success { color: var(--olive); background: var(--olive-tint); }
.flash-warning { color: var(--accent-ink); background: var(--accent-tint); }
.flash-error { color: var(--danger); background: var(--danger-tint); }

/* Featured — fixed-ratio scrollable strip (same pattern as RestoCaffé deals) */
.deals { margin-bottom: 30px; }
.deal-strip {
  display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth; direction: ltr; cursor: grab;
  scrollbar-width: none; -ms-overflow-style: none;
}
.deal-strip::-webkit-scrollbar { display: none; }
.deal-strip.dragging { cursor: grabbing; user-select: none; }
.deal-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.deal-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background .2s, width .2s; }
.deal-dots button:hover { background: var(--muted); }
.deal-dots button[aria-current="true"] { background: var(--accent); width: 26px; }
.deal {
  position: relative; flex: 0 0 calc(100% - 112px); scroll-snap-align: center;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.deal img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.deal:only-child { flex: 0 0 100%; }
.deal-tag {
  position: absolute; top: 10px; inset-inline-start: 10px;
  font-size: 11px; background: var(--surface); color: var(--muted);
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
}

/* Filters */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.filters select {
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; background: var(--surface); color: var(--ink); font-family: var(--font-sans); cursor: pointer;
}
.open-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); padding: 9px 4px; }
.clear-filters { font-size: 13px; color: var(--accent); }

/* Product grid */
.product-results { margin-bottom: 34px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.product-card:hover { border-color: var(--accent); }
.product-photo { display: block; position: relative; }
.product-photo img, .product-card > span.product-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; background: var(--surface-2); color: var(--faint); }
.photo-placeholder i { font-size: 34px; }
.product-info { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; flex: 1; }
.product-name { font-weight: 600; font-size: 15px; line-height: 1.35; }
.product-shop { font-size: 12px; color: var(--faint); }
.product-shop:hover { color: var(--accent); }
.product-desc { font-size: 12px; color: var(--muted); }
.product-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.product-price { font-weight: 700; color: var(--accent-ink); font-size: 15px; white-space: nowrap; }
.btn-add {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--accent); color: #fff; border: none; border-radius: 999px;
  padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.btn-add:hover { filter: brightness(.95); }

/* Unavailable products: shown to buyers, greyed out, not orderable */
.product-card.is-unavailable { opacity: .9; }
.product-card.is-unavailable:hover { border-color: var(--line); }
.product-card.is-unavailable .product-photo img,
.product-card.is-unavailable .photo-placeholder { filter: grayscale(1); opacity: .55; }
.product-card.is-unavailable .product-price { color: var(--muted); }
.sold-out {
  position: absolute; top: 8px; inset-inline-start: 8px;
  background: rgba(0, 0, 0, .66); color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
}
.unavailable-tag {
  font-size: 12px; font-weight: 500; color: var(--muted);
  background: var(--surface-2); border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}

/* Shop cards */
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Home: list + map side by side (desktop); toggled on narrow screens */
.results { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: start; }
.results .shop-list { grid-template-columns: 1fr; }
.map { height: 520px; border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 92px; overflow: hidden; }
/* top: auto — .map's sticky offset (top: 92px) must not shift this one, Leaflet makes it position: relative */
.shop-map { position: static; top: auto; height: 200px; max-width: 420px; margin-top: 16px; isolation: isolate; }
.pin-map { height: 280px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; isolation: isolate; }
.pin-remove { align-self: flex-start; margin-top: 8px; background: var(--surface); color: var(--accent-ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-size: 13px; font-family: var(--font-sans); cursor: pointer; }
.pin-remove:hover { border-color: var(--accent); }
.leaflet-container { direction: ltr; }
html[data-theme="dark"] .leaflet-tile-pane { filter: grayscale(1) invert(1) brightness(0.90) contrast(0.9); }
.leaflet-div-icon.dk-pin { background: transparent; border: 0; }
.dk-pin span {
  display: block; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}

/* Home list / map view toggle (shown on narrow screens) */
.view-switch { display: none; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.vs-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--muted); background: var(--surface); border: 0; cursor: pointer; font-family: var(--font-sans); }
.vs-btn + .vs-btn { border-inline-start: 1px solid var(--line); }
.vs-btn i { font-size: 17px; }
.vs-btn.is-active { background: var(--accent); color: #fff; }
.shop-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s; }
.shop-card:hover { border-color: var(--accent); }
.shop-logo { flex: 0 0 64px; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.shop-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-logo .photo-placeholder { aspect-ratio: auto; height: 100%; }
.shop-logo .photo-placeholder i { font-size: 26px; }
.shop-card-body { flex: 1; min-width: 0; position: relative; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.shop-card .name, .cart-group-head .name { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.shop-card .name::after { content: ""; position: absolute; inset: -16px -18px; border-radius: var(--radius); }
.shop-desc { font-size: 13px; color: var(--muted); margin: 5px 0 0; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.meta { font-size: 13px; color: var(--faint); }
.links { display: flex; gap: 12px; font-size: 16px; color: var(--muted); }
.links .ti-brand-whatsapp { color: #25D366; }
.links .ti-brand-instagram { color: #E4405F; }
.links .ti-brand-facebook { color: #1877F2; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge-delivery { color: var(--accent-ink); background: var(--accent-tint); display: inline-flex; align-items: center; gap: 4px; }
.empty { color: var(--muted); padding: 24px 0; list-style: none; }

/* Shop page */
.shop-header { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.shop-header-row { display: flex; gap: 20px; margin-top: 12px; align-items: flex-start; }
/* The text column fills the remaining width so the map (and layout) don't
   shrink when a shop has a short name/description. */
.shop-header-row > div:last-child { flex: 1; min-width: 0; }
.shop-logo-lg { flex: 0 0 96px; width: 96px; height: 96px; }
.shop-header h1 { font-size: 30px; margin: 0; line-height: 1.1; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.bio { font-family: var(--font-display); font-style: italic; font-size: 16px; color: var(--muted); max-width: 56ch; margin: 12px 0 0; line-height: 1.5; }
.address { font-size: 13px; color: var(--faint); margin: 8px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.chip { font-size: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; background: var(--surface); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-danger:hover { border-color: var(--danger); color: var(--danger); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; transition: color .15s, border-color .15s; }
.icon-btn i { font-size: 20px; line-height: 1; }
.icon-btn.wa { color: #25D366; }
.icon-btn.wa:hover { border-color: #25D366; }
.icon-btn.ig:hover { border-color: #DD2A7B; }
.icon-btn.fb { color: #1877F2; }
.icon-btn.fb:hover { border-color: #1877F2; }
.shop-section { margin-bottom: 30px; }
.shop-section h2 { font-size: 20px; margin: 0 0 12px; }

/* Draft workspace bar (dashboard) */
.draft-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent-tint); color: var(--accent-ink);
  border: 1px dashed var(--accent); border-radius: var(--radius);
  padding: 14px 18px; margin: 0 0 20px; font-size: 14px;
}
.draft-bar > span { display: inline-flex; align-items: center; gap: 8px; }
.draft-bar i { font-size: 18px; }
.draft-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.draft-actions form { margin: 0; }
.draft-actions .cta { margin: 0; border: 0; cursor: pointer; font-family: var(--font-sans); display: inline-flex; align-items: center; gap: 6px; }
.draft-discard { background: none; border: none; color: var(--muted); font-size: 13px; font-family: var(--font-sans); cursor: pointer; text-decoration: underline; padding: 6px; }
.draft-discard:hover { color: var(--accent-ink); }

/* "Near me" location button (home filters) */
.near-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; background: var(--surface); color: var(--ink);
  font-family: var(--font-sans); cursor: pointer;
}
.near-btn:hover { border-color: var(--accent); }
.near-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.near-btn.is-active i { color: #fff; }
.near-btn.is-loading { opacity: .6; pointer-events: none; }
.near-msg { font-size: 13px; color: var(--accent); align-self: center; }

/* Report a problem (shop page) */
.report { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 18px; max-width: 520px; }
.report summary { cursor: pointer; color: var(--faint); font-size: 13px; display: inline-flex; align-items: center; gap: 7px; list-style: none; }
.report summary::-webkit-details-marker { display: none; }
.report summary:hover { color: var(--accent); }
.report form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.report select, .report textarea { font-family: var(--font-sans); font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); width: 100%; }
.report textarea { min-height: 84px; resize: vertical; }
.report button { align-self: flex-start; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 9px 20px; font-size: 14px; font-family: var(--font-sans); cursor: pointer; transition: opacity .15s; }
.report button:hover { opacity: .9; }
.report .hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.report-thanks { color: var(--olive); background: var(--olive-tint); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; margin: 36px 0 0; max-width: 520px; }

/* Cart */
.cart-hint { color: var(--muted); font-size: 14px; max-width: 62ch; margin: 0 0 20px; }
.cart-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.cart-group-head { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cart-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.cart-thumb { flex: 0 0 52px; width: 52px; height: 52px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-thumb .photo-placeholder { aspect-ratio: auto; height: 100%; }
.cart-thumb .photo-placeholder i { font-size: 22px; }
.cart-row-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cart-row-name span { font-weight: 500; }
.cart-row-name small { color: var(--muted); font-size: 13px; }
.cart-line-total { font-weight: 600; white-space: nowrap; min-width: 72px; text-align: end; }
.stepper { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; margin: 0; }
.stepper button { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 8px; font-size: 18px; line-height: 1; cursor: pointer; }
.stepper button:hover { border-color: var(--accent); }
.stepper .qty { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.cart-group-foot { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.cart-group-foot form { margin: 0; }
.cart-clear { background: none; border: none; color: var(--faint); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.cart-clear:hover { color: var(--danger); }
.order-total { font-weight: 600; margin-inline-start: auto; }
.order-send { display: inline-flex; align-items: center; gap: 6px; background: #25D366; color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px 16px; font: inherit; font-weight: 500; cursor: pointer; }
.order-send:hover { filter: brightness(.95); }
.order-send i { font-size: 18px; }

/* Static pages + forms */
.page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 34px; max-width: 720px; }
.page h1 { font-size: 28px; margin: 0 0 16px; }
.page p { color: var(--muted); line-height: 1.7; margin: 0 0 14px; max-width: 62ch; }
.page p:last-child { margin-bottom: 0; }
.page .steps { color: var(--muted); line-height: 1.9; margin: 0 0 14px; padding-inline-start: 20px; }
.page h2 { font-size: 18px; margin: 22px 0 8px; }
.page-list { color: var(--muted); line-height: 1.8; margin: 0 0 14px; padding-inline-start: 20px; }
.page-list li { margin-bottom: 4px; }
.cta { display: inline-block; margin-top: 10px; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 11px 22px; font-size: 14px; font-family: var(--font-sans); cursor: pointer; transition: opacity .15s; }
.cta:hover { opacity: .9; }
.cta-danger { background: var(--danger); }
.fineprint { font-size: 13px; color: var(--faint); margin-top: 16px; }
.fineprint a { color: var(--accent); }
.confirm-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.form-error { color: var(--danger); background: var(--danger-tint); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }

.submit-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; max-width: 520px; }
.submit-form .field { display: flex; flex-direction: column; gap: 6px; }
.submit-form .field span { font-size: 13px; color: var(--muted); }
.submit-form .field .help { font-size: 12px; color: var(--faint); }
.submit-form .field.has-error input, .submit-form .field.has-error textarea { border-color: var(--danger); }
.submit-form .errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: 13px; }
.submit-form input, .submit-form textarea, .submit-form select {
  font-family: var(--font-sans); font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); width: 100%;
}
.submit-form input[type="checkbox"] { width: auto; }

/* Checkbox fields render as toggle switches (label beside the switch) */
.submit-form .field-toggle {
  flex-direction: row; align-items: center; gap: 12px; cursor: pointer;
}
.submit-form .field-toggle input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  position: relative; flex-shrink: 0; margin: 0; padding: 0;
  width: 44px; height: 24px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: background .18s, border-color .18s;
}
.submit-form .field-toggle input[type="checkbox"]::before {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
  transition: transform .18s;
}
.submit-form .field-toggle input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}
.submit-form .field-toggle input[type="checkbox"]:checked::before { transform: translateX(20px); }
html[dir="rtl"] .submit-form .field-toggle input[type="checkbox"]:checked::before { transform: translateX(-20px); }
.submit-form .field-toggle input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.submit-form .field-toggle .toggle-text { display: flex; flex-direction: column; gap: 1px; }
.submit-form .field-toggle .toggle-label { font-size: 14px; color: var(--ink); font-weight: 500; }
.submit-form .field-toggle .help { margin: 0; }
.submit-form input[type="file"] { padding: 8px; font-size: 13px; }
.submit-form input:focus, .submit-form textarea:focus, .submit-form select:focus { outline: none; border-color: var(--accent); }
.submit-form textarea { min-height: 84px; resize: vertical; }
.submit-form input::placeholder, .submit-form textarea::placeholder { color: var(--faint); }
.submit-form > button { align-self: flex-start; margin-top: 4px; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 11px 24px; font-size: 14px; font-family: var(--font-sans); cursor: pointer; transition: opacity .15s; }
.submit-form > button:hover { opacity: .9; }
.auth-page { max-width: 460px; }
.dash-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; max-width: 620px; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 18px; }
.dash-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: border-color .15s; }
.dash-card:hover { border-color: var(--accent); }
.dash-card i { font-size: 26px; color: var(--accent); }
.dash-card strong { font-family: var(--font-display); font-size: 18px; }
.dash-card span { font-size: 13px; color: var(--muted); }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list-head .page-title { margin-bottom: 8px; }
.list-head-side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.quota { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 6px 14px; }
.quota-full { color: var(--accent-ink); background: var(--accent-tint); }
.dash-products { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.dash-product-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.dash-product-row.is-off { opacity: .55; }
.row-actions { display: flex; gap: 8px; }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: center; align-items: center; padding: 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); margin-top: 40px; }
.footer-logout { margin: 0; }
.footer-logout button { background: none; border: none; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.footer-logout button:hover { color: var(--accent); }

@media (max-width: 760px) {
  .shop-list { grid-template-columns: 1fr; }
  .results { grid-template-columns: 1fr; gap: 22px; }
  .results .map { position: static; height: 320px; }
  .view-switch { display: inline-flex; }
  .results.view-list .map { display: none; }
  .results.view-map .shop-list { display: none; }
  .results.view-map .map { height: 72vh; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .deal-strip { gap: 10px; }
  .deal { flex: 0 0 calc(100% - 60px); }
  .site-header { gap: 10px; padding: 14px 16px; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
  .container { padding: 20px 16px; }
  .tagline { display: none; }
  .nav-cart { margin-left: auto; }
  .nav-cart .nav-label, .nav-sell .nav-label { display: none; }
  .nav-cart, .nav-sell { padding: 0; width: 38px; height: 38px; justify-content: center; border-radius: 50%; }
  .shop-header-row { gap: 14px; }
  .shop-logo-lg { flex-basis: 72px; width: 72px; height: 72px; }
  .cart-row { flex-wrap: wrap; }
  .cart-line-total { min-width: 0; }
  .cart-group-foot { flex-wrap: wrap; }
  .dash-product-row { flex-wrap: wrap; }
}
