/* ===== Тема t-obuv.ru — тёмная, кофейно-коричневая с золотыми акцентами =====
   Меняйте --accent / --gold, чтобы перекрасить весь магазин. */
:root {
  --accent: #a86b3c;         /* тёплый коричневый (кнопки, актив) */
  --accent-dark: #7d4e28;    /* тёмный коричневый (нажатие) */
  --accent-soft: #2a1d14;    /* тёмная тёплая подложка */
  --gold: #d4af37;           /* золото (логотип, бейджи, звёзды, категория) */
  --gold-soft: #e6c976;

  --bg-top: #1a120e;         /* фон-градиент сверху */
  --bg-bottom: #0f0a07;      /* фон-градиент снизу */
  --card-top: #241a13;       /* карточка — светлее вверху */
  --card-bottom: #17100b;    /* карточка — темнее внизу */

  --text: #f5efe9;
  --muted: #9c8b7d;
  --line: rgba(255, 255, 255, 0.07);
  --savings: #cba76a;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 60%) fixed;
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(104px + env(safe-area-inset-bottom)); /* место под фиксированное нижнее меню + безопасная зона */
}

/* ===== Топбар ===== */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(26, 18, 14, 0.96), rgba(26, 18, 14, 0.72));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { color: var(--gold); font-size: 14px; }
.brand-name {
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 700; font-size: 22px; letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
}
.top-icons { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  border: none; background: transparent; color: var(--text);
  width: 40px; height: 40px; border-radius: 12px; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.icon-btn:active { background: var(--accent-soft); }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: 2px; right: 2px;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.fav-btn { position: relative; }
.fav-count {
  position: absolute; top: 0; right: 0;
  background: var(--gold); color: #1a120e; font-size: 10px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ===== Поиск ===== */
.search-wrap { padding: 12px 16px 4px; scroll-margin-top: 76px; }
/* Режим поиска (фокус в поле): верхние блоки скрыты, поле поиска подтянуто
   к шапке и закреплено там, каталог получает больше высоты — чтобы при пустом
   результате поле не пряталось под клавиатурой. */
body.searching .quicklinks,
body.searching .hero,
body.searching .collection { display: none; }
body.searching .search-wrap {
  position: sticky; top: var(--header-h, 56px); z-index: 9;
  background: var(--bg-top);
}
body.searching .grid { min-height: 70vh; }
.search {
  width: 100%; border: 1px solid var(--line);
  background: linear-gradient(180deg, #221812, #1a120d);
  color: var(--text); border-radius: 999px;
  padding: 14px 18px; font-size: 14px; outline: none;
}
.search::placeholder { color: var(--muted); }
.search:focus { border-color: var(--accent); }

/* ===== Блок «Коллекция» + авто-карусель ===== */
.collection { padding: 16px 0 4px; }
.collection-head { padding: 0 16px 12px; }
.collection-title {
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 700; font-size: 22px; letter-spacing: 0.5px; color: var(--text);
}
.collection-sub {
  margin-top: 2px; font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--gold-soft);
}
.carousel {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.carousel::-webkit-scrollbar { display: none; }
.carousel.dragging { cursor: grabbing; }
.carousel-track {
  display: flex; gap: 12px; width: max-content; padding: 4px 16px;
}
.cslide {
  flex: 0 0 auto; width: 172px; height: 240px; border-radius: 20px; cursor: pointer;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  background:
    radial-gradient(120% 70% at 75% 8%, rgba(168, 107, 60, 0.55), transparent 60%),
    linear-gradient(180deg, #2a1c12 0%, #17100b 60%, #0f0a07 100%);
  box-shadow: inset 0 1px 0 rgba(212, 175, 55, 0.12), 0 8px 22px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  padding: 16px 16px 18px; transition: transform 0.12s, border-color 0.15s;
}
.cslide:active { transform: scale(0.97); border-color: var(--gold); }
.cslide-ic { font-size: 54px; line-height: 1; color: var(--gold); }
.cslide--photo { background-size: cover; background-position: center; justify-content: flex-end; }
.cslide--photo .cslide-ic { display: none; }
.cslide-label {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 20px; font-weight: 700; color: #f5efe9; letter-spacing: 0.5px;
}

/* ===== Быстрые ссылки (круглые иконки) ===== */
.quicklinks {
  display: flex; gap: 16px; overflow-x: auto;
  padding: 14px 16px 4px; scrollbar-width: none;
}
.quicklinks::-webkit-scrollbar { display: none; }
.ql {
  flex: 0 0 auto; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.ql-ic {
  width: 62px; height: 62px; border-radius: 6px;
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  background: linear-gradient(180deg, #241a13, #14100b);
  color: var(--gold); font-size: 23px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(212, 175, 55, 0.12), 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s, border-color 0.15s;
}
.ql:active .ql-ic { transform: scale(0.94); border-color: var(--gold); }
.ql-label { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ===== Hero-баннер ===== */
.hero {
  position: relative; margin: 12px 16px 4px;
  min-height: 296px; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background:
    radial-gradient(120% 90% at 70% 12%, rgba(168, 107, 60, 0.4), transparent 60%),
    linear-gradient(180deg, #2a1c12 0%, #17100b 68%, #0f0a07 100%);
  box-shadow: var(--shadow);
  display: flex; align-items: flex-end;
}
/* Баннер = логотип HERMAN, вписанный в тёмную кофейную тему */
.hero--logo {
  position: relative;
  isolation: isolate;
  min-height: 340px;
  background:
    radial-gradient(120% 90% at 50% 22%, rgba(168, 107, 60, 0.38), transparent 62%),
    linear-gradient(180deg, #2a1c12 0%, #17100b 68%, #0f0a07 100%);
  border-color: rgba(212, 175, 55, 0.45);
  align-items: flex-end; justify-content: center;
}
/* логотип чёрным-по-белому → инвертируем в светлый и «выжигаем» белый фон блендом */
.hero-logo-img {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  height: 72%; width: auto; object-fit: contain;
  filter: invert(1) sepia(0.22) saturate(1.15) brightness(1.02);
  mix-blend-mode: screen;
  pointer-events: none; user-select: none;
}
.hero-inner { position: relative; z-index: 1; padding: 22px 22px 24px; width: 100%; }
.hero--logo .hero-inner {
  display: flex; justify-content: center; padding: 0 22px 20px;
}
.hero-logo {
  font-family: "Georgia", "Times New Roman", serif; font-weight: 700;
  font-size: 46px; letter-spacing: 2px; color: #fff; line-height: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}
.hero-tagline {
  margin-top: 10px; color: var(--gold-soft);
  font-size: 13px; letter-spacing: 3px; font-weight: 600; text-transform: uppercase;
}
.hero-cta {
  margin-top: 18px; border: none; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #2a1c12; font-weight: 800; font-size: 15px;
  padding: 14px 28px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
  transition: transform 0.12s, filter 0.15s;
}
.hero-cta:active { transform: scale(0.96); filter: brightness(0.95); }

/* ===== Чипсы категорий ===== */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line);
  background: linear-gradient(180deg, #221812, #180f0b); color: var(--text);
  padding: 9px 16px; border-radius: 999px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chip.active {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-color: var(--accent); color: #fff; font-weight: 600;
}
.chip-count { opacity: 0.6; font-size: 12px; margin-left: 2px; }
.chip.active .chip-count { opacity: 0.85; }

/* ===== Сетка товаров ===== */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; padding: 0 16px;
}
.card {
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform 0.12s ease, border-color 0.15s;
}
.card:active { transform: scale(0.98); border-color: rgba(212, 175, 55, 0.35); }
.card-img {
  position: relative; aspect-ratio: 1; margin: 0; border-radius: 14px 14px 0 0;
  background: #f3f1ee; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  background: rgba(20, 14, 10, 0.82); color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.6);
  font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 10px;
  backdrop-filter: blur(4px); white-space: nowrap;
}
.fav {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(20, 14, 10, 0.5); color: #fff; font-size: 14px; cursor: pointer;
  backdrop-filter: blur(4px);
}
.fav.active { background: rgba(20, 14, 10, 0.72); color: var(--gold); }
.card-body { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-cat { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: var(--gold); text-transform: uppercase; }
.card-name {
  font-size: 14px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.card-rating { font-size: 12px; color: var(--gold); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; align-self: flex-start; padding: 2px 0; }
.card-rating:active { transform: scale(0.94); }
.made-tag {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  font-size: 11px; font-weight: 600; color: var(--gold);
  background: var(--accent-soft); border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 999px; padding: 3px 9px; margin: 2px 0;
}
.made-note { font-size: 11px; line-height: 1.35; color: var(--muted); margin: 2px 0; }
.made-note-lg { font-size: 13px; color: var(--gold); display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; }
.card-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.card-price { font-size: 18px; font-weight: 800; color: var(--text); }
.card-old { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.card-disc {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 12px; font-weight: 800; color: #fff; background: #d4a017;
  border-radius: 8px; padding: 3px 8px; line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.card-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-top: 8px; }
.card-savings { font-size: 12px; font-weight: 600; color: var(--savings); line-height: 1.3; }
.card-add {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; border: none;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff; font-size: 22px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(168, 107, 60, 0.4);
}
.card-add:active { transform: scale(0.92); }

/* ===== Sheet (модалки) ===== */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet.hidden { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.sheet-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, var(--card-top), var(--bg-bottom));
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow-y: auto;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-body h2 { font-size: 20px; }
.sheet-close {
  position: absolute; top: 14px; right: 14px; z-index: 5; border: none;
  background: rgba(20, 14, 10, 0.55); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.p-image { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: #f3f1ee; }
/* Свайп-карусель фото */
.p-gallery { position: relative; }
.p-gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  border-radius: var(--radius); background: #f3f1ee;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.p-gallery-track::-webkit-scrollbar { display: none; }
.p-slide {
  flex: 0 0 100%; width: 100%; aspect-ratio: 1; object-fit: cover;
  scroll-snap-align: center;
}
.p-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; gap: 6px; justify-content: center; pointer-events: none;
}
.p-dots .p-dot { pointer-events: auto; }
.p-dot {
  width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.55); cursor: pointer;
  transition: width 0.2s, background 0.2s; box-shadow: 0 0 2px rgba(0,0,0,0.3);
}
.p-dot.active { width: 18px; border-radius: 4px; background: #fff; }
.p-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.p-thumbs:empty { display: none; }
.p-thumbs::-webkit-scrollbar { display: none; }
.p-disc {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  font-size: 13px; font-weight: 800; color: #fff; background: #d4a017;
  border-radius: 8px; padding: 3px 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.p-disc:empty { display: none; }
.p-thumb {
  flex: 0 0 auto; width: 60px; height: 60px; border-radius: 10px;
  object-fit: cover; cursor: pointer; background: #f3f1ee;
  border: 2px solid transparent; opacity: 0.65;
  transition: opacity 0.15s, border-color 0.15s;
}
.p-thumb.active { border-color: var(--gold); opacity: 1; }
#pName { margin-top: 14px; }
.p-desc { color: var(--muted); font-size: 14px; margin: 10px 0; line-height: 1.5; }
.p-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.p-price { font-size: 26px; font-weight: 800; color: var(--gold); }
.p-old { font-size: 15px; color: var(--muted); text-decoration: line-through; }
.p-sizes-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.size {
  min-width: 46px; padding: 11px 0; text-align: center; border: 1px solid var(--line);
  background: #1c130e; color: var(--text); border-radius: 10px; cursor: pointer; font-size: 14px;
}
.size.active { border-color: var(--gold); background: var(--accent-soft); color: var(--gold); font-weight: 700; }

/* ===== Кнопки ===== */
.btn-primary {
  width: 100%; border: none; color: #fff;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  padding: 16px; border-radius: 14px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: filter 0.15s;
  box-shadow: 0 6px 18px rgba(168, 107, 60, 0.35);
}
.btn-primary:active { filter: brightness(0.9); }

/* ===== Корзина ===== */
.cart-items { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #f3f1ee; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 600; }
.cart-item-meta { font-size: 12px; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: #1c130e; color: var(--text); cursor: pointer; font-size: 16px;
}
.cart-empty { text-align: center; color: var(--muted); padding: 24px 0; }
.cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 800; font-size: 18px; margin: 8px 0 16px;
}
.cart-total-row #cartTotal { color: var(--gold); }

/* ===== Отдельные страницы (Избранное, О нас) ===== */
/* Прячем домашние блоки, показываем нужную страницу. */
#favPage, #aboutPage, #infoPage, #salePage, #reviewsPage, #madePage, #profilePage { display: none; }
body.page-fav #favPage,
body.page-about #aboutPage,
body.page-info #infoPage,
body.page-sale #salePage,
body.page-reviews #reviewsPage,
body.page-made #madePage,
body.page-profile #profilePage { display: block; }
body.page-fav .hero, body.page-fav .quicklinks, body.page-fav .collection,
body.page-fav .search-wrap, body.page-fav .chips, body.page-fav #grid,
body.page-about .hero, body.page-about .quicklinks, body.page-about .collection,
body.page-about .search-wrap, body.page-about .chips, body.page-about #grid,
body.page-info .hero, body.page-info .quicklinks, body.page-info .collection,
body.page-info .search-wrap, body.page-info .chips, body.page-info #grid,
body.page-reviews .hero, body.page-reviews .quicklinks, body.page-reviews .collection,
body.page-reviews .search-wrap, body.page-reviews .chips, body.page-reviews #grid,
body.page-profile .hero, body.page-profile .quicklinks, body.page-profile .collection,
body.page-profile .search-wrap, body.page-profile .chips, body.page-profile #grid { display: none; }
/* Страница «Акции» содержит свои .search-wrap/.chips/.grid — прячем только домашние
   блоки (прямые дети body), чтобы не задеть вложенные в саму страницу. */
body.page-sale > .hero, body.page-sale > .quicklinks, body.page-sale > .collection,
body.page-sale > .search-wrap, body.page-sale > .chips, body.page-sale > #grid,
body.page-made > .hero, body.page-made > .quicklinks, body.page-made > .collection,
body.page-made > .search-wrap, body.page-made > .chips, body.page-made > #grid { display: none; }

/* ===== Пагинатор каталога (главная) ===== */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 8px 16px 22px;
}
.pager.hidden { display: none; }
.pager-btn {
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: #1c130e; color: var(--text);
  font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, opacity 0.15s;
}
.pager-btn:active { background: var(--accent-soft); }
.pager-btn:disabled { opacity: 0.35; cursor: default; }
.pager-info { font-size: 14px; color: var(--muted); min-width: 66px; text-align: center; }
body.light .pager-btn { background: #fff; }
/* Пагинатор живёт на главной — на прочих страницах прячем */
body.page-fav > #gridPager, body.page-about > #gridPager, body.page-info > #gridPager,
body.page-reviews > #gridPager, body.page-profile > #gridPager,
body.page-sale > #gridPager, body.page-made > #gridPager { display: none; }

.page { padding-top: 6px; animation: page-in 0.25s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 14px;
}
.page-back {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card-top); color: var(--text);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.page-back:active { transform: scale(0.92); border-color: var(--gold); }
.page-title {
  font-family: "Georgia", serif; font-size: 22px; font-weight: 700;
  letter-spacing: 0.5px; display: flex; align-items: baseline; gap: 8px;
}
.page-count { font-family: inherit; font-size: 15px; font-weight: 600; color: var(--muted); }
.fav-title-ic, .sale-title-ic { color: var(--gold); font-size: 18px; }

.fav-empty { text-align: center; color: var(--muted); padding: 48px 20px 24px; }
.fav-empty-ic {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, var(--accent-soft), var(--card-bottom));
  color: var(--gold); font-size: 34px; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.fav-empty-title { font-size: 18px; font-weight: 700; color: var(--text); }
.fav-empty-sub { font-size: 13px; margin: 8px auto 22px; max-width: 260px; line-height: 1.5; }
.fav-empty .btn-primary { max-width: 240px; margin: 0 auto; }

/* ===== Страница «О нас» ===== */
#aboutPage.page { padding-top: 0; }
.about-back {
  position: absolute; top: 12px; left: 14px; z-index: 3;
  color: #f5efe9; background: rgba(20, 14, 10, 0.5); backdrop-filter: blur(4px);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Hero: баннер-логотип + since + слоган */
.about-hero {
  position: relative; isolation: isolate; text-align: center;
  padding: 30px 24px 34px;
  background:
    radial-gradient(120% 80% at 50% 10%, rgba(168, 107, 60, 0.4), transparent 62%),
    linear-gradient(180deg, #2a1c12 0%, #17100b 74%, var(--bg-bottom) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}
/* логотип чёрным-по-белому → инвертируем в светлый, «выжигаем» белый фон блендом */
.about-logo {
  display: block; margin: 4px auto 6px; height: 152px; width: auto; max-width: 84%;
  object-fit: contain;
  filter: invert(1) sepia(0.22) saturate(1.15) brightness(1.02);
  mix-blend-mode: screen; pointer-events: none; user-select: none;
}
.about-since {
  color: var(--gold); font-size: 13px; letter-spacing: 6px;
  font-weight: 700; text-transform: uppercase;
}
.about-tagline {
  font-family: "Georgia", "Times New Roman", serif; font-style: italic;
  font-size: 18px; line-height: 1.55; color: #e8ddd0; margin-top: 14px;
}

/* Статистика в три колонки с разделителями */
.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 26px 8px; border-bottom: 1px solid var(--line);
}
.astat { text-align: center; padding: 2px 6px; }
.astat + .astat { border-left: 1px solid var(--line); }
.astat-num {
  font-family: "Georgia", serif; font-weight: 700; font-size: 36px;
  color: var(--gold); line-height: 1;
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
}
.astat-star { font-size: 20px; }
.astat-cap { margin-top: 9px; font-size: 12px; color: var(--muted); }

/* Текстовые блоки */
.about-block { padding: 28px 20px 2px; }
.about-h {
  position: relative; padding-bottom: 12px; margin-bottom: 16px;
  font-family: "Georgia", serif; font-weight: 700; font-size: 26px;
  letter-spacing: 0.5px; color: var(--text);
}
.about-h::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 46px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.about-p { font-size: 15px; line-height: 1.72; color: var(--muted); margin-bottom: 12px; }

/* Ценности */
.about-values { display: flex; flex-direction: column; gap: 12px; }
.aval {
  display: flex; gap: 14px; align-items: center; padding: 14px;
  border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
}
.aval-ic {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--gold); font-size: 18px;
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.aval-t { font-size: 15px; font-weight: 700; color: var(--text); }
.aval-d { font-size: 13px; color: var(--muted); margin-top: 2px; }
/* строка-ссылка (контакты) */
a.aval { text-decoration: none; color: inherit; }
a.aval:active { transform: scale(0.99); border-color: var(--gold); }
/* бренд-иконки контактов */
.ic-wa i { color: #25d366; }
.ic-ig i { color: #e1306c; }
.ic-wb { font-family: "Georgia", serif; font-weight: 800; font-size: 17px;
  letter-spacing: -1px; color: #cb11ab; }

/* Подвал страницы */
.about-foot { padding: 30px 20px 12px; text-align: center; }
.about-foot .btn-primary { max-width: 260px; margin: 0 auto; }
.contact-write { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 9px; }
.contact-write i { font-size: 15px; }
.about-sign {
  margin-top: 20px; font-size: 12px; letter-spacing: 2px;
  color: var(--gold-soft); text-transform: uppercase; opacity: 0.85;
}
.about-req {
  margin-top: 22px; font-size: 10.5px; line-height: 1.5;
  color: var(--muted); text-align: center; opacity: 0.75;
  max-width: 320px; margin-left: auto; margin-right: auto;
}
.about-docs {
  margin: 16px auto 0; max-width: 360px;
  display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center;
}
.about-docs a { font-size: 12px; color: var(--muted); text-decoration: underline; }
.about-docs a:active { color: var(--gold); }

/* Чекбокс согласия в форме заказа */
.agree {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12.5px; line-height: 1.45; color: var(--muted); margin: 2px 0 4px;
  cursor: pointer;
}
.agree input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.agree a { color: var(--gold); }

/* Светлая тема: кремовый hero + оригинальный тёмный логотип */
body.light .about-hero {
  background:
    radial-gradient(120% 80% at 50% 10%, rgba(212, 175, 55, 0.2), transparent 62%),
    linear-gradient(180deg, #fbf6ef 0%, #f1e7d9 100%);
  border-bottom-color: rgba(212, 175, 55, 0.5);
}
body.light .about-logo { filter: none; mix-blend-mode: multiply; }
body.light .about-tagline { color: var(--accent-dark); }

/* ===== Страница «Доставка и возврат» ===== */
#infoPage.page { padding-top: 0; }
.info-hero { padding-top: 46px; }
.info-hero-ic {
  display: inline-flex; width: 68px; height: 68px; border-radius: 50%;
  align-items: center; justify-content: center; margin-bottom: 16px;
  background: var(--accent-soft); color: var(--gold); font-size: 27px;
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.info-hero-title {
  font-family: "Georgia", serif; font-weight: 700; font-size: 28px;
  letter-spacing: 0.5px; color: var(--text);
}
/* отступ под липкую шапку при якорном скролле к секциям */
.info-section, #contactsSection { scroll-margin-top: 72px; }

/* ===== Страница «Отзывы» ===== */
#reviewsPage.page { padding-top: 0; }
.reviews-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.review-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
}
.rc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rc-name { font-weight: 700; font-size: 15px; color: var(--text); }
.rc-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rc-stars { color: var(--gold); font-size: 13px; margin: 8px 0 10px; letter-spacing: 3px; }
.rc-stars .fa-regular { color: var(--line); }
.rc-text { font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-word; }

.reviews-empty { text-align: center; color: var(--muted); padding: 20px 0; }
.reviews-empty-ic { font-size: 32px; color: var(--gold); margin-bottom: 10px; opacity: 0.85; }

/* Форма отзыва */
.review-block { margin-top: 6px; }
.review-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.review-input, .review-textarea {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: #1c130e; color: var(--text); font-size: 14px; font-family: inherit; outline: none;
}
.review-textarea { resize: vertical; min-height: 96px; }
/* Когда открывается клавиатура, поле подтягивается к верху — не под sticky-шапку */
.review-input, .review-textarea { scroll-margin-top: 96px; }
.review-input:focus, .review-textarea:focus { border-color: var(--gold); }

/* Интерактивные звёзды выбора оценки */
.rating-input { display: flex; gap: 10px; }
.rstar {
  background: none; border: none; padding: 2px; cursor: pointer; line-height: 1;
  font-size: 32px; color: var(--line); transition: transform 0.1s, color 0.15s;
}
.rstar.on { color: var(--gold); }
.rstar:active { transform: scale(0.86); }

.review-note { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 2px 0 0; }
.review-note i { color: var(--gold); }

/* Баннер «Отзыв о товаре» над формой */
.review-target {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text);
  background: var(--accent-soft); border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px; padding: 10px 14px;
}
.review-target i { color: var(--gold); }

/* Ссылка на товар в карточке отзыва */
.rc-product {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 12.5px; color: var(--gold); cursor: pointer; text-decoration: none;
  border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 999px; padding: 5px 12px;
}
.rc-product:active { transform: scale(0.96); }

/* Отзывы внутри карточки товара (модалка) */
.p-reviews { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.p-reviews-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.p-reviews-head h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.p-rev-btn {
  background: var(--accent-soft); border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold); border-radius: 999px; padding: 8px 14px; font-size: 13px;
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.p-rev-btn:active { transform: scale(0.96); }
.p-reviews-list { display: flex; flex-direction: column; gap: 10px; }
.p-rev { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--accent-soft); }
.p-rev-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.p-rev-name { font-weight: 700; font-size: 14px; color: var(--text); }
.p-rev-text { font-size: 13px; line-height: 1.45; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.p-rev-empty { font-size: 13px; color: var(--muted); padding: 4px 0; }

body.light .p-rev, body.light .p-rev-btn, body.light .review-target { background: #faf4ec; }

/* Светлая тема */
body.light .review-card { background: linear-gradient(180deg, #ffffff, #faf5ee); }
body.light .review-input, body.light .review-textarea { background: #fff; }
body.light .rstar, body.light .rc-stars .fa-regular { color: #d9cdbd; }
body.light .rstar.on { color: var(--gold); }

/* ===== Форма ===== */
.form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.form input, .form textarea {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: #1c130e; color: var(--text);
  font-size: 14px; font-family: inherit; outline: none;
}
.form input::placeholder, .form textarea::placeholder { color: var(--muted); }
.form input:focus, .form textarea:focus { border-color: var(--accent); }
.form textarea { resize: vertical; min-height: 64px; }

/* ===== Нижнее меню ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(23, 16, 11, 0.9), rgba(15, 10, 7, 0.98));
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tab {
  border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-size: 10px; padding: 4px 6px; flex: 1;
  position: relative;
}
.tab .tab-ico { font-size: 19px; }
.tab.active { color: var(--gold); }
.tab .tab-badge {
  position: absolute; top: -2px; right: 4px;
  background: var(--accent); color: #fff; font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: #2a1d14; color: #f5efe9; padding: 12px 20px; border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 14px; z-index: 100; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.toast.hidden { display: none; }

/* Утилита-«скрыть». !important — чтобы перекрывать display из admin.css
   (он грузится позже: .login/.panel иначе побеждали и экран входа не прятался). */
.hidden { display: none !important; }

/* ===== Экран оплаты (СБП/карта) ===== */
.pay-body { text-align: center; }
.pay-amount { font-size: 16px; font-weight: 700; margin: 6px 0 16px; }
#payBtn { display: block; text-decoration: none; }
.pay-hint { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.4; }
.pay-status {
  margin-top: 18px; padding: 12px; border-radius: 12px; font-weight: 600;
  background: #3a2c15; color: var(--gold-soft);
}
.pay-status.paid { background: var(--accent-soft); color: var(--savings); }

/* ===== Бургер-меню (drawer) ===== */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer.hidden { display: none; }
.drawer .sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.drawer-body {
  position: absolute; left: 0; top: 0; bottom: 0; width: 80%; max-width: 320px;
  background: linear-gradient(180deg, var(--card-top), var(--bg-bottom));
  border-right: 1px solid var(--line);
  padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto; animation: slideRight 0.25s ease;
}
@keyframes slideRight { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.drawer-brand {
  font-family: "Georgia", serif; color: var(--gold);
  font-size: 24px; letter-spacing: 2px; margin: 6px 0 22px;
}
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px; border-radius: 12px;
  color: var(--text); font-size: 15px; cursor: pointer; text-decoration: none;
}
.drawer-nav .dn-ic {
  flex: 0 0 24px; width: 24px; text-align: center; font-size: 18px;
}
.drawer-nav a:active { background: var(--accent-soft); }

/* ===== Светлая тема (переключатель ☀) ===== */
body.light {
  --bg-top: #f7f1ea; --bg-bottom: #efe6da;
  --card-top: #ffffff; --card-bottom: #f6efe7;
  --text: #2a1d14; --muted: #8a7a6c;
  --line: rgba(0, 0, 0, 0.08); --accent-soft: #f0e4d6;
  --shadow: 0 10px 30px rgba(120, 80, 40, 0.15);
}
body.light .topbar { background: linear-gradient(180deg, rgba(247, 241, 234, 0.96), rgba(247, 241, 234, 0.72)); }
body.light .search { background: linear-gradient(180deg, #fff, #f6efe7); }
body.light .chip { background: linear-gradient(180deg, #fff, #f4ece2); }
/* активный чип: коричневый фон + белый текст (перебиваем светлый фон .chip выше) */
body.light .chip.active {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-color: var(--accent); color: #fff;
}
body.light .size,
body.light .form input,
body.light .form textarea,
body.light .qty button { background: #fff; }
body.light .tabbar { background: linear-gradient(180deg, rgba(247, 241, 234, 0.9), rgba(239, 230, 218, 0.98)); }
body.light .card-price { color: var(--accent-dark); }
/* тайлы быстрых ссылок — светлеют вместе с темой */
body.light .ql-ic { background: linear-gradient(180deg, #ffffff, #f4ece2); color: var(--accent-dark); }
/* мелкие подписи на белой карточке — тёмно-коричневые для контраста */
body.light .card-cat,
body.light .card-rating { color: var(--accent-dark); }
/* тёмный статус-пилл оплаты остаётся тёмным — вернём светлый текст */
body.light .pay-status { color: var(--gold-soft); }
/* hero-баннер в светлой теме: кремовый фон + оригинальный тёмный логотип */
body.light .hero--logo {
  background:
    radial-gradient(120% 90% at 50% 22%, rgba(212, 175, 55, 0.20), transparent 62%),
    linear-gradient(180deg, #fbf6ef 0%, #f1e7d9 100%);
  border-color: rgba(212, 175, 55, 0.5);
}
body.light .hero-logo-img {
  filter: none;
  mix-blend-mode: multiply;
}

/* ===== Страница «Профиль» (личный кабинет) ===== */
#profilePage.page { padding-top: 8px; }
.prof-hero {
  position: relative; text-align: center;
  padding: 28px 20px 26px; margin-bottom: 18px;
  border-radius: 20px; border: 1px solid rgba(212, 175, 55, 0.3);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(212, 175, 55, 0.18), transparent 60%),
    linear-gradient(180deg, var(--card-top), var(--card-bottom));
}
.prof-ava {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--accent-soft); border: 3px solid var(--gold);
  color: var(--gold); font-size: 38px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.prof-ava img { width: 100%; height: 100%; object-fit: cover; }
.prof-name { font-family: "Georgia", serif; font-weight: 700; font-size: 26px; color: var(--text); letter-spacing: 0.5px; }
.prof-sub { margin-top: 6px; font-size: 13px; color: var(--muted); }

.prof-list { display: flex; flex-direction: column; gap: 12px; }
.prof-row {
  display: flex; align-items: center; gap: 14px; width: 100%; cursor: pointer;
  padding: 16px; border-radius: 16px; text-align: left;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  color: var(--text); transition: border-color 0.15s, transform 0.1s;
}
.prof-row:active { transform: scale(0.99); border-color: var(--gold); }
.pr-ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--gold); font-size: 17px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}
.pr-label { flex: 1; font-size: 15px; font-weight: 600; }
.pr-count { color: var(--muted); font-size: 15px; font-weight: 700; min-width: 18px; text-align: right; }
.pr-arrow { color: var(--muted); font-size: 13px; }

/* Лист «Мои заказы» */
.orders-title { font-family: "Georgia", serif; font-size: 22px; margin-bottom: 14px; color: var(--text); }
.orders-list { display: flex; flex-direction: column; gap: 12px; }
.orders-empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 14px; }
.orders-empty-ic { font-size: 30px; color: var(--gold); opacity: 0.8; margin-bottom: 10px; }
.ord-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--accent-soft); }
.ord-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ord-id { font-weight: 700; color: var(--text); }
.ord-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(212, 175, 55, 0.18); color: var(--gold); white-space: nowrap; }
.ord-st-paid, .ord-st-done { background: rgba(46, 160, 67, 0.18); color: #5fd07f; }
.ord-st-canceled { background: rgba(220, 80, 80, 0.16); color: #e88; }
.ord-date { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.ord-items { list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text); }
.ord-made { color: var(--gold); font-weight: 600; }
.ord-total { margin-top: 10px; font-size: 14px; color: var(--text); }
.ord-total b { color: var(--gold); }

/* Диагностика клиента Telegram (низ профиля) */
.prof-diag { margin: 18px 4px 4px; text-align: center; font-size: 11px; color: var(--muted); opacity: 0.7; }

/* Кнопка «Взять телефон из Telegram» (заказ + отзыв) */
.phone-grab {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  border: 1px solid var(--gold); background: rgba(212,175,55,0.10); color: var(--gold);
  border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.phone-grab:disabled { opacity: 0.6; cursor: default; }
.phone-grab i { font-size: 14px; }
.phone-status { font-size: 13px; color: #34d399; display: flex; align-items: center; gap: 6px; }
.phone-status.hidden { display: none; }

/* Светлая тема */
body.light .prof-row, body.light .prof-hero, body.light .ord-card, body.light .pr-ic { }
body.light .prof-row { background: linear-gradient(180deg, #ffffff, #faf5ee); }
body.light .ord-card { background: #faf4ec; }
