/* style.css */
:root{
  --bg:#0b0b0b;
  --panel:#101010;
  --panel2:#0f0f0f;
  --text:#eaeaea;
  --muted:#9a9a9a;
  --gold:#C8A15A;

  --line: rgba(255,255,255,0.10);
  --line2: rgba(255,255,255,0.08);

  --goldLine: rgba(200,161,90,0.28);
  --goldLine2: rgba(200,161,90,0.20);

  --shadow: 0 10px 35px rgba(0,0,0,0.55);

  /* Sidebar typo scale */
  --sb-base: 13px;
  --sb-count: 11px;
  --sb-title: 15px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Top bar */
.topbar{
  padding:16px 18px;
  border-bottom:1px solid rgba(200,161,90,0.18);
  background: linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(0,0,0,0));
}

.title{
  font-weight:800;
  font-size:20px;
  display:flex;
  align-items:baseline;
  gap:10px;
}

/* center title under logo */
.title--center{
  justify-content:center;
  width:100%;
  text-align:center;
}

/* Layout */
.layout{
  display:flex;
  min-height: calc(100vh - 58px);
}

.sidebarOverlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.55);
  opacity:0;
  pointer-events:none;
  transition: opacity 160ms ease;
  z-index:80;
}
.sidebarOverlay.isOpen{
  opacity:1;
  pointer-events:auto;
}

.sidebar{
  width:300px;
  background: rgba(15,15,15,0.92);
  border-right:1px solid rgba(200,161,90,0.18);
  padding:14px;
  overflow:auto;
  z-index:90;
  box-shadow: inset -1px 0 0 rgba(200,161,90,0.10);
}

.sidebar__titleRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.sidebar__title{
  font-weight:900;
  letter-spacing:0.3px;
}

.iconBtn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid var(--line2);
  background: rgba(0,0,0,0.45);
  color: var(--text);
  font-size:22px;
  cursor:pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
.iconBtn:hover{ border-color: rgba(200,161,90,0.35); }

.content{
  flex:1;
  padding:16px;
}

/* Applied filters bar */
.appliedFiltersBar{
  margin: 8px 0 14px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(200,161,90,0.22);
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
}

.appliedFiltersTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.appliedFiltersTitle{
  color: rgba(255,255,255,0.90);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.appliedClearAll{
  border: 1px solid rgba(200,161,90,0.28);
  background: rgba(0,0,0,0.20);
  color: rgba(255,255,255,0.92);
  padding: 8px 10px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}
.appliedClearAll:hover{
  border-color: rgba(200,161,90,0.45);
  background: rgba(200,161,90,0.10);
}

.appliedChips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.appliedChip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  max-width:100%;
  border: 1px solid rgba(200,161,90,0.24);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.92);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.appliedChip:hover{
  border-color: rgba(200,161,90,0.45);
  background: rgba(200,161,90,0.08);
}
.appliedChipText{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.appliedChipX{
  color: rgba(200,161,90,0.95);
  font-weight: 900;
  line-height: 1;
}

/* Statusbar */
.statusbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.status{
  color: rgba(255,255,255,0.75);
  font-size:13px;
}

.controls{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.filtersToggle{
  border:1px solid rgba(200,161,90,0.35);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
}
.filtersToggle:hover{ border-color: rgba(200,161,90,0.55); }

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background: rgba(200,161,90,0.18);
  border:1px solid rgba(200,161,90,0.30);
  color: var(--gold);
  font-weight:800;
  font-size:12px;
}

.filtersReset{
  border:1px solid var(--line2);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  width:40px;
  height:40px;
  border-radius:12px;
  cursor:pointer;
}
.filtersReset:hover{ border-color: rgba(200,161,90,0.35); }

.searchWrap{ position:relative; }

.topSearch{
  padding:10px 12px;
  background: rgba(0,0,0,0.35);
  border:1px solid var(--line2);
  color: var(--text);
  border-radius:12px;
  outline:none;
  width:260px;
}
.topSearch:focus{
  border-color: rgba(200,161,90,0.55);
  box-shadow: 0 0 0 2px rgba(200,161,90,0.18);
}

.searchDropdown{
  position:absolute;
  top: calc(100% + 6px);
  left:0;
  right:0;
  background: rgba(15,15,15,0.97);
  border:1px solid var(--line2);
  border-radius:14px;
  box-shadow: var(--shadow);
  overflow:hidden;
  display:none;
  z-index:30;
}
.searchDropdown.isOpen{ display:block; }

.searchItem{
  padding:10px 12px;
  cursor:pointer;
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.searchItem:hover{ background: rgba(200,161,90,0.10); }
.searchItem__title{ font-weight:800; }
.searchItem__meta{
  color: rgba(255,255,255,0.7);
  font-size:12px;
}

.sortSelect{
  padding:10px 12px;
  background: rgba(0,0,0,0.35);
  border:1px solid var(--line2);
  color: var(--text);
  border-radius:12px;
  outline:none;
}
.sortSelect:focus{
  border-color: rgba(200,161,90,0.55);
  box-shadow: 0 0 0 2px rgba(200,161,90,0.18);
}

/* Franchise brand */
.franchiseBrand{
  margin: 8px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(200,161,90,0.18);
  border-radius: 14px;
  background: rgba(0,0,0,0.20);
  color: rgba(255,255,255,0.9);
  display:none;
}
.franchiseBrand.isVisible,
.franchiseBrand.isOpen{ display:block; }

.franchiseBrand img{
  width:100%;
  height:auto;
  max-height: 54px;
  object-fit: contain;
  display:block;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.35));
}

/* Grid */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:14px;
  align-content:start;
}

/* Card */
.card{
  background: rgba(16,16,16,0.78);
  border:1px solid rgba(200,161,90,0.18);
  border-radius:16px;
  padding:12px;
  cursor:pointer;
  transition: transform 140ms ease, border-color 140ms ease;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(200,161,90,0.32);
}

/* Card media */
.cardMedia{
  position:relative;
  display:block;
  width:100%;
}
.cardImgWrap{
  background: rgba(0,0,0,0.35);
  border-radius:14px;
  border:1px solid rgba(200,161,90,0.14);
  overflow:hidden;
}
.cardImg{
  width:100%;
  height:220px;
  object-fit:contain;
  display:block;
}

.cardTitle{
  margin-top:10px;
  font-weight:900;
  letter-spacing:0.2px;
}

.franchiseRow{
  margin-top:8px;
  display:flex;
  justify-content:center;
}
.franchiseChip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--gold);
  color:#fff;
  font-weight:400;
  font-size: calc(1em - 2px);
  line-height:1;
  letter-spacing:0.1px;
}

/* Sections */
.section{
  margin: 14px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--goldLine);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15);
}

.section__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.section__title{
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.8px;
  font-size: var(--sb-title);
}

/* Pills */
.pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.pills--list{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex-wrap: nowrap;
  width: 100%;
  align-items: stretch;
}

.pill{
  padding: 8px 10px;
  border: 1px solid rgba(200,161,90,0.18);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  border-radius: 999px;
  line-height: 1;
  cursor:pointer;
  transition: border-color 140ms ease, background 140ms ease;
  text-align:center;
}
.pill:hover{ border-color: rgba(200,161,90,0.35); }

.pill--active{
  border-color: rgba(200,161,90,0.65);
  background: rgba(200,161,90,0.14);
  color: #fff;
}

