/* ==========================================================================
   PetLoft — global stylesheet
   Warm, handcrafted look. Mobile-first with desktop enhancements.
   ========================================================================== */

:root {
  /* Palette: terracotta primary + warm neutrals + sage accent */
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-2: #f4ece1;
  --border: #e7ddce;
  --text: #2f2823;
  --muted: #857a6e;
  --primary: #c0673f;
  --primary-dark: #a4542f;
  --primary-soft: #f5e3d8;
  --accent: #5f7a5b;
  --danger: #c0473f;
  --star: #e0a13c;
  --shadow-sm: 0 1px 2px rgba(58, 45, 35, 0.06), 0 1px 3px rgba(58, 45, 35, 0.08);
  --shadow-md: 0 6px 18px rgba(58, 45, 35, 0.10);
  --shadow-lg: 0 18px 50px rgba(58, 45, 35, 0.20);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --maxw: 1160px;
  --header-h: 64px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

/* The [hidden] attribute must always win over any display rule below.
   Without this, fixed overlays (cart drawer, modals) keep covering the page
   and block every click even while "closed". */
[hidden] { display: none !important; }

html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Custom cat-paw cursor (skip on touch / coarse pointers for performance) */
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: url('/assets/images/cursor-paw-32.png') 8 8, auto; }
  a, button, [role="button"], .btn, input[type="submit"], input[type="button"], label, select, summary { cursor: url('/assets/images/cursor-paw-32.png') 8 8, pointer; }
}

/* Stable image rendering for product/upload images on all devices */
img { max-width: 100%; height: auto; }

/* Responsive grid tweaks for very small screens */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 0.4em; color: var(--text); }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mini { font-size: 0.75rem; }
.center { text-align: center; }
.big { font-size: 1.5rem; }
.bg-bg { background: var(--bg); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.93); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.link { color: var(--primary); font-weight: 600; background: none; border: 0; }
.link:hover { text-decoration: underline; }
.link-danger { background: none; border: 0; color: var(--muted); font-size: 1rem; padding: 2px 4px; }
.link-danger:hover { color: var(--danger); }

