/* ============================================================
   DUANASTAR — Style, Culture, Elegance
   Design system: warm paper background, card maroon, logo gold
   ============================================================ */

:root {
  --paper: #FDFBF7;
  --card: #FFFFFF;
  --ink: #2B2117;
  --ink-soft: #6F6052;
  --ink-faint: #9C8F80;
  --brand: #6A1223;       /* maroon of the business card */
  --brand-deep: #4A0A17;
  --brand-soft: #F6E9E5;
  --gold: #E0B04A;        /* logo gold — for maroon / dark surfaces */
  --gold-deep: #8A6212;   /* gold that stays legible on light surfaces */
  --gold-soft: #F7EED9;
  --berry: #B23A5C;
  --berry-soft: #F8E6EC;
  --green: #2E7D4F;
  --green-soft: #E5F2EA;
  --line: #ECE4D6;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(43, 33, 23, 0.08);
  --shadow-md: 0 8px 28px rgba(43, 33, 23, 0.13);
  --shadow-lg: 0 18px 50px rgba(43, 33, 23, 0.18);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Cinzel", "Trajan Pro", Georgia, serif;   /* the DUANASTAR wordmark */
  --header-h: 74px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--ink); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
  border-radius: 4px;
}
/* On the maroon surfaces the ring switches to the light logo gold. */
.hero :focus-visible, .site-footer :focus-visible, .admin-side :focus-visible { outline-color: var(--gold); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 22px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---------- Kanga strip (signature element) ---------- */
.kanga-strip {
  height: 12px;
  background: url("../images/products/pattern-border.svg") repeat-x;
  background-size: auto 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-deep); box-shadow: var(--shadow-md); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #463928; }
.btn-ghost { background: transparent; border: 2px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-gold { background: linear-gradient(180deg, #F0CC72, #C9962F); color: var(--brand-deep); }
.btn-gold:hover { background: linear-gradient(180deg, #F5D78A, #D4A43F); }
.btn-danger { background: var(--berry); color: #fff; }
.btn-danger:hover { background: #93294A; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.74rem; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-pill);
}
.badge-stock { background: var(--green-soft); color: var(--green); }
.badge-low { background: var(--berry-soft); color: var(--berry); }
.badge-out { background: #EEE9DF; color: var(--ink-faint); }
.badge-cat { background: var(--gold-soft); color: var(--gold-deep); }
.badge-featured { background: var(--brand-soft); color: var(--brand-deep); }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--brand); color: #F8EEE4;
  text-align: center; font-size: 0.85rem; font-weight: 600;
  padding: 8px 16px;
}
.announce strong { color: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(253, 251, 247, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand-name {
  font-family: var(--font-brand);
  font-weight: 700; font-size: 1.45rem; letter-spacing: 0.04em;
  color: var(--brand); line-height: 1;
}
.brand-tag { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); }

.search-wrap { flex: 1; max-width: 560px; position: relative; }
.search-wrap input {
  width: 100%; padding: 12px 48px 12px 20px;
  border: 2px solid var(--ink); border-radius: var(--radius-pill);
  background: #fff; font-size: 0.95rem;
}
.search-wrap input::placeholder { color: var(--ink-faint); }
.search-btn {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.search-btn:hover { background: var(--brand-deep); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  position: relative; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--ink);
  transition: background 0.12s ease;
}
.icon-btn:hover { background: var(--brand-soft); }
.icon-btn.active { background: var(--berry-soft); color: var(--berry); }
.icon-btn svg { width: 23px; height: 23px; }
.count-pip {
  position: absolute; top: 2px; right: 0;
  min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--brand); color: #fff;
  font-size: 0.7rem; font-weight: 800;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper);
}
.count-pip.hidden, .hidden { display: none !important; }

.lang-switch {
  display: flex; border: 2px solid var(--line); border-radius: var(--radius-pill);
  overflow: hidden; font-size: 0.8rem; font-weight: 800;
}
.lang-switch button { padding: 7px 12px; color: var(--ink-faint); }
.lang-switch button.active { background: var(--ink); color: #fff; }

/* ---------- Category pills ---------- */
.cat-row {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 14px 0; scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  padding: 9px 18px; border-radius: var(--radius-pill);
  border: 2px solid var(--line); background: #fff;
  font-weight: 700; font-size: 0.88rem; color: var(--ink-soft);
  transition: all 0.12s ease;
}
.cat-pill:hover { border-color: var(--ink); color: var(--ink); }
.cat-pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Hero (the maroon face of the business card) ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(224, 176, 74, 0.16), transparent 70%),
    linear-gradient(120deg, #7C1A2C 0%, var(--brand) 50%, var(--brand-deep) 100%);
  color: #FFF8EE;
  border-radius: var(--radius-lg);
  margin-top: 8px;
  overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 30px; align-items: center;
  padding: 52px 56px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 600; line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero h1 em { font-family: var(--font-brand); font-style: normal; font-weight: 700; color: var(--gold); letter-spacing: 0.03em; }
.hero p { margin-top: 14px; color: rgba(248, 238, 228, 0.82); font-size: 1.05rem; max-width: 46ch; }
.hero .btn-ghost { border-color: rgba(248, 238, 228, 0.35); color: #FFF8EE; }
.hero .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.hero-cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-collage { position: relative; height: 300px; }
.hero-collage img {
  position: absolute; width: 56%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  border: 5px solid #fff;
}
.hero-collage img:nth-child(1) { top: 0; left: 0; transform: rotate(-5deg); }
.hero-collage img:nth-child(2) { top: 26%; right: 0; transform: rotate(4deg); z-index: 2; }
.hero-collage img:nth-child(3) { bottom: 0; left: 12%; transform: rotate(-2deg); z-index: 3; width: 48%; }

/* ---------- Sections ---------- */
.section { padding: 44px 0 10px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 600;
}
.sort-select {
  padding: 9px 14px; border: 2px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; font-weight: 600; font-size: 0.88rem; cursor: pointer;
}

/* ---------- Product grid & cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 22px;
  padding-bottom: 50px;
}
.card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  cursor: pointer; position: relative;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--brand-soft); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card-img-wrap img { transform: scale(1.06); }
.fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.93); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); transition: transform 0.12s ease, color 0.12s ease;
  z-index: 2;
}
.fav-btn:hover { transform: scale(1.12); color: var(--berry); }
.fav-btn.faved { color: var(--berry); }
.fav-btn svg { width: 20px; height: 20px; }
.card-sold-overlay {
  position: absolute; inset: 0;
  background: rgba(253, 251, 247, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.card-sold-overlay span {
  background: var(--ink); color: #fff; font-weight: 800;
  padding: 8px 18px; border-radius: var(--radius-pill); font-size: 0.85rem;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 0.98rem; line-height: 1.3; }
.card-rating { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--ink-soft); }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 0.85rem; }
.card-price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.card-price { font-weight: 800; font-size: 1.12rem; }
.card-unit { font-size: 0.78rem; color: var(--ink-faint); }
.card-stock { margin-top: auto; padding-top: 8px; }
.card-add {
  margin-top: 10px;
  width: 100%; padding: 10px; border-radius: var(--radius-pill);
  border: 2px solid var(--ink); font-weight: 800; font-size: 0.88rem;
  background: #fff; transition: all 0.12s ease;
}
.card-add:hover:not([disabled]) { background: var(--ink); color: #fff; }
.card-add[disabled] { opacity: 0.4; cursor: not-allowed; }
.card-bulk {
  align-self: flex-start; margin-top: 2px;
  font-size: 0.72rem; font-weight: 700; color: var(--brand-deep);
  background: var(--brand-soft); border-radius: var(--radius-pill);
  padding: 3px 9px;
}

.empty-state {
  grid-column: 1 / -1; text-align: center;
  padding: 70px 20px; color: var(--ink-soft);
}
.empty-state .big { font-size: 2.6rem; margin-bottom: 10px; }

/* ---------- Modals ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(43, 33, 23, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--paper); border-radius: var(--radius-lg);
  max-width: 880px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.98); transition: transform 0.18s ease;
}
.overlay.open .modal { transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm);
  font-size: 1.1rem; z-index: 3;
}
.modal-close:hover { background: var(--brand-soft); }

.pd-grid { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
/* Cards crop to a square so the grid stays even, but the detail view is where a
   customer decides what to buy — show the WHOLE fabric there, never a crop.
   Phone photos are 4:3 / 3:4, so `contain` leaves bands: fill them with the soft
   brand tone rather than white, which reads as deliberate matting. */
.pd-img { aspect-ratio: 1; background: var(--brand-soft); border-radius: var(--radius-lg) 0 0 var(--radius-lg); overflow: hidden; }
.pd-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-info { padding: 34px 34px 30px; display: flex; flex-direction: column; gap: 12px; }
.pd-info h2 { font-family: var(--font-display); font-size: 1.65rem; font-weight: 600; line-height: 1.15; padding-right: 30px; }
.pd-price { font-size: 1.6rem; font-weight: 800; }
.pd-price small { font-size: 0.85rem; font-weight: 600; color: var(--ink-faint); }
.pd-desc { color: var(--ink-soft); font-size: 0.95rem; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.qty-stepper {
  display: flex; align-items: center;
  border: 2px solid var(--line); border-radius: var(--radius-pill);
}
.qty-stepper button { width: 40px; height: 40px; font-size: 1.2rem; font-weight: 800; }
.qty-stepper button:hover { color: var(--brand); }
.qty-stepper input {
  width: 52px; text-align: center; border: none; background: none;
  font-weight: 800; font-size: 1rem;
}
.pd-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pd-bulk {
  align-self: flex-start;
  font-size: 0.85rem; font-weight: 700; color: var(--brand-deep);
  background: var(--brand-soft); border-radius: 10px; padding: 8px 12px;
}

/* ---------- Product detail: other designs in the same pale ---------- */
.pd-related { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 22px 34px 30px; }
.pd-related-head { margin-bottom: 14px; }
.pd-related-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.pd-related-n { color: var(--ink-faint); font-weight: 600; }
.pd-related-cap { display: block; font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; }
.pd-sib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.pd-sib {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: none; border-radius: 12px; padding: 6px; transition: background 0.15s ease;
}
.pd-sib:hover { background: var(--brand-soft); }
.pd-sib-img { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.pd-sib-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-sib-out {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(43, 33, 23, 0.55); color: #fff; font-size: 0.72rem; font-weight: 700;
}
.pd-sib-name { font-size: 0.82rem; font-weight: 700; line-height: 1.2; }
.pd-sib-price { font-size: 0.82rem; font-weight: 800; }
.pd-sib-price small { font-weight: 600; color: var(--ink-faint); font-size: 0.72rem; }

/* "Buy the whole pale" banner */
.bale-buy {
  margin-top: 16px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 14px;
  background: var(--brand-soft); border: 1.5px solid var(--brand);
}
.bale-buy-info { display: flex; flex-direction: column; gap: 2px; }
.bale-buy-sub { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }
.bale-buy-price { font-size: 1.15rem; font-weight: 800; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bale-buy-save { font-size: 0.78rem; font-weight: 700; color: var(--green); }
.bale-buy .btn { flex: 0 0 auto; }

.bale-buy-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bale-qty-label { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.bale-buy-actions .mini-stepper { background: #fff; }
.bale-buy-actions .mini-stepper input {
  width: 42px; text-align: center; border: none; background: none;
  font-weight: 800; font-size: 0.9rem;
}

/* Sold-as-whole-pale-only */
.card-add-bale { border-style: dashed; color: var(--brand-deep); }
.pd-baleonly {
  padding: 10px 14px; border-radius: 10px; font-size: 0.88rem; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-deep);
}

/* Admin: photo upload status ("Optimising…" / "Ready ✓ 142 KB" / upload failed) */
.img-status:empty { display: none; }
.img-status {
  font-size: 0.78rem; font-weight: 700; color: var(--ink-soft);
  padding: 6px 10px; border-radius: 8px; background: var(--brand-soft);
}

/* Admin: pale wizard — two ways in (supplier link, or one sheet photo) */
.wizard-modes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.wizard-mode {
  flex: 1 1 200px; text-align: left; cursor: pointer;
  padding: 10px 14px; border-radius: 12px; font: inherit; font-weight: 700;
  border: 2px solid var(--line); background: transparent; color: var(--ink);
}
.wizard-mode small {
  display: block; font-weight: 600; font-size: 0.75rem; color: var(--ink-soft); margin-top: 2px;
}
.wizard-mode.on { border-color: var(--brand); background: var(--brand-soft); }

.wizard-fallback {
  margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--brand-soft); font-size: 0.85rem;
}
.wizard-fallback p { margin: 6px 0 10px; color: var(--ink-soft); }
.wizard-fallback code { font-size: 0.8rem; word-break: break-all; }
.wizard-fallback textarea {
  width: 100%; margin-bottom: 8px; padding: 8px 10px; font-family: inherit; font-size: 0.8rem;
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}

/* Admin: pale wizard (mark each design on one supplier sheet) */
.wizard-tools {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 10px;
}
.wizard-count { display: block; font-size: 0.85rem; color: var(--ink-soft); margin: 10px 0 2px; }

.wizard-sheet-wrap {
  display: flex; justify-content: center; padding: 8px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--brand-soft);
}
/* Shrink-wraps the image so the box layer lines up with it exactly. */
.wizard-sheet { position: relative; display: inline-block; line-height: 0; }
.wizard-sheet img { display: block; max-width: 100%; max-height: 58vh; border-radius: 8px; }
.wizard-layer {
  position: absolute; inset: 0; cursor: crosshair; touch-action: none;
}
.wiz-box {
  position: absolute; border: 2.5px solid var(--brand); border-radius: 6px;
  background: rgba(0, 0, 0, 0.04); cursor: move;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);   /* stays visible on dark/red fabric */
}
.wiz-box.draft { border-style: dashed; pointer-events: none; }
.wiz-num {
  position: absolute; top: -2px; left: -2px; min-width: 22px; height: 22px;
  display: grid; place-items: center; padding: 0 5px;
  background: var(--brand); color: #fff; font-size: 0.75rem; font-weight: 800;
  border-radius: 6px 0 6px 0; line-height: 1;
}
.wiz-del {
  position: absolute; top: -2px; right: -2px; width: 22px; height: 22px;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  background: var(--ink); color: #fff; border: 0; font-size: 0.75rem; line-height: 1;
  border-radius: 0 6px 0 6px;
}
.wiz-handle {
  position: absolute; right: -7px; bottom: -7px; width: 15px; height: 15px;
  background: #fff; border: 2.5px solid var(--brand); border-radius: 50%;
  cursor: nwse-resize;
}

.wizard-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px; max-height: 320px; overflow-y: auto; margin-top: 10px;
  padding: 6px; border: 1.5px solid var(--line); border-radius: 12px;
}
.wizard-tile {
  position: relative; display: block;
  border-radius: 10px; overflow: hidden; border: 2.5px solid var(--brand);
}
.wizard-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.wizard-tile span {
  position: absolute; top: 0; left: 0; min-width: 22px; padding: 2px 6px;
  background: var(--brand); color: #fff; font-size: 0.75rem; font-weight: 800;
  border-radius: 0 0 6px 0;
}
/* Imported designs are tickable (drop one the owner doesn't want) and captioned
   with the supplier's design code. */
.wizard-tile.pick { cursor: pointer; border-color: transparent; opacity: 0.45; }
.wizard-tile.pick.on { border-color: var(--brand); opacity: 1; }
.wizard-tile input {
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; z-index: 2;
  accent-color: var(--brand);
}
.wizard-tile em {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px;
  background: rgba(0, 0, 0, 0.62); color: #fff; font-style: normal;
  font-size: 0.68rem; font-weight: 700; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Admin: pale member picker */
.pale-picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px; max-height: 300px; overflow-y: auto; margin-top: 8px;
  padding: 4px; border: 1.5px solid var(--line); border-radius: 12px;
}
.pale-pick {
  display: grid; grid-template-columns: auto 34px 1fr; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 10px; cursor: pointer; font-size: 0.85rem;
}
.pale-pick:hover { background: var(--brand-soft); }
.pale-pick img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; grid-row: span 2; }
.pale-pick input { width: 16px; height: 16px; grid-row: span 2; }
.pale-pick-name { font-weight: 700; line-height: 1.15; }
.pale-pick-meta { grid-column: 3; font-size: 0.72rem; color: var(--ink-faint); }
.pale-pick.taken { opacity: 0.55; cursor: not-allowed; }

/* ---------- Cart drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(43, 33, 23, 0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 96;
  width: min(430px, 100vw);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  transform: translateX(102%); transition: transform 0.24s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-family: var(--font-display); font-size: 1.35rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px;
  background: #fff; border-radius: var(--radius); padding: 10px;
  box-shadow: var(--shadow-sm); align-items: center;
}
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.cart-item-name { font-weight: 700; font-size: 0.9rem; line-height: 1.25; }
.cart-item-price { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.mini-stepper { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-pill); }
.mini-stepper button { width: 28px; height: 28px; font-weight: 800; }
.mini-stepper span { min-width: 30px; text-align: center; font-weight: 700; font-size: 0.85rem; }
.cart-item-total { font-weight: 800; font-size: 0.95rem; text-align: right; }
.cart-remove { color: var(--ink-faint); font-size: 0.78rem; text-decoration: underline; margin-top: 4px; }
.cart-remove:hover { color: var(--berry); }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px; background: #fff; }
.cart-subtotal { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.15rem; margin-bottom: 6px; }
.cart-line { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 4px; }
.cart-save { color: var(--green); font-weight: 700; }
.cart-was { text-decoration: line-through; color: var(--ink-faint); font-weight: 600; font-size: 0.82rem; margin-right: 4px; }
.order-discount { margin-top: 6px; font-size: 0.82rem; font-weight: 700; color: var(--green); }
.cart-note { font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 14px; }

/* ---------- Checkout ---------- */
.checkout-form { padding: 34px; display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.checkout-form h2 { font-family: var(--font-display); font-size: 1.6rem; }
.form-field label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--brand); outline: none;
}
.form-hint { font-size: 0.78rem; color: var(--ink-faint); margin-top: 4px; }
.order-success { text-align: center; padding: 50px 34px; }
.order-success .big { font-size: 3rem; }
.order-success h2 { font-family: var(--font-display); margin: 10px 0 6px; }
.order-success code {
  background: var(--gold-soft); color: var(--gold-deep);
  padding: 4px 12px; border-radius: 8px; font-weight: 800;
}

/* Manual M-Pesa Paybill instructions on the success screen */
.pay-box {
  text-align: left; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin: 18px auto 0; max-width: 420px;
}
.pay-box h3 { margin: 0 0 12px; font-family: var(--font-display); }
.pay-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.pay-steps > li { line-height: 1.5; }
.pay-line { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.pay-k { color: var(--ink-soft); font-size: 0.85rem; min-width: 120px; }
.pay-v { font-weight: 800; font-size: 1.05rem; }
.pay-hint { font-weight: 400; font-size: 0.72rem; color: var(--ink-faint); }
.pay-copy {
  margin-left: auto; flex-shrink: 0; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius-pill); padding: 4px 14px; font-size: 0.78rem; cursor: pointer;
}
.pay-copy:hover { border-color: var(--brand); color: var(--brand); }
.pay-note { margin: 14px 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.pay-fallback {
  margin: 12px auto 0; max-width: 420px; font-size: 0.85rem; color: var(--berry);
  background: #fff4f4; border: 1px solid #f3d0d0; border-radius: 10px; padding: 10px 12px;
}
.stk-spinner {
  width: 38px; height: 38px; margin: 18px auto; border-radius: 50%;
  border: 4px solid var(--brand-soft); border-top-color: var(--brand);
  animation: stk-spin 0.9s linear infinite;
}
@keyframes stk-spin { to { transform: rotate(360deg); } }

/* ---------- Chat widget ---------- */
.chat-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 80;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--brand); color: #fff;
  box-shadow: var(--shadow-md), inset 0 0 0 2px rgba(224, 176, 74, 0.6);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.14s ease, background 0.14s ease;
}
.chat-fab:hover { transform: scale(1.07); background: var(--brand-deep); }
.chat-fab svg { width: 28px; height: 28px; }
.chat-fab .count-pip { top: -2px; right: -2px; border-color: #fff; }
.chat-panel {
  position: fixed; bottom: 96px; right: 22px; z-index: 81;
  width: min(370px, calc(100vw - 32px));
  height: min(520px, 70vh);
  background: var(--paper); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(14px); opacity: 0; pointer-events: none;
  transition: all 0.18s ease;
}
.chat-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.chat-head {
  background: var(--brand); color: #fff;
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
}
.chat-head img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(224, 176, 74, 0.7); }
.chat-head-name { font-weight: 800; font-size: 0.95rem; }
.chat-head-status { font-size: 0.75rem; opacity: 0.85; display: flex; align-items: center; gap: 5px; }
.chat-head-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7BE6A3; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 0.9rem; line-height: 1.4; }
.msg-time { font-size: 0.68rem; opacity: 0.6; margin-top: 3px; }
.msg.from-customer { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.from-owner { align-self: flex-start; background: #fff; box-shadow: var(--shadow-sm); border-bottom-left-radius: 4px; }
.msg.auto { border: 1.5px dashed var(--gold); background: var(--gold-soft); }
.chat-input-row {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid var(--line); background: #fff;
}
.chat-input-row input {
  flex: 1; padding: 11px 14px;
  border: 2px solid var(--line); border-radius: var(--radius-pill);
}
.chat-input-row input:focus { border-color: var(--brand); outline: none; }
.chat-send {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.chat-send:hover { background: var(--brand-deep); }
.chat-whatsapp {
  text-align: center; font-size: 0.78rem; padding: 8px;
  background: #fff; color: var(--ink-faint);
}

/* ---------- Toasts ---------- */
.toast-zone {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.25s ease, toast-out 0.3s ease 2.6s forwards;
}
.toast.success { background: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: #D8CDBE; margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px; padding-top: 48px; padding-bottom: 36px;
}
.site-footer h4 { color: var(--gold); font-size: 0.92rem; margin-bottom: 14px; letter-spacing: 0.04em; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 0.88rem; }
.site-footer a { color: #D8CDBE; }
.site-footer a:hover { color: var(--gold); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 46px; height: 46px; border-radius: 50%; }
.footer-brand strong { font-family: var(--font-brand); font-size: 1.25rem; letter-spacing: 0.04em; color: var(--gold); }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--gold); }
.footer-about { font-size: 0.88rem; max-width: 34ch; }
.pay-badges { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pay-badges span {
  background: rgba(255,255,255,0.1); padding: 5px 12px;
  border-radius: 8px; font-size: 0.76rem; font-weight: 700; color: #fff;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 0; font-size: 0.8rem; text-align: center; color: var(--ink-faint);
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-body { background: #F4EFE6; min-height: 100vh; }
.admin-login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 42px 38px; width: 100%; max-width: 420px; text-align: center;
}
.login-card img { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px; }
.login-card h1 { font-family: var(--font-brand); font-size: 1.55rem; letter-spacing: 0.03em; color: var(--brand); margin-bottom: 4px; }
.login-card p { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 22px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-error { color: var(--berry); font-size: 0.85rem; font-weight: 700; }
.login-note {
  margin-top: 18px; font-size: 0.78rem; color: var(--ink-faint);
  background: var(--brand-soft); border-radius: 10px; padding: 10px 14px; text-align: left;
}

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--brand-deep); color: #D8CDBE; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.admin-side .brand { margin-bottom: 22px; padding: 0 8px; }
.admin-side .brand-name { color: var(--gold); font-size: 1.2rem; }
.admin-side .brand img { width: 40px; height: 40px; }
.admin-nav-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  font-weight: 700; font-size: 0.92rem; color: #D8CDBE;
  text-align: left; position: relative;
}
.admin-nav-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav-btn.active { background: var(--gold); color: var(--brand-deep); }
.admin-nav-btn .count-pip { position: static; margin-left: auto; border: none; background: var(--berry); }
.admin-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.admin-side-foot a, .admin-side-foot button {
  font-size: 0.85rem; color: var(--ink-faint); padding: 8px 14px; text-align: left;
}
.admin-side-foot a:hover, .admin-side-foot button:hover { color: #fff; text-decoration: none; }
.admin-account {
  padding: 8px 14px; margin-bottom: 4px; border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 14px; line-height: 1.4; word-break: break-word;
}
.admin-account-label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); }
.admin-account strong { font-size: 0.85rem; color: #fff; }

.admin-main { padding: 30px 34px 60px; }
.admin-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-title { font-family: var(--font-display); font-size: 1.8rem; }
.admin-subtitle { margin-top: 4px; color: var(--ink-soft); font-size: 0.92rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); border-top: 4px solid var(--brand);
}
.stat-card.green { border-color: var(--green); }
.stat-card.berry { border-color: var(--berry); }
.stat-card.gold { border-color: var(--gold); }
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 0.84rem; color: var(--ink-soft); font-weight: 600; }

.admin-table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th {
  text-align: left; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.9rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--paper); }
.admin-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.stock-adjust { display: inline-flex; align-items: center; gap: 8px; }
.stock-adjust button {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line); font-weight: 800; line-height: 1;
}
.stock-adjust button:hover { border-color: var(--ink); }
.stock-adjust .stock-val { font-weight: 800; min-width: 34px; text-align: center; }
.row-actions { display: flex; gap: 6px; }
.row-actions button {
  padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 700;
  border: 1.5px solid var(--line);
}
.row-actions .edit:hover { border-color: var(--brand); color: var(--brand); }
.row-actions .del:hover { border-color: var(--berry); color: var(--berry); }

/* Admin product form modal */
.admin-form { padding: 30px 32px; display: flex; flex-direction: column; gap: 14px; }
.admin-form h2 { font-family: var(--font-display); font-size: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.img-preview-row { display: flex; gap: 14px; align-items: center; }
.img-preview { width: 86px; height: 86px; border-radius: 12px; object-fit: cover; border: 2px solid var(--line); background: var(--paper); }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9rem; }
.check-row input { width: 19px; height: 19px; accent-color: var(--brand); }

/* Admin chat inbox */
.inbox-shell {
  display: grid; grid-template-columns: 1fr;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  height: 64vh; min-height: 420px; overflow: hidden;
}
.inbox-msgs { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.inbox-msgs .msg.from-customer { align-self: flex-start; background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); border-radius: 16px 16px 16px 4px; }
.inbox-msgs .msg.from-owner { align-self: flex-end; background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; }
.inbox-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.inbox-input input { flex: 1; padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--radius-pill); }
.inbox-input input:focus { border-color: var(--brand); outline: none; }
.inbox-input input:disabled { background: var(--paper); cursor: not-allowed; }

/* Two-pane inbox: conversation list + thread */
.inbox-shell.inbox-2col { grid-template-columns: minmax(220px, 300px) 1fr; }
.inbox-list { overflow-y: auto; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.conv-item {
  position: relative; text-align: left; padding: 14px 16px; border: none; border-bottom: 1px solid var(--line);
  background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; width: 100%;
}
.conv-item:hover { background: var(--paper); }
.conv-item.active { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.conv-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.conv-name { font-weight: 700; font-size: 0.9rem; }
.conv-time { font-size: 0.7rem; color: var(--ink-faint); flex-shrink: 0; }
.conv-bottom { display: flex; align-items: center; gap: 8px; }
.conv-preview { flex: 1; min-width: 0; font-size: 0.8rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-you { color: var(--ink-faint); }
.conv-pip { flex-shrink: 0; background: var(--berry); color: #fff; font-size: 0.7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.conv-item.resolved { opacity: 0.62; }
.conv-item.resolved .conv-name { font-weight: 600; }
.conv-tag { display: inline-block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--gold-deep); background: var(--gold-soft); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.inbox-thread { display: flex; flex-direction: column; min-width: 0; }
.inbox-thread .inbox-msgs { flex: 1; }
.inbox-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-weight: 700; background: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

@media (max-width: 640px) {
  .inbox-shell.inbox-2col { grid-template-columns: 1fr; height: auto; }
  .inbox-list { max-height: 30vh; }
}

/* Orders */
.order-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 18px 20px; margin-bottom: 14px;
  display: grid; grid-template-columns: 1fr auto; gap: 14px;
}
.order-id { font-weight: 800; }
.order-meta { font-size: 0.84rem; color: var(--ink-soft); margin-top: 2px; }
.order-items { font-size: 0.88rem; margin-top: 8px; color: var(--ink-soft); }
.order-right { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.order-total { font-weight: 800; font-size: 1.1rem; }
.status-select { padding: 7px 12px; border-radius: var(--radius-pill); border: 2px solid var(--line); font-weight: 700; font-size: 0.82rem; }

/* Show/hide toggle switch (category visibility) */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; border-radius: 999px; background: #D9D0C2; transition: background .18s ease; }
.switch-slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s ease;
}
.switch input:checked + .switch-slider { background: var(--green); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.switch input:focus-visible + .switch-slider { outline: 2px solid var(--ink); outline-offset: 2px; }
.cat-help { max-width: 760px; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; margin: -2px 0 16px; }

.settings-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; max-width: 620px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.settings-card h3 { font-family: var(--font-display); font-size: 1.25rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 38px 30px; }
  .hero-collage { height: 240px; max-width: 420px; }
  .pd-grid { grid-template-columns: 1fr; }
  /* single column on mobile: the photo sits on top, so round the top corners
     (on the container, which is what clips) and cap its height */
  .pd-img { border-radius: var(--radius-lg) var(--radius-lg) 0 0; aspect-ratio: auto; height: 340px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
  }
  .admin-side .brand { margin-bottom: 0; margin-right: auto; }
  .admin-side-foot { margin-top: 0; flex-direction: row; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; row-gap: 10px; }
  .search-wrap { order: 3; max-width: 100%; flex-basis: 100%; }
  .brand-tag { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-body { padding: 10px 12px 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .admin-main { padding: 20px 16px 50px; }
  .form-row { grid-template-columns: 1fr; }
}

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