.pillText{
  font-size: var(--sb-base);
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pillCount{
  font-size: var(--sb-count);
  opacity: 0.82;
  margin-left: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* List layout: left align and count on the right */
.pills--list .pill{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 10px;
  min-height: 34px;
  padding: 8px 10px;
}
.pills--list .pillText{
  flex: 1;
  text-align: left;
  min-width: 0;
}
.pills--list .pill{ min-width:0; }

/* Tiles */
.tiles{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:8px;
}
@media (min-width: 520px){
  .tiles{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tile{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 8px 10px;
  border: 1px solid rgba(200,161,90,0.18);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  border-radius: 12px;
  line-height: 1;
  cursor:pointer;
  transition: border-color 140ms ease, background 140ms ease;
  min-height: 36px;
}
.tile:hover{ border-color: rgba(200,161,90,0.35); }
.tile--active{
  border-color: rgba(200,161,90,0.65);
  background: rgba(200,161,90,0.14);
  color:#fff;
}
.tileText{
  font-size: var(--sb-base);
  color:#fff;
  white-space: nowrap;
}
.tileCount{
  font-size: var(--sb-count);
  opacity: 0.82;
  margin-left: 6px;
  white-space: nowrap;
}

/* Franchise-only search input */
.sidebarSearch{
  width: 100%;
  max-width: 170px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(200,161,90,0.35);
  background: rgba(0,0,0,0.35);
  color: #fff;
  outline: none;
  font-size: 12px;
}
.sidebarSearch::placeholder{ color: rgba(255,255,255,0.55); }
.sidebarSearch:focus{
  border-color: rgba(200,161,90,0.65);
  box-shadow: 0 0 0 2px rgba(200,161,90,0.18);
}

/* LIMITED toggle */
.limitedRow{
  display:flex;
  align-items:center;
  gap:10px;
  user-select:none;
}
.limitedRow span{
  font-size: var(--sb-base);
  color: #ffffff;
}
.limitedRow input{
  width:16px;
  height:16px;
  accent-color: var(--gold);
}

/* Scrollable lists (VERTICAL) */
.section .sidebarSearch + .pills--list,
.section[data-section="franchise"] .pills--list,
.section[data-section="subcategory"] .pills--list,
.section[data-section="features"] .pills--list{
  max-height: 210px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;

  scrollbar-width: auto;
  scrollbar-color: rgba(200,161,90,0.85) rgba(0,0,0,0.20);
}

/* Webkit fat gold scrollbar */
.section .sidebarSearch + .pills--list::-webkit-scrollbar,
.section[data-section="franchise"] .pills--list::-webkit-scrollbar,
.section[data-section="subcategory"] .pills--list::-webkit-scrollbar,
.section[data-section="features"] .pills--list::-webkit-scrollbar{
  width: 12px;
}
.section .sidebarSearch + .pills--list::-webkit-scrollbar-track,
.section[data-section="franchise"] .pills--list::-webkit-scrollbar-track,
.section[data-section="subcategory"] .pills--list::-webkit-scrollbar-track,
.section[data-section="features"] .pills--list::-webkit-scrollbar-track{
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
}
.section .sidebarSearch + .pills--list::-webkit-scrollbar-thumb,
.section[data-section="franchise"] .pills--list::-webkit-scrollbar-thumb,
.section[data-section="subcategory"] .pills--list::-webkit-scrollbar-thumb,
.section[data-section="features"] .pills--list::-webkit-scrollbar-thumb{
  background: rgba(200,161,90,0.88);
  border-radius: 999px;
  border: 3px solid rgba(0,0,0,0.18);
  background-clip: padding-box;
}

/* Buttons */
.btn{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  cursor:pointer;
}
.btn--ghost{
  width:100%;
  margin-top:10px;
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.86);
}
.btn--ghost:hover{ border-color: rgba(200,161,90,0.35); }

/* =========================
   DETAIL OVERLAY
   - AUTOFIT to viewport height
   - header always visible
   - body uses available height
   ========================= */
.detailOverlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.75);
  display:none;
  z-index:200;
}
.detailOverlay.isOpen{ display:block; }

.detailPanel{
  position:absolute;
  inset: clamp(10px, 1.6vw, 18px);
  background: rgba(16,16,16,0.92);
  border:1px solid rgba(200,161,90,0.25);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);

  /* ✅ critical: fit any screen height */
  max-height: calc(100dvh - 20px);
  overflow: hidden;
  display:flex;
  flex-direction: column;
}

.detailHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.detailTitle{
  font-weight: 900;
  font-size: 20px;
  max-width: calc(100% - 56px);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detailClose{
  width:42px;
  height:42px;
  border-radius: 14px;
  border:1px solid rgba(200,161,90,0.25);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 22px;
  cursor:pointer;
  flex: 0 0 auto;
}
.detailClose:hover{ border-color: rgba(200,161,90,0.55); }

/* Body takes remaining height */
.detailBody{
  flex: 1 1 auto;
  min-height: 0;
  display:grid;
grid-template-columns: minmax(0,520px) minmax(0,1fr);

  gap: 18px;
  align-items:stretch;
}

/* =========================
   Detail media compose (auto-fit to viewport)
   ========================= */

.detailMediaWrap{
  max-width:560px;
  min-height:0;
  display:flex;
  flex-direction:column;
  flex: 1 1 auto;
}

.mediaCompose{
  width:100%;
  flex: 1 1 auto;
  min-height:0;
  display:flex;
}

.mediaImgWrap{
  flex: 1 1 auto;
  min-height:0;
  max-height:100%;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}

.mediaImgWrap img{
  width:100%;
  height:100%;
  max-height:100%;
  object-fit:contain;
}


.zoomHint{
  font-size:12px;
  opacity:0.70;
  text-align:left;
  user-select:none;
  margin-top: 8px;
}

/* RIGHT column: meta top / badges bottom */
.detailInfoWrap{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}

.detailMeta{
  flex: 1 1 auto;
  min-height:0;
  overflow:auto;
  padding-right: 10px;
  padding-top: 2px;
}
/* === Detail meta: scroll hint (FADE) + scrollbar styling === */
.detailMeta{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 10px;
  padding-top: 2px;

  position: relative;    /* anchor for ::after */
  padding-bottom: 28px;  /* space so fade doesn't cover last line */

  /* Match sidebar scrollbar style (where supported) */
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;

  /* Firefox */
  scrollbar-width: auto;
  scrollbar-color: rgba(200,161,90,0.85) rgba(0,0,0,0.20);
}

.detailMeta::after{
  content:"";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  pointer-events: none;
  z-index: 5; /* ← ВОТ ЭТОГО НЕ ХВАТАЛО: иначе fade может быть "под" контентом */

  /* two-layer fade: dark -> transparent + gold accent */
  background:
    linear-gradient(to bottom,
      rgba(16,16,16,0) 0%,
      rgba(16,16,16,0.92) 80%,
      rgba(16,16,16,0.98) 100%
    ),
    linear-gradient(to bottom,
      rgba(200,161,90,0) 0%,
      rgba(200,161,90,0.12) 75%,
      rgba(200,161,90,0.18) 100%
    );
}

/* Webkit (Chrome/Edge/Android). iOS WebKit scrollbars may ignore this */
.detailMeta::-webkit-scrollbar{
  width: 12px;
}
.detailMeta::-webkit-scrollbar-track{
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
}
.detailMeta::-webkit-scrollbar-thumb{
  background: rgba(200,161,90,0.88);
  border-radius: 999px;
  border: 3px solid rgba(0,0,0,0.18);
  background-clip: padding-box;
}

/* META: label | value */
.metaRow{
  display:grid;
  grid-template-columns: 170px 1fr;
  column-gap: 14px;
  row-gap: 2px;
  align-items: baseline;
  margin: 0 0 10px 0;
}

.metaLabel{
  color: rgba(200,161,90,0.92);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.metaValue{
  color: rgba(255,255,255,0.92);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.metaRow::after{
  content:"";
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(200,161,90,0.10);
  margin-top: 10px;
}
.detailMeta .metaRow:last-child::after{ display:none; }

@media (max-width: 520px){
  /* Mobile: keep label + value on ONE line */
  .metaRow{
    grid-template-columns: 140px 1fr;
    column-gap: 12px;
    row-gap: 2px;
    align-items: baseline;
  }
  .metaLabel{
    font-size: 12px;
    letter-spacing: 0.05em;
    opacity: 0.95;
    white-space: nowrap;
  }
  .metaValue{
    font-size: 14px;
  }
}

/* ✅ BADGES 2.0 — adaptive height (autofit)
   - On normal screens: 250px and 200x200
   - On shorter screens: shrinks smoothly so the whole card fits
*/
.detailBadgesRow{
  flex: 0 0 auto;
  height: clamp(170px, 24vh, 250px);
  margin-top: auto;
  display:flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 25px;
  justify-content:flex-start;
  align-items:center;
  overflow-x:auto;
  overflow-y:hidden;
  padding-top: 10px;
  border-top:1px solid rgba(200,161,90,0.20);
  -webkit-overflow-scrolling: touch;
}

.detailBadgesRow img.detailBadge{
  width: clamp(140px, 18vh, 200px);
  height: clamp(140px, 18vh, 200px);
  flex: 0 0 auto;
  display:block;
  object-fit:contain;
  border-radius:14px;
  background:rgba(0,0,0,0.25);
  border:1px solid rgba(200,161,90,0.22);
  box-shadow:0 6px 18px rgba(0,0,0,0.35);
  padding:6px;
}

/* Responsive layout */
@media (max-width: 1000px){
  .detailBody{ grid-template-columns: 1fr; }
  .topSearch{ width: 220px; }
}
@media (max-width: 820px){
  .detailBody{
    display:flex;
    flex-direction:column;
  }
  .detailMediaWrap,
  .detailInfoWrap{
    width:100%;
  }
  .topSearch{ width: 200px; }
}
@media (max-width: 520px){
  .content{ padding: 12px; }
  .grid{ grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .cardImg{ height: 200px; }
}

/* Community logo (top) */
.communityBrandTop{
  display:flex;
  justify-content:center;
  align-items:center;
  padding:14px 16px 6px;
}
.communityBrandTop__img{
  width: clamp(160px, 22vw, 360px);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,0.6));
}

/* Contact overlay (no JS) */
.contactBtn{
  border:1px solid rgba(200,161,90,0.35);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
}
.contactBtn:hover{ border-color: rgba(200,161,90,0.55); }

.contactOverlay{
  position:fixed;
  inset:0;
  z-index:9998;
  display:none;
}
.contactOverlay__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.62);
}
.contactPanel{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 28px));
  background: rgba(15,15,15,0.94);
  border:1px solid rgba(200,161,90,0.22);
  border-radius:16px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.contactHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid rgba(200,161,90,0.18);
}
.contactTitle{
  font-size:18px;
  font-weight:900;
  letter-spacing:0.4px;
}
.contactClose{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid var(--line2);
  background: rgba(0,0,0,0.45);
  color: var(--text);
  font-size:22px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.contactClose:hover{ border-color: rgba(200,161,90,0.35); }

.contactBody{ padding:16px 14px 18px; }
.contactJoin{
  color: rgba(255,255,255,0.78);
  font-size:13px;
  margin-bottom:10px;
}
.contactLinks{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.contactLink{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(200,161,90,0.18);
  background: rgba(0,0,0,0.25);
  text-decoration:none;
  color: var(--text);
  min-width: 160px;
}
.contactLink:hover{ border-color: rgba(200,161,90,0.35); }

.contactLink img{
  width:36px;
  height:auto;
  max-height:36px;
  display:block;
  object-fit:contain;
  flex-shrink:0;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45));
}
.contactLink span{
  font-weight:800;
  letter-spacing:0.2px;
}