/* ---------- Lost Pets page ---------- */
.lp-hero {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--background) 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 40px;
  text-align: center;
}
.lp-hero-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lp-hero-icon {
  width: 80px; height: 80px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.lp-hero-title { font-family: var(--font-head); font-size: clamp(1.8rem,5vw,2.6rem); font-weight: 700; margin: 0; }
.lp-hero-sub { color: var(--text-muted); font-size: .98rem; max-width: 480px; margin: 0; }

.lp-filters-wrap { padding: 20px 0 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lp-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.lp-hint { margin: 0; }

.lp-grid-section { padding: 24px 0 60px; }
.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.lp-empty { text-align: center; padding: 40px; color: var(--text-muted); }
.lp-loading { text-align: center; padding: 40px; color: var(--text-muted); }

.lp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.lp-card:hover, .lp-card:focus { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); outline: none; }
.lp-card-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.lp-card-img { width: 100%; height: 100%; object-fit: cover; }
.lp-card-img--placeholder {
  width: 100%; height: 100%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.lp-card-body { padding: 14px; }
.lp-card-name { font-size: .98rem; font-weight: 700; margin: 6px 0 4px; }
.lp-card-detail, .lp-card-date { font-size: .82rem; margin: 0; color: var(--text-muted); }
.lp-card-location { font-size: .82rem; margin: 4px 0 0; display: flex; align-items: center; gap: 4px; color: var(--text-muted); }

/* Badges */
.lp-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }
.lp-badge--lost     { background: #fef2f2; color: #dc2626; }
.lp-badge--found    { background: #f0fdf4; color: #16a34a; }
.lp-badge--pending  { background: #fefce8; color: #ca8a04; }
.lp-badge--rejected { background: var(--surface-2); color: var(--text-muted); }

/* Detail modal */
.lp-detail { display: flex; gap: 24px; flex-wrap: wrap; }
.lp-detail-img { width: 100%; max-width: 300px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.lp-detail-img--placeholder { width: 100%; max-width: 300px; aspect-ratio: 4/3; background: var(--surface-2); border-radius: var(--radius); }
.lp-detail-info { flex: 1; min-width: 200px; }
.lp-detail-info h2 { margin: 8px 0; }
.lp-detail-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.lp-detail-list li { color: var(--text); }

/* Photo upload */
.lp-photo-upload { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lp-photo-preview {
  width: 80px; height: 80px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hidden-file-input { display: none; }

/* ---------- Promo timer section ---------- */
/* ═══════════════════════════════════════════════════════════
   PROMO TIMER SECTION — redesigned
═══════════════════════════════════════════════════════════ */
.promo-timer {
  position: relative;
  background: #3d2318;
  color: #fff;
  padding: 0;
  overflow: hidden;
}

/* gradient fades top/bottom into surrounding page */
.promo-fade {
  position: absolute;
  left: 0; right: 0;
  height: 64px;
  z-index: 2;
  pointer-events: none;
}
.promo-fade--top {
  top: 0;
  background: linear-gradient(to bottom, var(--bg, #faf6f0), transparent);
}
.promo-fade--bottom {
  bottom: 0;
  background: linear-gradient(to top, var(--bg, #faf6f0), transparent);
}

/* ── Red running ribbon ───────────────────────────────────── */
.promo-ribbon {
  background: #c0392b;
  overflow: hidden;
  padding: 7px 0;
  white-space: nowrap;
  position: relative;
  z-index: 3;
}
.promo-ribbon-track {
  display: inline-block;
  white-space: nowrap;
  animation: ribbonScroll 22s linear infinite;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  padding-right: 40px;
}
.promo-ribbon-dot {
  margin: 0 8px;
  opacity: .7;
}
@keyframes ribbonScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Main inner layout ────────────────────────────────────── */
.promo-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 56px 0 64px;
  position: relative;
  z-index: 1;
}
.promo-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.promo-right {
  flex-shrink: 0;
  width: 320px;
}

/* badge */
.promo-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(192,57,43,.25);
  border: 1.5px solid rgba(192,57,43,.5);
  color: #f8b4ae;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  width: fit-content;
}

/* heading */
.promo-heading {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}
.promo-sub {
  margin: 0;
  font-size: .9rem;
  color: rgba(255,255,255,.55);
  line-height: 1.5;
}

/* ── Countdown blocks ─────────────────────────────────────── */
.promo-countdown {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.promo-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 64px;
}
.promo-unit-val {
  font-family: 'Courier New', monospace;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.promo-unit-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.45);
}
.promo-sep {
  font-size: 1.8rem;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  margin-bottom: 16px;
  align-self: flex-start;
  margin-top: 10px;
}

/* cta button */
.promo-btn {
  width: fit-content;
  padding: 13px 28px;
  font-size: .95rem;
}

/* ── Product card (right side) ────────────────────────────── */
.promo-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

/* slider */
.promo-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.promo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
}
.promo-slide.active { opacity: 1; }
.promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* dots */
.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 4px;
}
.promo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.25);
  cursor: pointer;
  transition: background .2s, transform .2s;
  padding: 0;
}
.promo-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* card info */
.promo-card-info {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.promo-card-name {
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.promo-card-prices {
  display: flex;
  align-items: center;
  gap: 10px;
}
.promo-price-old {
  font-size: .9rem;
  color: rgba(255,255,255,.4);
  text-decoration: line-through;
}
.promo-price-new {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f87171;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .promo-inner {
    flex-direction: column;
    gap: 32px;
    padding: 48px 0 56px;
    text-align: center;
    align-items: center;
  }
  .promo-left { align-items: center; }
  .promo-countdown { justify-content: center; }
  .promo-right { width: 100%; max-width: 340px; }
  .promo-badge { margin: 0 auto; }
}

/* Chat online status dot (blinking) */
.chat-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.chat-status-dot.online {
  background: #10b981;
  animation: statusBlink 1.5s infinite;
}
.chat-status-dot.offline {
  background: #6b7280;
}
@keyframes statusBlink {
  0%, 49%, 51%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Chat online status indicator */
.chat-admin-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.chat-admin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  position: relative;
}
.chat-admin-avatar::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #fff;
}
.chat-admin-avatar.offline::after {
  background: #6b7280;
}
.chat-admin-info {
  flex: 1;
  min-width: 0;
}
.chat-admin-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}
.chat-admin-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-admin-status.online {
  color: #10b981;
  font-weight: 500;
}
.chat-typing-indicator {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 12px;
  width: fit-content;
}
.chat-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.2s infinite;
}
.chat-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.chat-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

.phone-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.phone-code-select {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  min-width: 110px;
}
.phone-code-select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.phone-number-input { flex: 1; min-width: 160px; height: 46px; }

/* Inline text-style button (e.g. "Forgot password?") */
.btn-link-inline {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  line-height: 1;
}
.btn-link-inline:hover { opacity: 0.72; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  width: fit-content;
}

.price { font-weight: 700; color: var(--text); }
.price.big { font-size: 1.6rem; color: var(--primary-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
}
.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}
/* Footer logo — white via invert filter for dark footer background */
.footer-logo-white {
  filter: brightness(0) invert(1);
  width: 56px;
  height: 56px;
}
.brand-name { letter-spacing: -0.01em; }

.main-nav {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}
.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.82rem;
  padding: 6px 9px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.main-nav a:hover { background: var(--surface-2); color: var(--primary); }
.main-nav a.active { color: var(--primary); font-weight: 600; }

/* "More" dropdown for nav overflow */
.nav-more {
  position: relative;
}
.nav-more-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.82rem;
  padding: 6px 9px;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.nav-more-btn:hover { background: var(--surface-2); color: var(--primary); }
.nav-more-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  padding: 6px;
  z-index: 200;
  flex-direction: column;
  gap: 2px;
}
.nav-more-dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.nav-more-dropdown a:hover { background: var(--surface-2); color: var(--primary); }
.nav-more:hover .nav-more-dropdown,
.nav-more:focus-within .nav-more-dropdown { display: flex; }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }

.lang-switch { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 999px;
}
.lang-switch button.active { background: var(--surface); color: var(--primary-dark); box-shadow: var(--shadow-sm); }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn .dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.nav-toggle { display: inline-flex; }

/* Mobile nav — fixed overlay panel that slides from top */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}
.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav[hidden] { display: none !important; }
.mobile-nav a {
  padding: 12px 10px;
  border-radius: 9px;
  font-weight: 500;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-nav a:hover { background: var(--surface-2); color: var(--primary); }

/* ---------- Hero ---------- */
.hero { padding: 32px 0 12px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center; }
.hero-text .lead { font-size: 1.08rem; color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 22px; }
.hero-stats { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--primary-dark); }
.hero-stats span { font-size: 0.85rem; color: var(--muted); }
.hero-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-alt { background: var(--surface-2); }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 28px; }
.section-head .muted { font-size: 1.02rem; }
.section-title { margin-bottom: 18px; }

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-bottom: 26px;
}
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Product grid + cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  cursor: pointer;
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-thumb img { transform: scale(1.04); }
.card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
/* Share button on product cards */
.share-btn {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 2;
  background: rgba(255,255,255,0.88);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
}
.product-card:hover .share-btn,
.product-card:focus-within .share-btn {
  opacity: 1;
  transform: scale(1);
}
.share-btn:hover { color: var(--primary); background: #fff; }

.card-discount-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}
.tag-sale {
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.product-info { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.product-info h3 { margin: 0; font-size: 1.05rem; cursor: pointer; }
.product-info h3:hover { color: var(--primary-dark); }
.product-info .clamp { margin: 0; font-size: 0.9rem; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }

/* Favorite heart on cards */
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: color 0.15s, transform 0.1s;
}
.fav-btn:hover { transform: scale(1.08); color: var(--primary); }
.fav-btn.active { color: var(--primary); }
.fav-btn.active svg { fill: var(--primary); }

/* Favorite heart inside the product modal sits next to the title, not absolute */
.pm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pm-head h2 { margin: 0; }
.fav-btn.pm-fav {
  position: static;
  flex: none;
  width: 40px;
  height: 40px;
  background: var(--surface-2);
}

/* ---------- Modal (product + checkout) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(40, 30, 24, 0.55);
  opacity: 0;
  transition: opacity 0.25s;
  padding: 0;
}
.modal-overlay.open { opacity: 1; }
.modal {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  transform: translateY(40px);
  transition: transform 0.25s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
  color: var(--text);
}
.modal-close:hover { background: var(--surface-2); }
.modal-body { padding: 22px 18px 26px; }

/* product modal internals */
.pm-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.pm-media img#pmMain {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.pm-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pm-thumb {
  width: 60px;
  height: 60px;
  border-radius: 9px;
  border: 2px solid transparent;
  overflow: hidden;
  padding: 0;
  background: var(--surface-2);
}
.pm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pm-thumb.active { border-color: var(--primary); }
.pm-info { display: flex; flex-direction: column; gap: 12px; }
.pm-info h2 { margin: 0; }
.pm-info > .muted { margin: 0; }
.pm-material { margin: 0; font-size: 0.92rem; }
.pm-variants label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 8px; }
.variant-row { display: flex; flex-wrap: wrap; gap: 8px; }
.variant {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  min-width: 84px;
  transition: all 0.15s;
}
.variant span { font-weight: 600; font-size: 0.9rem; }
.variant small { color: var(--muted); font-size: 0.74rem; }
.variant:hover { border-color: var(--primary); }
.variant.active { border-color: var(--primary); background: var(--primary-soft); }
.pm-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ---------- Cart drawer ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(40, 30, 24, 0.5);
  opacity: 0;
  transition: opacity 0.25s;
  display: flex;
  justify-content: flex-end;
}
.drawer-overlay.open { opacity: 1; }
.drawer {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.drawer-overlay.open .drawer { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.drawer-head h3 { margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 18px; }
.drawer-foot { padding: 16px 18px; border-top: 1px solid var(--border); background: var(--surface); }

.cart-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-row img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.cart-row-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-row-info strong { font-size: 0.92rem; }
.cart-row-info .muted { font-size: 0.8rem; }
.cart-row-end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; font-weight: 700; font-size: 0.9rem; }

.qty { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: 4px; width: fit-content; }
.qty button { width: 28px; height: 28px; border: 0; background: var(--surface-2); color: var(--text); font-size: 1rem; line-height: 1; }
.qty button:hover { background: var(--primary-soft); }
.qty span { min-width: 30px; text-align: center; font-size: 0.88rem; font-weight: 600; }

/* totals block (cart + checkout) */
.totals { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.totals > div { display: flex; justify-content: space-between; font-size: 0.92rem; }
.totals .discount { color: var(--accent); }
.totals .grand { font-size: 1.12rem; font-weight: 700; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 2px; }
.totals .grand span:last-child { color: var(--primary-dark); }

.promo-row { display: flex; gap: 8px; margin: 4px 0 14px; }
.promo-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.field input, .field textarea, .field select {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea { resize: vertical; min-height: 70px; }
.form-error, .form-msg { font-size: 0.88rem; padding: 10px 12px; border-radius: var(--radius-sm); }
.form-error { background: #fbe9e7; color: var(--danger); }
.form-msg { background: #eaf3e8; color: var(--accent); }
.form-msg.ok { background: #eaf3e8; color: var(--accent); }
.form-msg.err { background: #fbe9e7; color: var(--danger); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center; }
.about-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 1 / 1; object-fit: cover; }
.feature-list { display: flex; flex-direction: column; gap: 11px; margin-top: 14px; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; }
.tick {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 2px;
}

/* ---------- Reviews ---------- */
.review-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stars { color: var(--star); letter-spacing: 2px; margin-bottom: 8px; }
.stars .muted { color: var(--border); }
.review-card p { font-style: italic; color: var(--text); }
.review-author { display: flex; flex-direction: column; }
.review-author strong { font-weight: 600; }
.review-author .muted { font-size: 0.85rem; }

/* ---------- Contacts ---------- */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.contact-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 20px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-list li a { font-weight: 600; color: var(--primary-dark); }
.social-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* show-more pagination */
.catalog-more { display: flex; justify-content: center; margin-top: 28px; }
.catalog-more .btn { min-width: 200px; }

/* contacts popup */
.modal.modal-sm { max-width: 460px; }
.contacts-pop { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contacts-pop-logo { width: 64px; height: 64px; margin-bottom: 6px; }
.contacts-pop h2 { margin: 0 0 6px; }
.contacts-pop > .muted { margin: 0 0 18px; max-width: 36ch; }
.contacts-pop .contact-list { width: 100%; max-width: 320px; text-align: left; }
.contacts-pop .contact-list li { align-items: flex-start; }
.contacts-pop .social-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--text); color: #e9e0d4; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 26px; padding: 40px 18px 28px; }
.footer-grid h4 { color: #fff; margin-bottom: 12px; }
.footer-grid a { display: block; color: #c9bfb2; padding: 4px 0; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-about { color: #b6ab9d; font-size: 0.92rem; max-width: 34ch; }
.footer-grid .brand-name { color: #fff; font-size: 1.4rem; }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: #9c9183;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: var(--danger); color: #fff; }

/* ---------- Auth pages ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  background:
    radial-gradient(120% 120% at 0% 0%, var(--primary-soft) 0%, transparent 45%),
    var(--bg);
}
.auth-split {
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-aside { display: none; }
.auth-main { padding: 30px 22px 28px; }
.auth-main h1 { text-align: center; margin-bottom: 4px; font-size: clamp(1.6rem, 5vw, 2rem); }
.auth-main > .muted.center { margin-bottom: 22px; }
.auth-mobile-brand { margin-bottom: 18px; justify-content: center; }
.auth-switch-link { color: var(--primary-dark); font-weight: 600; }
.auth-switch-link:hover { text-decoration: underline; }

.auth-aside-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
}
.auth-aside-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
}
.auth-aside-logo img { width: 42px; height: 42px; object-fit: contain; }
.auth-aside-title { color: #fff; margin: 0 0 8px; }
.auth-aside-text { color: rgba(255, 247, 240, 0.9); margin: 0; line-height: 1.6; }
.auth-aside-list { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.auth-aside-list li { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 500; }
.auth-aside-list .tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.8rem;
  flex-shrink: 0;
}

@media (min-width: 760px) {
  .auth-split { grid-template-columns: 1.05fr 1fr; }
  .auth-aside {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 40px 36px;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  }
  .auth-mobile-brand { display: none; }
  .auth-main { padding: 46px 42px; }
  .auth-main h1 { text-align: left; }
  .auth-main > .muted.center { text-align: left; }
}

/* ---------- Verify ---------- */
.verify-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 2rem;
}
.verify-status { text-align: center; }

/* ---------- Profile ---------- */
.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.tabs button {
  border: 0;
  background: none;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button.active { color: var(--primary-dark); border-bottom-color: var(--primary); }

.order-list, .order-items { display: flex; flex-direction: column; gap: 14px; }
.order-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.order-items { gap: 6px; font-size: 0.9rem; color: var(--muted); }
.order-total { font-weight: 700; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; }

.status { font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.02em; }
.tag-ok { background: #eaf3e8; color: var(--accent); }
.tag-warn { background: #fbeede; color: #b07a26; }

.empty-state { text-align: center; padding: 50px 18px; color: var(--muted); }

/* ---------- Admin ---------- */
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.admin-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.admin-row-info { min-width: 0; }
.admin-row-info strong { display: block; font-size: 0.95rem; }
.admin-row-actions { display: flex; gap: 6px; }

.editor-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.variant-rows { display: flex; flex-direction: column; gap: 10px; }
.variant-del { align-self: center; }

.modal-lg { max-width: 720px; }
.modal-title { margin: 0 0 18px; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(40, 30, 24, 0.55);
  opacity: 0;
  transition: opacity 0.25s;
}
.modal-backdrop.open { opacity: 1; }
.modal-backdrop .modal { transform: translateY(40px); }
.modal-backdrop.open .modal { transform: translateY(0); }

/* Small dialog box used inside modal-backdrop (e.g. forgot-password form) */
.modal-box {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 460px;
  transform: translateY(40px);
  transition: transform 0.25s;
}
.modal-backdrop.open .modal-box { transform: translateY(0); }
.modal-box .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--surface-2);
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box .modal-close:hover { background: var(--border); }

.is-hidden { display: none !important; }

/* ==========================================================================
   TABLET  (>= 640px)
   ========================================================================== */
@media (min-width: 640px) {
  .container { padding: 0 24px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .hero-stats { gap: 40px; }
  .modal-overlay { align-items: center; padding: 24px; }
  .modal { border-radius: var(--radius-lg); max-height: 90vh; }
  .modal-backdrop { align-items: center; padding: 24px; }
  .pm-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ==========================================================================
   DESKTOP  (>= 960px)
   ========================================================================== */
@media (min-width: 900px) {
  :root { --header-h: 68px; }
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
  /* Hide mobile nav entirely on desktop */
  .mobile-nav { display: none !important; }
  .hero { padding: 56px 0 24px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  .section { padding: 72px 0; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .review-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .contact-card { padding: 40px 48px; max-width: 720px; margin: 0 auto; }
}

/* ==========================================================================
   FIRST-VISIT LOADER  — cream card with cat progress bar
   ========================================================================== */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0e6d2;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  overflow: hidden;
}
.site-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
html.no-loader .site-loader { display: none !important; }

/* Corner decorations — absolutely positioned SVGs */
.loader-deco {
  position: absolute;
  pointer-events: none;
}
.loader-deco--tl { top: 0; left: 0; width: clamp(120px, 18vw, 220px); height: auto; }
.loader-deco--tr { top: 0; right: 0; width: clamp(80px, 12vw, 140px); height: auto; }
.loader-deco--bl { bottom: 0; left: 0; width: clamp(70px, 10vw, 120px); height: auto; }
.loader-deco--br { bottom: 0; right: 0; width: clamp(80px, 11vw, 130px); height: auto; }

/* Central content column */
.loader-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
  animation: loader-fade-in 0.5s ease both;
}
@keyframes loader-fade-in {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Logo image */
.loader-logo {
  width: clamp(210px, 33vw, 360px);
  height: clamp(210px, 33vw, 360px);
  object-fit: contain;
  margin-bottom: 4px;
  /* give the SVG its correct dark-brown colour on the cream background */
  filter: brightness(0) saturate(100%) invert(15%) sepia(30%) saturate(600%) hue-rotate(350deg) brightness(40%);
}

/* Title block */
.loader-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

/* "— PET LOFT —" row */
.loader-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.loader-title-text {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  letter-spacing: 0.18em;
  color: #3d2410;
  line-height: 1;
}
.loader-dash {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1rem, 3vw, 1.6rem);
  color: #3d2410;
  opacity: 0.7;
  line-height: 1;
}

/* "PREMIUM HOMES FOR PETS" */
.loader-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.6rem, 1.8vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  color: #6b4c2a;
  margin: 0;
  text-transform: uppercase;
}

/* Diamond ornament divider */
.loader-ornament {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.loader-ornament-line {
  display: block;
  width: clamp(40px, 8vw, 80px);
  height: 1px;
  background: #6b4c2a;
  opacity: 0.55;
}

/* Progress bar wrapper */
.loader-bar-wrap {
  width: min(440px, 82vw);
  margin: 4px 0 14px;
}
.loader-bar-track {
  position: relative;
  height: 56px;
  background: #e8d8c0;
  border-radius: 999px;
  box-shadow:
    inset 0 2px 6px rgba(80,40,10,0.18),
    0 2px 8px rgba(80,40,10,0.1);
  overflow: visible;
}

/* Sandy fill */
.loader-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c4893a 0%, #d4a050 50%, #c8923e 100%);
  overflow: hidden;
  transition: width 0.05s linear;
}

/* Sheen overlay inside the fill */
.loader-bar-sheen {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    105deg,
    transparent 0px,
    rgba(255,255,255,0.08) 6px,
    transparent 12px
  );
}

/* Paw SVG watermarks inside the bar — visible through the fill */
.loader-bar-paws {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 60px);
  height: 56px;
  pointer-events: none;
}

/* Cat face icon riding at the right edge of the fill */
.loader-cat-face {
  position: absolute;
  top: 50%;
  left: -27px;          /* starts off-track; JS drives left: calc(N% - 27px) */
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid #e8d8c0;
  background: #e8d8c0;
  overflow: hidden;
  transition: left 0.05s linear;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(40,20,5,0.22);
}

/* Percentage label */
.loader-pct {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  color: #6b4c2a;
  letter-spacing: 0.04em;
  margin: 0;
}
.loader-paw-icon { fill: #c8a882; flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  .loader-center { animation: none; }
  .loader-bar-fill, .loader-cat-face { transition: none; }
}

/* ==========================================================================
   WIDE  (>= 1200px)
   ========================================================================== */
@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   AUTH — fixed back button (top-left corner, outside all containers)
   ========================================================================== */
.auth-back-fixed {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px 7px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.auth-back-fixed:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.auth-back-fixed svg { flex-shrink: 0; }

/* ==========================================================================
   FAQ — profile tab
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq-item[open] {
  border-color: var(--primary);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item[open] .faq-question::after {
  content: "−";
}
.faq-answer {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.faq-answer p { margin: 0; }

/* ==========================================================================
   ENGRAVING — product modal option
   ========================================================================== */
.engraving-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.engraving-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}
.engraving-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.engraving-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}
.engraving-input:focus { outline: none; border-color: var(--primary); }
.engraving-input.hidden { display: none; }

/* ==========================================================================
   HOUSE PASSPORT — public check page
   ========================================================================== */
.passport-page {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.passport-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.passport-icon {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 4px;
}
.passport-hero h1 { margin: 0 0 6px; }
.passport-hero .muted { margin: 0; }

.passport-search-form { display: flex; flex-direction: column; gap: 10px; }
.passport-input-row {
  display: flex;
  gap: 10px;
}
.passport-input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
}
.passport-input:focus { outline: none; border-color: var(--primary); }

/* Result card */
.passport-card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  background: var(--surface);
  overflow: hidden;
}
.passport-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.passport-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.passport-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.passport-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.passport-card-head h2 { margin: 0; }

.passport-warranty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.warranty-ok   { background: #dcfce7; color: #166534; }
.warranty-expired { background: #fee2e2; color: #991b1b; }
.warranty-icon { font-size: 1.1rem; font-weight: 700; }
.passport-warranty strong { display: block; font-size: 0.95rem; }

.passport-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.passport-table th,
.passport-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.passport-table th { color: var(--muted); font-weight: 500; width: 38%; }
.passport-table td code {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
}

.passport-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.passport-desc p { margin: 0; }

/* ==========================================================================
   ADMIN — orders + passport tabs
   ========================================================================== */
.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.admin-actions { display: flex; gap: 10px; align-items: center; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th { background: var(--surface-2); font-weight: 600; }

.order-total {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  max-width: 280px;
  margin-left: auto;
}
.order-total > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.order-total .grand { font-size: 1.05rem; border-top: 1px solid var(--border); padding-top: 8px; }

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-new        { background: #dbeafe; color: #1d4ed8; }
.status-processing { background: #fef9c3; color: #854d0e; }
.status-done       { background: #dcfce7; color: #166534; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }

.order-status-sel {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
}

.admin-thumb-empty {
  background: var(--surface-2);
  border-radius: 6px;
}

/* Passport modal form-grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.form-grid .field-full { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field-full { grid-column: 1; }
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}
.contact-list li {
  display: flex;
  gap: 12px;
}
.contact-list .muted { min-width: 100px; }

.modal-lg { max-width: min(720px, 95vw); }

@media (max-width: 600px) {
  .passport-input-row { flex-direction: column; }
  .passport-hero { flex-direction: column; gap: 12px; }
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.prof-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  min-height: 70vh;
}

/* Sidebar */
.prof-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 80px;
}
.prof-avatar-wrap { text-align: center; margin-bottom: 20px; }
.prof-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto 10px;
}
.prof-avatar-lg { width: 80px; height: 80px; }
.prof-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.prof-avatar-initials { color: #fff; font-size: 1.3rem; font-weight: 700; }
.prof-avatar-name  { font-weight: 600; font-size: .95rem; }
.prof-avatar-email { font-size: .8rem; color: var(--muted); margin: 2px 0 8px; }

.tag { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.tag-ok   { background: #d4edda; color: #166534; }
.tag-warn { background: #fff3cd; color: #856404; }

.prof-nav { display: flex; flex-direction: column; gap: 2px; }
.prof-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: none;
  background: none;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text);
  text-align: left;
  width: 100%;
  position: relative;
  transition: background .15s, color .15s;
}
.prof-nav-item:hover { background: var(--bg); }
.prof-nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.prof-nav-item svg { flex-shrink: 0; opacity: .75; }
.prof-nav-item.active svg { opacity: 1; }
.prof-logout { margin-top: 12px; color: var(--muted); font-size: .85rem; justify-content: center; }

/* Content */
.prof-content { flex: 1; min-width: 0; }

.tab-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}
.tab-title    { font-size: 1.25rem; font-weight: 700; margin: 0 0 20px; }
.tab-subtitle { font-size: 1rem; font-weight: 600; margin: 0 0 16px; color: var(--primary); }

/* Profile form */
.prof-form { max-width: 560px; }
.prof-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-bottom: 16px;
}
.prof-form-grid .field-full { grid-column: 1 / -1; }

.prof-edit-avatar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.prof-edit-avatar-info { flex: 1; }

.prof-section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.form-msg { font-size: .85rem; padding: 8px 12px; border-radius: 6px; }
.form-msg-ok  { background: #d4edda; color: #166534; }
.form-msg-err { background: #f8d7da; color: #842029; }

.field-input {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  width: 100%;
  font-size: 1rem;
}
.field-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.field-label { font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 4px; display: block; }

.verify-banner {
  background: #fff9e6;
  border: 1px solid #f5c542;
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.verify-banner p { margin: 0; font-size: .88rem; }

/* Orders */
.order-list { display: flex; flex-direction: column; gap: 16px; }
.order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
}
.order-items { list-style: none; padding: 0; margin: 0 0 10px; font-size: .88rem; line-height: 1.7; }
.order-card-foot {
  display: flex;
  gap: 16px;
  font-size: .88rem;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.status {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.status-new        { background: #dbeafe; color: #1e40af; }
.status-processing { background: #fef3c7; color: #92400e; }
.status-done       { background: #d1fae5; color: #065f46; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }

/* Favorites */
.fav-grid { display: flex; flex-direction: column; gap: 12px; }
.fav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.fav-thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.fav-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fav-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fav-actions { display: flex; gap: 8px; flex-shrink: 0; }
.fav-remove { color: var(--muted); }

/* Cart tab */
.cart-item-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.qty-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.cart-item-price { font-weight: 600; white-space: nowrap; }
.cart-item-remove { border: none; background: none; cursor: pointer; font-size: 1.2rem; color: var(--muted); }
.cart-totals { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.cart-total-row { display: flex; justify-content: space-between; font-size: .9rem; }
.cart-total-row.grand { font-size: 1rem; font-weight: 700; padding-top: 8px; border-top: 1px solid var(--border); }
.btn-block { width: 100%; justify-content: center; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.empty-icon { font-size: 3rem; }

/* ============================================================
   CHAT (user-facing + admin)
   ============================================================ */
.chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 4px;
  margin-left: auto;
}

.chat-section { padding: 0 !important; overflow: hidden; }
.chat-window {
  display: flex;
  flex-direction: column;
  height: 540px;
  min-height: 360px;
}
.chat-window .tab-title {
  padding: 20px 24px 12px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.chat-loading { text-align: center; color: var(--muted); font-size: .88rem; padding: 24px; }

/* Support header */
.chat-support-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.chat-support-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.chat-support-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.chat-support-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--surface);
}
.chat-support-dot.online  { background: #10b981; animation: statusBlink 1.8s infinite; }
.chat-support-dot.offline { background: #9ca3af; }
.chat-support-info { display: flex; flex-direction: column; gap: 1px; }
.chat-support-name  { font-weight: 600; font-size: .9rem; }
.chat-support-email { font-size: .78rem; color: var(--muted); }
.chat-support-status { font-size: .78rem; color: var(--muted); }
.chat-support-status.is-online { color: #10b981; font-weight: 500; }
.chat-support-status.is-typing { color: var(--primary); font-weight: 500; font-style: italic; }

/* Chat message with avatar */
.chat-msg {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  max-width: 75%;
}
.chat-msg-body { display: flex; flex-direction: column; }
.chat-avatar-wrap { flex-shrink: 0; }
.chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.chat-avatar-initials {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* me = current user's own messages (right side) */
.chat-msg-me,
.chat-msg-user  { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-me .chat-msg-body,
.chat-msg-user .chat-msg-body { align-items: flex-end; }
/* them = other party's messages (left side) */
.chat-msg-them,
.chat-msg-admin { align-self: flex-start; }
.chat-msg-them .chat-msg-body,
.chat-msg-admin .chat-msg-body { align-items: flex-start; }

.chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .9rem;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg-me    .chat-bubble,
.chat-msg-user  .chat-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-them  .chat-bubble,
.chat-msg-admin .chat-bubble { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.chat-meta { font-size: .72rem; color: var(--muted); margin-top: 3px; }

.chat-compose {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .9rem;
  outline: none;
  background: var(--bg);
  color: var(--text);
}
.chat-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chat-send { white-space: nowrap; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: var(--surface);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: "+"; font-size: 1.2rem; color: var(--primary); }
details[open] .faq-question::after { content: "−"; }
.faq-answer { padding: 12px 16px; font-size: .88rem; line-height: 1.6; background: var(--bg); color: var(--muted); }
.faq-answer p { margin: 0; }

/* ============================================================
   ADMIN CHAT
   ============================================================ */
.admin-chat-layout {
  display: flex;
  gap: 0;
  height: 560px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 16px;
}
.admin-chat-threads {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--surface);
}
.admin-chat-thread {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
  gap: 2px;
  transition: background .15s;
  position: relative;
}
.admin-chat-thread:hover  { background: var(--bg); }
.admin-chat-thread.active { background: var(--primary-soft); }
.admin-chat-thread-name  { font-size: .88rem; font-weight: 600; }
.admin-chat-thread-email { font-size: .76rem; }
.admin-chat-thread .chat-badge { margin-left: 0; position: absolute; top: 10px; right: 10px; }

.admin-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.admin-chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}
.admin-chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  flex-shrink: 0;
}
.admin-chat-main .chat-messages { background: var(--bg); }
.admin-chat-main .chat-compose  { background: var(--surface); }

/* ============================================================
   RESPONSIVE — Profile
   ============================================================ */
@media (max-width: 900px) {
  .prof-layout { flex-direction: column; }
  .prof-sidebar {
    width: 100%;
    position: static;
  }
  .prof-nav { flex-direction: row; flex-wrap: wrap; }
  .prof-nav-item { flex: none; }
}
@media (max-width: 600px) {
  .tab-section { padding: 18px 14px; }
  .prof-form-grid { grid-template-columns: 1fr; }
  .prof-form-grid .field-full { grid-column: 1; }
  .admin-chat-threads { width: 150px; }
  .admin-chat-thread-name { font-size: .8rem; }
  .chat-msg { max-width: 88%; }
  .chat-window { height: calc(100dvh - 280px); min-height: 320px; }
  .chat-compose { gap: 6px; padding: 10px 10px; }
  .chat-compose-tools { flex-shrink: 0; }
  .chat-input { font-size: .85rem; padding: 9px 10px; }
  .chat-send { padding: 0 10px; min-width: 38px; }
}

/* ================================================================
   CATALOG SEARCH + SORT TOOLBAR
   ================================================================ */
.catalog-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.catalog-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.catalog-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.catalog-search-input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .92rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
  box-sizing: border-box;
}
.catalog-search-input:focus { border-color: var(--color-primary); }
.catalog-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
  display: flex;
  align-items: center;
  line-height: 1;
}
.catalog-search-clear:hover { color: var(--text); }
.catalog-sort-select {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  outline: none;
  font-family: inherit;
  flex-shrink: 0;
}
.catalog-sort-select:focus { border-color: var(--color-primary); }
.catalog-empty-msg { grid-column: 1/-1; padding: 40px 0; text-align: center; }
@media (max-width: 560px) {
  .catalog-toolbar { flex-direction: column; align-items: stretch; }
  .catalog-sort-select { width: 100%; }
}

/* ================================================================
   PHONE DIAL CODE PICKER (register page)
   ================================================================ */
.phone-row {
  display: flex;
  gap: 0;
  align-items: stretch;
}
.dial-wrap {
  position: relative;
  flex-shrink: 0;
}
.dial-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 44px;
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: .88rem;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .15s;
}
.dial-btn:hover { background: var(--bg); }
.dial-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 300;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0,0,0,.13);
  min-width: 210px;
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  padding: 4px 0;
  margin: 0;
}
.dial-option {
  padding: 8px 14px;
  cursor: pointer;
  font-size: .87rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dial-option:hover { background: var(--bg); }
.dial-code-num { margin-left: auto; color: var(--muted); font-size: .8rem; }
.phone-input {
  flex: 1;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .92rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  height: 44px;
  font-family: inherit;
  transition: border-color .15s;
}
.phone-input:focus { border-color: var(--color-primary); }
.hidden-file-input { display: none !important; }

/* ================================================================
   PASSWORD STRENGTH METER
   ================================================================ */
.pwd-wrap {
  position: relative;
}
.pwd-wrap .field-input,
.pwd-wrap input { padding-right: 42px; }
.pwd-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
  display: flex;
  align-items: center;
  line-height: 1;
}
.pwd-toggle:hover { color: var(--text); }
.pwd-strength-wrap {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pwd-strength-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.pwd-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width .3s ease, background-color .3s ease;
}
.pwd-strength-fill.pwd-weak   { background: #ef4444; }
.pwd-strength-fill.pwd-fair   { background: #f59e0b; }
.pwd-strength-fill.pwd-good   { background: #22c55e; }
.pwd-strength-fill.pwd-strong { background: #16a34a; }
.pwd-strength-label           { font-size: .78rem; white-space: nowrap; color: var(--muted); min-width: 56px; }
.pwd-strength-label.pwd-weak  { color: #ef4444; }
.pwd-strength-label.pwd-fair  { color: #f59e0b; }
.pwd-strength-label.pwd-good  { color: #22c55e; }
.pwd-strength-label.pwd-strong{ color: #16a34a; }
.pwd-rules {
  list-style: none;
  font-size: .8rem;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}
.rule { transition: color .2s; }
.rule-ok { color: #16a34a; font-weight: 500; }

/* ================================================================
   FIELD LABEL / HINT HELPERS
   ================================================================ */
.field-label-auth {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
.req { color: var(--color-primary); margin-left: 1px; }
.field-hint {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ================================================================
   REVIEWS — home page cards
   ================================================================ */
.review-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-rating { font-size: 1.1rem; }
.stars-filled  { color: #f59e0b; }
.stars-empty   { color: var(--border); }
.review-text   { font-size: .9rem; font-style: italic; line-height: 1.55; flex: 1; color: var(--text); }
.review-author { display: flex; gap: 8px; align-items: center; font-size: .83rem; flex-wrap: wrap; }
.review-write-wrap { display: flex; justify-content: center; padding: 8px 0 4px; }

/* ================================================================
   REVIEW MODAL — star picker
   ================================================================ */
.star-picker {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.star-pick {
  background: none;
  border: none;
  font-size: 1.9rem;
  cursor: pointer;
  color: var(--border);
  padding: 0 3px;
  transition: color .12s, transform .1s;
  line-height: 1;
}
.star-pick.selected,
.star-pick.hover { color: #f59e0b; }
.star-pick:hover  { transform: scale(1.18); }

/* ================================================================
   ADMIN — reviews moderation list
   ================================================================ */
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.rev-card   { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.rev-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}
.rev-text { font-style: italic; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.rev-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rev-status {
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  white-space: nowrap;
}
.rev-status-pending  { background: #fef9c3; color: #92400e; }
.rev-status-approved { background: #dcfce7; color: #166534; }
.rev-status-rejected { background: #fee2e2; color: #991b1b; }
.stars-sm { font-size: .9rem; color: #f59e0b; }
.tag-sm {
  font-size: .72rem;
  background: var(--surface-2);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  color: var(--muted);
}
.admin-rev-filter.active {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}

/* ================================================================
   PASSPORT — enhanced warranty block
   ================================================================ */
.passport-warranty {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  line-height: 1.4;
}
.warranty-ok {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
}
.warranty-expired {
  background: #fff7ed;
  border: 1.5px solid #fdba74;
  color: #9a3412;
}
.passport-warranty svg { flex-shrink: 0; margin-top: 2px; }
.passport-warranty div { display: flex; flex-direction: column; gap: 4px; }
.passport-warranty strong { font-size: .95rem; }
.passport-warranty span  { font-size: .85rem; opacity: .9; }
.passport-warranty-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: .78rem;
  color: var(--muted);
  margin-top: 18px;
  line-height: 1.55;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.passport-warranty-note svg { flex-shrink: 0; margin-top: 1px; }
.passport-notes {
  margin-top: 12px;
  font-size: .88rem;
  background: var(--surface-2);
  padding: 10px 14px;
  border-radius: var(--radius);
  line-height: 1.5;
}

/* ================================================================
   PRODUCT MODAL — review button row
   ================================================================ */
.pm-review-row { margin-top: 10px; }

/* ================================================================
   PROFILE — avatar file upload
   ================================================================ */
.prof-edit-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ================================================================
   PROFILE — password rules list (inline)
   ================================================================ */
#profilePwdRules { margin-top: 8px; }

/* ================================================================
   ADMIN — Login page redesign
   ================================================================ */
.admin-login-page {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--header-h));
}
@media (min-width: 760px) {
  .admin-login-page { grid-template-columns: 1.1fr 1fr; }
}
.admin-login-aside {
  display: none;
  background: var(--text);
  padding: 48px 44px;
  flex-direction: column;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 760px) {
  .admin-login-aside { display: flex; }
}
.admin-login-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(192, 103, 63, 0.25) 0%, transparent 60%);
  pointer-events: none;
}
.admin-login-logo {
  filter: brightness(0) invert(1);
  opacity: 0.9;
  width: 64px; height: 64px;
}
.admin-login-aside-text h2 {
  color: #fff;
  font-size: 1.8rem;
  margin: 0 0 10px;
}
.admin-login-aside-text p {
  color: rgba(255, 247, 240, 0.75);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}
.admin-login-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}
.admin-login-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 247, 240, 0.88);
  font-size: 0.9rem;
}
.admin-feat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.admin-login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}
.admin-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-md);
}
.admin-login-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.admin-login-title {
  font-size: 1.5rem;
  margin: 0 0 6px;
}
.admin-login-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
}
.admin-login-back {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}
.admin-login-back a { color: var(--primary); }

/* ================================================================
   FOOTER — Rich redesign
   ================================================================ */
.site-footer { background: var(--text); color: #e9e0d4; margin-top: 20px; }
.footer-top { padding: 52px 0 32px; border-bottom: 1px solid rgba(255,247,240,0.1); }
.footer-grid-rich {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 40px;
}
@media (min-width: 640px) {
  .footer-grid-rich { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .footer-grid-rich { grid-template-columns: 2fr 1fr 1.2fr 1.1fr; }
}
.footer-brand-link { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand-link .brand-name { color: #fff; font-size: 1.35rem; }
.footer-about { color: #b6ab9d; font-size: 0.88rem; line-height: 1.65; max-width: 30ch; margin: 0 0 16px; }
.footer-trust { display: flex; flex-direction: column; gap: 8px; }
.footer-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,247,240,0.65);
}
.footer-trust-item svg { color: var(--primary); flex-shrink: 0; }

.footer-nav-col h4,
.footer-contacts-col h4,
.footer-info-col h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 14px; font-family: var(--font-sans); }
.footer-nav-col a,
.footer-contacts-col a { display: block; color: #c9bfb2; padding: 4px 0; font-size: 0.88rem; transition: color .15s; }
.footer-nav-col a:hover,
.footer-contacts-col a:hover { color: #fff; }

.footer-contact-item {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  padding: 5px 0 !important;
}
.footer-contact-item svg { flex-shrink: 0; color: var(--primary); }
.footer-wa { color: #25d366 !important; }

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.footer-social-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,247,240,0.07);
  border: 1px solid rgba(255,247,240,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, background .15s;
}
.footer-social-icon:hover { transform: translateY(-2px) scale(1.08); background: rgba(255,247,240,0.13); }
.footer-social-ig svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.15)); }
.footer-social-tt svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.15)); }
.footer-social-fb svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.10)); }

.footer-hours { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.footer-hours-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  gap: 8px;
}
.footer-hours-item strong { color: #fff; }
.footer-hours-item span   { color: #b6ab9d; }

.footer-guarantee { display: flex; flex-direction: column; gap: 8px; }
.footer-guarantee-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.82rem; color: rgba(255,247,240,0.65); }
.fgi-icon {
  display: flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px;
  background: rgba(192,103,63,0.2);
  border-radius: 6px;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.footer-bottom-bar { padding: 16px 0; }
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #6b6259;
}
.footer-made { color: #6b6259; }

/* ================================================================
   WHATSAPP FLOATING BUTTON
   ================================================================ */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 22px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  padding: 14px 20px 14px 16px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background .18s, box-shadow .18s, transform .1s;
  white-space: nowrap;
}
.whatsapp-fab:hover {
  background: #1ebe5d;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
  transform: translateY(-2px);
}
.whatsapp-fab:active { transform: translateY(0); }
.whatsapp-fab-label { display: none; }
@media (min-width: 480px) {
  .whatsapp-fab-label { display: inline; }
}
@media (max-width: 479px) {
  .whatsapp-fab { padding: 14px; border-radius: 50%; }
}

/* ================================================================
   SOCIAL ICON LINKS (contacts modal)
   ================================================================ */
.social-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.social-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--text);
  background: var(--surface);
  transition: background .15s, color .15s, border-color .15s;
}
.social-icon-link:hover { background: var(--bg); }
.social-wa  { color: #128c7e; border-color: #dcf8c6; background: #f0fff4; }
.social-wa:hover  { background: #dcf8c6; }
.social-ig  { color: #c13584; }
.social-ig:hover  { background: #fdf0f9; border-color: #f7c6e8; }
.social-fb  { color: #1877f2; }
.social-fb:hover  { background: #ebf4ff; border-color: #c3dafe; }
.social-tt  { color: #010101; }
.social-tt:hover  { background: var(--bg); }

/* ================================================================
   CHAT — emoji panel + file tools
   ================================================================ */
.chat-compose-rich {
  padding: 10px 12px 10px 10px !important;
  gap: 6px !important;
  align-items: center;
  position: relative;
}
.chat-compose-tools {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.chat-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  color: var(--muted);
  transition: background .12s, color .12s;
}
.chat-tool-btn:hover { background: var(--bg); color: var(--text); }
.chat-emoji-panel {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 8px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 10px;
  width: 280px;
  max-width: calc(100vw - 24px);
}
.emoji-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.35rem;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
  transition: background .1s;
}
.emoji-btn:hover { background: var(--bg); }
.chat-file-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  font-size: 0.85rem;
}
.chat-msg-me    .chat-file-bubble,
.chat-msg-user  .chat-file-bubble { background: rgba(255,255,255,0.15); }
.chat-msg-them  .chat-file-bubble,
.chat-msg-admin .chat-file-bubble { background: var(--surface-2); }
.chat-file-name { font-size: 0.78rem; display: block; margin-top: 3px; opacity: 0.75; }

/* ================================================================
   MOBILE NAV — improved header/mobile layout
   ================================================================ */
.mobile-nav {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-md);
}
.mobile-nav a {
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-nav a:hover { background: var(--bg); }
.mobile-nav[hidden] { display: none !important; }

/* ================================================================
   REGISTER / LOGIN — mobile dial dropdown fix
   ================================================================ */
@media (max-width: 479px) {
  .dial-dropdown {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    min-width: min(90vw, 320px);
    max-height: 60vh;
    z-index: 9999;
  }
  .phone-row { flex-wrap: nowrap; }
  .dial-btn { font-size: .82rem; padding: 0 8px; }
  .auth-split { min-height: unset; }
  .auth-main { padding: 22px 16px 28px; }
}

/* ================================================================
   CATALOG SEARCH — mobile
   ================================================================ */
@media (max-width: 480px) {
  .catalog-toolbar { gap: 8px; }
  .catalog-search-input { font-size: .88rem; }
  .catalog-sort-select { font-size: .88rem; }
}

/* ================================================================
   ADMIN — reviews filter active state fix
   ================================================================ */
.admin-rev-filter {
  border-radius: 999px !important;
  font-size: 0.82rem;
}
.admin-rev-filter.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

/* ================================================================
   CHECKOUT modal — general improvements
   ================================================================ */
#checkoutModal .modal { max-width: min(520px, 95vw); }
.checkout-hero {
  text-align: center;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.checkout-hero h2 { margin: 0 0 4px; font-size: 1.35rem; }
.checkout-hero p  { color: var(--muted); font-size: 0.9rem; margin: 0; }
.checkout-summary {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}
.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  color: var(--muted);
}
.checkout-summary-row.grand {
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 8px;
  font-size: 1rem;
}
.checkout-submit-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* ================================================================
   PROFILE ICON — notification dot
   ================================================================ */
.dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
  pointer-events: none;
}
.dot-alert {
  background: #ef4444;
  animation: dot-pulse 1.6s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.3); }
}

/* ================================================================
   DIAL DROPDOWN — mobile modal backdrop
   ================================================================ */
@media (max-width: 479px) {
  /* dark backdrop behind dropdown on mobile */
  .dial-wrap.open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
  }
  .dial-dropdown {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    min-width: min(90vw, 310px);
    max-height: 55vh;
    z-index: 9999;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
  }
  .dial-option { padding: 12px 16px; font-size: .92rem; }
  .auth-split { min-height: auto; }
  .auth-main { padding: 20px 16px 30px; }
}

/* ================================================================
   FORM GRID — 2 column layout for checkout + profile
   ================================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.form-grid .field-full { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field-full { grid-column: 1; }
}

/* ================================================================
   CHECKOUT — button flex alignment
   ================================================================ */
#checkoutModal .btn-primary { display: flex; align-items: center; justify-content: center; gap: 10px; }

/* ================================================================
   MOBILE — general overflow & layout fixes
   ================================================================ */
@media (max-width: 600px) {
  .site-footer { word-break: break-word; }
  .footer-grid-rich { gap: 28px 0; }
  .footer-brand-col,
  .footer-nav-col,
  .footer-contacts-col,
  .footer-info-col { padding: 0; }
  .whatsapp-fab { bottom: 16px; right: 14px; }
  .chat-emoji-panel { width: calc(100vw - 24px); }
  .admin-login-form-wrap { padding: 24px 16px; }
  .admin-login-card { padding: 24px 18px 20px; }
}

/* ================================================================
   ADMIN — image gallery editor
   ================================================================ */
.img-gallery-editor {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 14px 12px 10px;
  background: var(--surface-alt, var(--surface));
  transition: border-color 0.2s, background 0.15s;
}
.img-gallery-editor.drag-over {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}
.img-gallery-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.img-gallery-item {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: grab;
  background: var(--bg);
  transition: border-color 0.18s, transform 0.15s;
}
.img-gallery-item:active { cursor: grabbing; }
.img-gallery-item.dragging { opacity: 0.45; transform: scale(0.93); }
.img-gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.img-gallery-main-badge {
  position: absolute;
  bottom: 4px; left: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  pointer-events: none;
  letter-spacing: 0.02em;
}
.img-gallery-del {
  position: absolute;
  top: 3px; right: 3px;
  width: 20px; height: 20px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s;
}
.img-gallery-item:hover .img-gallery-del { opacity: 1; }
.img-gallery-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.18s, background 0.15s;
  user-select: none;
}
.img-gallery-add-btn:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--bg)); }
.img-gallery-hint { margin: 8px 0 0; }

/* ================================================================
   CARD ENGRAVING — inline option on product cards
   ================================================================ */
.card-engraving {
  margin: 8px 0 6px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--primary) 5%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 8px;
}
.card-engraving-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.card-engraving-toggle input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px; height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}
.ceng-input { margin-top: 8px; font-size: 0.84rem; padding: 6px 10px; }

/* ================================================================
   CONSTRUCTOR PAGE — layout
   ================================================================ */
.constructor-page .section-head {
  text-align: center;
  margin-bottom: 40px;
}
.constructor-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) {
  .constructor-layout { grid-template-columns: 1fr; }
}

/* Panel */
.constructor-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.ctor-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
}

/* Shape buttons */
.ctor-shape-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ctor-shape-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.18s, background 0.15s, transform 0.12s;
  text-align: center;
}
.ctor-shape-btn:hover  { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--bg)); }
.ctor-shape-btn.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--bg)); color: var(--primary); transform: scale(1.02); }
.ctor-shape-icon { color: var(--text); line-height: 0; }
.ctor-shape-btn.active .ctor-shape-icon { color: var(--primary); }
.ctor-shape-label { font-size: 0.83rem; font-weight: 600; }
.ctor-shape-desc  { font-size: 0.72rem; }

/* Generic option buttons (size, material) */
.ctor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ctor-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  font-size: 0.83rem;
  transition: border-color 0.18s, background 0.15s;
  min-width: 60px;
}
.ctor-opt-btn:hover  { border-color: var(--primary); }
.ctor-opt-btn.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--bg)); color: var(--primary); font-weight: 600; }

/* Color swatches */
.ctor-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ctor-color-swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.14s, border-color 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.ctor-color-swatch:hover  { transform: scale(1.15); }
.ctor-color-swatch.active { border-color: var(--primary); transform: scale(1.18); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }

/* Extras */
.ctor-extras { display: flex; flex-direction: column; gap: 8px; }
.ctor-extra-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  transition: background 0.15s, border-color 0.15s;
}
.ctor-extra-item:has(input:checked) {
  background: color-mix(in srgb, var(--primary) 7%, var(--bg));
  border-color: var(--primary);
}
.ctor-extra-item input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.ctor-extra-label { flex: 1; font-size: 0.84rem; }
.ctor-extra-price { flex-shrink: 0; }

