@font-face {
  font-family: "Yerevanyan";
  src: url("fonts/Yerevanyan-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #E4DBCA;
  --paper: #fbf7f0;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #ddd2c2;
  --accent: #3ea319;
  --accent-hover: #328414;
  --accent-soft: #e8f6e0;
  --brand-green: #3ea319;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --font: "Segoe UI", "Geologica", system-ui, -apple-system, sans-serif;
  --font-brand: "Yerevanyan", "Segoe UI", "Geologica", system-ui, sans-serif;
  --bottom-nav-h: 3.6rem;
  --cover-ratio: 2 / 3;
  /* мягкий крафт: бумага + зерно SVG */
  --kraft:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.36 0 0 0 0 0.26 0 0 0 0.28 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    var(--kraft),
    radial-gradient(ellipse 900px 420px at 12% -8%, rgba(62, 163, 25, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 700px 380px at 92% 8%, rgba(139, 105, 60, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #ebe3d4 0%, #E4DBCA 42%, #ddd4c3 100%);
  background-attachment: scroll;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100%;
}

@media (hover: hover) and (pointer: fine) {
  html, body {
    background-attachment: fixed;
  }
}

body.shopper {
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.5rem);
}

/* Верхняя полоска с телефоном */
.site-topbar {
  background: #2a6414;
  color: #fff;
  font-size: 0.84rem;
  line-height: 1.3;
}

.site-topbar[hidden] {
  display: none !important;
}

.site-topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.45rem 2.4rem 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  text-align: center;
}

.site-topbar-text {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.45rem;
}

.site-topbar-phone {
  color: #fff;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.site-topbar-phone:hover {
  text-decoration: underline;
}

.site-topbar-ico {
  margin-left: 0.15rem;
  font-size: 0.9em;
}

.site-topbar-close {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  opacity: 0.85;
  border-radius: 4px;
}

.site-topbar-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 560px) {
  .site-topbar {
    font-size: 0.78rem;
  }

  .site-topbar-inner {
    padding: 0.4rem 2.1rem 0.4rem 0.65rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.shop-sticky-head {
  position: sticky;
  top: 0;
  z-index: 40;
}

.shop-sticky-head .top.shop-top {
  position: relative;
  top: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 247, 240, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.top-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem 0.7rem;
}

.brand-yerevanyan {
  font-family: var(--font-brand);
}

.brand {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(1.15rem, 3.8vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.15;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo img {
  display: block;
  height: 44px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

@media (min-width: 640px) {
  .brand-logo img {
    height: 52px;
  }
}

/* Hero главной — логотип как бренд, без зелёной «пустыни» */
.shop-hero {
  margin: 0 0 1.35rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.shop-hero-inner {
  display: flex;
  align-items: center;
  gap: 1rem 1.35rem;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(62, 163, 25, 0.22);
  background:
    linear-gradient(105deg, rgba(62, 163, 25, 0.1) 0%, transparent 42%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.92) 0%, rgba(247, 240, 228, 0.88) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.shop-hero-logo {
  width: min(38vw, 148px);
  height: auto;
  border-radius: 14px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(46, 100, 24, 0.14);
}

.shop-hero-stock {
  margin: 0;
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--brand-green);
  font-variant-numeric: tabular-nums;
}

.shop-hero-copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

/* Mobile-only two-line brand next to logo; PC shows stock + contacts in one banner */
.shop-hero-brand {
  display: none;
  margin: 0;
  min-width: 0;
  font-size: 1.045rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.shop-hero-brand .brand-line {
  display: block;
}

.shop-hero-text {
  display: none;
}

.shop-hero-tag {
  margin: 0;
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.shop-hero-meta {
  margin: 0.4rem 0 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.shop-hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(62, 163, 25, 0.28);
  transition: background 0.15s, transform 0.15s;
}

.shop-hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Горизонтальная полка */
.shelf {
  margin: 0 0 1.5rem;
}

.shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.65rem;
}

.shelf-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.shelf-head h2 a {
  color: inherit;
  text-decoration: none;
}

.shelf-head a {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}

.shelf-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.1rem 0.65rem;
  margin: 0 -0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  align-items: stretch;
}

.shelf-track::-webkit-scrollbar {
  height: 6px;
}

.shelf-track::-webkit-scrollbar-thumb {
  background: #c5ddb8;
  border-radius: 999px;
}

.shelf-card {
  /* Жёсткая ширина: иначе min-width:auto раздувает карточку
     длинным словом в названии / placeholder «Առանց շապիկի». */
  flex: 0 0 118px;
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  scroll-snap-align: start;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  height: auto;
  align-self: stretch;
  box-sizing: border-box;
}

.shelf-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.shelf-cart-form {
  margin: 0.15rem 0 0;
  margin-top: auto;
  flex: 0 0 auto;
}

/* полка: было 0.22/0.25 + 0.65rem → −30% padding, −20% текст */
.btn.btn-cart.btn-shelf {
  width: 100%;
  padding: 0.165rem 0.2rem !important;
  font-size: 0.57rem !important;
  font-weight: 700;
  border-radius: 5px;
  line-height: 1.15;
  min-height: 0 !important;
  height: auto !important;
  box-sizing: border-box;
}

@media (min-width: 560px) {
  .shelf-card {
    flex-basis: 132px;
    width: 132px;
    min-width: 132px;
    max-width: 132px;
  }
}

.shelf-card .book-card-cover {
  position: relative;
  margin-bottom: 0.3rem;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: var(--cover-ratio);
  overflow: hidden;
  /* Та же текстура/цвет, что у страницы (#E4DBCA + kraft): белый фон
     «мокап»-обложек сливается через mix-blend-mode на <img> ниже. */
  background-color: var(--bg);
  background-image: var(--kraft);
  border-color: transparent;
}

/* Placeholder без своего aspect-ratio — иначе двойной ratio раздувает блок */
.shelf-card .book-card-cover .cover-ph,
.shelf-card .book-card-cover .cover-ph.sm {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  padding: 0.4rem;
  box-sizing: border-box;
}

.shelf-discount-badge {
  position: absolute;
  top: 0.3rem;
  left: 0.3rem;
  z-index: 2;
  display: inline-block;
  padding: 0.28rem 0.42rem;
  border-radius: 6px;
  background: #c0392b;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  white-space: nowrap;
}

/* Белые части обложки умножаются на крафтовую базу и «растворяются»,
   как будто книга стоит прямо на крафтовом фоне. Только полки главной. */
.shelf-card .book-card-cover img {
  mix-blend-mode: multiply;
}

/* Обложки с уже нормализованным фоном (кэш covers_craft): фон точно #E4DBCA,
   поэтому показываем как есть — multiply НЕ применяем (иначе фон затемнится). */
.shelf-card .book-card-cover img.craft-bg {
  mix-blend-mode: normal;
}

.shelf-card .book-card-title {
  font-size: 0.75rem;
  line-height: 1.25;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  /* фиксируем 2 строки — кнопки в один ряд */
  min-height: calc(1.25em * 2);
  height: calc(1.25em * 2);
}

.shelf-card .book-card-price {
  font-size: 0.82rem;
  margin: 0.2rem 0 0;
  flex: 0 0 auto;
}

/* Staff: чекбоксы пинов на полки главной */
.shelf-pins {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0.35rem 0 0.15rem;
  padding: 0.4rem 0.45rem;
  border: 1px solid rgba(30, 40, 50, 0.14);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.95);
  font-size: 0.72rem;
  line-height: 1.25;
}

.shelf-pins-title {
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: #445;
  margin-bottom: 0.1rem;
}

.shelf-pin {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
  color: #223;
}

.shelf-pin input {
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  accent-color: #2f6f4e;
}

.shelf-pin span {
  flex: 1 1 auto;
}

.shelf-pins-compact {
  padding: 0.3rem 0.35rem;
  font-size: 0.62rem;
  gap: 0.12rem;
}

.shelf-pins-compact .shelf-pins-title {
  font-size: 0.6rem;
}

.shelf-pins.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.shelf-pins.is-error {
  border-color: #c44;
  background: #fff5f5;
}

.shelf-card .shelf-pins {
  margin-top: 0.2rem;
}

.shelf-pins-cell {
  min-width: 11rem;
  vertical-align: top;
}

.shelf-pins-cell .shelf-pins {
  margin: 0;
}

.book-card-body .shelf-pins {
  margin-top: 0.45rem;
}

.detail .shelf-pins,
.book-detail .shelf-pins {
  max-width: 22rem;
  margin: 0.75rem 0 1rem;
  font-size: 0.85rem;
}

/* Чипы категорий */
.cat-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0 0.85rem;
  margin: 0 0 0.35rem;
  scrollbar-width: none;
}

.cat-chips::-webkit-scrollbar {
  display: none;
}

.cat-chips-inline {
  padding-top: 0;
  margin-bottom: 0.85rem;
}

.cat-chip {
  flex: 0 0 auto;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
}

.cat-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.cat-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Промо-баннер (текстовый из config) */
.promo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(120deg, rgba(62, 163, 25, 0.14), rgba(139, 105, 60, 0.1)),
    var(--paper);
  border: 1px solid #cfe8c2;
}

.promo-title {
  font-size: 1.02rem;
  font-weight: 800;
}

.promo-text {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1 1 12rem;
}

.promo-cta {
  margin-left: auto;
  font-weight: 800;
  color: var(--accent);
  font-size: 0.9rem;
}

/* Карусель баннеров под поиском */
.home-banners {
  position: relative;
  margin: 0 0 1.35rem;
  --banner-radius: 14px;
}

.genre-browse-bar {
  margin: 0 0 0.85rem;
}

.genre-browse-trigger {
  display: block;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
}

.genre-menu-dialog {
  border: none;
  border-radius: 14px;
  padding: 0;
  max-width: min(92vw, 26rem);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.genre-menu-dialog::backdrop {
  background: rgba(20, 24, 20, 0.45);
}

.genre-menu-inner {
  padding: 0.85rem 0.95rem 1rem;
}

.genre-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.genre-menu-title {
  margin: 0;
  font-size: 1.05rem;
}

.genre-menu-close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.15rem 0.35rem;
}

.genre-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(60vh, 22rem);
  overflow: auto;
  display: grid;
  gap: 0.35rem;
}

.genre-menu-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  background: #f5f7f5;
}

.genre-menu-link:hover {
  background: #e8f0e9;
  color: var(--accent);
}

.genre-menu-link.is-active {
  background: var(--accent);
  color: #fff;
}

.home-banners-viewport {
  overflow: hidden;
  border-radius: var(--banner-radius);
  border: 1px solid var(--line);
  background: #1a1410;
  box-shadow: var(--shadow);
}

.home-banners-track {
  display: flex;
  transition: transform 0.45s ease;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .home-banners-track {
    transition: none;
  }
}

.home-banner-slide {
  flex: 0 0 100%;
  position: relative;
  min-width: 0;
}

.home-banner-link,
.home-banner-static {
  display: block;
  line-height: 0;
}

.home-banner-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
}

.home-banners-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2a2218;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.home-banners-nav:hover {
  background: #fff;
}

.home-banners-nav.prev { left: 0.55rem; }
.home-banners-nav.next { right: 0.55rem; }

.home-banners-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.home-banners-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #c9c0b4;
  cursor: pointer;
}

.home-banners-dot.is-active {
  background: var(--accent, #3ea319);
  width: 1.1rem;
}

.home-banner-edit {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 3;
  max-width: min(20rem, calc(100% - 1.3rem));
  background: rgba(255, 255, 255, 0.96);
  border-radius: 10px;
  border: 1px solid #ddd5c8;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Режим Գնորդ: staff-chrome не должен «просвечивать» даже при сбое шаблона */
body.shopper .home-banner-edit,
body.shopper .staff-filters-bar,
body.shopper .shelf-pins {
  display: none !important;
}

.home-banner-edit summary {
  cursor: pointer;
  font-weight: 700;
  color: #2a2218;
  list-style: none;
}

.home-banner-edit summary::-webkit-details-marker { display: none; }

.home-banner-form {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
  padding-bottom: 0.25rem;
}

.home-banner-form label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: #555;
}

/* Drag-and-drop photo upload (file-drop.js) */
.file-drop {
  position: relative;
  margin: 0.35rem 0 0;
}

.file-drop-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 7rem;
  padding: 1rem 0.85rem;
  border: 2px dashed #c8bcaa;
  border-radius: 0.65rem;
  background: linear-gradient(165deg, #fbf7f0 0%, #f3ebe0 100%);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

.file-drop-zone:hover,
.file-drop-zone:focus-visible {
  border-color: #6b8f5e;
  background: #f7f3eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 143, 94, 0.14);
}

.file-drop.is-dragover .file-drop-zone {
  border-color: #4a7a3a;
  background: #eef5ea;
  box-shadow: 0 0 0 3px rgba(74, 122, 58, 0.2);
}

.file-drop.has-file .file-drop-zone {
  min-height: 5.75rem;
}

.file-drop-icon {
  width: 2.1rem;
  height: 2.1rem;
  opacity: 0.62;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a7a3a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0L8 8m4-4 4 4'/%3E%3Cpath d='M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E");
}

.file-drop-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #3a3228;
}

.file-drop-sub {
  font-size: 0.78rem;
  color: #7a7268;
}

.file-drop-name {
  font-size: 0.78rem;
  color: #4a7a3a;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-drop-preview {
  margin-top: 0.15rem;
}

.file-drop-preview img {
  display: block;
  max-width: 120px;
  max-height: 120px;
  border-radius: 0.45rem;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.home-banner-form .file-drop {
  margin-top: 0.2rem;
}

.home-banner-form .file-drop-zone {
  min-height: 5.25rem;
  padding: 0.7rem 0.65rem;
}

.gallery-edit .file-drop-preview img {
  max-width: 88px;
  max-height: 88px;
}

.home-banner-form input[type="text"] {
  font: inherit;
  font-size: 0.82rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #d8d2c6;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .home-banner-slide img {
    aspect-ratio: 16 / 9;
  }
  .home-banners-nav {
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
  }
  .home-banner-edit {
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
  }
}

/* Как заказать */
.how-order {
  margin: 0.5rem 0 1.6rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.how-order h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.how-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.35;
}

.how-num {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Футер */
.shop-footer {
  margin-top: 1.5rem;
  padding: 1.4rem 1rem calc(1.4rem + var(--bottom-nav-h));
  border-top: 1px solid var(--line);
  background: rgba(251, 247, 240, 0.72);
}

.shop-footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .shop-footer-inner {
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
  }
}

.shop-footer-brand strong {
  display: block;
  font-family: var(--font-brand);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.shop-footer-brand p,
.shop-footer-contacts p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--ink);
}

