/* =========================================================
   SMart: the ONE stylesheet for every page. Mobile first.

   Look and feel comes from the FYP1 demo (FYP1 demo/index.html):
   KPTM red + gold, Poppins, 10px rounded white cards on a light grey page.

   How it is organised:
     1. Design tokens (CSS variables)   <- change a colour here and the whole site follows
     2. Bootstrap re-skin               <- Bootstrap's own variables point at our tokens
     3. Base
     4. Layout: top bar, sidebar, bottom nav
     5. Components: cards, buttons, forms, alerts, skeletons, toasts, empty states
     6. Auth pages (login)
     7. Home page
     8. Larger screens (tablet, laptop)

   Load order in the page:  bootstrap.css -> bootstrap-icons.css -> smart.css
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand */
  --brand: #C8102E;
  --brand-dark: #9E0B22;
  --brand-soft: #FDECEE;
  --accent: #E0A526;
  --accent-soft: #FCEFD0;

  /* Text, lines, surfaces */
  --text: #1B2733;
  --muted: #66727F;
  --line: #E4E9EF;
  --surface: #FFFFFF;
  --soft: #F5F7FA;
  --page: #F0F2F5;
  --grey: #5B6672;
  --grey-soft: #ECEFF2;

  /* Status */
  --green: #1E7A3C;
  --green-soft: #DDF3E4;
  --red: #B3261E;
  --red-soft: #FBE1E1;
  --orange: #9A6A00;

  /* Shape and size */
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  --font: 'Poppins', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --top: 60px;       /* top bar height (70px from tablet size up) */
  --bottom: 62px;    /* phone bottom bar height (0 on laptops) */
  --side: 232px;     /* laptop sidebar width */

  /* ---------- 2. Bootstrap re-skin: Bootstrap reads these instead of its blue defaults ---------- */
  --bs-primary: #C8102E;
  --bs-primary-rgb: 200, 16, 46;
  --bs-link-color: #C8102E;
  --bs-link-color-rgb: 200, 16, 46;
  --bs-link-hover-color: #9E0B22;
  --bs-link-hover-color-rgb: 158, 11, 34;
  --bs-body-color: #1B2733;
  --bs-body-color-rgb: 27, 39, 51;
  --bs-body-bg: #F0F2F5;
  --bs-body-bg-rgb: 240, 242, 245;
  --bs-body-font-family: var(--font);
  --bs-body-font-size: 15px;
  --bs-body-line-height: 1.5;
  --bs-border-color: #E4E9EF;
  --bs-border-radius: 10px;
  --bs-secondary-color: #66727F;
}

/* ---------- 3. Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.35rem; line-height: 1.25; }
h2 { font-size: 1.05rem; }
h3 { font-size: 1.1rem; margin-bottom: 8px; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border-radius: 0; }

.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.center { text-align: center; }

button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: #fff; color: var(--brand); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); font-weight: 600;
}
.skip-link:focus { left: 8px; }

/* ---------- 4. Layout ---------- */

/* ----- Top bar ----- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: var(--top);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.logo { display: inline-flex; align-items: center; font-weight: 700; font-size: 1.4rem; color: var(--brand); letter-spacing: -0.5px; white-space: nowrap; }
.logo:hover { text-decoration: none; color: var(--brand); }
.logo span { color: var(--text); }              /* "SM" dark, "art" red */
.logo-big { font-size: 1.8rem; }
.kptm-chip { height: 32px; width: auto; margin-right: 8px; padding-right: 8px; border-right: 1px solid var(--line); }
.kptm-logo { width: 104px; height: auto; margin: 0 auto 2px; }

.topbar-search { display: none; }                /* laptops only, see section 8 */

.topbar-actions { display: flex; align-items: center; gap: 2px; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.3rem; color: var(--text);
}
.icon-btn:hover { background: var(--page); color: var(--text); text-decoration: none; }

.nav-badge {
  position: absolute; top: -4px; right: -12px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 0.65rem; font-weight: 600; line-height: 17px; text-align: center; font-style: normal;
}
.icon-btn .nav-badge { top: 2px; right: -2px; }