/* Preview column */
.constructor-preview-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 90px;
}
.constructor-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px 16px;
  text-align: center;
}
/* Photo-based preview */
.ctor-photo-preview { text-align: center; }
.ctor-photo-scene {
  position: relative;
  background: linear-gradient(to bottom, #f5ede2 0%, #ede1d2 100%);
  border-radius: 12px;
  overflow: hidden;
  padding: 24px 12px 0;
}
.ctor-scene-inner {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
}
.ctor-house-photo {
  display: block;
  max-height: 240px;
  width: auto;
  object-fit: contain;
  transition: filter .3s ease;
  flex-shrink: 0;
}
.ctor-house-size-s { max-height: 180px; }
.ctor-house-size-m { max-height: 240px; }
.ctor-house-size-l { max-height: 300px; }
.ctor-scratch-photo {
  display: block;
  max-height: 140px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  margin-bottom: 4px;
}
.ctor-human-ref {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
  flex-shrink: 0;
}
.ctor-human-svg {
  width: 28px;
  height: auto;
  max-height: 112px;
  display: block;
  opacity: 0.55;
}
.ctor-human-label {
  font-size: 0.67rem;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
}
.ctor-scene-floor {
  height: 14px;
  background: #e0d4c4;
  margin-top: 0;
}
.ctor-size-label { color: var(--muted); margin-top: 6px; }
.ctor-preview-labels {
  margin-top: 14px;
}
.ctor-label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.ctor-label-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--surface-alt, var(--bg));
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text);
}
.ctor-label-extra {
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
  border-color: color-mix(in srgb, var(--primary) 25%, transparent);
  color: var(--primary);
}