.shop-footer-address {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.9rem;
}

.shop-address-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}

.shop-address-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0.15rem 0;
  color: var(--ink);
}

.shop-address-pin {
  flex-shrink: 0;
  line-height: 1.35;
}

.shop-footer-contacts a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.shop-footer-whatsapp {
  margin: 0.15rem 0 0.35rem;
}

.shop-footer-whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.shop-footer-whatsapp-icon {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.shop-footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.45rem !important;
}

.shop-footer-seo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.shop-footer-seo-nav a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.88rem;
}

.shop-footer-seo-nav a:hover {
  text-decoration: underline;
}

.shop-footer-seo {
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  word-break: break-word;
}

.shop-footer-seo-brand {
  display: inline;
  font-weight: 700;
  color: var(--ink);
}

.shop-footer-seo-tags {
  display: block;
  margin-top: 0.35rem;
  opacity: 0.85;
}

.shop-seo-intro {
  margin: 0 0 1.6rem;
  padding: 1.05rem 1.15rem 1.15rem;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}

/* Скрыто для людей, текст остаётся в HTML для поисковиков */
.shop-seo-intro--bots,
.shop-footer-seo--bots,
.seo-page-related--bots {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  background: transparent !important;
}

.shop-seo-intro-title {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.shop-seo-intro-text {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}

.shop-seo-intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
}

.shop-seo-intro-links a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
}

.shop-seo-intro-links a:hover {
  text-decoration: underline;
}

.seo-page {
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  padding: 1.1rem 1.15rem 1.35rem;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.seo-page-brand {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.seo-page-lead {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 650;
}

.seo-page-body {
  display: grid;
  gap: 0.85rem;
}

.seo-page-body p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
}

.seo-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0 0;
}