/* Toggle: show overlay when checked */
.contactToggle:checked ~ .contactOverlay{ display:block; }

@media (max-width: 520px){
  .contactLink{ width:100%; min-width: unset; }
}

.contactToggle{
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Scroll-to-top sentinel */
#topSentinel{
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  opacity: 0;
}

/* Scroll To Top Button */
.toTopBtn{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
  padding: 0;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.toTopBtn.is-visible{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================
   ZOOM OVERLAY (IMAGE ONLY + PAN)
   ========================= */
.zoomOverlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.82);
  display:none;
  z-index:9999;
}
.zoomOverlay.isOpen{ display:block; }

.zoomPanel{
  position:absolute;
  inset: 18px;
  background: rgba(16,16,16,0.92);
  border:1px solid rgba(200,161,90,0.25);
  border-radius: 18px;
  padding: 16px;
  overflow:hidden;
  box-shadow: var(--shadow);
}

.zoomClose{
  width:42px;
  height:42px;
  border-radius: 14px;
  border:1px solid rgba(200,161,90,0.25);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 22px;
  cursor:pointer;
}
.zoomClose:hover{ border-color: rgba(200,161,90,0.55); }

.zoomMedia{ margin-top: 10px; }

.zoomImgWrap{
  width:100%;
  height: calc(100vh - 160px);
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  border-radius:14px;
  background:rgba(0,0,0,0.35);
  border:1px solid rgba(255,255,255,0.06);
}