/* Price card */
.ctor-price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.ctor-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.ctor-price-row:last-of-type { border-bottom: none; }
.ctor-price-row.grand {
  font-size: 1.1rem;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid var(--border);
  border-bottom: none;
}
.ctor-order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.ctor-extra-included {
  background: color-mix(in srgb, var(--accent, #5f7a5b) 8%, var(--bg));
  border-color: color-mix(in srgb, var(--accent, #5f7a5b) 22%, transparent);
  color: var(--accent, #5f7a5b);
  cursor: default;
}
.ctor-extra-included svg { color: var(--accent, #5f7a5b); flex-shrink: 0; }

/* ── 3D Viewer ──────────────────────────────────────────────── */
/* Spinner inside viewer canvas */
.viewer3d-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer3d-spinner::after {
  content: "";
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin3d .8s linear infinite;
}
@keyframes spin3d { to { transform: rotate(360deg); } }

/* "Просмотр 3D" button inside product modal */
.btn-view3d {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 18px;
  background: var(--surface-2, #f0ebe4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius, 8px);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background .18s, transform .12s;
  width: 100%;
  justify-content: center;
}
.btn-view3d:hover { background: var(--border); transform: translateY(-1px); }
.btn-view3d svg { flex-shrink: 0; }

/* Admin: 3D model editor field */
.model3d-editor {
  margin-top: 6px;
}
.model3d-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.model3d-input-row input[type="text"] {
  flex: 1;
  min-width: 0;
}
.model3d-editor code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: .82rem;
  font-family: var(--font-mono, monospace);
}

/* ── Colour swatches — product modal ──────────────────────────── */
.pm-color-swatches {
  display: flex;
  gap: 8px;
  margin: 10px 0 4px;
  flex-wrap: wrap;
}
.pm-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  flex-shrink: 0;
}
.pm-swatch:hover {
  transform: scale(1.15);
}
.pm-swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--background), 0 0 0 5px var(--text);
}

/* ── Gallery colour tabs — admin ──────────────────────────────── */
.gallery-color-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.gallery-color-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface, #fff);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.gallery-color-tab:hover {
  border-color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,.08);
}
.gallery-color-tab.active {
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 20%, transparent);
}
/* Large swatch circle shown inside each tab */
.color-tab-swatch-lg {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
.color-tab-label {
  line-height: 1;
}
.color-tab-badge {
  margin-left: 2px;
  background: var(--primary, #c87941);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  line-height: 1.4;
}

/* ── Video embed in product modal ─────────────────────────────── */
.pm-video-wrap {
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}
.pm-video-wrap iframe,
.pm-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.pm-video-wrap video {
  object-fit: cover;
  border-radius: 10px;
}

/* ── Upload tabs (File / URL switcher) ────────────────────────── */
.upload-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.upload-tab {
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  border-radius: 0;
}
.upload-tab:hover { color: var(--text); }
.upload-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── Drop zone ────────────────────────────────────────────────── */
.upload-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 22px 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius, 8px);
  cursor: pointer;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  transition: border-color .18s, background .18s, color .18s;
}
.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  color: var(--primary);
}
.upload-drop-zone small { font-size: .75rem; opacity: .7; }