.seo-page-related {
  margin: 1.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.seo-page-related h2 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.seo-page-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.seo-page-links a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.seo-page-links a:hover {
  text-decoration: underline;
}

.catalog-seo-section {
  margin-top: 1.35rem;
}

.catalog-seo-section h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.catalog-seo-links,
.catalog-seo-books {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.catalog-seo-links a,
.catalog-seo-books a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.catalog-seo-links a:hover,
.catalog-seo-books a:hover {
  text-decoration: underline;
}

.catalog-seo-author {
  color: var(--muted);
  font-weight: 500;
}

.catalog-seo-more {
  margin-top: 1.5rem;
}

.seo-page-contacts {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  font-size: 0.95rem;
}

.seo-page-contacts a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

/* ——— About / Մեր մասին ——— */
.seo-page.about-page {
  max-width: 44rem;
  padding: 1.15rem 1.1rem 1.5rem;
  background:
    linear-gradient(165deg, rgba(251, 247, 240, 0.97) 0%, rgba(246, 239, 226, 0.98) 100%);
  border-color: #d4c8b4;
  overflow: hidden;
}

.about-hero-photo {
  margin: -0.35rem -0.55rem 1rem;
  border-radius: 0.65rem;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(42, 100, 20, 0.12);
}

.about-hero-photo img {
  display: block;
  width: 100%;
  max-height: min(52vw, 22rem);
  object-fit: cover;
  object-position: center 35%;
}

.about-hero {
  position: relative;
  padding-bottom: 0.85rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(62, 163, 25, 0.18);
}

.about-hero .page-title {
  margin: 0.15rem 0 0.55rem;
  letter-spacing: -0.02em;
}

.about-lead {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  font-weight: 550;
  color: var(--ink);
  max-width: 38rem;
}

.about-body {
  display: grid;
  gap: 1.35rem;
  margin-top: 1.15rem;
}

.about-section {
  position: relative;
  padding-left: 0.85rem;
  border-left: 2px solid rgba(62, 163, 25, 0.35);
}

.about-section--has-photo {
  display: flow-root;
}

.about-section-photo {
  margin: 0 0 0.75rem;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(42, 100, 20, 0.1);
}

.about-section-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.about-section--photo-right .about-section-photo {
  float: right;
  width: min(46%, 13.5rem);
  margin: 0.1rem 0 0.65rem 0.85rem;
}

.about-section--photo-left .about-section-photo {
  float: left;
  width: min(46%, 13.5rem);
  margin: 0.1rem 0.85rem 0.65rem 0;
}

.about-section--photo-full .about-section-photo {
  float: none;
  width: 100%;
  margin: 0 0 0.85rem;
}

.about-section-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-brand);
  font-size: clamp(1.12rem, 2.8vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: #2a6414;
  letter-spacing: -0.01em;
}

.about-section-intro,
.about-prose {
  margin: 0 0 0.7rem;
  font-size: 0.97rem;
  line-height: 1.58;
  color: var(--ink);
}

.about-prose:last-child {
  margin-bottom: 0;
}

.about-shelf-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.about-shelf-item {
  padding: 0.55rem 0 0.65rem;
  border-bottom: 1px solid var(--line);
}

.about-shelf-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.about-shelf-title {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.about-shelf-body {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #3a3a3a;
}

.about-features {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.about-features-head {
  display: none;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0 0 0.25rem;
  border-bottom: 1px solid var(--line);
}

.about-feature-row {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.about-feature-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.about-feature-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2a6414;
}

.about-feature-why {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.52;
  color: #3a3a3a;
}

.about-closing {
  margin: 0.15rem 0 0;
  padding: 0.95rem 1rem 1rem;
  border: 0;
  border-radius: 10px;
  background: rgba(62, 163, 25, 0.07);
  border-left: 3px solid var(--accent);
}

.about-closing p {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 600;
}

.about-closing-flat {
  font-family: var(--font-brand);
  font-weight: 650;
}

.about-contacts {
  margin-top: 1.35rem;
}

@media (min-width: 720px) {
  .seo-page.about-page {
    max-width: 52rem;
    padding: 1.55rem 1.75rem 1.85rem;
  }

  .about-lead {
    font-size: 1.08rem;
    line-height: 1.58;
  }

  .about-body {
    gap: 1.7rem;
    margin-top: 1.4rem;
  }

  .about-section {
    padding-left: 1.05rem;
  }

  .about-shelf-list {
    gap: 0.9rem;
  }

  .about-features-head {
    display: grid;
    grid-template-columns: minmax(10rem, 0.38fr) 1fr;
    gap: 1rem;
  }

  .about-feature-row {
    grid-template-columns: minmax(10rem, 0.38fr) 1fr;
    gap: 1rem;
    align-items: start;
    padding: 0.7rem 0;
  }

  .about-closing {
    padding: 1.15rem 1.25rem 1.2rem;
  }

  .about-closing p {
    font-size: 1.08rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .about-hero {
    animation: about-fade-up 0.55s ease both;
  }

  .about-section[data-about-animate],
  .about-closing[data-about-animate] {
    animation: about-fade-up 0.65s ease both;
  }

  .about-section[data-about-animate]:nth-of-type(1) { animation-delay: 0.08s; }
  .about-section[data-about-animate]:nth-of-type(2) { animation-delay: 0.16s; }
  .about-section[data-about-animate]:nth-of-type(3) { animation-delay: 0.24s; }
  .about-closing[data-about-animate] { animation-delay: 0.32s; }
}

@keyframes about-fade-up {
  from {
    opacity: 0;
    transform: translateY(0.55rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-hero,
  .about-section[data-about-animate],
  .about-closing[data-about-animate] {
    animation: none;
  }
}

.shop-footer .muted {
  display: inline-block;
  min-width: 4.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin-right: 0.35rem;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.check-label input {
  width: auto;
}

.bestseller-report {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.bestseller-block {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.bestseller-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.bestseller-block ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.flash-error {
  color: #a33;
  margin: 0.25rem 0;
}

.catalog-anchor {
  scroll-margin-top: 5.5rem;
}

.catalog-cta-wrap {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0 0.5rem;
}

a.btn.catalog-cta,
a.btn.catalog-cta:visited {
  min-width: min(100%, 280px);
  padding: 0.85rem 1.35rem;
  font-size: 1.05rem;
  text-align: center;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.top-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

/* PC: unwrap wrappers so Login/Cart/About stay siblings of lang-switch */
.top-tools-actions {
  display: contents;
}

.top-tools-login-cart {
  display: contents;
}

.shop-brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.28rem;
  flex: 1 1 auto;
  min-width: 0;
}

.shop-brand-tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28em;
  margin: 0;
  padding: 0;
  color: var(--brand-green);
  font-size: clamp(1.32rem, 3.08vw, 1.892rem);
  font-weight: 800;
  line-height: 1.18;
  text-align: left;
  text-decoration: none;
  max-width: 100%;
}

.shop-brand-tagline .brand-line {
  display: inline;
}

.shop-brand-tagline:hover,
.shop-brand-tagline:focus-visible {
  color: var(--brand-green);
  outline: none;
}

/* Mobile-only compact Login/Profile; PC uses .auth-desktop */
.auth-mobile-compact {
  display: none;
}

/* Unified soft-green pills: Cart / Login / Register / About */
.top-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  min-height: 2rem;
  box-sizing: border-box;
  font-family: var(--font-brand);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.top-tool-btn:hover,
.top-tool-btn:focus-visible {
  background: #d8efcc;
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent-hover);
  outline: none;
}

.top-tool-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.header-about-btn {
  display: inline-flex;
}

.auth-desktop {
  display: contents;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.15rem;
  padding: 0.18rem 0.28rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  flex-shrink: 0;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 1.55rem;
  border-radius: 4px;
  text-decoration: none;
  line-height: 0;
  opacity: 0.78;
  overflow: hidden;
  transition: opacity 0.15s, box-shadow 0.15s, transform 0.15s;
}

.lang-flag:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.lang-flag.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent);
}

.lang-flag-img {
  display: block;
  width: 22px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

.lang-btn {
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
}

.lang-btn.is-active {
  background: var(--accent);
  color: #fff;
}

.cart-chip {
  /* base look comes from .top-tool-btn when both are set */
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
}

.shopper .auth-desktop .auth-nav > a.role-btn.top-tool-btn {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
}

.shopper .auth-desktop .auth-nav > a.role-btn.top-tool-btn:hover,
.shopper .auth-desktop .auth-nav > a.role-btn.top-tool-btn:focus-visible {
  background: #d8efcc;
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent-hover);
}

.cart-badge,
.bn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.auth a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}

.auth-user {
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: 0.15rem;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.auth-user {
  color: var(--ink, #1a1a1a);
  font-weight: 600;
  text-decoration: none;
}

a.auth-user:hover,
a.auth-user:focus-visible {
  text-decoration: underline;
}

.auth-card h2 {
  margin-top: 0;
}

.auth-wrap {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.auth-panel {
  padding: 0;
}

.auth-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display, Georgia, "Times New Roman", serif);
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink, #1a1a1a);
}

.auth-lead {
  margin: 0 0 0.65rem;
  color: var(--muted, #666);
  font-size: 0.95rem;
  line-height: 1.45;
}

.auth-register-promo {
  margin: 0 0 1.35rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(120, 190, 32, 0.12);
  border: 1px solid rgba(62, 163, 25, 0.35);
  color: #2d7a1f;
  font-size: clamp(1.02rem, 2.8vw, 1.18rem);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.01em;
}

.auth-form label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
  color: var(--ink, #1a1a1a);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"],
.auth-form textarea {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  font-family: inherit;
  box-sizing: border-box;
}

.auth-form textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.profile-complete-banner {
  color: var(--accent, #2d7a3e) !important;
  font-weight: 600;
}

.profile-edit.is-complete {
  outline: 2px solid color-mix(in srgb, var(--accent, #2d7a3e) 35%, transparent);
  outline-offset: 6px;
  border-radius: 8px;
  padding: 0.5rem 0.15rem;
}

.auth-form input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent, #2d7a3e) 35%, transparent);
  border-color: var(--accent, #2d7a3e);
}

.auth-form input:disabled,
.auth-form input[readonly] {
  background: #f5f5f5;
  color: var(--muted, #666);
}

.auth-actions {
  margin-top: 1.1rem;
  gap: 0.6rem;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--muted, #888);
  font-size: 0.82rem;
  text-transform: lowercase;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e2e2;
}

.auth-code-input {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.auth-revealed-code {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 2px dashed #2d7a3e;
  border-radius: 12px;
  background: #f8faf5;
  text-align: center;
}

.auth-revealed-label {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
}

.auth-revealed-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
  margin: 0 0 0.75rem;
}

.auth-wait-note {
  margin-top: 0.65rem;
  text-align: center;
}

.auth-actions .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  background: #fff !important;
  color: #1a1a1a !important;
  border: 1px solid #dadce0 !important;
  font-weight: 550;
}

.google-btn:hover {
  background: #f8f9fa !important;
  border-color: #c6c6c6 !important;
}

.profile-edit {
  margin: 0 0 1.75rem;
  max-width: 28rem;
}

.profile-edit h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-turnstile {
  margin: 0.75rem 0 0.25rem;
}

.role-switch {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 3px;
  border-radius: 999px;
  background: #f0f0f0;
  gap: 2px;
  flex-shrink: 1;
  max-width: 100%;
}

.role-btn {
  display: inline-block;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.role-btn:hover {
  border-color: var(--line);
  color: var(--ink);
}

.role-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Staff: Հատուկ գործիքներ — Export + WhatsApp */
.staff-tools-menu {
  position: relative;
  display: inline-block;
}

.staff-tools-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.staff-tools-menu > summary::-webkit-details-marker {
  display: none;
}

.staff-tools-toggle::after {
  content: "▾";
  margin-left: 0.25rem;
  font-size: 0.7em;
  opacity: 0.75;
}

.staff-tools-menu[open] > .staff-tools-toggle {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.staff-tools-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 40;
  min-width: 11.5rem;
  max-width: min(18rem, 92vw);
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.staff-tools-item {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.staff-tools-item:hover,
.staff-tools-item:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}

.ui-mode-switch {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f3f3f3;
}

.ui-mode-switch .role-btn {
  border: 1px solid transparent;
  background: #fff;
  box-shadow: none;
  min-height: 1.7rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
}

.ui-mode-switch .role-btn.is-active {
  background: var(--accent);
  color: #fff;
}

.ui-mode-switch .role-btn:not(.is-active):hover {
  background: rgba(0, 0, 0, 0.06);
}

.shopper-role-switch {
  display: none;
  margin: 0.2rem 0 0.45rem;
}

body.shopper.admin-user .shopper-role-switch {
  display: block;
}

body.shopper.admin-user .shopper-role-switch .ui-mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
}

.logout-form {
  display: inline;
  margin: 0;
}

button.role-btn-as-link {
  appearance: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.edit-form input.readonly {
  background: #f0f0ec;
  color: var(--muted);
  cursor: default;
  border-color: color-mix(in srgb, var(--line) 85%, transparent);
}

.edit-form .edit-field,
.edit-form input.edit-field,
.edit-form select.edit-field,
.edit-form textarea.edit-field {
  background: #fff;
}

.card-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.85rem;
}

.test-hint {
  color: #9a6b2f;
}

.search {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.suggest-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.suggest-wrap input,
.search > input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: var(--paper);
}

.suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  max-height: min(60vh, 360px);
  overflow-y: auto;
}

.suggest-list li {
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  display: grid;
  gap: 0.1rem;
}

.suggest-list li:hover,
.suggest-list li.is-active {
  background: var(--accent-soft);
}

.suggest-title {
  font-weight: 600;
  color: var(--ink);
}

.suggest-code {
  display: inline-block;
  margin-right: 0.32rem;
  font-size: 0.57rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.suggest-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.suggest-oos {
  font-size: 0.82rem;
  font-weight: 600;
  color: #a33a3a;
}

.flash {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.flash li {
  margin: 0.25rem 0;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.92rem;
}

.flash-ok {
  background: #e8f8ef;
  color: #0d5c32;
}

.flash-error {
  background: #fdeceb;
  color: #8a1f1a;
}

.search input:focus,
.suggest-wrap input:focus {
  outline: 2px solid #9fd48a;
  border-color: var(--accent);
}

.search button {
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.search button:hover {
  background: var(--accent-hover);
}

.search button:active {
  transform: translateY(1px);
}

.meta {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.wrap-shop {
  max-width: 1100px;
}

.wrap-staff {
  max-width: 1480px;
}

.wrap-with-side {
  max-width: 1400px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 1rem;
  align-items: start;
}

.content-col {
  min-width: 0;
  overflow: hidden;
}

.staff-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.staff-filters-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}

.filter-group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.staff-filters-bar .filter-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.shop-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.book-lang-filters {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.book-lang-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #c5d9c8;
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.book-lang-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.book-lang-filter-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.shop-meta {
  margin: 0;
}

.publisher-filter-head {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.publisher-filter-logo {
  display: block;
  height: 2.1rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
}

.author-filter-head {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.author-profile {
  margin: 0 0 1rem;
}

.author-profile--minimal {
  margin: 0 0 0.65rem;
}

.author-profile--minimal .author-profile-name {
  margin: 0;
  font-size: 1.35rem;
}

.author-profile-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.05rem;
  border-radius: 0.75rem;
  border: 1px solid #d4c8b4;
  background: linear-gradient(
    165deg,
    rgba(251, 247, 240, 0.98) 0%,
    rgba(246, 239, 226, 0.98) 100%
  );
}

.author-profile-photo-wrap {
  flex: 0 0 auto;
}

.author-profile-photo {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  object-fit: cover;
  border-radius: 0.65rem;
  box-shadow: 0 6px 18px rgba(42, 100, 20, 0.12);
}

.author-profile-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(62, 163, 25, 0.08);
  border: 1px dashed rgba(62, 163, 25, 0.35);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 0.35rem;
}

.author-profile-body {
  flex: 1 1 auto;
  min-width: 0;
}

.author-profile-name {
  margin: 0 0 0.45rem;
  font-family: var(--font-brand);
  font-size: clamp(1.25rem, 3.2vw, 1.55rem);
  line-height: 1.2;
  color: #2a6414;
}

.author-profile-bio-line {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}

.author-profile-bio-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
  white-space: pre-wrap;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}

@media (min-width: 640px) {
  .author-profile-bio-clamped {
    -webkit-line-clamp: 3;
  }
}

.author-profile-bio-more {
  margin-top: 0.15rem;
}

.author-profile-bio-more:not([open]) .author-profile-bio-full {
  display: none;
}

.author-profile-bio-more[open] > summary {
  display: none;
}

.author-profile-bio-more > summary {
  cursor: pointer;
  list-style: none;
}

.author-profile-bio-more > summary::-webkit-details-marker {
  display: none;
}

.author-profile-bio-toggle {
  display: inline-block;
  margin-top: 0.2rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.author-profile-bio-full {
  margin-top: 0.1rem;
}

.author-profile-bio-close {
  display: inline-block;
  margin: 0.35rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.author-profile-bio-close:hover,
.author-profile-bio-close:focus-visible {
  text-decoration: underline;
  outline: none;
}

.author-profile-bio-extra {
  margin-top: 0.35rem;
}

.author-profile-empty-note {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
}

.author-profile-edit {
  margin: 0.65rem 0 0;
}

.author-profile-edit-btn {
  font-size: 0.88rem;
  padding: 0.35rem 0.75rem;
}

.author-edit-preview img {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 0.5rem 0;
}

@media (max-width: 520px) {
  .author-profile-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-profile-edit {
    text-align: center;
  }
}

.book-card-author .author-link,
.detail-author .author-link {
  color: inherit;
  text-decoration: none;
}

.book-card-author .author-link:hover,
.detail-author .author-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.book-card-author .meta-link,
.list-genre-inline .meta-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.book-card-author .meta-link:hover,
.list-genre-inline .meta-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.book-meta-sep {
  color: var(--muted);
  font-weight: 400;
}

.list-genre-inline {
  margin-top: 0.15rem;
  font-size: 0.78rem;
}

.sort-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  background: var(--paper);
}

.catalog-filter {
  position: relative;
  z-index: 2;
}

.catalog-filter[open] {
  z-index: 8;
}

.filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.filter-trigger::-webkit-details-marker {
  display: none;
}

.catalog-filter-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 20rem;
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.catalog-filter-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.catalog-filter-row input,
.catalog-filter-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  background: #fff;
}

.catalog-filter-sep {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.filter-apply {
  width: 100%;
}

.side-filters {
  position: sticky;
  top: 7.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}

.side-filters h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.filter-group {
  display: grid;
  gap: 0.4rem;
}

.filter-btn {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  background: #f5f5f5;
  font-size: 0.88rem;
  font-weight: 600;
}

.filter-btn.is-active {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 900px) {
  .wrap-with-side {
    grid-template-columns: 1fr;
  }

  .side-filters {
    position: static;
    order: -1;
  }

  .filter-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ——— Покупательская сетка ——— */
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 0.65rem;
}

@media (min-width: 560px) {
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem 0.9rem;
  }
}

@media (min-width: 900px) {
  .book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.book-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: 10px;
  overflow: hidden;
}

.book-card-cover {
  display: block;
  background-color: var(--bg);
  background-image: var(--kraft);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: var(--cover-ratio);
  border: 1px solid var(--line);
}

.book-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: scale(var(--cover-zoom, 1));
  transform-origin: center center;
}

.cover-ph {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a0a0a0;
  background:
    linear-gradient(145deg, #f7f7f7 0%, #ececec 100%);
  aspect-ratio: var(--cover-ratio);
}

.cover-ph.sm {
  aspect-ratio: var(--cover-ratio);
  font-size: 0.65rem;
  min-height: 0;
}

.book-card-body {
  padding: 0.55rem 0.1rem 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.book-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-title a {
  color: inherit;
  text-decoration: none;
}

.book-card-title a:hover {
  color: var(--accent);
}

.book-card-author {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-price {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.card-cart-form {
  margin-top: auto;
  padding-top: 0.4rem;
}

.btn-cart {
  width: 100%;
  background: var(--accent);
}

.btn-cart:hover {
  background: var(--accent-hover);
}

.btn-cart:disabled,
.btn-cart:disabled:hover {
  background: #b8b0a4;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.72;
}

.book-card-stock {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.book-card-stock.stock-unavailable {
  color: #a33a3a;
}

.btn-lg {
  padding: 0.65rem 1.15rem;
  font-size: 1rem;
  line-height: 1.25;
}

.buy-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0 0.25rem;
  padding: 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.buy-box .qty-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.buy-box .btn-cart {
  /* min-width for row layout — NOT flex-basis (that becomes height in column) */
  flex: 1 1 auto;
  min-width: min(12rem, 100%);
  width: auto;
  height: auto;
  min-height: 2.75rem;
  align-self: center;
  padding: 0.65rem 1.15rem;
  line-height: 1.25;
}

.qty-input {
  width: 4.2rem;
  min-height: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.45rem;
  font: inherit;
  text-align: center;
  font-size: 1rem;
  box-sizing: border-box;
}

.detail-author {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.detail-price {
  margin: 0.55rem 0 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent);
}

.page-title {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(251, 247, 240, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.bn-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.bn-item.is-active {
  color: var(--accent);
}

.bn-ico {
  font-size: 1.15rem;
  line-height: 1;
}

.bn-badge {
  position: absolute;
  top: 0.25rem;
  right: calc(50% - 1.6rem);
}

/* Cart */
.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.cart-cover {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: var(--cover-ratio);
  background: #f3f3f3;
}

.cart-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: scale(var(--cover-zoom, 1));
  transform-origin: center center;
}

.cart-title {
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
}

.cart-qty-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.cart-qty-row input {
  width: 3.5rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.cart-line {
  margin: 0.35rem 0 0;
  font-weight: 700;
}

.cart-footer {
  margin-top: 1rem;
  padding: 1rem;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.cart-total {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.cart-first-order-banner {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.cart-first-order-banner.is-pending {
  color: #7a5a00;
  background: #fff8e6;
  border-color: #ecd89a;
}

.cart-total-old {
  text-decoration: line-through;
  color: var(--muted, #6b6560);
  font-size: 1rem;
  font-weight: 500;
}

.cart-total-new {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.cart-discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
}

.cart-discount-note {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted, #6b6560);
}

.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cart-actions .btn-order {
  padding: 0.45rem 0.95rem;
  font-size: 0.92rem;
  min-height: 2.4rem;
  flex: 0 0 auto;
}

.cart-actions .btn-continue {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  min-height: 2.2rem;
}

.checkout-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.req-star {
  color: #c0392b;
  font-weight: 700;
}

.field-label {
  display: block;
  line-height: 1.35;
}

.field-error {
  display: block;
  margin: 0.2rem 0 0;
  color: #b3261e;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}

.field-error[hidden] {
  display: none !important;
}

.checkout-form input.is-invalid,
.checkout-form select.is-invalid,
.checkout-form textarea.is-invalid {
  border-color: #c0392b;
  box-shadow: 0 0 0 1px rgba(192, 57, 43, 0.25);
}

.payment-req-error {
  margin: 0 0 0.55rem;
}

.checkout-birthday-hint {
  margin: -0.35rem 0 0.75rem;
}

.birthday-inline-hint {
  font-weight: 400;
  color: var(--muted, #6b6560);
  font-size: 0.88em;
}

.birthday-field-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.birthday-field-row .checkout-birthday {
  flex: 1;
  min-width: 0;
}

.birthday-picker-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.birthday-picker-btn {
  flex-shrink: 0;
  width: 2.85rem;
  min-width: 2.85rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.birthday-picker-btn svg {
  display: block;
}

.password-field-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 0.3rem;
}

.password-field-row input[type="password"],
.password-field-row input[type="text"] {
  flex: 1;
  min-width: 0;
  margin-top: 0 !important;
}

.password-toggle-btn {
  flex-shrink: 0;
  width: 2.85rem;
  min-width: 2.85rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle-btn svg {
  display: block;
}

.password-toggle-btn .icon-eye-off {
  display: none;
}

.password-toggle-btn.is-visible .icon-eye-on {
  display: none;
}

.password-toggle-btn.is-visible .icon-eye-off {
  display: block;
}

.checkout-radio {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.checkout-form label.checkout-radio {
  display: flex;
  gap: 0.55rem;
}

.checkout-radio:hover {
  background: rgba(255, 255, 255, 0.72);
}

.checkout-radio input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent, #2d7a3e);
}

.checkout-radio span {
  line-height: 1.35;
}

.checkout-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.checkout-haypost-logo {
  height: 1.25rem;
  width: auto;
  max-width: 6.5rem;
  display: block;
  object-fit: contain;
}

.checkout-delivery-methods {
  margin: 0.15rem 0 0.85rem;
  padding: 0.7rem 0.75rem 0.55rem;
  border: 1px solid var(--line, #ddd5c8);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
}

.checkout-delivery-methods > .field-label {
  margin-bottom: 0.45rem;
}

.checkout-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.checkout-delivery-extra {
  margin-top: 0.5rem;
}

.checkout-delivery-extra label + label {
  margin-top: 0.15rem;
}

.checkout-form .checkout-extra-label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted, #6b6560);
}

.checkout-promo-line {
  margin: 0 0 1rem;
  line-height: 1.45;
}

.checkout-first-order-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  line-height: 1.45;
  font-weight: 600;
}

.checkout-first-order-banner.is-active {
  background: color-mix(in srgb, #78be20 14%, #fff);
  border: 1px solid color-mix(in srgb, #78be20 35%, #e4dccf);
  color: #2d5a12;
}

.checkout-first-order-banner.is-pending {
  background: color-mix(in srgb, #f0a020 12%, #fff);
  border: 1px solid color-mix(in srgb, #f0a020 35%, #e4dccf);
  color: #6b4a10;
}

.checkout-profile-saved {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--muted, #6b6560);
}

.checkout-profile-saved strong {
  color: var(--ink, #1a1a1a);
  font-weight: 600;
}

.checkout-phone2-field input[type="tel"] {
  font-size: 1.05em;
  padding: 0.72rem 0.82rem;
}

.checkout-phone2-field .field-label {
  font-size: 1.02em;
}

.checkout-summary-lines {
  margin: 0;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #ece6dc;
}

.checkout-summary-row dt,
.checkout-summary-row dd {
  margin: 0;
}

.checkout-summary-discount dd {
  color: #2d7a1f;
  font-weight: 600;
}

.checkout-summary-discount.is-hidden {
  display: none;
}

.checkout-summary-total {
  border-bottom: none;
  padding-top: 0.55rem;
  font-size: 1.05rem;
}

.checkout-promo-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.checkout-promo-modal[hidden] {
  display: none !important;
}

.checkout-promo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 22, 16, 0.52);
}

.checkout-promo-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e4dccf;
  box-shadow: 0 18px 48px rgba(30, 24, 16, 0.22);
  text-align: center;
}

.checkout-promo-modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  margin: 0 0 0.65rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #78be20, #3ea319);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.checkout-promo-modal-title {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.checkout-promo-modal-body {
  margin: 0 0 1rem;
  color: #5a5348;
  line-height: 1.5;
}

.checkout-promo-modal-actions {
  display: grid;
  gap: 0.55rem;
}

body.checkout-modal-open {
  overflow: hidden;
}

.checkout-block .field-label {
  margin-bottom: 0.1rem;
}

.checkout-fee-note {
  color: #3d6b18;
  font-weight: 650;
}

.checkout-confirm-wrap {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 2rem;
}

.btn-confirm-order {
  width: min(100%, 22rem);
  min-height: 3.4rem;
  padding: 0.95rem 1.4rem;
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.25;
  white-space: pre-line;
  text-align: center;
}

.cart-toast {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  left: auto;
  bottom: auto;
  z-index: 90;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  background: var(--paper, #fbf7f0);
  color: var(--ink, #1a1a1a);
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--brand-green, #3ea319);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(30, 50, 20, 0.14);
  pointer-events: none;
  max-width: min(92vw, 20.5rem);
  width: max-content;
  min-width: min(92vw, 16.5rem);
  text-align: left;
  line-height: 1.3;
}

.cart-toast.is-on {
  opacity: 1;
  transform: translateY(0);
}

.cart-toast.is-error {
  background: #f8ecec;
  border-color: #a94444;
  color: #6b1f1f;
  text-align: center;
  padding: 0.75rem 1rem;
  font-weight: 600;
}

.cart-toast.is-rich {
  padding: 0.55rem 0.7rem 0.55rem 0.55rem;
}

.cart-toast__row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.cart-toast__media {
  flex: 0 0 auto;
  width: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
}

.cart-toast__cover {
  display: block;
  width: 3.5rem;
  height: 5.1rem;
  object-fit: cover;
  border-radius: 3px;
  background: #eee6d8;
}

.cart-toast__cover--empty {
  box-shadow: inset 0 0 0 1px var(--line, #ddd2c2);
}

.cart-toast__status {
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--brand-green, #3ea319);
  text-align: center;
  line-height: 1.15;
  max-width: 3.6rem;
}

.cart-toast__body {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 0.1rem;
}

.cart-toast__title {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink, #1a1a1a);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 0.2rem;
}

.cart-toast__qty {
  font-size: 0.78rem;
  color: var(--muted, #6b6b6b);
  margin-bottom: 0.15rem;
}

.cart-toast__price {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-green, #3ea319);
}

@media (max-width: 560px) {
  .cart-toast {
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    left: max(0.5rem, env(safe-area-inset-left, 0px));
    max-width: none;
    width: auto;
    min-width: 0;
  }
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line, #e4dccf);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

@media (max-width: 560px) {
  .checkout-name-row {
    grid-template-columns: 1fr;
  }

  .cart-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cart-actions .btn-order,
  .cart-actions .btn-continue {
    width: auto;
    flex: 1 1 auto;
  }

  .cart-actions .btn {
    width: auto;
  }
}

.cart-remove-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.linkish {
  background: none;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.checkout-steps {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted);
}

.checkout-steps li {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #f3f3f3;
}

.checkout-steps li.is-active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.narrow-checkout {
  max-width: 560px;
}

.checkout-block {
  margin: 0 0 1.35rem;
}

.checkout-block-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.checkout-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--accent, #2d7a3e);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.checkout-extra-label,
.checkout-pay-label {
  display: block;
  margin: 0.5rem 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
}

.checkout-pay-label .field-label {
  display: inline;
}

.discount-card-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.discount-card-row input {
  flex: 1;
  min-width: 0;
}

.discount-card-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.discount-hint {
  min-height: 1.25rem;
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--muted, #6b6560);
}

.discount-hint.is-ok {
  color: var(--accent, #2d7a3e);
  font-weight: 600;
}

.discount-hint.is-err {
  color: #b42318;
}

.checkout-subtotal {
  text-decoration: line-through;
  opacity: 0.75;
}

.checkout-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  font: inherit;
  min-height: 4.5rem;
  resize: vertical;
  background: #fff;
}

.payment-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.payment-options-ameria {
  gap: 0.85rem;
}

.payment-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.95rem 0.7rem;
  border: 2px solid #ddd5c8;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.payment-options:not(:has(.payment-card.is-selected)) .payment-card {
  border-color: #c9c0b3;
}

.payment-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-card.is-selected,
.payment-card:has(input:checked) {
  border-color: #2d8a1f;
  border-width: 3px;
  background: linear-gradient(180deg, rgba(120, 190, 32, 0.14), #fff 55%);
  box-shadow:
    0 0 0 4px rgba(62, 163, 25, 0.28),
    0 8px 22px rgba(40, 60, 20, 0.12);
  opacity: 1;
}

.payment-card:not(.is-selected):not(:has(input:checked)) {
  opacity: 0.82;
}

.payment-card.is-selected::after,
.payment-card:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 0.42rem;
  right: 0.42rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: #3ea319;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(30, 80, 10, 0.35);
}

.payment-card-cash {
  display: block;
  width: min(100%, 28rem);
  justify-self: center;
  margin-inline: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  gap: 0;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
}

.payment-cash-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--cash-bg);
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
}

.payment-cash-caption {
  position: absolute;
  z-index: 1;
  top: 0.45rem;
  left: 0.5rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  max-width: calc(100% - 1rem);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.payment-cash-check {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 0.05rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.payment-cash-caption-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  text-align: left;
  min-width: 0;
}

.payment-card-cash.is-selected,
.payment-card-cash:has(input:checked) {
  border-color: #2d8a1f;
  border-width: 3px;
  box-shadow:
    0 0 0 4px rgba(62, 163, 25, 0.32),
    0 8px 22px rgba(40, 60, 20, 0.14);
}

.payment-card-cash.is-selected .payment-cash-fill::after,
.payment-card-cash:has(input:checked) .payment-cash-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(62, 163, 25, 0.12);
  pointer-events: none;
}

.payment-cash-title {
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.2;
}

.payment-card-cash .payment-cash-sub {
  font-size: calc(0.72rem * 1.4 * 1.3);
  font-weight: 900;
  color: #5a5348;
  letter-spacing: 0.01em;
}

.payment-card-cash.is-selected .payment-cash-sub,
.payment-card-cash:has(input:checked) .payment-cash-sub {
  color: #3d6b18;
}

@media (max-width: 480px) {
  .payment-card-cash {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .payment-cash-check {
    width: 1.7rem;
    height: 1.7rem;
  }
}

.payment-card-text {
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink, #1a1a1a);
}

.payment-card-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: #7a7266;
  letter-spacing: 0.01em;
}

.payment-card-icon {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 10px;
  background: #f3f6f4;
}

.payment-icon-cash {
  background:
    radial-gradient(circle at 70% 35%, #fff 0 18%, transparent 19%),
    linear-gradient(160deg, #e8a04a, #c97828);
}

.payment-ameria-block {
  border: 1px solid #e4dccf;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(120, 190, 32, 0.07), rgba(255, 255, 255, 0.85) 42%),
    #fff;
  padding: 0.75rem;
}

.payment-ameria-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0.1rem 0 0.75rem 0.2rem;
}

.payment-ameria-logo {
  display: block;
  height: 1.55rem;
  width: auto;
  max-width: 11.5rem;
  object-fit: contain;
}

.payment-ameria-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.payment-card-ameria {
  min-height: 7.2rem;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  border-color: #e8e2d6;
}

.payment-card-ameria.is-selected,
.payment-card-ameria:has(input:checked) {
  background: linear-gradient(180deg, rgba(120, 190, 32, 0.2), rgba(255, 255, 255, 0.98) 60%);
}

.payment-ameria-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.45rem;
  border-radius: 10px;
  background: #78be20;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.payment-ameria-badge-card {
  color: #fff;
}

.checkout-pay-hint {
  margin-top: 0.55rem;
}

.checkout-actions {
  margin-top: 1.25rem;
}

@media (max-width: 560px) {
  .payment-ameria-choices {
    grid-template-columns: 1fr;
  }
}

.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.order-row {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 0.25rem;
}

.orders-status-filters {
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  margin-bottom: 1rem;
}

.order-list-rich {
  gap: 0.85rem;
  max-width: 56rem;
}

.order-card {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.order-card-link {
  display: block;
  padding: 0.9rem 1rem;
  color: inherit;
  text-decoration: none;
}

.order-card-link:hover {
  background: #faf8f4;
}

.order-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.order-card-id {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.order-card-total {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
}

.order-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #efece5;
  color: #555;
}

.order-status-badge.status-new { background: #e8f1ff; color: #1e4f9a; }
.order-status-badge.status-packing { background: #fff3d9; color: #8a5a00; }
.order-status-badge.status-ready { background: #e7f6ec; color: #1f6b3a; }
.order-status-badge.status-done { background: #ececec; color: #444; }
.order-status-badge.status-cancel { background: #fde8e8; color: #9b1c1c; }

.order-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin-bottom: 0.7rem;
}

@media (min-width: 720px) {
  .order-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.order-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #888;
  margin-bottom: 0.15rem;
}

.order-card-value {
  font-size: 0.92rem;
  line-height: 1.3;
  word-break: break-word;
}

.order-card-sub {
  font-size: 0.82rem;
  margin-top: 0.12rem;
  word-break: break-word;
}

.order-card-bottom {
  border-top: 1px solid #efece5;
  padding-top: 0.55rem;
  display: grid;
  gap: 0.25rem;
}

.order-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  font-size: 0.82rem;
  color: #666;
}

.order-card-items {
  font-size: 0.85rem;
  line-height: 1.35;
}

.order-card-comment {
  font-size: 0.85rem;
  color: #444;
  background: #f6f3ec;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
}

.profile-page .profile-email-line {
  margin-top: -0.35rem;
  color: var(--muted);
}

.profile-logout-row {
  margin-bottom: 1rem;
}

.profile-orders {
  margin-top: 1.75rem;
}

.profile-orders-hint {
  margin-top: -0.25rem;
  margin-bottom: 0.85rem;
}

.profile-order-list .profile-order-row {
  padding: 0;
  overflow: hidden;
}

.profile-order-link {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem;
  color: inherit;
  text-decoration: none;
}

.profile-order-link:hover,
.profile-order-link:focus-visible {
  background: var(--accent-soft, rgba(0, 0, 0, 0.04));
}

.profile-order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.profile-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.profile-order-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}

.profile-pay-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.profile-pay-badge.is-paid {
  background: #e6f4ea;
  color: #137333;
}

.profile-pay-badge.is-pending {
  background: #fef7e0;
  color: #b06000;
}

.profile-pay-badge.is-failed {
  background: #fce8e6;
  color: #c5221f;
}

.profile-pay-badge.is-cash {
  background: #eef2ff;
  color: #3b5bdb;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.35rem;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Колонка «Остаток» всегда видна при горизонтальном скролле */
.staff .table-scroll th.num:last-child,
.staff .table-scroll td.num:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--paper);
  box-shadow: -8px 0 10px -8px rgba(0, 0, 0, 0.2);
  min-width: 4.5rem;
  padding-right: 1rem;
}

.staff .table-scroll th.num:last-child {
  z-index: 2;
  background: var(--accent-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th, td {
  padding: 0.7rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: var(--accent-soft);
  color: #1f5c0f;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: #fcfcfc;
}

tbody tr:hover {
  background: var(--accent-soft);
}

.click-row {
  cursor: pointer;
}

.click-row:focus {
  outline: 2px solid #9fd48a;
  outline-offset: -2px;
}

.edit-dot {
  color: var(--accent);
  font-size: 0.7rem;
  vertical-align: middle;
}

.new-dot {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: #d97706;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.is-new-row td {
  background: rgba(217, 119, 6, 0.06);
}

.staff .table-scroll th.col-thumb,
.staff .table-scroll td.col-thumb {
  width: 2.75rem;
  padding: 0.25rem 0.35rem;
  vertical-align: middle;
  text-align: center;
}

.staff-list-thumb {
  display: block;
  width: 36px;
  height: 48px;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.staff-list-thumb-ph {
  display: block;
  width: 36px;
  height: 48px;
  margin: 0 auto;
  border-radius: 3px;
  border: 1px dashed rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #f5f5f0 0%, #ece8df 100%);
}

tr.is-site-hidden td {
  background: rgba(185, 70, 70, 0.1);
}

.book-detail.is-site-hidden {
  background: rgba(185, 70, 70, 0.07);
  border-color: rgba(185, 70, 70, 0.25);
}

.site-hidden-banner {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  background: rgba(185, 70, 70, 0.12);
  color: #8b2e2e;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-hidden-lock {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-left: 0.2rem;
  vertical-align: -0.1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 8h-1V6a4 4 0 0 0-8 0v2H7a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2zm-7-2a2 2 0 0 1 4 0v2h-4V6zm7 12H7v-8h10v8z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 8h-1V6a4 4 0 0 0-8 0v2H7a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2zm-7-2a2 2 0 0 1 4 0v2h-4V6zm7 12H7v-8h10v8z'/%3E%3C/svg%3E") center / contain no-repeat;
  color: #a33a3a;
}

.list-edited {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.filter-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted);
}

.status-pill {
  display: inline-block;
  margin: 0.35rem 0.35rem 0 0;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-new {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
}

.status-edited {
  background: var(--accent-soft);
  color: #1f5c0f;
  border: 1px solid #9fd48a;
}

.inline-form {
  display: inline;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

.back {
  margin: 0 0 0.85rem;
}

.back a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.narrow {
  max-width: 420px;
}

.card.detail {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.detail-side {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  position: sticky;
  top: 1rem;
}

.cover {
  border-radius: 10px;
  overflow: hidden;
  background: #f3f3f3;
  border: 1px solid var(--line);
}

.cover-zoom-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
}

.cover-zoom-btn:focus-visible {
  outline: 2px solid var(--accent, #3ea319);
  outline-offset: 2px;
}

.cover-zoom-btn {
  overflow: hidden;
  border-radius: 8px;
}

.cover img,
.cover-zoom-btn img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--cover-ratio);
  object-fit: cover;
  object-position: center center;
  transform: scale(var(--cover-zoom, 1));
  transform-origin: center center;
}

.cover-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.2rem, 1fr));
  gap: 0.35rem;
  padding: 0.45rem;
  background: #fafafa;
  border-top: 1px solid var(--line);
}

.cover-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
  aspect-ratio: var(--cover-ratio);
}

.cover-thumb.is-active {
  border-color: var(--accent, #3ea319);
}

.cover-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.cover-caption {
  margin: 0;
  padding: 0.45rem 0.5rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
  text-align: center;
  background: #fafafa;
  border-top: 1px solid var(--line);
}

.cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: var(--cover-ratio);
  min-height: 240px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Лайтбокс фото на карточке */
body.lightbox-open {
  overflow: hidden;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(12, 10, 8, 0.88);
  box-sizing: border-box;
}

.photo-lightbox[hidden] {
  display: none !important;
}

.photo-lightbox img {
  max-width: min(92vw, 720px);
  max-height: 88vh;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.photo-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  width: 2.6rem;
  height: 2.6rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.8rem;
  height: 2.8rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox-nav.prev { left: 0.75rem; }
.photo-lightbox-nav.next { right: 0.75rem; }

.photo-lightbox-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .photo-lightbox {
    padding: 0.75rem;
  }
  .photo-lightbox-nav {
    width: 2.3rem;
    height: 2.3rem;
    font-size: 1.4rem;
  }
}

.photo-edit {
  display: grid;
  gap: 0.5rem;
}

.gallery-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.55rem;
}

.gallery-edit-item {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
}

.gallery-edit-item img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.gallery-edit-actions {
  display: grid;
  gap: 0.25rem;
  width: 100%;
}

.gallery-edit-actions .btn {
  width: 100%;
  font-size: 0.72rem;
  padding: 0.25rem 0.35rem;
  line-height: 1.2;
}

.gallery-edit-thumb {
  cursor: pointer;
}

.gallery-edit-item:has(.gallery-edit-thumb:hover) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.photo-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.photo-preview {
  width: 140px;
  height: 210px;
  object-fit: cover;
  object-position: center center;
  transform: scale(var(--cover-zoom, 1));
  transform-origin: center center;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.photo-preview-wrap {
  width: 140px;
  height: 210px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  margin-bottom: 0.35rem;
}

.photo-preview-wrap .photo-preview {
  width: 100%;
  height: 100%;
  border: none;
}

.cover-zoom-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 10rem;
  margin: 0.35rem 0;
  font-size: 0.9rem;
}

.cover-zoom-input {
  width: 100%;
}

.video-edit {
  display: grid;
  gap: 0.5rem;
}

.video-preview {
  width: 100%;
  max-width: 360px;
  max-height: 220px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #111;
}

.book-extra {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.book-extra-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.book-video-player {
  display: block;
  width: 100%;
  max-height: 360px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #111;
}

.ig-embed-wrap {
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  min-height: 120px;
}

.ig-embed-wrap .instagram-media {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  background: #fff;
  border: 1px solid var(--line) !important;
  border-radius: 10px;
  box-shadow: none !important;
}

.book-ig-iframe {
  display: block;
  width: 100%;
  max-width: 540px;
  min-height: 480px;
  height: min(72vh, 720px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.book-ig-iframe.is-loading {
  min-height: 0;
  height: 320px;
  background: #f3f3f3;
}

.book-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.book-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.book-link:hover {
  border-color: var(--brand);
  background: #f7fff4;
}

.book-link-wb {
  border-color: #c9b8ff;
  background: #f8f4ff;
}

.book-wb-under-cover {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  text-align: center;
  margin: 0;
  padding: 0;
  border: none;
}

.book-wb-under-cover .book-wb-logo {
  display: block;
  width: min(100%, 200px);
  height: auto;
  border-radius: 8px;
}

.book-wb-under-cover .book-links-row {
  justify-content: center;
  width: 100%;
}

.book-wb-under-cover .book-link-wb {
  font-size: 0.8rem;
  padding: 0.4rem 0.65rem;
  max-width: 100%;
  word-break: break-word;
}

.book-ig-under-cover,
.book-ig-after-desc {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  text-align: center;
  margin: 0;
  padding: 0;
  border: none;
}

.book-ig-after-desc {
  margin: 1.15rem 0 0.25rem;
  justify-items: start;
  text-align: left;
}

.book-ig-after-desc .book-ig-stage {
  justify-items: start;
}

.book-ig-after-desc .book-ig-thumb-link {
  width: min(100%, 280px);
}

.book-ig-thumb-link {
  position: relative;
  display: block;
  width: min(100%, 220px);
  padding: 0;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.book-ig-thumb-link:hover,
.book-ig-thumb-link:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent);
  outline: none;
}

.book-ig-under-cover.is-playing,
.book-ig-after-desc.is-playing {
  width: 100%;
  max-width: 540px;
  justify-self: center;
}

.book-ig-under-cover.is-blocked.is-playing,
.book-ig-after-desc.is-blocked.is-playing {
  max-width: none;
}

.book-ig-under-cover.is-blocked .book-ig-iframe,
.book-ig-under-cover.is-blocked .ig-embed-wrap > iframe,
.book-ig-after-desc.is-blocked .book-ig-iframe,
.book-ig-after-desc.is-blocked .ig-embed-wrap > iframe {
  display: none !important;
}

.book-ig-under-cover .book-ig-fallback[hidden],
.book-ig-under-cover .book-ig-blocked[hidden],
.book-ig-after-desc .book-ig-fallback[hidden],
.book-ig-after-desc .book-ig-blocked[hidden] {
  display: none !important;
}

.book-ig-blocked {
  margin: 0;
  max-width: 22rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted, #666);
}

.book-ig-stage {
  width: 100%;
  display: grid;
  justify-items: center;
}

.book-ig-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  vertical-align: middle;
}

.book-ig-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.6rem;
  height: 2.6rem;
  margin: -1.3rem 0 0 -1.3rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.book-ig-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 0.55rem 0 0.55rem 0.9rem;
  border-color: transparent transparent transparent #fff;
}

.book-link-ig {
  border-color: #f5b4c8;
  background: #fff7fa;
}

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

@media (max-width: 640px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    max-width: 220px;
    margin: 0 auto;
    position: static;
    width: 100%;
  }

  .cover {
    max-width: none;
    margin: 0;
  }

  .staff .top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .staff .top-tools {
    justify-content: space-between;
  }

  .auth-nav {
    justify-content: stretch;
  }

  .auth-nav .role-btn {
    flex: 1;
    text-align: center;
  }

  .staff-tools-menu {
    flex: 1 1 100%;
    width: 100%;
  }

  .staff-tools-menu > .staff-tools-toggle {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .staff-tools-panel {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 0.25rem;
    box-shadow: none;
  }

  .staff-tools-item {
    white-space: normal;
    text-align: center;
  }

  .auth-user {
    max-width: none;
    width: 100%;
    text-align: center;
  }

  .narrow {
    max-width: 100%;
    padding: 0 0.25rem;
  }
}

.detail-head h2 {
  margin: 0.25rem 0 0.4rem;
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  line-height: 1.25;
}

.code {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.facts {
  display: grid;
  gap: 0.75rem;
  margin: 1.15rem 0 0;
  padding: 0;
}

.facts > div {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) 1fr;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.facts dd {
  margin: 0;
  font-weight: 600;
}

.facts dd.fact-with-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.fact-edit-link {
  font-size: 0.85em;
  font-weight: 500;
  white-space: nowrap;
}

.book-genre-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.book-genre-select {
  max-width: min(100%, 22rem);
  font: inherit;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border, #ccc);
  border-radius: 6px;
  background: #fff;
}

.book-genre-edit-btn {
  border: none;
  background: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
}

.facts dd.stock-available {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-green);
}

.facts dd.stock-unavailable {
  color: #a33a3a;
  font-weight: 600;
}

.facts dd a.meta-link,
a.meta-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.facts dd a.meta-link:hover,
a.meta-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

/* после .btn — иначе font:inherit перебивает размер на полках */
.btn.btn-cart.btn-shelf {
  padding: 0.165rem 0.2rem !important;
  font-size: 0.57rem !important;
  font-weight: 700;
  line-height: 1.15;
  min-height: 0 !important;
  height: auto !important;
  border-radius: 5px;
}

.btn.ghost,
.btn.ghost:visited {
  background: #f0f0f0;
  color: var(--ink);
}

/* после .btn — иначе solid green перебивает ghost */
.btn.btn-ghost,
.btn.btn-ghost:visited {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn.btn-ghost:hover {
  background: var(--accent-soft);
}

/* Дубль bottom-nav в шапке — скрыт; навигация только в .bottom-nav */
.header-nav {
  display: none;
}

.edit-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.edit-form-cols {
  display: grid;
  gap: 0.85rem;
}

.edit-form-left,
.edit-form-main {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.edit-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.edit-form select,
.edit-form input,
.edit-form textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.edit-form input:focus,
.edit-form select:focus,
.edit-form textarea:focus {
  outline: 2px solid #9fd48a;
  border-color: var(--accent);
}

.edit-tags-panel {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 92%, var(--brand-green) 8%);
}

.edit-tags-heading {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.edit-tags-panel .edit-tag-line {
  gap: 0.2rem;
}

.edit-tags-panel .edit-tag-line span {
  font-size: 0.78rem;
}

.edit-tags-panel input {
  padding: 0.5rem 0.65rem;
  background: #fff;
}

.edit-side-panel {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 94%, var(--brand-green) 6%);
}

.edit-side-panel .check-label {
  color: var(--ink);
  font-size: 0.88rem;
}

.list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.list-tags .book-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 85%, var(--brand-green) 15%);
  border: 1px solid var(--line);
}

/* Книга: форма — слева поля, справа теги (ПК); мобильный — теги сверху */
@media (min-width: 900px) {
  /* PC order: Cart → Auth → Lang → About (rightmost) */
  .shopper .top-tools > .cart-chip { order: 1; }
  .shopper .top-tools > .auth-desktop { order: 2; }
  .shopper .top-tools > .lang-switch { order: 3; }
  .shopper .top-tools > .header-about-btn { order: 4; }
}

@media (min-width: 900px) {
  body.book-edit .edit-form {
    max-width: 56rem;
  }

  /* Две колонки; правая статична у верха формы — не едет со скроллом */
  body.book-edit .edit-form-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
    column-gap: 1.35rem;
    align-items: start;
  }

  body.book-edit .edit-form-left {
    display: grid;
    gap: 0.85rem;
    align-content: start;
    min-width: 0;
  }

  body.book-edit .edit-form-side {
    display: grid;
    gap: 0.85rem;
    align-content: start;
    align-self: start;
    position: static;
  }
}

.title {
  font-weight: 600;
  min-width: 14rem;
}

.mono {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.92rem;
}

.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

.pager a,
.pager .disabled,
.pager .page-info {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
}

.pager a {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.pager .disabled {
  background: #ebebeb;
  color: #8a8680;
}

.pager .page-info {
  color: var(--muted);
  font-weight: 600;
}

.empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (max-width: 640px) {
  .top-inner,
  .wrap {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .top-inner {
    padding-top: 0.28rem;
    padding-bottom: 0.55rem;
  }

  /* shopper: ближе к тёмно-зелёному topbar, без сжатия слогана */
  .shopper .top.shop-top .top-inner {
    padding-top: 0.18rem;
  }

  .top {
    padding-top: env(safe-area-inset-top, 0px);
  }

  /* мобильная шапка: слоган в свободной зоне слева от кнопок; инструменты справа */
  .shopper .top-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    min-width: 0;
    width: 100%;
  }

  .shopper .auth-desktop {
    display: none;
  }

  .shopper .auth-mobile-compact {
    display: contents;
  }

  /* Персонал в режиме «Покупатель»: на телефоне оставляем только переключатель вида */
  .shopper.admin-user .auth-desktop {
    display: none;
  }

  .shopper.admin-user .shopper-role-switch {
    display: block;
  }

  /* Staff/прочие: слоган слева в колонке */
  .shop-brand-block {
    gap: 0;
    flex: 1 1 0;
    min-width: 0;
    align-self: flex-start;
  }

  /*
   * Shopper: center slogan in free space left of Մուտք/Զամբյուղ
   * (flex region, not full-viewport absolute center).
   */
  .shopper .shop-brand-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    align-self: stretch;
    max-width: none;
    width: auto;
  }

  .shop-brand-tagline {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    font-size: clamp(1.089rem, 4.356vw, 1.392rem);
    line-height: 1.12;
    max-width: 100%;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .shop-brand-tagline .brand-line {
    display: block;
  }

  .shop-brand-tagline .brand-line-1,
  .shop-brand-tagline .brand-line-2 {
    text-align: center;
    width: 100%;
  }

  .brand-logo img {
    height: 40px;
  }

  /* Staff/прочие: компактный wrap; shopper ниже переопределяет */
  .top-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.18rem 0.22rem;
    flex: 0 0 auto;
    max-width: none;
    width: max-content;
    min-width: 0;
    justify-content: flex-end;
    align-items: center;
    margin-left: 0.1rem;
  }

  /*
   * Shopper mobile 2×2 (top-right block):
   *   [Մուտք|Գրանցվել]  [flags]
   *   [Զամբյուղ]         [Մեր մասին]
   */
  .shopper .top-tools {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    justify-content: end;
    justify-items: end;
    align-content: start;
    align-items: center;
    gap: 0.05rem 0.18rem;
    flex-shrink: 0;
    margin-left: 0;
    margin-top: 0;
    width: auto;
    max-width: min(62vw, 17rem);
  }

  .shopper .top-tools-login-cart,
  .shopper .top-tools-actions,
  .shopper .auth-mobile-compact {
    display: contents;
  }

  .shopper .auth-mobile-pair,
  .shopper .auth-mobile-compact .auth-mobile-user {
    grid-row: 1;
    grid-column: 1;
    justify-self: end;
  }

  .shopper .auth-mobile-pair {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    flex-wrap: nowrap;
    max-width: 100%;
  }

  .shopper .top-tools > .cart-chip {
    grid-row: 2;
    grid-column: 1;
    justify-self: end;
  }

  .shopper .top-tools > .header-about-btn {
    grid-row: 2;
    grid-column: 2;
    justify-self: end;
  }

  .shopper .top-tools-login-cart .top-tool-btn,
  .shopper .top-tools-login-cart .cart-chip.top-tool-btn,
  .shopper .auth-mobile-pair .top-tool-btn,
  .shopper .auth-mobile-compact .auth-mobile-user,
  .shopper .header-about-btn.top-tool-btn {
    padding: 0.18rem 0.38rem;
    font-size: 0.6rem;
    min-height: 1.35rem;
    letter-spacing: 0;
    max-width: none;
    flex: 0 0 auto;
  }

  .shopper .cart-chip {
    display: inline-flex !important;
  }

  .shopper .lang-switch {
    grid-row: 1;
    grid-column: 2;
    transform: scale(0.87);
    transform-origin: right center;
    margin-left: 0;
    margin-top: 0;
    padding: 0.08rem 0.14rem;
    gap: 0.1rem;
    max-width: 100%;
    justify-self: end;
    box-sizing: border-box;
    min-height: 1.35rem;
    align-items: center;
  }

  .shopper.admin-user .shopper-role-switch .ui-mode-switch {
    display: inline-flex;
    flex-wrap: nowrap;
    max-width: 100%;
  }

  .shopper.admin-user .shopper-role-switch .role-btn {
    min-height: 1.55rem;
    padding: 0.22rem 0.48rem;
    font-size: 0.73rem;
  }

  .catalog-filter-panel {
    right: 0;
    left: auto;
    min-width: min(20rem, calc(100vw - 1.5rem));
  }

  /* Каталог — в bottom-nav; корзина/профиль снова в шапке */
  .header-nav {
    display: none !important;
  }

  .lang-switch {
    margin-left: 0;
    padding: 0.12rem 0.18rem;
    gap: 0.14rem;
  }

  /* флаги ~5% меньше (от предыдущих 1.66/1.28 и 19×13) */
  .lang-flag {
    width: 1.58rem;
    height: 1.22rem;
  }

  .lang-flag-img {
    width: 18px;
    height: 12px;
  }

  .lang-btn {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.5rem;
  }

  .cart-chip {
    min-height: 1.45rem;
    padding: 0.18rem 0.4rem;
    font-size: 0.62rem;
  }

  .cart-chip-label {
    display: inline;
  }

  /* страховка от горизонтального скролла на узких экранах */
  html,
  body {
    overflow-x: hidden;
  }

  .top,
  .top-inner {
    max-width: 100%;
  }

  .shop-sticky-head {
    max-width: 100%;
  }

  .search {
    flex-direction: row;
    gap: 0.4rem;
  }

  .search button {
    width: auto;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
    line-height: 1.1;
  }

  .suggest-wrap input {
    min-height: 44px;
    font-size: 16px; /* без зума iOS */
  }

  /* hero mobile: logo left + two-line brand + stock */
  .shop-hero {
    margin-bottom: 1rem;
  }

  .shop-hero-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem 0.85rem;
    /* vertical pad cut ~13px total so larger logo keeps banner height;
       left = top so logo gap matches top edge */
    padding: 0.35rem 0.85rem 0.35rem 0.35rem;
    border-radius: 14px;
  }

  .shop-hero-logo {
    width: 112px;
    border-radius: 10px;
  }

  .shop-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.2rem;
    width: auto;
    text-align: center;
  }

  .shop-hero-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    width: 100%;
    margin: 0;
    font-size: clamp(1.469rem, 6.708vw, 1.885rem);
    font-weight: 800;
    line-height: 1.12;
    text-align: center;
  }

  .shop-hero-brand .brand-line {
    display: block;
    width: 100%;
    text-align: center;
  }

  .shop-hero-stock {
    font-size: 1.104rem;
    width: 100%;
    margin: 0;
    text-align: center;
  }

  .shop-toolbar {
    gap: 0.5rem;
    margin-bottom: 0.65rem;
  }

  .shop-toolbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .book-lang-filter-btn {
    min-height: 40px;
    font-size: 0.8rem;
  }

  .shop-meta {
    font-size: 0.82rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  .sort-form select {
    min-height: 40px;
    max-width: 100%;
    font-size: 0.88rem;
  }

  .book-grid {
    gap: 0.75rem 0.5rem;
  }

  .book-card-title {
    font-size: 0.82rem;
    -webkit-line-clamp: 2;
  }

  .book-card-price {
    font-size: 0.95rem;
  }

  .btn,
  .btn-cart {
    min-height: 44px;
    font-size: 0.9rem;
    padding: 0.55rem 0.7rem;
  }

  .btn.btn-cart.btn-shelf {
    min-height: 0 !important;
    height: auto !important;
    padding: 0.165rem 0.2rem !important;
    font-size: 0.57rem !important;
  }

  .shelf-card {
    flex-basis: 104px;
    width: 104px;
    min-width: 104px;
    max-width: 104px;
  }

  .shelf-discount-badge {
    top: 0.25rem;
    left: 0.25rem;
    font-size: 0.82rem;
    padding: 0.32rem 0.48rem;
    border-radius: 7px;
  }

  .shelf-track {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* карточка книги */
  .card.detail {
    padding: 0.85rem;
    border-radius: 12px;
  }

  .detail-price {
    font-size: 1.35rem;
  }

  .buy-box {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .buy-box .btn,
  .buy-box .btn-cart {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 2.75rem;
    align-self: center;
  }

  .buy-box .qty-label {
    display: inline-flex;
    justify-content: center;
    flex: 0 0 auto;
  }

  /* корзина */
  .cart-item {
    grid-template-columns: 64px 1fr;
    gap: 0.6rem;
  }

  .cart-footer.sticky-buy {
    position: sticky;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.35rem);
    z-index: 15;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
  }

  .cart-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .cart-actions .btn-order {
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
  }

  .cart-actions .btn-continue {
    flex: 0 1 auto;
    width: auto;
  }

  .checkout-steps {
    font-size: 0.75rem;
  }

  .checkout-steps li {
    padding: 0.28rem 0.5rem;
  }

  .narrow-checkout {
    max-width: 100%;
  }

  .pager {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  th, td {
    padding: 0.55rem 0.6rem;
    font-size: 0.92rem;
  }
}

@media (max-width: 380px) {
  .shop-hero-logo {
    width: 97px;
  }

  .shop-hero-brand {
    font-size: 1.406rem;
  }

  .shop-hero-stock {
    font-size: 1.008rem;
  }

  .brand-logo img {
    height: 36px;
  }

  .search button {
    font-size: 0.76rem;
    padding: 0.5rem 0.55rem;
  }
}

/* Отзывы на карточке книги */
.book-reviews .reviews-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.review-item { background: #fff; border: 1px solid #e6e1d8; border-radius: 10px; padding: 12px 14px; }
.review-item.review-pending { border-color: #e8b64c; background: #fdf7ea; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 0.92rem; }
.review-stars { color: #e8a020; letter-spacing: 1px; }
.review-author { font-weight: 600; }
.review-source { color: #777; }
.review-source a { color: inherit; text-decoration: underline; }
.review-badge { background: #e8b64c; color: #4a3200; border-radius: 999px; padding: 1px 10px; font-size: 0.78rem; font-weight: 600; }
.review-body { margin: 0; white-space: pre-line; }
.review-actions { display: flex; gap: 8px; margin-top: 8px; }
.review-item.is-busy { opacity: 0.55; pointer-events: none; }
.review-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 80;
  transform: translate(-50%, 12px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: #2d3a2e;
  color: #f5f7f4;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.review-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.review-toast.is-error { background: #5c2a2a; }
.btn-sm { padding: 4px 12px; font-size: 0.85rem; }
.review-add { margin-top: 10px; }
.review-add summary { cursor: pointer; color: #6a5acd; font-weight: 600; }
.review-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; max-width: 480px; }
.review-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.review-form input, .review-form textarea, .review-form select { border: 1px solid #d8d2c6; border-radius: 8px; padding: 7px 10px; font: inherit; }

.wb-import-box {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #d8e8cf;
  border-radius: 10px;
  background: #f6fbf2;
}
.wb-import-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: end;
}
.wb-import-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #555;
}
.wb-import-form input,
.wb-import-form select {
  font: inherit;
  padding: 0.4rem 0.5rem;
  border: 1px solid #d8d2c6;
  border-radius: 8px;
  min-width: 7rem;
}

/* Статистика посетителей (админ) */
.visitors-chip { background: #2e6b46; color: #fff; border-color: #2e6b46; white-space: nowrap; }
.visitors-chip:hover { background: #3a8256; }
.visitors-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 12px; margin-bottom: 1.5rem; }
.visitors-card { background: #fff; border: 1px solid #e6e1d8; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.visitors-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.visitors-card-link:hover,
.visitors-card-link.is-active {
  border-color: #2e6b46;
  box-shadow: 0 0 0 2px rgba(46, 107, 70, 0.18);
}
.visitors-num { font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: #2e6b46; }
.visitors-label { font-size: 0.85rem; color: #777; }
.visitors-h2 { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; }
.visitors-h3 { font-size: 0.95rem; margin: 0.85rem 0 0.45rem; color: #444; }
.visitors-today { margin: 0 0 1.25rem; max-width: none; }
.visitors-today-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.visitors-today-head .visitors-h2 { margin: 0; }
.visitors-today-close { font-size: 0.85rem; color: #2e6b46; }
.visitors-today-sheet {
  background: #fff;
  border: 1px solid #e6e1d8;
  border-radius: 10px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.visitors-today-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1.4fr) 7.5rem 4.5rem;
  gap: 0.5rem 0.75rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #efece5;
  font-size: 0.9rem;
  align-items: baseline;
}
.visitors-today-row:last-child { border-bottom: none; }
.visitors-today-headrow {
  background: #f6f3ec;
  font-size: 0.82rem;
  color: #555;
  font-weight: 600;
}
.visitors-today-user { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.visitors-today-link { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(46, 107, 70, 0.45); }
.visitors-today-link:hover { color: #2e6b46; border-bottom-color: #2e6b46; }
.visitors-user:target { border-color: #2e6b46; box-shadow: 0 0 0 2px rgba(46, 107, 70, 0.18); }
.visitors-today-guests {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
  color: #444;
}
.visitors-table { width: 100%; max-width: 34rem; border-collapse: collapse; background: #fff; border: 1px solid #e6e1d8; border-radius: 10px; overflow: hidden; }
.visitors-table-wide { max-width: 48rem; }
.visitors-table-compact { max-width: 28rem; }
.visitors-table th, .visitors-table td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid #efece5; }
.visitors-table thead th { background: #f6f3ec; font-size: 0.85rem; color: #555; }
.visitors-table tbody tr:last-child td { border-bottom: none; }
.visitors-users { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 0.5rem; max-width: 48rem; }
.visitors-user { background: #fff; border: 1px solid #e6e1d8; border-radius: 10px; padding: 0.35rem 0.75rem; }
.visitors-user summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.85rem; padding: 0.45rem 0; }
.visitors-user summary::-webkit-details-marker { display: none; }
.visitors-user-name { font-weight: 700; }
.visitors-user-meta { font-size: 0.85rem; color: #777; }
.visitors-user-body { padding: 0 0 0.65rem; }
.visitors-event-detail { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.visitors-pill { display: inline-block; background: #f3f0ea; border: 1px solid #e6e1d8; border-radius: 6px; padding: 0.1rem 0.4rem; font-size: 0.82rem; }
.visitors-query-note { margin: -0.35rem 0 0.85rem; max-width: 42rem; font-size: 0.9rem; }
.visitors-query-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  max-width: 56rem;
}
.visitors-query-block { min-width: 0; }

/* --- Book sets / bundles --- */
.book-set-offer {
  margin: 1.1rem 0 0.35rem;
  padding: 1rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.book-set-offer-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.book-set-covers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin-bottom: 0.85rem;
}
.book-set-cover {
  display: block;
  width: 4.6rem;
  flex: 0 0 auto;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.book-set-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
.book-set-plus {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}
.book-set-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
}
.book-set-sum {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.book-set-deal {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.book-set-buy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.book-set-buy .btn-cart {
  flex: 1 1 auto;
  min-width: min(12rem, 100%);
  height: auto;
  min-height: 2.75rem;
  align-self: center;
}
.book-set-edit {
  margin: 1rem 0 0.25rem;
  padding: 1rem 0.9rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
}
.book-set-edit-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.book-set-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.55rem;
  margin: 0.75rem 0;
}
.book-set-formula label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.book-set-formula input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  min-width: 5.5rem;
  max-width: 9rem;
}
.book-set-formula input.readonly {
  background: #f3f0ea;
}
.book-set-op {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 0.55rem;
}
.book-set-clear {
  margin-top: 0.35rem;
}
.book-set-staff-form {
  margin-top: 1.25rem;
}
.cart-bundle-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}
.cart-bundle-note {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  .book-set-cover { width: 3.8rem; }
  .book-set-deal { font-size: 1.4rem; }
  .book-set-formula input { max-width: 7.5rem; }
}

.sync-alert {
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: #fde8e6;
  color: #7a1f16;
  border: 1px solid #f0b4ad;
  font-size: 0.9rem;
  line-height: 1.35;
  display: grid;
  gap: 0.2rem;
}
.sync-alert-meta {
  color: #9a4a42;
  font-size: 0.82rem;
}

.sync-history {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.sync-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.55rem;
}
.sync-history-title {
  font-size: 0.95rem;
}
.sync-history-last {
  font-size: 0.82rem;
  color: var(--muted);
}
.sync-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sync-run {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.35rem 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  line-height: 1.2;
}
.sync-run.is-open {
  border-color: #2f6fed;
  box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.18);
}
.sync-run.is-reviewed {
  background: #eef6ee;
  border-color: #b7d4b7;
}
.sync-run.is-fail {
  background: #fdeeee;
  border-color: #e8b4b0;
}
.sync-run-when {
  color: var(--ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
a.sync-run-when:hover {
  text-decoration: underline;
}
.sync-run-when.is-fail {
  color: #8a2f28;
}
.sync-run-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #1f4f3a;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.sync-run-new:hover {
  filter: brightness(1.08);
}
.sync-run-new.is-zero {
  background: #c9c5bc;
  color: #444;
  font-weight: 600;
}
.sync-run-mark {
  color: #1f6b3a;
  font-weight: 700;
  padding: 0 0.2rem;
}
.sync-run-fail {
  color: #8a2f28;
  font-size: 0.75rem;
  padding-right: 0.25rem;
}
.sync-history-list.is-collapsed .sync-run-extra {
  display: none;
}
.sync-history-toggle {
  margin-top: 0.55rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}
.sync-history-toggle .sync-history-less {
  display: none;
}
.sync-history-toggle.is-expanded .sync-history-more {
  display: none;
}
.sync-history-toggle.is-expanded .sync-history-less {
  display: inline;
}
.sync-history-hint,
.sync-history-empty {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Главная: один непрерывный banner (PC ≥900px); мобильный — без контактов в hero */
.shop-hero-row {
  margin: 0 0 1.35rem;
}

.shop-hero-row .shop-hero {
  margin-bottom: 0;
}

.shop-hero-contacts {
  display: none;
}

.shop-contacts-reach {
  display: contents;
}

@media (min-width: 900px) {
  .shop-hero-row .shop-hero {
    margin: 0;
  }

  .shop-hero-row .shop-hero-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem 1.35rem;
    padding: 0.4rem 1.2rem 0.4rem 0.45rem;
    box-sizing: border-box;
    background:
      linear-gradient(105deg, rgba(62, 163, 25, 0.11) 0%, transparent 38%),
      linear-gradient(180deg, rgba(255, 252, 246, 0.94) 0%, rgba(247, 240, 228, 0.9) 100%),
      var(--kraft);
    background-blend-mode: normal, normal, soft-light;
  }

  .shop-hero-row .shop-hero-logo {
    width: auto;
    height: 9.1rem;
    max-height: 9.1rem;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(46, 100, 24, 0.12);
  }

  .shop-hero-row .shop-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 1 14rem;
    min-width: 0;
    gap: 0;
  }

  .shop-hero-row .shop-hero-stock {
    font-family: var(--font-brand);
    font-size: clamp(1.05rem, 1.55vw, 1.38rem);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  .shop-hero-contacts {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }

  .shop-hero-contacts .shop-footer-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem 0;
    min-width: 0;
    width: 100%;
  }

  .shop-hero-contacts .shop-contacts-reach {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    padding: 0 1.15rem;
    border-left: 1px solid rgba(62, 163, 25, 0.22);
  }

  .shop-hero-contacts .shop-footer-contacts p,
  .shop-hero-contacts .shop-footer-address {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.3;
    word-break: break-word;
  }

  .shop-hero-contacts .muted {
    display: none;
  }

  .shop-hero-contacts .shop-footer-whatsapp {
    margin: 0;
  }

  .shop-hero-contacts .shop-footer-whatsapp-icon {
    width: 22px;
    height: 22px;
  }

  .shop-hero-contacts .shop-footer-whatsapp-link {
    gap: 0.3rem;
    font-size: 0.82rem;
  }

  .shop-hero-contacts .shop-footer-address {
    padding: 0 1.15rem;
    border-left: 1px solid rgba(62, 163, 25, 0.22);
    max-width: 22rem;
  }

  .shop-hero-contacts .shop-address-list {
    margin: 0;
  }

  .shop-hero-contacts .shop-address-list li {
    margin: 0.08rem 0;
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .shop-hero-contacts .shop-footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin: 0 !important;
    padding: 0 0 0 1.15rem;
    border-left: 1px solid rgba(62, 163, 25, 0.22);
  }

  .shop-hero-contacts .shop-footer-social a {
    font-size: 0.8rem;
    font-weight: 700;
  }
}

/* --- Export Excel (staff) --- */
.export-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.export-fieldset {
  border: 1px solid var(--line, #ddd);
  border-radius: 12px;
  padding: 0.85rem 1rem 1rem;
  margin: 0;
}

.export-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
}

.export-options {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.export-choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
}

.export-choice input[type="checkbox"],
.export-choice input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--accent, #2d7a3e);
  cursor: pointer;
}

.export-choice label {
  display: inline;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink, #1a1a1a);
  cursor: pointer;
  line-height: 1.35;
}

.export-filter-block {
  margin: 0.1rem 0;
}

.export-filter-extra {
  margin: 0.1rem 0 0.35rem 1.65rem;
}

.export-filter-extra select {
  width: min(28rem, 100%);
  max-width: 100%;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  background: #fff;
}

.export-divider {
  border: none;
  border-top: 1px solid var(--line, #ddd);
  margin: 1.5rem 0;
}

.export-form .btn-secondary {
  display: inline-block;
  text-decoration: none;
}

/* ——— Լունա assistant ——— */
.luna-assistant {
  position: fixed;
  right: 0.75rem;
  /* выше нижней панели (Каталог / Պրոֆիլ), чтобы силуэт не резался */
  bottom: calc(var(--bottom-nav-h, 3.6rem) + env(safe-area-inset-bottom, 0px) + 0.35rem);
  z-index: 80;
  font-size: 0.92rem;
  pointer-events: none;
}

.luna-assistant .luna-fab-wrap,
.luna-assistant .luna-panel {
  pointer-events: auto;
}

.luna-fab-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.luna-bubble-block {
  position: absolute;
  right: 0;
  bottom: calc(100% - 0.1rem);
  width: min(17.5rem, calc(100vw - 2rem));
  z-index: 3;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.luna-assistant.is-snoozed .luna-bubble-block,
.luna-assistant.is-snoozed .luna-dismiss-block {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.luna-assistant.is-snoozed .luna-fab-img {
  opacity: 0.2;
  transform: scaleX(-1);
  cursor: pointer;
}

.luna-assistant.is-snoozed .luna-fab {
  cursor: pointer;
}

.luna-assistant.is-snoozed .luna-fab-label {
  opacity: 0.85;
  font-size: 0.68rem;
  max-width: 9.5rem;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

/* когда чат открыт — крупный силуэт снизу прячем, остаётся аватар в шапке */
.luna-assistant.is-open .luna-fab-img {
  visibility: hidden;
  height: 0;
  width: 0;
}

.luna-assistant.is-open .luna-fab-label {
  opacity: 0.95;
}

.luna-assistant.is-open .luna-panel {
  bottom: 2.6rem;
}

.luna-fab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
  isolation: isolate;
}

.luna-fab::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 6.4rem;
  height: 6.4rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 248, 220, 0.95) 0%, rgba(190, 230, 170, 0.55) 42%, rgba(190, 230, 170, 0) 72%);
  z-index: -1;
  pointer-events: none;
  animation: luna-halo 3.6s ease-in-out infinite;
}

.luna-assistant.is-snoozed .luna-fab::before {
  opacity: 0.25;
  animation: none;
}

.luna-speech {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: linear-gradient(160deg, #ffffff 0%, #f4fff4 55%, #fff9e8 100%);
  color: #1f2a1c;
  border: 1.5px solid rgba(90, 170, 100, 0.55);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75) inset,
    0 10px 28px rgba(47, 107, 58, 0.22),
    0 0 24px rgba(180, 230, 140, 0.35);
  font-size: 0.8rem;
  line-height: 1.42;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  animation: luna-float 5s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.luna-speech::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 65%,
    transparent 100%
  );
  transform: translateX(-120%);
  animation: luna-shimmer 4.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.luna-speech::after {
  content: "";
  position: absolute;
  right: 1.65rem;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #f4fff4 30%, #fff9e8 100%);
  border-right: 1.5px solid rgba(90, 170, 100, 0.55);
  border-bottom: 1.5px solid rgba(90, 170, 100, 0.55);
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 0;
}

.luna-speech:hover,
.luna-speech:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(70, 150, 80, 0.8);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 14px 34px rgba(47, 107, 58, 0.28),
    0 0 30px rgba(180, 230, 140, 0.45);
  outline: none;
}

.luna-speech-text {
  display: block;
  position: relative;
  z-index: 1;
  min-height: 3.6em;
  white-space: pre-line;
  line-height: 1.42;
}

.luna-speech.is-typing .luna-speech-text::after {
  content: "▍";
  display: inline-block;
  margin-left: 1px;
  color: #3d8a4a;
  animation: luna-caret 0.8s steps(1) infinite;
}

.luna-dismiss-block {
  position: absolute;
  right: calc(7.2rem + 0.35rem);
  bottom: 2.4rem;
  z-index: 2;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: auto;
}

.luna-dismiss-bubble {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  width: 6.7rem;
  padding: 0.5rem 0.55rem;
  border: 1.5px solid rgba(90, 170, 100, 0.5);
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff 0%, #f7fff7 100%);
  color: #1f2a1c;
  box-shadow:
    0 8px 22px rgba(47, 107, 58, 0.16),
    0 0 16px rgba(180, 230, 140, 0.22);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.luna-dismiss-bubble:hover,
.luna-dismiss-bubble:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(70, 150, 80, 0.75);
  box-shadow:
    0 12px 28px rgba(47, 107, 58, 0.24),
    0 0 22px rgba(180, 230, 140, 0.35);
  outline: none;
}

.luna-dismiss-line {
  display: block;
  width: 100%;
  white-space: nowrap;
  line-height: 1.25;
  text-align: center;
}

.luna-dismiss-x {
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  margin: 0;
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid #c8dfc8;
  border-radius: 999px;
  background: #fff;
  color: #5a554f;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 12px rgba(47, 107, 58, 0.12);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.luna-dismiss-x:hover,
.luna-dismiss-x:focus-visible {
  background: #f5f0e8;
  color: #2a2418;
  border-color: #9ecf9e;
  outline: none;
}

@keyframes luna-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes luna-halo {
  0%, 100% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes luna-shimmer {
  0%, 55% {
    transform: translateX(-120%);
  }
  75%, 100% {
    transform: translateX(120%);
  }
}

@keyframes luna-caret {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

.luna-assistant.is-open .luna-bubble-block,
.luna-assistant.is-speech-hidden .luna-bubble-block,
.luna-assistant.is-open .luna-dismiss-block,
.luna-assistant.is-speech-hidden .luna-dismiss-block {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

/* короткая подсказка по поиску — поверх snooze / скрытого bubble */
.luna-assistant.is-search-tip .luna-bubble-block,
.luna-assistant.is-search-tip.is-speech-hidden .luna-bubble-block,
.luna-assistant.is-search-tip.is-snoozed .luna-bubble-block {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 6;
}

.luna-assistant.is-search-tip .luna-dismiss-block,
.luna-assistant.is-search-tip.is-speech-hidden .luna-dismiss-block,
.luna-assistant.is-search-tip.is-snoozed .luna-dismiss-block {
  opacity: 0;
  pointer-events: none;
}

.luna-assistant.is-search-tip.is-snoozed .luna-fab-img {
  opacity: 0.9;
  transform: none;
}

.luna-assistant.is-search-tip .luna-speech-text {
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .luna-speech,
  .luna-speech::before,
  .luna-fab::before,
  .luna-bubble-block,
  .luna-dismiss-block,
  .luna-assistant.is-snoozed .luna-fab-img {
    animation: none;
    transition: none;
  }

  .luna-speech.is-typing .luna-speech-text::after {
    content: none;
  }
}

.luna-fab-img {
  width: 7.2rem;
  height: 7.2rem;
  object-fit: contain;
  border-radius: 0;
  border: none;
  background: transparent;
  display: block;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.luna-fab-label {
  font-weight: 800;
  color: var(--accent, #2f6b3a);
  background: linear-gradient(180deg, #ffffff 0%, #f3fff3 100%);
  border: 1px solid rgba(90, 170, 100, 0.35);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.78rem;
  box-shadow:
    0 3px 10px rgba(47, 107, 58, 0.16),
    0 0 12px rgba(180, 230, 140, 0.35);
}

.luna-fab-hint {
  display: none;
  max-width: 6.5rem;
  margin-bottom: 0.08rem;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(90, 170, 100, 0.28);
  color: #3a6842;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  box-shadow: 0 2px 8px rgba(47, 107, 58, 0.1);
  pointer-events: none;
}

.luna-assistant.is-fab-hint:not(.is-open):not(.is-snoozed) .luna-fab-hint {
  display: block;
}

.luna-assistant.is-open .luna-fab-hint,
.luna-assistant.is-snoozed .luna-fab-hint,
.luna-assistant.is-search-tip .luna-fab-hint {
  display: none !important;
}

.luna-panel {
  position: absolute;
  right: 0;
  bottom: 7.6rem;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 32rem);
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  border: 1px solid #e4d8c4;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(30, 24, 16, 0.22);
  overflow: hidden;
}

.luna-panel[hidden] {
  display: none !important;
}

.luna-panel-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, #f7efd6, #fffdf8);
  border-bottom: 1px solid #eadfca;
}

.luna-panel-avatar {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 0;
  object-fit: contain;
  border: none;
  background: transparent;
}

.luna-panel-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.luna-panel-titles strong {
  font-size: 1rem;
}

.luna-panel-titles span {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.luna-panel-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.1rem 0.35rem;
}

.luna-messages {
  flex: 1;
  overflow: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 10rem;
}

.luna-msg p {
  margin: 0;
  line-height: 1.4;
  white-space: pre-line;
}

.luna-msg-bot {
  align-self: flex-start;
  max-width: 95%;
  background: #f3f6f2;
  border-radius: 12px 12px 12px 4px;
  padding: 0.55rem 0.7rem;
}

.luna-msg-user {
  align-self: flex-end;
  max-width: 90%;
  background: var(--accent, #2f6b3a);
  color: #fff;
  border-radius: 12px 12px 4px 12px;
  padding: 0.55rem 0.7rem;
}

.luna-msg-thinking {
  opacity: 0.75;
  font-style: italic;
}

.luna-books {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.luna-book {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e5e0d6;
  border-radius: 10px;
  padding: 0.4rem;
}

.luna-book:hover {
  border-color: var(--accent, #2f6b3a);
}

.luna-book img {
  width: 44px;
  height: 66px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #eee;
}

.luna-book-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.luna-book-meta strong {
  font-size: 0.84rem;
  line-height: 1.25;
}

.luna-book-meta em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
}

.luna-book-price {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent, #2f6b3a);
}

.luna-book-open {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent, #2f6b3a);
  margin-top: 0.15rem;
}

.luna-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem 0;
  background: #fff;
}

.luna-chip {
  border: 1px solid #d8cdb6;
  background: #fdf8ee;
  color: #5b4a33;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
}

.luna-chip:hover,
.luna-chip:focus-visible {
  background: #f4e7cf;
  border-color: #c9b591;
}

.luna-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem;
  border-top: 1px solid #eadfca;
  background: #fff;
}

.luna-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d8d0c2;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font: inherit;
}

.luna-send {
  border-radius: 999px;
  white-space: nowrap;
  padding: 0.55rem 0.85rem;
}

@media (max-width: 640px) {
  .luna-assistant {
    right: 0.4rem;
    bottom: calc(var(--bottom-nav-h, 3.6rem) + env(safe-area-inset-bottom, 0px) + 0.2rem);
  }

  .luna-fab-img {
    width: 6.2rem;
    height: 6.2rem;
  }

  .luna-speech {
    font-size: 0.72rem;
    padding: 0.5rem 0.6rem;
  }

  .luna-bubble-block {
    width: min(15rem, calc(100vw - 1.5rem));
  }

  .luna-dismiss-block {
    right: calc(6.2rem + 0.25rem);
    bottom: 2.05rem;
    gap: 0.28rem;
  }

  .luna-dismiss-bubble {
    width: 5.85rem;
    font-size: 0.66rem;
    padding: 0.42rem 0.48rem;
  }

  .luna-dismiss-x {
    width: 1.28rem;
    height: 1.28rem;
    font-size: 0.92rem;
  }

  .luna-panel {
    bottom: 7.2rem;
    width: min(22rem, calc(100vw - 1rem));
  }

  .luna-fab-label {
    display: none;
  }

  .luna-fab-hint {
    font-size: 0.58rem;
    max-width: 5.8rem;
    padding: 0.1rem 0.38rem;
  }
}

/* ——— Ноутбук / короткий экран (100% zoom): 2 полных ряда полок или сетки ——— */
@media (min-width: 900px) and (max-height: 900px) {
  .wrap,
  .wrap-shop {
    padding: 0.65rem 0.85rem;
  }

  .site-topbar-inner {
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
  }

  .top-inner {
    padding: 0.45rem 0.85rem 0.4rem;
  }

  .top-row {
    margin-bottom: 0.35rem;
  }

  .shop-brand-tagline {
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    line-height: 1.12;
  }

  .top-tool-btn {
    min-height: 1.75rem;
    padding: 0.28rem 0.6rem;
    font-size: 0.78rem;
  }

  .shopper .search button,
  .shopper .suggest-wrap input {
    min-height: 38px;
    padding-top: 0.38rem;
    padding-bottom: 0.38rem;
  }

  .shopper-role-switch {
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
  }

  .shopper-role-switch .role-btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.78rem;
  }

  .genre-browse-bar {
    margin-bottom: 0.45rem;
  }

  .genre-browse-trigger {
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
  }

  .shop-hero-row {
    margin-bottom: 0.65rem;
  }

  .shop-hero-row .shop-hero-inner {
    padding: 0.3rem 0.85rem 0.3rem 0.35rem;
    gap: 0.55rem 0.85rem;
  }

  .shop-hero-row .shop-hero-logo {
    height: 5.25rem;
    max-height: 5.25rem;
  }

  .shop-hero-row .shop-hero-stock {
    font-size: clamp(0.95rem, 1.35vw, 1.15rem);
  }

  .shop-hero-contacts .shop-footer-address,
  .shop-hero-contacts .shop-footer-social {
    display: none;
  }

  .shelf {
    margin-bottom: 0.75rem;
  }

  .shelf-head {
    margin-bottom: 0.35rem;
  }

  .shelf-head h2 {
    font-size: 0.95rem;
  }

  .shelf-head a {
    font-size: 0.8rem;
  }

  .shelf-track {
    gap: 0.55rem;
    padding-bottom: 0.35rem;
  }

  .shelf-card {
    flex-basis: 112px;
    width: 112px;
    min-width: 112px;
    max-width: 112px;
  }

  .shelf-card .book-card-cover {
    margin-bottom: 0.2rem;
  }

  .shelf-card .book-card-title {
    font-size: 0.68rem;
    line-height: 1.18;
    min-height: calc(1.18em * 2);
    height: calc(1.18em * 2);
  }

  .shelf-card .book-card-price {
    font-size: 0.74rem;
    margin-top: 0.08rem;
  }

  .book-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem 0.45rem;
  }

  .book-card-body {
    padding: 0.35rem 0.05rem 0.1rem;
    gap: 0.1rem;
  }

  .book-card-title {
    font-size: 0.78rem;
    -webkit-line-clamp: 2;
  }

  .book-card-author {
    font-size: 0.72rem;
    -webkit-line-clamp: 1;
  }

  .book-card-price {
    font-size: 0.88rem;
    margin-top: 0.05rem;
  }

  .book-card-cover {
    aspect-ratio: auto;
    height: 9.75rem;
  }

  .card-cart-form {
    padding-top: 0.2rem;
  }

  .book-grid .btn-cart {
    min-height: 34px;
    padding: 0.35rem 0.45rem;
    font-size: 0.78rem;
    border-radius: 8px;
  }

  .shop-toolbar {
    margin-bottom: 0.55rem;
  }
}

@media (min-width: 1100px) and (max-height: 900px) {
  .book-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 900px) and (max-height: 780px) {
  .shop-hero-row .shop-hero-logo {
    height: 4.25rem;
    max-height: 4.25rem;
  }

  .shop-hero-row {
    margin-bottom: 0.45rem;
  }

  .shelf-card {
    flex-basis: 100px;
    width: 100px;
    min-width: 100px;
    max-width: 100px;
  }

  .book-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.45rem 0.4rem;
  }

  .book-card-cover {
    height: 8.5rem;
  }

  .book-card-author {
    display: none;
  }
}