.zoomImgWrap img{
  width:100%;
  height:auto;
  display:block;
  object-fit:contain;
  cursor: zoom-in;
}

/* zoomed: bigger image so user can pan */
.zoomOverlay.isZoomed .zoomImgWrap img{
  width:200%;
  max-width:none;
  cursor: zoom-out;
}

@media (max-width: 820px){
  .zoomPanel{ inset: 10px; padding: 12px; }
  .zoomImgWrap{ height: calc(100vh - 150px); }
}

/* =========================
   MOBILE: SIDEBAR OFF-CANVAS (FIX)
   ========================= */
@media (max-width: 920px){
  .layout{
    display:block; /* sidebar must not take half screen */
    min-height: auto;
  }

  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(82vw, 340px);
    max-width: 340px;
    transform: translateX(-110%);
    transition: transform 180ms ease;
    z-index: 90;
  }
  .sidebar.isOpen{
    transform: translateX(0);
  }

  .content{
    width: 100%;
    padding: 12px;
  }
}
/* =========================
   SITE HEADER (NEW)
   - does NOT touch catalogue logic
   ========================= */

.siteHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(200,161,90,0.18);
  background: linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(0,0,0,0));
}

.siteLogo{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  text-decoration:none;
  flex: 0 0 auto;
}

.siteLogo__img{
  width: clamp(120px, 14vw, 220px);
  height: auto;
  display:block;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,0.6));
}

/* Center hero */
.hero{
  position:relative;
  flex: 1 1 auto;
  min-width: 0;
  display:flex;
  align-items:center;
  gap:10px;
}

.heroTrack{
  flex: 1 1 auto;
  min-width: 0;
  display:flex;
  overflow:hidden;
  border-radius: 16px;
  border: 1px solid rgba(200,161,90,0.18);
  background: rgba(0,0,0,0.18);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
  background-image: url("https://itubcihzwjvcqxeoteir.supabase.co/storage/v1/object/public/figures/header.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
.heroRail{
  display: flex;
  width: 100%;
  min-width: 0;
  transition: transform 240ms ease;
}
.heroRail{ width: 100%; }
.heroSlide{ flex: 0 0 100%; }

.heroTrack::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to right,
    rgba(0,0,0,0.48),
    rgba(0,0,0,0.22),
    rgba(0,0,0,0.48)
  );
  pointer-events:none;
}

