/* TVG — авторские ножи. Тёмная тема, золотой акцент, адаптивная вёрстка. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-dark: #19222C;
  --bg-panel: #19222C;
  --bg-card: #19222C;

  --accent-gold: #D4AF37;
  --accent-steel: #8A99AD;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --border-thin: #2E3A48;
  --border-gold: #3A3220;

  --font-family: 'Inter', sans-serif;

  --transition: 0.25s ease;

  --header-h: 113px;  /* высота шапки: 12 + 88 (логотип) + 12 + 1 (линия) */
  --hero-pad: 80px;   /* отступ текста от краёв фото на первом экране */
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-decoration: none !important;
}

/* Текст на сайте не выделяется; в полях ввода (админка) — выделяется */
body {
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* Disable drag on all images */
img {
  -webkit-user-drag: none !important;
  user-drag: none !important;
}

/* Hide scrollbar universally while preserving smooth scrolling */
html, body, div, section {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;  /* Firefox */
}

::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-family);
}

/* Иконки Lucide (SVG) — размер задаётся здесь и ниже по месту */
.lucide {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Смена страниц: старая растворяется, затем проявляется новая.
   Шапка в анимации не участвует — остаётся на месте. */
.header-v2 { view-transition-name: site-header; }

::view-transition-old(root) {
  animation: page-out 0.25s ease-in both;
}

::view-transition-new(root) {
  animation: page-in 0.35s ease-out 0.15s both;
}

@keyframes page-out {
  to { opacity: 0; }
}

@keyframes page-in {
  from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  letter-spacing: 0.02em;
  text-transform: none;
  color: #FFF;
}

.mono {
  font-family: var(--font-family);
  letter-spacing: 0.05em;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 28px;
}

.btn-v2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-family);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none !important;
  min-height: 44px;
}

.btn-v2-gold {
  background: var(--accent-gold);
  color: #090C10;
}

.btn-v2-gold:hover {
  background: #C5A028;
}

/* Header V2 - 3-Column Grid for Desktop */
.header-v2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border-thin);
  background: rgba(25, 34, 44, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

/* Логотип слева, вкладки по центру, «Связаться» справа */
.nav-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo-v2 {
  justify-self: start;
  display: block;
  line-height: 0;
}

.logo-v2 img {
  height: 88px;
  width: auto;
  transition: opacity var(--transition);
}

.logo-v2:hover img {
  opacity: 0.8;
}

.nav-v2 {
  display: flex;
  justify-content: center;
  gap: 36px;
  list-style: none;
}

.nav-tab-v2 {
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 8px 14px;
  text-decoration: none !important;
  border: none !important;
}

.nav-tab-v2:hover {
  color: var(--text-secondary);
}

.nav-tab-v2.active {
  color: #FFF;
}

/* Первый экран: от текста с кнопками до краёв фото одинаковый отступ сверху и снизу
   (сверху фото уходит под шапку, поэтому к отступу прибавлена её высота) */
.hero-v2 {
  padding-top: calc(var(--header-h) + var(--hero-pad));
  padding-bottom: var(--hero-pad);
  background: transparent;
  display: flex;
  align-items: center;
}

/* Внизу фото плавно переходит в фон страницы (слой --hero-fade) */
/* Фото и затемнение — отдельными слоями под текстом:
   ::before — само фото, ::after — затемнение и плавный переход в фон внизу. */
.photo-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.photo-hero::before,
.photo-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.photo-hero::before {
  background: var(--hero-photo) center 48% / cover no-repeat;
}

.photo-hero::after {
  background:
    linear-gradient(to bottom, rgba(25, 34, 44, 0) calc(100% - 180px), var(--bg-dark) 100%),
    radial-gradient(ellipse at center, rgba(25, 34, 44, 0.77) 0%, rgba(25, 34, 44, 0.65) 100%);
}

.photo-hero {
  --hero-photo: url('assets/hero.jpg');
}

.gallery-hero {
  --hero-photo: url('assets/hero-gallery.jpg');
}

.contacts-hero {
  --hero-photo: url('assets/hero-contacts.jpg');
}

/* Главная и Контакты — на весь экран за вычетом подвала (60px); Галерея — по содержимому */
.home-hero,
.contacts-hero {
  min-height: calc(100svh - 60px);
}

/* Первый экран всех вкладок: одна колонка, всё по центру */
.hero-v2 .hero-v2-grid {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}

.hero-v2 .hero-v2-left-col {
  justify-content: center;
}

.hero-copy {
  margin-left: auto;
  margin-right: auto;
}

.hero-v2-actions {
  justify-content: center;
}

.contacts-hero .contact-card-box-hero {
  width: 100%;
  max-width: 650px;
  height: auto;
}

.home-hero .hero-v2-left-col,
.gallery-hero .hero-v2-left-col {
  max-width: 800px;
}

/* последний элемент блока без нижнего отступа — иначе снизу отступ больше, чем сверху */
.hero-v2-left-col > div > :last-child {
  margin-bottom: 0;
}

.home-hero .hero-v2-title {
  max-width: 800px;
  text-wrap: balance;
}

.hero-copy {
  max-width: 730px;
  margin-bottom: 28px;
}

.hero-copy p {
  color: #e4e7ec;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-copy p:last-child {
  margin-bottom: 0;
}

.hero-v2-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: stretch;
  width: 100%;
}