/* Buyer | Seller switch (icons only on small phones, words from 520px) */
.mode-toggle { display: flex; margin: 0 0 0 6px; background: var(--page); border-radius: 999px; padding: 3px; }
.mode-toggle button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 36px; height: 36px; padding: 0 9px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  border-radius: 999px; font-size: 0.88rem; font-weight: 500; white-space: nowrap;
}
.mode-toggle button.active { background: var(--brand); color: #fff; font-weight: 600; }
.mode-word { display: none; }

/* ----- Page area ----- */
.view {
  padding: calc(var(--top) + 16px) 16px calc(var(--bottom) + 24px);
  max-width: 1080px;
  margin: 0 auto;
}

/* ----- Navigation links (shared by the bottom bar and the sidebar) ----- */
.sidebar { display: none; }

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--bottom) + env(safe-area-inset-bottom));
  display: flex;
  background: #fff;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}

.navlink {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--muted); font-size: 0.68rem; font-weight: 500;
}
.navlink:hover { text-decoration: none; color: var(--muted); }
.navlink.active { color: var(--brand); font-weight: 600; }
.nav-icon { position: relative; display: inline-flex; font-size: 1.35rem; line-height: 1; margin-bottom: 2px; }

/* ---------- 5. Components ---------- */

/* ----- Cards ----- */
.card {
  /* Bootstrap's own .card is "display: flex; flex-direction: column". We want a plain block,
     and flex-direction: row so a child such as .cats (display: flex) lays out in a row. */
  display: block; flex-direction: row; position: relative; min-width: 0;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ----- Buttons (Bootstrap .btn, restyled through its variables) ----- */
.btn {
  --bs-btn-padding-x: 18px;
  --bs-btn-padding-y: 9px;
  --bs-btn-font-family: var(--font);
  --bs-btn-font-size: 0.92rem;
  --bs-btn-font-weight: 600;
  --bs-btn-line-height: 1.5;
  --bs-btn-border-width: 1.5px;
  --bs-btn-border-radius: 10px;
  --bs-btn-disabled-opacity: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px;
  text-align: center; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled, .btn.disabled {
  --bs-btn-disabled-bg: var(--grey-soft);
  --bs-btn-disabled-color: var(--muted);
  --bs-btn-disabled-border-color: transparent;
  cursor: not-allowed;
}
.btn-sm { --bs-btn-padding-y: 5px; --bs-btn-padding-x: 12px; --bs-btn-font-size: 0.82rem; --bs-btn-border-radius: 10px; min-height: 34px; }

.btn-primary {
  --bs-btn-color: #fff;                 --bs-btn-bg: var(--brand);       --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;           --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-color: #fff;          --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-focus-shadow-rgb: 200, 16, 46;
}
.btn-outline {
  --bs-btn-color: var(--brand);         --bs-btn-bg: #fff;               --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: var(--brand);   --bs-btn-hover-bg: var(--brand-soft); --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-color: var(--brand);  --bs-btn-active-bg: var(--brand-soft); --bs-btn-active-border-color: var(--brand);
}
.btn-ghost {
  --bs-btn-color: var(--text);          --bs-btn-bg: var(--soft);        --bs-btn-border-color: var(--soft);
  --bs-btn-hover-color: var(--text);    --bs-btn-hover-bg: var(--grey-soft); --bs-btn-hover-border-color: var(--grey-soft);
  --bs-btn-active-color: var(--text);   --bs-btn-active-bg: var(--grey-soft); --bs-btn-active-border-color: var(--grey-soft);
}
.btn-accent {
  --bs-btn-color: #2A1E00;              --bs-btn-bg: var(--accent);      --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #2A1E00;        --bs-btn-hover-bg: #CC931C;      --bs-btn-hover-border-color: #CC931C;
  --bs-btn-active-color: #2A1E00;       --bs-btn-active-bg: #CC931C;     --bs-btn-active-border-color: #CC931C;
}
.btn-success {
  --bs-btn-color: #fff;                 --bs-btn-bg: var(--green);       --bs-btn-border-color: var(--green);
  --bs-btn-hover-color: #fff;           --bs-btn-hover-bg: #17612F;      --bs-btn-hover-border-color: #17612F;
  --bs-btn-active-color: #fff;          --bs-btn-active-bg: #17612F;     --bs-btn-active-border-color: #17612F;
}
.btn-danger {
  --bs-btn-color: #fff;                 --bs-btn-bg: var(--red);         --bs-btn-border-color: var(--red);
  --bs-btn-hover-color: #fff;           --bs-btn-hover-bg: #8E1E18;      --bs-btn-hover-border-color: #8E1E18;
  --bs-btn-active-color: #fff;          --bs-btn-active-bg: #8E1E18;     --bs-btn-active-border-color: #8E1E18;
}
.btn-danger-outline {
  --bs-btn-color: var(--red);           --bs-btn-bg: #fff;               --bs-btn-border-color: var(--red);
  --bs-btn-hover-color: var(--red);     --bs-btn-hover-bg: var(--red-soft); --bs-btn-hover-border-color: var(--red);
  --bs-btn-active-color: var(--red);    --bs-btn-active-bg: var(--red-soft); --bs-btn-active-border-color: var(--red);
}
/* "Loading" state: keeps the brand colour (a disabled grey button would look broken) but ignores clicks */
.btn.is-loading { pointer-events: none; opacity: 0.88; }

/* ----- Form fields ----- */
.field { display: block; margin-bottom: 14px; }
.field > label { display: block; margin: 0 0 5px; }
.field > label > span { display: block; font-size: 0.82rem; font-weight: 500; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"],
input[type="number"], input[type="time"], input[type="search"], input[type="file"], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 16px;          /* 16px stops iPhones from zooming into the field */
  appearance: none;
}
textarea { resize: vertical; }
/* appearance: none removes the browser's arrow, so a drawn one goes back in (an inline SVG, allowed by our security policy) */
select {
  padding-right: 38px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2366727F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 13px center / 14px;
}
input::placeholder, textarea::placeholder { color: #98A2AD; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.14); }

input.is-invalid { border-color: var(--red); }
input.is-invalid:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.16); }
.field-error { display: block; margin-top: 5px; color: var(--red); font-size: 0.78rem; font-weight: 500; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.pw-toggle {
  position: absolute; top: 50%; right: 3px; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-size: 1.15rem; cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: var(--soft); }

.check { display: inline-flex; align-items: center; gap: 8px; margin: 0; min-height: 44px; font-size: 0.88rem; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.form-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 12px; font-size: 0.88rem; }

.hint { font-size: 0.78rem; color: var(--muted); margin: 10px 0; text-align: center; }
.notice { background: var(--brand-soft); border-radius: 10px; padding: 12px; font-size: 0.88rem; margin-top: 14px; }

/* ----- Alert box above a form ----- */
.form-alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; padding: 12px 14px; border-radius: 10px; font-size: 0.86rem; line-height: 1.45; }
.form-alert > i { flex: none; margin-top: 1px; font-size: 1.15rem; }
.form-alert strong { display: block; font-weight: 600; }
.form-alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.form-alert-error   { background: var(--red-soft);    color: var(--red); }
.form-alert-warning { background: var(--accent-soft); color: var(--orange); }

/* ----- Headings inside pages ----- */
.page-title { margin-bottom: 2px; }
.section { margin-top: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.see-all { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }   /* minmax(0, ...) stops wide images from stretching the cards */

/* ----- Empty state ----- */
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty-icon { font-size: 2.4rem; line-height: 1; margin-bottom: 6px; }
.empty strong { display: block; color: var(--text); margin-top: 4px; }
.empty p { font-size: 0.88rem; margin-top: 2px; }

/* ----- Skeleton loaders (grey shimmering shapes while data loads) ----- */
.skeleton {
  background: linear-gradient(90deg, #E8ECF0 25%, #F4F6F8 40%, #E8ECF0 60%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.sk-carousel { height: 150px; border-radius: var(--radius); }
.sk-product { overflow: hidden; }
.sk-photo { aspect-ratio: 1 / 1; border-radius: 0; }
.sk-body { padding: 10px; display: grid; gap: 8px; }
.sk-line { height: 12px; }
.sk-line.short { width: 60%; }
.sk-line.price { width: 40%; height: 16px; }
.sk-name { width: 56px; }
.sk-avatar { width: 64px; height: 64px; border-radius: 50%; }
.sk-avatar.small { width: 44px; height: 44px; }
.sk-wide { height: 150px; margin: 12px -14px 0; border-radius: 0; }
.post .sk-line + .sk-line { margin-top: 8px; }

/* ----- Toast ----- */
.toast-root {
  position: fixed; left: 0; right: 0; bottom: calc(var(--bottom) + env(safe-area-inset-bottom) + 14px); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px;
}
body.auth .toast-root { bottom: 20px; }
.app-toast {
  background: #1B2733; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 500; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  animation: slide-up 0.2s ease-out; transition: opacity 0.3s; max-width: 100%;
}
.app-toast-success { background: var(--green); }
.app-toast-error { background: var(--red); }
.app-toast.hide { opacity: 0; }
@keyframes slide-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ----- Avatars, tags, prices ----- */
.avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700;
}
.avatar.big { width: 64px; height: 64px; font-size: 1.6rem; }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 0.72rem; font-weight: 600;
}
.price { color: var(--brand); font-weight: 700; }

/* ---------- 6. Auth pages (login, register, forgot, code, reset) ---------- */
/* Every auth page is built to fit ONE screen with no scrolling (about 560px of height is enough),
   so the sizes below are small on purpose. If a screen is shorter still, the page just scrolls.
   Phones: white full-screen page, the form sits directly on it.  600px and up: a centred card (section 8). */
body.auth { background: #fff; }
body.auth .view {
  min-height: 100vh; min-height: 100dvh;
  max-width: none; margin: 0;
  padding: 12px 22px calc(12px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.auth-wrap { width: 100%; max-width: 420px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.auth-wide { max-width: 460px; }                 /* register and reset: room for two password boxes side by side */
.auth-brand { text-align: center; margin: 0 0 12px; }
.auth-brand p { color: var(--muted); font-size: 0.78rem; }
.card.auth-card { padding: 0; background: transparent; box-shadow: none; border: 0; }
.auth-card h1 { margin-bottom: 2px; font-size: 1.3rem; }
.auth-lead { margin-bottom: 12px; font-size: 0.82rem; line-height: 1.45; }
.auth-switch { margin-top: 10px; font-size: 0.84rem; }
.auth-legal { margin-top: 10px; text-align: center; font-size: 0.72rem; line-height: 1.4; color: var(--muted); }
.auth-legal a { font-weight: 500; }

/* Smaller boxes and tighter gaps inside the auth forms */
body.auth .field { margin-bottom: 9px; }
body.auth .field > label { margin-bottom: 3px; }
body.auth .field > label > span { font-size: 0.78rem; }
body.auth .field input { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
body.auth .btn { min-height: 42px; }
body.auth .pw-toggle { width: 34px; height: 34px; }
body.auth .form-alert { margin-bottom: 10px; padding: 8px 12px; font-size: 0.82rem; }
body.auth .form-row-between { margin: -2px 0 8px; font-size: 0.84rem; }
body.auth .check { min-height: 36px; font-size: 0.84rem; }

/* Register and code pages */
.field-hint { display: block; margin-top: 3px; font-size: 0.72rem; line-height: 1.35; color: var(--muted); }
.field-error + .field-hint { margin-top: 2px; }
.field-pair { display: block; }                  /* the two password boxes: stacked on phones, side by side from 600px */
.auth-icon {
  width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.3rem;
}
/* "body.auth .field" in front so this beats the generic input rule above (that is why the old code box stayed small) */
body.auth .field input.code-input {
  text-align: center; font-size: 1.4rem; font-weight: 600; min-height: 46px;
  letter-spacing: 0.4em; padding-left: calc(12px + 0.4em); font-variant-numeric: tabular-nums;
}
.code-input::placeholder { color: #C5CCD3; letter-spacing: 0.4em; }
.center.field-error { text-align: center; }
.resend-row { margin: 8px 0 0; text-align: center; font-size: 0.84rem; color: var(--muted); }
.link-btn { padding: 4px; border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--muted); font-weight: 500; cursor: default; text-decoration: none; }

/* Shown only while developing (mail driver "log"): the code, because no real e-mail is sent */
.dev-note {
  margin: 0 0 10px; padding: 8px 10px; border: 1.5px dashed var(--accent); border-radius: 10px;
  background: var(--accent-soft); color: var(--orange); font-size: 0.76rem; line-height: 1.4;
}
.dev-note code { color: inherit; font-size: 0.95em; }
.dev-code { font-size: 1.15rem; letter-spacing: 0.2em; color: var(--text); }

/* Placeholder pages ("coming in module N") */
.soon { padding-top: 12vh; }
body.auth .soon { padding-top: 0; margin: auto; }

/* Profile page */
.profile-main { flex: 1; min-width: 0; }
.profile-handle { display: block; margin: 0 0 6px; color: var(--brand); font-weight: 600; font-size: 0.92rem; }
a.profile-handle:hover { text-decoration: underline; }
.profile-bio { margin: 8px 0 0; font-size: 0.88rem; }
.profile-privacy { margin-top: 12px; }
.tag-ok { margin-left: 4px; background: #E2F3E6; color: var(--green); }

/* Forms inside the app (edit profile, password, recovery e-mail) */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 10px; font-size: 0.86rem; font-weight: 500; }
.page-lead { max-width: 560px; margin: 4px 0 14px; }
.form-card { max-width: 560px; padding: 16px; margin: 12px 0 14px; }
.form-card h2 { font-size: 1.05rem; margin-bottom: 4px; }
.form-lead { margin-bottom: 14px; }
.at-wrap { position: relative; }                      /* the "@" sign sits inside the username box */
.at-sign { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.at-wrap input { padding-left: 30px; }
.text-brand { color: var(--brand); }

/* Follow counts, people lists and search */
.stats-row { display: flex; gap: 22px; margin: 12px 0; }
.stat { display: flex; flex-direction: column; color: var(--text); line-height: 1.25; }
.stat:hover { text-decoration: none; color: var(--brand); }
.stat strong { font-size: 1.1rem; }
.stat span { font-size: 0.78rem; color: var(--muted); }
.profile-programme { margin: 6px 0 0; }
.follow-form { margin: 0; }

.people-search { display: flex; gap: 8px; max-width: 560px; margin: 10px 0 14px; }
.people-search input { flex: 1; min-width: 0; }
.people-hint { max-width: 560px; margin: 0 0 10px; }
.people-list { display: grid; gap: 10px; max-width: 560px; }
.person-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 0; }
.person-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); }
.person-main:hover { text-decoration: none; color: var(--text); }
.person-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.person-text strong, .person-bio { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs { display: flex; gap: 6px; max-width: 560px; margin: 8px 0 14px; border-bottom: 1px solid var(--line); }
.tab { margin-bottom: -1px; padding: 9px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; }
.tab:hover { text-decoration: none; color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-count { margin-left: 4px; font-size: 0.78rem; }
.pager { display: flex; gap: 10px; justify-content: center; max-width: 560px; margin-top: 16px; }
.form-card .code-input { text-align: center; font-size: 1.5rem; font-weight: 600; min-height: 50px; letter-spacing: 0.4em; padding-left: calc(12px + 0.4em); font-variant-numeric: tabular-nums; }

.profile-card { display: flex; gap: 14px; padding: 16px; margin: 12px 0 14px; }
.profile-card h2 { margin-bottom: 4px; }
.profile-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0 0; font-size: 0.86rem; }
.profile-list dt { color: var(--muted); font-weight: 400; }
.profile-list dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.menu { margin-bottom: 14px; overflow: hidden; }
.menu-title { padding: 12px 14px 6px; font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; color: var(--text); border-top: 1px solid var(--line); font-weight: 500; }
.menu-row:hover { text-decoration: none; color: var(--text); background: var(--soft); }
button.menu-row { width: 100%; background: transparent; border: 0; border-top: 1px solid var(--line); text-align: left; cursor: pointer; }
.menu-row span { flex: 1; }
.menu-row i:first-child { font-size: 1.15rem; color: var(--brand); }
.menu-row i:last-child { color: var(--muted); }

/* ---------- 7. Home page ---------- */

/* Greeting banner with the phone search box */
.hero {
  margin: -16px -16px 12px; padding: 18px 16px 20px;
  background: linear-gradient(135deg, var(--brand), #E8364F); color: #fff;
}
.hero p { font-size: 0.9rem; opacity: 0.92; margin-bottom: 12px; }

.search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; border: 1.5px solid transparent; border-radius: 999px; background: #fff; color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search input { border: 0; background: transparent; padding-left: 0; box-shadow: none !important; color: var(--text); }
.search input::-webkit-search-cancel-button { appearance: none; }

/* Category tiles */
.cats { display: flex; gap: 4px; overflow-x: auto; padding: 12px 8px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 1 0 72px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 4px 2px; font-size: 0.74rem; font-weight: 500; color: var(--text);
}
.cat:hover { text-decoration: none; color: var(--text); }
.cat-icon {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 1.3rem;
}
.cat.active { color: var(--brand); font-weight: 600; }
.cat.active .cat-icon { background: var(--brand); color: #fff; }

/* Carousel (Bootstrap carousel, restyled) */
.hero-carousel { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-slide {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px;
  min-height: 150px; padding: 20px 20px 38px; color: #fff;
}
.hero-slide h2 { font-size: 1.25rem; line-height: 1.25; }
.hero-slide p { font-size: 0.88rem; opacity: 0.94; max-width: 36em; }
.hero-slide > * { position: relative; z-index: 1; }
.slide-brand { background: linear-gradient(135deg, var(--brand), #E8364F); }
.slide-gold  { background: linear-gradient(135deg, #D79A1B, #F0BE55); color: #2A1E00; }
.slide-dark  { background: linear-gradient(135deg, #1B2733, #3B4C5C); }
.hero-slide.has-img::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.12)); }
.hero-slide.has-img > *:not(.hero-slide-img) { z-index: 2; }
.hero-slide-img { position: absolute !important; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0 !important; }
.hero-cta { --bs-btn-color: var(--brand); --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-hover-color: var(--brand-dark); --bs-btn-hover-bg: var(--brand-soft); --bs-btn-hover-border-color: var(--brand-soft); margin-top: 6px; }
.carousel-indicators { margin-bottom: 8px; }
.carousel-indicators [data-bs-target] { width: 22px; height: 4px; border: 0; border-radius: 4px; margin: 0 3px; }
.carousel-control-prev, .carousel-control-next { display: none; width: 8%; }

/* Product grid and card */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.product-card {
  display: flex; flex-direction: column; overflow: hidden; color: var(--text);
  transition: transform 0.12s, box-shadow 0.12s;
}
.product-card:hover { text-decoration: none; color: var(--text); border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); }
.product-photo { position: relative; }
/* Every photo has the same square shape. height:auto matters: without it the <img height="400"> attribute would win over aspect-ratio. */
.product-photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: var(--soft); }
.sold-out .product-photo img { filter: grayscale(0.8); opacity: 0.65; }
.soldout-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--red); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
}
.product-body { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 10px; }
.product-name {
  font-size: 0.86rem; line-height: 1.35; min-height: 2.7em; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin: 2px 0; }
.price-row .price { font-size: 1.05rem; }
.stock-out { color: var(--red); font-weight: 600; }
.shop-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Popular shops as round "story" bubbles */
.stories { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 8px; margin: 0 -16px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story {
  flex: 0 0 78px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center; color: var(--text); font-size: 0.72rem; font-weight: 600; line-height: 1.25;
}
.story:hover { text-decoration: none; color: var(--text); }
.story img { width: 64px; height: 64px; margin-bottom: 4px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--brand); }
.story .muted { font-weight: 400; font-size: 0.68rem; }
.story > span { max-width: 78px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Feed post */
.post { padding: 12px 14px; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-head .avatar-img { width: 44px; height: 44px; }
.post-head strong { color: var(--text); font-size: 0.95rem; }
.post-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.post-text { font-size: 0.95rem; line-height: 1.45; overflow-wrap: anywhere; }
.post-img {
  display: block; margin: 10px -14px 0; width: calc(100% + 28px); max-width: none; height: auto; max-height: 460px;
  aspect-ratio: 16 / 9; object-fit: cover; background: var(--page);
}
.post-stats { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0 0; font-size: 0.8rem; color: var(--muted); }
.post-stats a { color: var(--muted); font-weight: 500; }
.post-stats a:hover { color: var(--brand); }

/* ---------- 7b. Catalog: search, product page, shop page, seller pages, admin pages, bell ---------- */

/* Search page: sort chips */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--text); font-size: 0.8rem; font-weight: 500; white-space: nowrap;
}
.chip:hover { text-decoration: none; color: var(--text); border-color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.sort-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }     /* one row that scrolls sideways on a phone */
.sort-chips::-webkit-scrollbar { display: none; }
.sort-chips > * { flex: none; }
.search-page-form { max-width: none; margin: 6px 0 10px; }
.pager-info { align-self: center; }

/* Product page: photos slide sideways on phones, sit beside the details on laptops */
.product-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; scroll-snap-align: center; background: var(--soft); border-radius: var(--radius); }
.gallery-hint { margin: 6px 0 0; text-align: center; }
.product-info h1 { font-size: 1.3rem; margin-bottom: 4px; overflow-wrap: anywhere; }
.product-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.product-price { font-size: 1.55rem; }
.product-description { margin: 12px 0 16px; font-size: 0.92rem; line-height: 1.5; overflow-wrap: anywhere; }
.product-soon { margin: 6px 0 0; }
.shop-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); }
.shop-card:hover { text-decoration: none; color: var(--text); border-color: var(--brand); }
.shop-card img { flex: none; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.shop-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.shop-card-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-card > i { color: var(--muted); }

/* Shop page */
.shop-header { display: flex; gap: 14px; padding: 16px; margin-bottom: 4px; }
.shop-logo { flex: none; width: 72px; height: 72px; aspect-ratio: 1 / 1; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--soft); }
.shop-header-main { flex: 1; min-width: 0; }
.shop-header-main h1 { font-size: 1.25rem; margin-bottom: 4px; overflow-wrap: anywhere; }
.shop-description { margin: 8px 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.info-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; font-size: 0.86rem; color: var(--muted); }
.info-list i { margin-right: 4px; color: var(--brand); }
.shop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Seller forms and lists */
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset:disabled { opacity: 0.6; }
.form-subtitle { font-size: 1rem; margin: 18px 0 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.logo-edit { display: flex; align-items: center; gap: 12px; }
.logo-edit .shop-logo { width: 56px; height: 56px; }
.sub-fields { margin: 2px 0 8px 6px; padding-left: 12px; border-left: 3px solid var(--line); }
.form-below { max-width: 560px; margin-bottom: 14px; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.photo-item { display: flex; flex-direction: column; width: 96px; }
.photo-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); }
.photo-item .check { min-height: 30px; font-size: 0.8rem; }
.photo-item .check input { width: 16px; height: 16px; }

.seller-list { display: grid; gap: 10px; max-width: 760px; }
.seller-product { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.seller-product.is-hidden { opacity: 0.75; }
.seller-product img { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.seller-product-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.seller-product-name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-product-actions { flex: none; display: flex; flex-direction: column; gap: 6px; }
.seller-product-actions form { margin: 0; }
.seller-product-actions .btn { width: 100%; }
.text-low { color: var(--orange); font-weight: 600; }
.tag-grey { align-self: flex-start; margin-top: 3px; background: var(--grey-soft); color: var(--grey); }

/* Admin */
.tabs-wide { max-width: none; overflow-x: auto; scrollbar-width: none; }
.tabs-wide .tab { white-space: nowrap; }
.admin-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 14px; }
.admin-tile { display: flex; flex-direction: column; padding: 14px; color: var(--text); }
a.admin-tile:hover { text-decoration: none; color: var(--text); border-color: var(--brand); }
.admin-tile strong { font-size: 1.6rem; line-height: 1.1; }
.admin-tile span { font-size: 0.8rem; color: var(--muted); }
.admin-tile.needs-you { border-color: var(--brand); background: var(--brand-soft); }
.admin-list { display: grid; gap: 12px; max-width: 760px; }
.admin-shop { padding: 14px; }
.admin-shop-head { display: flex; align-items: center; gap: 12px; }
.admin-shop-head .shop-logo { width: 56px; height: 56px; }
.admin-shop-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.admin-shop-text { margin: 10px 0 4px; overflow-wrap: anywhere; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.admin-actions form { margin: 0; }
.reason-box { margin-top: 10px; }
.reason-box summary { display: inline-flex; list-style: none; cursor: pointer; }
.reason-box summary::-webkit-details-marker { display: none; }
.reason-box form { margin-top: 8px; }
.btn-danger-soft { color: var(--red); border-color: var(--red-soft); }
.admin-categories { max-width: 560px; margin-bottom: 14px; overflow: hidden; }
.category-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.category-row:first-child { border-top: 0; }
.category-row.is-off { opacity: 0.6; }
.category-row .cat-icon { flex: none; width: 40px; height: 40px; font-size: 1.1rem; }
.category-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.category-actions { display: flex; gap: 0; margin: 0; }
.category-actions .icon-btn { width: 36px; height: 36px; border: 0; background: transparent; font-size: 1.05rem; color: var(--muted); cursor: pointer; }
.category-actions .icon-btn:hover { background: var(--page); color: var(--text); }
.category-actions .icon-btn[disabled] { opacity: 0.3; }

/* Admin site: the small badge in the top bar and the "Your connection" card */
.admin-badge { margin-left: 4px; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.admin-badge i { margin-right: 2px; }
.topbar .admin-badge + .topbar-actions { margin-left: auto; }
.connection-card { max-width: 760px; margin-top: 14px; }
.connection-card .profile-list { margin-top: 8px; }

/* The bell page */
.notif-list { max-width: 560px; }
.notif-row { display: flex; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--text); }
.notif-row:first-child { border-top: 0; }
a.notif-row:hover { text-decoration: none; color: var(--text); background: var(--soft); }
.notif-row.unread { background: var(--brand-soft); }
.notif-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }

@media (min-width: 900px) {
  .product-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .shop-card { grid-column: 1 / -1; }
  .admin-tiles { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Small phones ---------- */
@media (max-width: 349px) {
  .mode-toggle { display: none; }          /* too narrow for the top bar: the same switch is on the Profile page */
}

/* ---------- 8a. Tablet and up (600px) ---------- */
@media (min-width: 600px) {
  :root { --top: 70px; }
  .topbar { padding: 0 20px; gap: 12px; }
  .logo { font-size: 1.7rem; }
  .kptm-chip { height: 44px; margin-right: 12px; padding-right: 12px; }

  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-slide { min-height: 170px; padding: 24px 28px 40px; }
  .hero-slide h2 { font-size: 1.5rem; }

  /* The auth pages become a centred card on the grey page */
  body.auth { background: var(--page); }
  body.auth .view { justify-content: center; padding: 16px; }
  .auth-wrap { flex: none; }
  .card.auth-card { padding: 18px 22px; background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(27, 39, 51, 0.08); }
  .auth-legal { margin-top: 10px; }
  .field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
}

@media (min-width: 520px) {
  .mode-word { display: inline; }
  .mode-toggle button { padding: 0 14px; }
}

/* ---------- 8b. Laptop (900px): sidebar instead of the bottom bar ---------- */
@media (min-width: 900px) {
  :root { --bottom: 0px; }

  .topbar { padding: 0 24px; gap: 20px; }
  .bottomnav { display: none; }

  /* Search lives in the top bar on laptops */
  .topbar-search {
    display: flex; align-items: center; gap: 8px; flex: 1; max-width: 520px; margin: 0 auto;
    padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--muted);
  }
  .topbar-search:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12); }
  .topbar-search input { min-height: 40px; border: 0; background: transparent; padding-left: 0; box-shadow: none !important; color: var(--text); }
  .topbar-search input::-webkit-search-cancel-button { appearance: none; }
  .hero-search { display: none; }
  .topbar-actions { gap: 6px; }

  .sidebar {
    position: fixed; top: var(--top); left: 0; bottom: 0; z-index: 20;
    width: var(--side);
    display: flex; flex-direction: column; gap: 4px;
    padding: 18px 12px;
    background: #fff; border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .side-title { padding: 0 12px 8px; font-size: 0.74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
  .sidebar .navlink { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 0.92rem; color: var(--text); }
  .sidebar .navlink:hover { background: var(--page); color: var(--text); }
  .sidebar .navlink.active { background: var(--brand); color: #fff; }
  .sidebar .nav-icon { font-size: 1.1rem; margin: 0 6px 0 0; }
  .side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
  .side-user > div:last-child { display: flex; flex-direction: column; min-width: 0; font-size: 0.82rem; line-height: 1.3; }
  .side-user strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user span { color: var(--muted); font-size: 0.74rem; }

  /* Content sits in a centred column (max 960px) in the space beside the sidebar */
  .view {
    margin: 0 0 0 var(--side); max-width: none;
    padding: calc(var(--top) + 28px) max(32px, calc((100vw - var(--side) - 960px) / 2)) 40px;
  }
  body.auth .view { margin: 0; padding: 16px; }

  h1 { font-size: 1.6rem; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
  .hero { margin: 0 0 14px; border-radius: var(--radius); padding: 26px 28px; }
  .hero p { margin-bottom: 0; }
  .cats { padding: 16px; }
  .cat { flex: 1 0 0; font-size: 0.82rem; }
  .cat-icon { width: 56px; height: 56px; font-size: 1.5rem; }
  .stories { margin: 0; padding: 4px 0 8px; }
  .toast-root { bottom: 24px; left: var(--side); }
  body.auth .toast-root { left: 0; }

  .carousel-control-prev, .carousel-control-next { display: flex; }
  .hero-slide { padding-left: 40px; padding-right: 40px; }

  /* The whole Home page sits in one centred column (banner, categories, carousel, products, posts all line up), like a social feed */
  #home { max-width: 840px; margin: 0 auto; }
}

/* ---------- 8c. Short screens: auth pages shrink once more so they still fit without scrolling ---------- */
@media (max-height: 700px) {
  body.auth .view { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .auth-brand { margin-bottom: 8px; }
  .auth-brand p, .auth-icon { display: none; }       /* tagline and round icon are the first things to go */
  .kptm-logo { width: 92px; }
  .logo-big { font-size: 1.6rem; }
  .auth-lead { margin-bottom: 8px; }
  body.auth .field { margin-bottom: 7px; }
  .auth-legal { margin-top: 6px; }
}
@media (max-height: 600px) {
  .kptm-logo { width: 80px; }
  .logo-big { font-size: 1.4rem; }
  .auth-card h1 { font-size: 1.15rem; }
  body.auth .field { margin-bottom: 6px; }
  body.auth .field input { min-height: 38px; }
}
@media (min-width: 600px) and (max-height: 700px) {
  .card.auth-card { padding-top: 12px; padding-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  .product-card, .btn, .app-toast { transition: none; animation: none; }
}
