/* ============================================================
   Stockat storefront design system
   RTL-first via CSS logical properties; direction comes from
   <html dir="..."> so ar/en/zh all share one stylesheet.
   ============================================================ */

:root {
  /* palette */
  --c-primary: #0e4f55;        /* deep teal — matches app brand */
  --c-primary-700: #0a3d42;
  --c-primary-100: #d7e8e9;
  --c-primary-050: #eef5f5;
  --c-accent: #f59e0b;         /* amber — CTAs & featured */
  --c-accent-700: #b45309;
  --c-accent-050: #fef3e2;
  --c-ink: #13272b;
  --c-muted: #5b7075;
  --c-bg: #f5f7f7;
  --c-surface: #ffffff;
  --c-line: #e2eaea;
  --c-success: #16a34a;
  --c-success-050: #ecfdf3;
  --c-danger: #dc2626;
  --c-danger-050: #fef2f2;
  --c-whatsapp: #25d366;
  --c-whatsapp-700: #128c7e;

  /* shape & elevation */
  --r-card: 16px;
  --r-pill: 999px;
  --shadow-1: 0 1px 3px rgba(16, 39, 43, 0.07);
  --shadow-2: 0 8px 24px rgba(16, 39, 43, 0.11);
  --shadow-3: 0 16px 40px rgba(16, 39, 43, 0.16);

  --font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Inter", "Segoe UI", Roboto, sans-serif;
  --header-h: 68px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.store-body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-en);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
html[lang="ar"] body.store-body { font-family: var(--font-ar); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .35em; line-height: 1.3; font-weight: 800; }
p { margin: 0 0 .8em; }
main.store-main { flex: 1; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: var(--r-pill);
  padding: 10px 22px; font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-700); }