.hero-v2-left-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-v2-title {
  font-size: 3.2rem;
  line-height: 1.08;
  margin-bottom: 16px;
  font-weight: 800;
}

.hero-v2-actions {
  display: flex;
  gap: 18px;
  margin-bottom: 28px;
}

.hero-v2-image-frame {
  height: 440px;
  border: 1px solid var(--border-thin);
  padding: 12px;
  background: var(--bg-dark);
  box-sizing: border-box;
}

.hero-v2-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-card-box-hero {
  height: 440px;
  /* фон и обводка как у шапки */
  border: 1px solid var(--border-thin);
  padding: 32px;
  background: rgba(25, 34, 44, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Sections Generous Spacing */
/* сразу после фото линии нет — там плавный переход */
.photo-hero + .section-v2,
.photo-hero + .site-footer,
.contacts-v2-main-content + .site-footer {
  border-top: none;
}

.section-v2 {
  padding: 100px 0;
  background: transparent;
  border-top: 1px solid var(--border-thin);
}

.section-v2-header {
  margin-bottom: 50px;
  border-bottom: 1px solid var(--border-thin);
  padding-bottom: 20px;
}

.section-v2-title {
  font-size: 2.2rem;
}

/* Checkerboard Gallery V2 Generous Spacing */
.checkerboard-v2-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.checker-v2-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 36px;
  background: transparent;
  border: 1px solid var(--border-thin);
}

.checker-v2-item.reverse {
  grid-template-areas: "img text";
}

.checker-v2-item.reverse .checker-v2-img-col { grid-area: img; }
.checker-v2-item.reverse .checker-v2-text-col { grid-area: text; }

/* Multi-Image Knife Slider - Transparent Default & Hover Overlay */
.checker-v2-img-wrap {
  width: 100%;
  height: 340px;
  border: 1px solid var(--border-thin);
  background: #000;
  position: relative;
  overflow: hidden;
}

.checker-v2-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.slider-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  height: 100%;
  width: 48px;
  background: transparent;
  color: var(--text-primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.slider-btn .lucide {
  width: 28px;
  height: 28px;
}

.slider-btn:hover {
  background: rgba(25, 34, 44, 0.65);
  color: var(--accent-gold);
}

.slider-prev {
  left: 0;
}

.slider-next {
  right: 0;
}

.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  padding: 5px 10px;
  border-radius: 12px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.slider-dot.active {
  background: var(--accent-gold);
  transform: scale(1.3);
}

.checker-v2-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px;
  background: transparent;
  border: 1px solid var(--border-thin);
  margin: 22px 0;
  font-family: var(--font-family);
}

.checker-v2-specs p {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: none;
}

.checker-v2-specs span {
  font-size: 0.85rem;
  color: #FFF;
  font-weight: 600;
}

/* Footer, about */
.site-footer {
  padding: 20px 0;
  border-top: 1px solid var(--border-thin);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Gallery: header with groups (available / sold) */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.gallery-tabs {
  display: flex;
  gap: 8px;
}

.gallery-tab {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-thin);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-tab span {
  color: var(--text-muted);
  margin-left: 4px;
}

.gallery-tab:hover {
  color: #FFF;
  border-color: var(--border-gold);
}

.gallery-tab.active {
  color: #090C10;
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.gallery-tab.active span {
  color: #090C10;
}

.gallery-empty {
  padding: 60px 0;
  text-align: center;
  color: var(--text-muted);
}

/* Gallery card text */
.checker-v2-name {
  font-size: 1.6rem;
  margin: 0 0 12px;
}

.checker-v2-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.checker-v2-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.checker-v2-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: 0.01em;
}

.checker-v2-price.sold {
  color: var(--text-muted);
  text-decoration: line-through !important;
}

.sold-badge {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: none;
  color: var(--text-muted);
  border: 1px solid var(--border-thin);
  padding: 10px 18px;
}

.sold-ribbon {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  background: rgba(25, 34, 44, 0.85);
  border: 1px solid var(--border-thin);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: none;
  padding: 6px 12px;
}

.checker-v2-item.sold .checker-v2-img-wrap img {
  filter: grayscale(0.75) brightness(0.8);
}

/* Contacts Layout Generous Spacing */
.contacts-v2-full-page {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  box-sizing: border-box;
}

.contacts-v2-main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Full-Screen Image Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(4, 6, 8, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* Крестик — справа от фото, по её верхней грани */
.lightbox-close {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3010;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: var(--accent-gold);
  color: #090C10;
}

/* Блок по размеру фото, без своего фона и рамки */
.lightbox-content {
  position: relative;
  display: flex;
}

.lightbox-content img {
  max-width: min(90vw - 112px, 1200px);
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

/* 100% RESPONSIVE MOBILE MEDIA QUERIES (@media max-width: 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  /* На телефоне «Связаться» не влезает — её заменяет вкладка «Контакты» */
  .nav-wrap {
    grid-template-columns: auto 1fr;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .logo-v2 img {
    height: 76px;
  }

  .nav-v2 {
    justify-self: end;
    gap: 2px;
  }

  .nav-v2 a {
    padding: 8px 10px;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
  }

  /* Hero Section Mobile */
  :root {
    --header-h: 93px;   /* 8 + 76 (логотип) + 8 + 1 (линия) */
    --hero-pad: 40px;
  }

  .hero-v2-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .photo-hero::before {
    background-position: 58% center;
  }

  .photo-hero::after {
    background:
      linear-gradient(to bottom, rgba(25, 34, 44, 0) calc(100% - 180px), var(--bg-dark) 100%),
      linear-gradient(rgba(25, 34, 44, 0.73), rgba(25, 34, 44, 0.79));
  }

  .home-hero .hero-v2-title {
    font-size: clamp(1.75rem, 7.5vw, 2.2rem);
  }

  .hero-copy p {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .hero-v2-title {
    font-size: 2.2rem;
    line-height: 1.1;
    margin-bottom: 14px;
  }

  .hero-v2-actions {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
  }

  .hero-v2-actions .btn-v2 {
    width: 100%;
  }

  .hero-v2-image-frame {
    height: 260px;
  }

  .contact-card-box-hero {
    height: auto;
    padding: 20px;
  }

  /* Section Headers Mobile */
  .section-v2 {
    padding: 60px 0;
  }

  .section-v2-header {
    margin-bottom: 28px;
    padding-bottom: 14px;
  }

  .section-v2-title {
    font-size: 1.5rem;
  }

  /* Checkerboard Gallery Mobile */
  .checkerboard-v2-list {
    gap: 32px;
  }

  .checker-v2-item, .checker-v2-item.reverse {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    padding: 20px;
    gap: 20px;
  }

  .checker-v2-item.reverse .checker-v2-img-col,
  .checker-v2-item.reverse .checker-v2-text-col {
    grid-area: auto;
  }

  .checker-v2-img-col {
    order: -1;
  }

  .checker-v2-img-wrap {
    height: 240px;
  }

  .slider-btn {
    width: 36px;
  }

  .checker-v2-text-col h3 {
    font-size: 1.3rem;
  }

  .checker-v2-specs {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
    margin: 14px 0;
  }

  .checker-v2-text-col .btn-v2 {
    width: 100%;
  }

  /* Contacts Tab Mobile */
  .contacts-v2-full-page {
    min-height: auto;
  }

  /* Lightbox Mobile */
  .lightbox-content img {
    max-width: 95vw;
    max-height: 80vh;
  }

  /* Справа от фото места нет — крестик над её правым верхним углом */
  .lightbox-close {
    top: auto;
    bottom: 100%;
    left: auto;
    right: 0;
    margin: 0 0 10px;
  }

  .gallery-header {
    align-items: flex-start;
  }

  .gallery-tabs {
    width: 100%;
  }

  .gallery-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.72rem;
  }

  .checker-v2-name {
    font-size: 1.3rem;
  }

  .checker-v2-buy {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .checker-v2-buy .btn-v2,
  .checker-v2-buy .sold-badge {
    width: 100%;
    text-align: center;
  }

}