/* ── Progress bar ─────────────────────────────────────────────── */
.upload-progress {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--primary);
  width: 0%;
  transition: width .2s;
  position: relative;
}
.upload-progress-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: 3px;
  width: 100%;
}
.upload-progress > span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  min-width: 36px;
  text-align: right;
}

/* ── Current media row (name + action buttons) ────────────────── */
.media-current-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2, #f5f0eb);
  border-radius: var(--radius, 8px);
  flex-wrap: wrap;
}
.media-current-name {
  flex: 1;
  font-size: .83rem;
  font-family: var(--font-mono, monospace);
  color: var(--text);
  word-break: break-all;
  min-width: 0;
}

/* 3D viewer modal open animation */
#viewer3dBackdrop.open { opacity: 1; pointer-events: auto; }
#viewer3dBackdrop { opacity: 0; transition: opacity .2s; pointer-events: none; }
#viewer3dBackdrop.open .modal { transform: none; }
#viewer3dBackdrop .modal { transform: translateY(24px); transition: transform .25s; }

/* House shape badge on product cards */
.card-shape-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(192,103,63,0.95);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  z-index: 2;
  transform: translateY(34px);
}
.product-thumb .card-tag + .card-shape-badge { transform: translateY(34px); }

/* Online/typing indicators in admin chat threads */
.chat-status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.chat-status-dot.online { background: #4caf50; box-shadow: 0 0 0 2px rgba(76,175,80,.18); }
.chat-status-dot.offline { background: #c9c2b8; }
.chat-thread-typing { color: var(--primary); font-style: italic; font-size: .75rem; }

/* Bigger touch targets and image quality on mobile */
@media (max-width: 640px) {
  .product-card img, .pm-media img, .promo-slide img {
    image-rendering: -webkit-optimize-contrast;
  }
  .product-thumb { aspect-ratio: 1/1; overflow: hidden; }
  .product-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .pm-thumbs { gap: 6px; }
  .pm-thumb { width: 60px; height: 60px; }
  .pm-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .footer-grid-rich { grid-template-columns: 1fr; gap: 24px; }
  .footer-social { flex-wrap: wrap; gap: 10px; }
  .social-row { flex-wrap: wrap; }
}

/* 3D Viewer Loading Spinner */
.viewer3d-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.viewer3d-spinner-ring {
  position: relative;
  width: 60px;
  height: 60px;
}

.viewer3d-spinner-ring::before,
.viewer3d-spinner-ring::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-radius: 50%;
  top: 0;
  left: 0;
}

.viewer3d-spinner-ring::before {
  border-top-color: var(--primary);
  border-right-color: var(--primary);
  animation: spin 1.2s linear infinite;
}

.viewer3d-spinner-ring::after {
  border-bottom-color: var(--primary-soft);
  border-left-color: var(--primary-soft);
  animation: spin 1.2s linear infinite reverse;
  opacity: 0.5;
}

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

.viewer3d-spinner-text {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
  text-align: center;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.viewer3d-spinner-paw {
  font-size: 2rem;
  opacity: 0.3;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-8px); opacity: 0.6; }
}