.btn--accent { background: var(--c-accent); color: #fff; }
.btn--accent:hover { background: var(--c-accent-700); }
.btn--outline { border-color: var(--c-primary); color: var(--c-primary); background: transparent; }
.btn--outline:hover { background: var(--c-primary-050); box-shadow: none; }
.btn--whatsapp { background: var(--c-whatsapp); color: #fff; }
.btn--whatsapp:hover { background: var(--c-whatsapp-700); }
.btn--ghost { color: var(--c-primary); background: transparent; padding-inline: 12px; }
.btn--ghost:hover { background: var(--c-primary-050); box-shadow: none; transform: none; }
.btn--lg { padding: 14px 30px; font-size: 1.05em; }
.btn--block { width: 100%; }
.btn svg { flex: none; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--r-pill); padding: 3px 11px;
  font-size: .78em; font-weight: 700; line-height: 1.7;
  background: var(--c-primary-050); color: var(--c-primary);
}
.badge--featured { background: var(--c-accent); color: #fff; }
.badge--success { background: var(--c-success-050); color: var(--c-success); }
.badge--danger { background: var(--c-danger-050); color: var(--c-danger); }
.badge--warn { background: var(--c-accent-050); color: var(--c-accent-700); }
.badge--verified { background: var(--c-primary); color: #fff; }
.badge--muted { background: #eef1f2; color: var(--c-muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 18px;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.22em; color: var(--c-primary); }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c-primary), #1a7a83);
  color: #fff; font-size: 1.05em; box-shadow: var(--shadow-1);
}
.brand__tag { display: block; font-size: .58em; font-weight: 600; color: var(--c-muted); line-height: 1.2; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 8px; }
.site-nav a {
  padding: 8px 14px; border-radius: var(--r-pill); font-weight: 700; color: var(--c-ink);
  transition: background .15s ease, color .15s ease;
}
.site-nav a:hover { background: var(--c-primary-050); color: var(--c-primary); }
.site-nav a.is-active { background: var(--c-primary); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.lang-switch {
  border: 1.5px solid var(--c-line); background: var(--c-surface);
  border-radius: var(--r-pill); padding: 7px 16px; font: inherit; font-weight: 700;
  color: var(--c-primary); cursor: pointer; transition: border-color .15s ease;
}
.lang-switch:hover { border-color: var(--c-primary); }

.menu-toggle {
  display: none; border: 0; background: transparent; cursor: pointer; padding: 8px;
  color: var(--c-primary);
}

/* header search */
.header-search { flex: 1; max-width: 430px; display: flex; }
.header-search input {
  flex: 1; border: 1.5px solid var(--c-line); border-inline-end: 0;
  border-start-start-radius: var(--r-pill); border-end-start-radius: var(--r-pill);
  padding: 9px 18px; font: inherit; background: var(--c-bg); min-width: 0;
}
.header-search input:focus { outline: none; border-color: var(--c-primary); background: #fff; }
.header-search button {
  border: 0; background: var(--c-primary); color: #fff; cursor: pointer;
  padding-inline: 18px; font-weight: 700;
  border-start-end-radius: var(--r-pill); border-end-end-radius: var(--r-pill);
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hero__track::-webkit-scrollbar { display: none; }
.hero__slide {
  min-width: 100%; scroll-snap-align: start;
  color: #fff; padding-block: 64px 76px;
  background: linear-gradient(120deg, var(--c-primary), #14666e 55%, #1a7a83);
}
.hero__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.hero__title { font-size: clamp(1.7em, 4vw, 2.6em); color: #fff; }
.hero__subtitle { font-size: 1.12em; color: rgba(255, 255, 255, .82); max-width: 34em; }
.hero__image { border-radius: var(--r-card); box-shadow: var(--shadow-3); object-fit: cover; aspect-ratio: 16/10; width: 100%; }
.hero__dots {
  position: absolute; inset-block-end: 18px; inset-inline: 0;
  display: flex; justify-content: center; gap: 8px;
}
.hero__dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .45); transition: transform .15s ease, background .15s ease;
}
.hero__dots button.is-active { background: #fff; transform: scale(1.25); }

/* trust stats strip */
.stats-strip { margin-block-start: -34px; position: relative; z-index: 5; }
.stats-strip__inner {
  background: var(--c-surface); border-radius: var(--r-card); box-shadow: var(--shadow-2);
  display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden;
}
.stat { text-align: center; padding: 20px 12px; border-inline-start: 1px solid var(--c-line); }
.stat:first-child { border-inline-start: 0; }
.stat__num { font-size: 1.7em; font-weight: 800; color: var(--c-primary); line-height: 1.2; }
.stat__label { color: var(--c-muted); font-weight: 600; font-size: .92em; }

/* ---------- sections ---------- */
.section { padding-block: 44px 10px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-block-end: 22px; }
.section-head__title { font-size: 1.5em; }
.section-head__title .accent-bar {
  display: inline-block; width: 34px; height: 5px; border-radius: 3px;
  background: var(--c-accent); margin-inline-end: 10px; vertical-align: middle;
}
.section-head__sub { color: var(--c-muted); margin: 0; }
.section-head__link { font-weight: 700; color: var(--c-primary); white-space: nowrap; }
.section-head__link:hover { text-decoration: underline; }

/* ---------- categories row ---------- */
.cat-row {
  display: flex; gap: 18px; overflow-x: auto; padding-block: 6px 14px;
  scrollbar-width: thin;
}
.cat-chip { flex: none; width: 106px; text-align: center; }
.cat-chip__img {
  width: 88px; height: 88px; margin-inline: auto; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--c-surface); box-shadow: var(--shadow-1);
  background: var(--c-primary-050);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: grid; place-items: center; font-size: 1.6em; color: var(--c-primary);
}
.cat-chip:hover .cat-chip__img { transform: translateY(-4px) scale(1.04); box-shadow: var(--shadow-2); border-color: var(--c-accent); }
.cat-chip__label { display: block; margin-block-start: 9px; font-weight: 700; font-size: .9em; }

/* ---------- product grid & card ---------- */
.grid-products {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
}
.p-card {
  background: var(--c-surface); border-radius: var(--r-card); overflow: hidden;
  border: 1px solid var(--c-line); box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.p-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.p-card__media { position: relative; aspect-ratio: 4/3; background: var(--c-primary-050); overflow: hidden; }
.p-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.p-card:hover .p-card__media img { transform: scale(1.05); }
.p-card__media--empty { display: grid; place-items: center; color: var(--c-primary); font-size: 2.2em; opacity: .45; }
.p-card__badges {
  position: absolute; inset-block-start: 10px; inset-inline-start: 10px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.p-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.p-card__cat { font-size: .8em; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .02em; }
.p-card__title {
  font-weight: 800; font-size: 1.02em; line-height: 1.45; margin: 0; min-height: 2.9em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-card__price-row { display: flex; align-items: baseline; gap: 6px; }
.p-card__price { font-size: 1.2em; font-weight: 800; color: var(--c-primary); }
.p-card__price--ask { font-size: .98em; color: var(--c-accent-700); }
.p-card__unit { color: var(--c-muted); font-size: .85em; }
.p-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-block-start: auto;
  padding-block-start: 9px; border-block-start: 1px dashed var(--c-line);
  color: var(--c-muted); font-size: .86em; font-weight: 600;
}
.p-card__meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- factory card ---------- */
.grid-factories { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.f-card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
  overflow: hidden; box-shadow: var(--shadow-1); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.f-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.f-card__cover { aspect-ratio: 16/7; background: linear-gradient(120deg, var(--c-primary-100), var(--c-primary-050)); position: relative; }
.f-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.f-card__code {
  position: absolute; inset-block-end: -20px; inset-inline-start: 18px;
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--c-primary); color: #fff; font-weight: 800; font-size: .74em;
  border: 3px solid var(--c-surface); box-shadow: var(--shadow-1); text-align: center; line-height: 1.15;
}
.f-card__body { padding: 30px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.f-card__title { font-weight: 800; font-size: 1.05em; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.f-card__region { color: var(--c-muted); font-weight: 600; font-size: .9em; }
.f-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: auto; }

/* ---------- CTA band ---------- */
.cta-band {
  margin-block: 54px 0;
  background:
    radial-gradient(1200px 300px at 85% -60%, rgba(245, 158, 11, .35), transparent),
    linear-gradient(120deg, var(--c-primary-700), var(--c-primary));
  color: #fff; border-radius: 22px; padding: 44px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: 1.6em; }
.cta-band p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 40em; }

/* ---------- listing page ---------- */
.page-band {
  background: linear-gradient(120deg, var(--c-primary), #15707a);
  color: #fff; padding-block: 34px;
}
.page-band h1 { color: #fff; font-size: 1.7em; margin: 0 0 4px; }
.page-band p { color: rgba(255, 255, 255, .8); margin: 0; }
.breadcrumbs { font-size: .88em; color: rgba(255, 255, 255, .75); margin-block-end: 10px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.breadcrumbs .sep { opacity: .6; }

.listing { display: grid; grid-template-columns: 272px 1fr; gap: 26px; padding-block: 28px 50px; align-items: start; }
.listing > * { min-width: 0; }

/* mobile filter-drawer backdrop: fixed at all sizes so it never occupies a
   grid cell inside .listing (it sits between the sidebar and the results) */
.drawer-backdrop {
	position: fixed; inset: 0; background: rgba(16, 39, 43, .45); z-index: 75;
	opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.drawer-backdrop.is-visible { opacity: 1; pointer-events: auto; }

.filters-card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
  padding: 20px; box-shadow: var(--shadow-1); position: sticky; top: calc(var(--header-h) + 14px);
}
.filters-card h3 { font-size: 1.06em; display: flex; justify-content: space-between; align-items: center; }
.filters-card h3 a { font-size: .82em; color: var(--c-danger); font-weight: 700; }
.field { margin-block-end: 15px; }
.field label { display: block; font-weight: 700; font-size: .88em; margin-block-end: 6px; color: var(--c-ink); }
.field select, .field input[type="text"], .field input[type="number"], .field input[type="search"] {
  width: 100%; border: 1.5px solid var(--c-line); border-radius: 11px; padding: 9px 12px;
  font: inherit; background: var(--c-bg); color: var(--c-ink);
}
.field select:focus, .field input:focus { outline: none; border-color: var(--c-primary); background: #fff; }
.field--row { display: flex; gap: 10px; }
.field--row > * { flex: 1; }
.field--check { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: .92em; cursor: pointer; }
.field--check input { width: 17px; height: 17px; accent-color: var(--c-accent); }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-block-end: 18px; flex-wrap: wrap;
}
.toolbar__count { color: var(--c-muted); font-weight: 700; }
.toolbar__count strong { color: var(--c-primary); }
.toolbar__sort { display: flex; align-items: center; gap: 9px; }
.toolbar__sort select {
  border: 1.5px solid var(--c-line); border-radius: var(--r-pill); padding: 7px 14px;
  font: inherit; font-weight: 700; background: var(--c-surface); color: var(--c-primary); cursor: pointer;
}

.filters-toggle { display: none; }

/* pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; margin-block: 34px 8px; flex-wrap: wrap; }
.pagination a, .pagination span.current {
  min-width: 40px; height: 40px; padding-inline: 12px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-surface); border: 1.5px solid var(--c-line); font-weight: 700;
}
.pagination a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pagination span.current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pagination .gap { color: var(--c-muted); }

/* empty state */
.empty-state {
  text-align: center; padding: 70px 20px; background: var(--c-surface);
  border: 1.5px dashed var(--c-line); border-radius: var(--r-card);
}
.empty-state__icon { font-size: 3em; margin-block-end: 10px; }
.empty-state h3 { color: var(--c-ink); }
.empty-state p { color: var(--c-muted); }

/* ---------- product detail ---------- */
.pd { padding-block: 26px 50px; }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 30px; align-items: start; }

.gallery__main {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
  overflow: hidden; aspect-ratio: 1/1; display: grid; place-items: center; box-shadow: var(--shadow-1);
}
.gallery__main img, .gallery__main video { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 10px; margin-block-start: 12px; overflow-x: auto; padding-block-end: 4px; }
.gallery__thumb {
  flex: none; width: 76px; height: 76px; border-radius: 12px; overflow: hidden;
  border: 2px solid var(--c-line); cursor: pointer; background: var(--c-surface);
  position: relative; padding: 0;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--c-accent); }
.gallery__thumb--video::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; background: rgba(16, 39, 43, .45); font-size: 1.2em;
}

.buy-panel {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
  padding: 26px; box-shadow: var(--shadow-1); position: sticky; top: calc(var(--header-h) + 14px);
}
.buy-panel__badges { display: flex; flex-wrap: wrap; gap: 7px; margin-block-end: 12px; }
.buy-panel__title { font-size: 1.45em; line-height: 1.4; }
.buy-panel__cat { color: var(--c-muted); font-weight: 700; margin-block-end: 14px; }
.buy-panel__price { font-size: 2em; font-weight: 800; color: var(--c-primary); line-height: 1.2; }
.buy-panel__price small { font-size: .5em; color: var(--c-muted); font-weight: 700; }
.buy-panel__price-note { color: var(--c-muted); font-size: .9em; }
.validity {
  display: inline-flex; align-items: center; gap: 7px; margin-block: 10px 4px;
  border-radius: var(--r-pill); padding: 5px 14px; font-weight: 700; font-size: .88em;
  background: var(--c-accent-050); color: var(--c-accent-700);
}
.validity--expired { background: var(--c-danger-050); color: var(--c-danger); }

.info-rows { margin-block: 18px; border-block-start: 1px solid var(--c-line); }
.info-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding-block: 10px; border-block-end: 1px solid var(--c-line); font-size: .95em;
}
.info-row dt { color: var(--c-muted); font-weight: 600; }
.info-row dd { margin: 0; font-weight: 800; text-align: end; }

.buy-panel__actions { display: flex; flex-direction: column; gap: 10px; margin-block-start: 18px; }
.trust-line {
  display: flex; align-items: center; gap: 8px; margin-block-start: 14px;
  color: var(--c-muted); font-size: .88em; font-weight: 600;
}

.prose {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
  padding: 26px; margin-block-start: 26px; box-shadow: var(--shadow-1);
}
.prose h2 { font-size: 1.2em; padding-block-end: 12px; border-block-end: 1px solid var(--c-line); margin-block-end: 14px; }
.prose img { border-radius: 10px; }

/* ---------- factory profile ---------- */
.factory-hero {
	position: relative; border-radius: var(--r-card); overflow: hidden;
	background: linear-gradient(120deg, var(--c-primary-700), var(--c-primary));
	min-height: 240px; margin-block-start: 26px;
}
.factory-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.factory-hero__scrim {
	position: absolute; inset: 0;
	background: linear-gradient(0deg, rgba(10, 61, 66, .88) 0%, rgba(10, 61, 66, .15) 60%);
}
.factory-hero__content {
	position: relative; z-index: 2; color: #fff; padding: 26px;
	display: flex; align-items: end; gap: 18px; min-height: 240px; flex-wrap: wrap;
}
.factory-hero__code {
	width: 76px; height: 76px; border-radius: 18px; flex: none;
	display: grid; place-items: center; text-align: center; line-height: 1.15;
	background: #fff; color: var(--c-primary); font-weight: 800; font-size: .82em;
	box-shadow: var(--shadow-2);
}
.factory-hero__title { color: #fff; font-size: 1.5em; margin: 0; }
.factory-hero__meta { color: rgba(255, 255, 255, .85); font-weight: 600; display: flex; gap: 16px; flex-wrap: wrap; }
.factory-hero__badges { display: flex; gap: 7px; flex-wrap: wrap; margin-block-start: 6px; }

.identity-note {
	display: flex; align-items: center; gap: 10px; margin-block-start: 14px;
	background: var(--c-primary-050); border: 1px dashed var(--c-primary-100);
	border-radius: 12px; padding: 11px 16px; color: var(--c-primary);
	font-weight: 600; font-size: .92em;
}

/* category page header image */
.cat-hero { display: flex; align-items: center; gap: 16px; }
.cat-hero__img {
	width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none;
	border: 2px solid rgba(255, 255, 255, .5); box-shadow: var(--shadow-1);
}

/* ---------- footer ---------- */
.site-footer { background: var(--c-primary-700); color: rgba(255, 255, 255, .82); margin-block-start: 60px; }
.site-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 34px; padding-block: 46px 30px;
}
.site-footer h4 { color: #fff; margin-block-end: 14px; font-size: 1.02em; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer__brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.2em; margin-block-end: 12px; }
.site-footer__bottom {
  border-block-start: 1px solid rgba(255, 255, 255, .14);
  padding-block: 16px; font-size: .88em; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.footer-contact li { display: flex; gap: 9px; align-items: start; }

/* WhatsApp float */
.wa-float {
  position: fixed; inset-block-end: 22px; inset-inline-end: 22px; z-index: 70;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-whatsapp); color: #fff; box-shadow: var(--shadow-3);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.08); }

.muted { color: var(--c-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* toast */
.toast {
  position: fixed; inset-block-end: 90px; inset-inline: 0; margin-inline: auto; width: fit-content;
  background: var(--c-ink); color: #fff; padding: 10px 22px; border-radius: var(--r-pill);
  font-weight: 700; z-index: 90; opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* skeleton (for future JS-driven loads) */
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton {
  background: linear-gradient(90deg, #eef1f2 25%, #f7f9f9 50%, #eef1f2 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px;
}

/* ---------- forms / auth ---------- */
.form-card {
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
	box-shadow: var(--shadow-1); padding: 30px; max-width: 560px; margin-inline: auto;
}
.form-card h2 { font-size: 1.3em; }
.form-card .form-sub { color: var(--c-muted); margin-block-end: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .field--full { grid-column: 1 / -1; }
.field textarea {
	width: 100%; border: 1.5px solid var(--c-line); border-radius: 11px; padding: 10px 12px;
	font: inherit; background: var(--c-bg); color: var(--c-ink); min-height: 110px; resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--c-primary); background: #fff; }
.otp-input {
	letter-spacing: .55em; text-align: center; font-size: 1.4em !important; font-weight: 800;
	direction: ltr;
}
.auth-step { display: none; }
.auth-step.is-active { display: block; }
.auth-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block: 4px 14px; font-size: .9em; }
.auth-meta button { border: 0; background: none; color: var(--c-primary); font-weight: 700; cursor: pointer; font: inherit; }
.auth-meta button:disabled { color: var(--c-muted); cursor: default; }

/* radio pills */
.pill-group { display: flex; gap: 9px; flex-wrap: wrap; }
.pill-group label {
	border: 1.5px solid var(--c-line); border-radius: var(--r-pill); padding: 8px 18px;
	font-weight: 700; cursor: pointer; background: var(--c-surface); transition: all .15s ease;
}
.pill-group input { display: none; }
.pill-group input:checked + span { color: #fff; }
.pill-group label:has(input:checked) { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* alerts */
.alert { border-radius: 12px; padding: 12px 16px; font-weight: 600; margin-block: 12px; display: none; }
.alert.is-visible { display: block; }
.alert--error { background: var(--c-danger-050); color: var(--c-danger); }
.alert--success { background: var(--c-success-050); color: var(--c-success); }

/* dialog */
dialog.store-dialog {
	border: 0; border-radius: var(--r-card); padding: 0; width: min(520px, 92vw);
	box-shadow: var(--shadow-3);
}
dialog.store-dialog::backdrop { background: rgba(16, 39, 43, .55); }
.store-dialog__head {
	display: flex; justify-content: space-between; align-items: center;
	padding: 18px 24px; border-block-end: 1px solid var(--c-line);
}
.store-dialog__head h3 { margin: 0; font-size: 1.1em; }
.store-dialog__close { border: 0; background: none; font-size: 1.4em; cursor: pointer; color: var(--c-muted); line-height: 1; }
.store-dialog__body { padding: 22px 24px 26px; }

/* image uploader */
.img-uploader { display: flex; gap: 10px; flex-wrap: wrap; }
.img-uploader__thumb {
	position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden;
	border: 1.5px solid var(--c-line);
}
.img-uploader__thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-uploader__remove {
	position: absolute; inset-block-start: 4px; inset-inline-end: 4px; width: 22px; height: 22px;
	border: 0; border-radius: 50%; background: rgba(16, 39, 43, .72); color: #fff;
	cursor: pointer; display: grid; place-items: center; font-size: .8em; line-height: 1;
}
.img-uploader__add {
	width: 84px; height: 84px; border: 1.5px dashed var(--c-line); border-radius: 12px;
	display: grid; place-items: center; cursor: pointer; color: var(--c-muted);
	background: var(--c-bg); font-size: 1.5em;
}
.img-uploader__add:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* ---------- account area ---------- */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 26px; padding-block: 28px 50px; align-items: start; }
.account-nav {
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
	padding: 12px; box-shadow: var(--shadow-1); display: grid; gap: 4px;
}
.account-nav a { padding: 11px 16px; border-radius: 12px; font-weight: 700; }
.account-nav a:hover { background: var(--c-primary-050); color: var(--c-primary); }
.account-nav a.is-active { background: var(--c-primary); color: #fff; }
.account-nav a.logout { color: var(--c-danger); }

.tabs { display: flex; gap: 8px; margin-block-end: 18px; flex-wrap: wrap; }
.tabs button {
	border: 1.5px solid var(--c-line); background: var(--c-surface); border-radius: var(--r-pill);
	padding: 8px 20px; font: inherit; font-weight: 700; cursor: pointer; color: var(--c-muted);
}
.tabs button.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.record-card {
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
	padding: 18px 20px; box-shadow: var(--shadow-1); margin-block-end: 13px;
}
.record-card__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.record-card__title { font-weight: 800; font-size: 1.02em; }
.record-card__date { color: var(--c-muted); font-size: .85em; font-weight: 600; }
.record-card__meta { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-block-start: 10px; color: var(--c-muted); font-size: .92em; font-weight: 600; }
.record-card__meta b { color: var(--c-ink); }
.record-card__notes {
	margin-block-start: 10px; padding: 10px 14px; background: var(--c-bg);
	border-radius: 10px; font-size: .92em; color: var(--c-muted);
}
.record-card__notes b { color: var(--c-ink); }
.record-images { display: flex; gap: 8px; margin-block-start: 10px; flex-wrap: wrap; }
.record-images img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--c-line); }

.profile-rows { display: grid; gap: 0; }

.record-card__actions { margin-block-start: 10px; padding-block-start: 10px; border-block-start: 1px dashed var(--c-line); }

/* contact page */
.contact-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.contact-card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
  padding: 24px 20px; text-align: center; display: grid; gap: 6px; justify-items: center;
  box-shadow: var(--shadow-1); transition: transform .15s ease, box-shadow .15s ease;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.contact-card__icon {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-primary-050); font-size: 1.5em;
}

/* ---------- chat ---------- */
.chat-header-link {
  position: relative; display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%; font-size: 1.25em;
  border: 1.5px solid var(--c-line); background: var(--c-surface);
  transition: border-color .15s ease;
}
.chat-header-link:hover { border-color: var(--c-primary); }
.chat-badge {
  position: absolute; inset-block-start: -5px; inset-inline-end: -5px;
  min-width: 20px; height: 20px; padding-inline: 5px; border-radius: var(--r-pill);
  background: var(--c-danger); color: #fff; font-size: .62em; font-weight: 800;
  display: grid; place-items: center; line-height: 1;
}

.chat-app {
  display: grid; grid-template-columns: 320px 1fr; gap: 0;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
  box-shadow: var(--shadow-1); overflow: hidden; min-height: 560px; max-height: 74vh;
}
.chat-rooms { border-inline-end: 1px solid var(--c-line); display: flex; flex-direction: column; min-height: 0; }
.chat-rooms__head { padding: 14px; border-block-end: 1px solid var(--c-line); }
.chat-rooms__list { overflow-y: auto; flex: 1; }
.chat-rooms__empty { text-align: center; padding: 40px 18px; }
.chat-room {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  padding: 13px 14px; border: 0; background: transparent; cursor: pointer; font: inherit;
  border-block-end: 1px solid var(--c-line); transition: background .15s ease;
}
.chat-room:hover { background: var(--c-bg); }
.chat-room.is-active { background: var(--c-primary-050); }
.chat-room__icon { font-size: 1.35em; flex: none; }
.chat-room__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.chat-room__title { font-weight: 800; font-size: .93em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room__preview { color: var(--c-muted); font-size: .82em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room__meta { display: grid; gap: 5px; justify-items: end; flex: none; }
.chat-room__unread {
  min-width: 20px; height: 20px; padding-inline: 5px; border-radius: var(--r-pill);
  background: var(--c-danger); color: #fff; font-size: .7em; font-weight: 800;
  display: grid; place-items: center;
}

.chat-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-thread__head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-block-end: 1px solid var(--c-line); background: var(--c-bg);
}
.chat-thread__back {
  display: none; border: 0; background: transparent; cursor: pointer;
  font-size: 1.3em; color: var(--c-primary); padding: 4px;
}
.chat-thread__title { font-weight: 800; }
.chat-thread__status { font-size: .82em; }
.chat-thread__scroll {
  flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 9px;
  background: linear-gradient(180deg, #fbfdfd, var(--c-bg));
}
.chat-bubble {
  max-width: 74%; border-radius: 16px; padding: 9px 13px; box-shadow: var(--shadow-1);
  font-size: .95em; position: relative;
}
.chat-bubble--mine {
  align-self: flex-end; background: var(--c-primary); color: #fff;
  border-end-end-radius: 5px;
}
.chat-bubble--theirs {
  align-self: flex-start; background: var(--c-surface); border: 1px solid var(--c-line);
  border-end-start-radius: 5px;
}
.chat-bubble--system {
  align-self: center; background: #eef1f2; color: var(--c-muted); font-size: .82em;
  box-shadow: none; border-radius: var(--r-pill); padding-block: 5px;
}
.chat-bubble__text { white-space: pre-wrap; word-break: break-word; }
.chat-bubble__img { max-width: 260px; max-height: 240px; border-radius: 10px; margin-block-end: 4px; }
.chat-bubble__time { font-size: .68em; opacity: .65; text-align: end; margin-block-start: 3px; }
.chat-closed-note {
  padding: 12px 16px; text-align: center; color: var(--c-muted);
  background: #eef1f2; border-block-start: 1px solid var(--c-line); font-size: .9em;
}
.chat-composer {
  display: flex; align-items: flex-end; gap: 9px; padding: 12px 14px;
  border-block-start: 1px solid var(--c-line); background: var(--c-surface);
}
.chat-composer__attach {
  border: 1.5px solid var(--c-line); background: var(--c-bg); cursor: pointer;
  width: 42px; height: 42px; border-radius: 50%; font-size: 1.1em; flex: none;
  transition: border-color .15s ease;
}
.chat-composer__attach:hover { border-color: var(--c-primary); }
.chat-composer textarea {
  flex: 1; resize: none; border: 1.5px solid var(--c-line); border-radius: 14px;
  padding: 10px 14px; font: inherit; background: var(--c-bg); max-height: 120px; min-width: 0;
}
.chat-composer textarea:focus { outline: none; border-color: var(--c-primary); background: #fff; }
.chat-composer__send { flex: none; }
.chat-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.chat-app.is-thread .chat-placeholder { display: none; }

@media (max-width: 900px) {
  .chat-app { grid-template-columns: 1fr; max-height: none; min-height: 70vh; }
  .chat-rooms { border-inline-end: 0; }
  .chat-placeholder { display: none; }
  .chat-thread { display: none; }
  .chat-app.is-thread .chat-rooms { display: none; }
  .chat-app.is-thread .chat-thread { display: flex; min-height: 70vh; }
  .chat-thread__back { display: inline-block; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .listing { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .filters-card {
    position: fixed; inset: 0 auto 0 auto; inset-inline-start: 0; top: 0; height: 100vh;
    width: min(330px, 86vw); z-index: 80; border-radius: 0; overflow-y: auto;
    transform: translateX(calc(var(--drawer-dir, -1) * 105%)); transition: transform .25s ease;
  }
  html[dir="rtl"] .filters-card { --drawer-dir: 1; inset-inline-start: auto; inset-inline-end: 0; }
  .filters-card.is-open { transform: translateX(0); }
  .pd-grid { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__image { display: none; }
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { display: flex; overflow-x: auto; }
  .account-nav a { white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-search { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    background: var(--c-surface); border-block-end: 1px solid var(--c-line);
    flex-direction: column; align-items: stretch; padding: 12px 20px; gap: 4px;
    box-shadow: var(--shadow-2);
  }
  .site-nav.is-open { display: flex; }
  .brand__tag { display: none; }
  .stats-strip__inner { grid-template-columns: repeat(3, 1fr); }
  .stat__num { font-size: 1.25em; }
  .section { padding-block: 32px 6px; }
  .cta-band { padding: 32px 24px; }
  .grid-products { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 13px; }
  .p-card__title { font-size: .95em; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 26px; }
}