.heroSlide{ position: relative; z-index: 1; }

/* Slides are laid horizontally; JS will translate */
.heroSlide{
  flex: 0 0 100%;
  min-width: 100%;
  padding: 16px 18px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.heroInner{
  text-align:center;
}

.heroTitle{
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.2px;
}

.heroSubtitle{
  margin-top: 6px;
  color: rgba(255,255,255,0.76);
  font-size: 13px;
}

/* Nav arrows (gold accent, no autoplay) */
.heroNav{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(200,161,90,0.24);
  background: rgba(0,0,0,0.35);
  color: rgba(200,161,90,0.95);
  font-size: 22px;
  cursor: pointer;
  user-select:none;
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity: 0.92;
}
.heroNav:hover{
  border-color: rgba(200,161,90,0.55);
  background: rgba(200,161,90,0.08);
}

/* Right actions */
.headerActions{
  display:flex;
  align-items:center;
  gap:12px;
  flex: 0 0 auto;
}

.langSwitch{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(200,161,90,0.18);
  background: rgba(0,0,0,0.22);
}

.langLink{
  text-decoration:none;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: rgba(255,255,255,0.78);
}
.langLink:hover{
  color: #fff;
}
.langLink.isActive{
  color: rgba(200,161,90,0.98);
}
.langSep{
  color: rgba(255,255,255,0.35);
}

/* Contact in header keeps existing .contactBtn look */
.headerContactBtn{
  white-space: nowrap;
}

/* Mobile: header like an app (compact + banner full width) */
@media (max-width: 820px){

  .siteHeader{
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo actions"
      "hero hero";
    gap: 12px;
    align-items: center;
    padding: 12px 12px;
  }

  .siteLogo{ grid-area: logo; }
  .headerActions{
    grid-area: actions;
    justify-content: flex-end;
    gap: 10px;
  }
  .hero{ grid-area: hero; }

  /* Logo smaller (no огромный первый экран) */
  .siteLogo__img{
    width: 140px;
  }

  /* Actions smaller */
  .langSwitch{
    padding: 8px 10px;
    border-radius: 12px;
  }
  .headerContactBtn{
    padding: 10px 12px;
    border-radius: 12px;
  }

  /* Banner becomes full width */
  .hero{
    position: relative;
    gap: 0;
  }

  .heroTrack{
    border-radius: 16px;
  }

  .heroSlide{
    padding: 14px 14px;
  }

  .heroInner{
    text-align: left;
  }

  .heroTitle{
    font-size: 20px;
    line-height: 1.15;
  }

  .heroSubtitle{
    font-size: 13px;
    line-height: 1.35;
  }

  /* Arrows overlay on banner (not отдельные огромные кнопки сбоку) */
  .heroNav{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 14px;
    z-index: 3;
    opacity: 0.95;
  }
  .heroNav--prev{ left: 10px; }
  .heroNav--next{ right: 10px; }
}
/* =========================
   ADDON: Market Price + Rare badge (detail only)
   ========================= */

.marketBlock{
  border:1px solid rgba(200,161,90,0.22);
  background: rgba(0,0,0,0.18);
  border-radius:14px;
  padding:12px;
  margin-bottom:14px;
}

.marketHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.marketTitle{
  font-weight:900;
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(200,161,90,0.95);
}

.marketRareBadge{
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(200,161,90,0.26);
  background: rgba(0,0,0,0.25);
  padding:4px;
}

.marketGrid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.marketCell{
  border:1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.22);
  border-radius:10px;
  padding:8px;
}

.marketLabel{
  font-size:11px;
  font-weight:800;
  color: rgba(200,161,90,0.85);
  margin-bottom:4px;
}

.marketValue{
  font-size:14px;
  font-weight:900;
  color: #fff;
}

.marketUpdated{
  margin-top:8px;
  font-size:11px;
  color: rgba(255,255,255,0.65);
}


