/* =====================================================
   HERMIT — STREETWEAR STORE
   ===================================================== */

:root {
  --black: #000;
  --white: #fff;
  --gray: #888;
  --gray-light: #b0b0b0;
  --gray-dark: #1a1a1a;
  --accent: #fff;
  --border: rgba(255,255,255,0.08);
  --font: 'Courier New', 'Courier', 'Lucida Console', monospace;
  --font-gothic: 'UnifrakturMaguntia', serif;
  --transition: 0.2s ease;

  --bg: #000;
  --fg: #fff;
  --gray-ui: #888;
  --gray-ui-light: #b0b0b0;
  --border-color: rgba(255,255,255,0.08);
  --card-bg: #0d0d0d;
  --sidebar-bg: #0a0a0a;
  --header-bg: rgba(0,0,0,0.85);
}

/* LIGHT THEME */
body.light {
  --bg: #f0ede8;
  --fg: #0a0a0a;
  --gray-ui: #666;
  --gray-ui-light: #444;
  --border-color: rgba(0,0,0,0.12);
  --card-bg: #e2ddd7;
  --sidebar-bg: #f5f2ed;
  --header-bg: rgba(240,237,232,0.92);
  /* НЕ переопределяем --white и --black — они используются как цвета кнопок/бейджей */
  --gray: #666;
  --gray-light: #555;
  --border: rgba(0,0,0,0.12);
  /* отдельные токены для текста и фона в light */
  --text-on-dark-btn: #fff;
  --nav-color: #444;
  --nav-hover: #000;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.05em;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }
img { display: block; width: 100%; object-fit: cover; }
ul { list-style: none; }

/* =====================================================
   FLOATING LOGO
   ===================================================== */

/*
  Логотип позиционируется fixed, изначально большой по центру hero.
  JS интерполирует его размер и позицию при скролле.
  --logo-progress: 0 = hero (большой), 1 = хедер (маленький)
*/
.logo-morph {
  position: fixed;
  z-index: 101;
  display: block;
  pointer-events: auto;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: none;
  /* лого чёрное на прозрачном → инвертируем для тёмной темы */
  filter: invert(1);
}

body.light .logo-morph { filter: invert(0); }

.logo-morph__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-morph:hover .logo-morph__img {
  animation: logo-glitch 0.5s steps(1) forwards;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

@keyframes logo-glitch {
  0%   { transform: translate(0,0);       clip-path: none; opacity: 1; }
  10%  { transform: translate(-4px, 2px); clip-path: inset(0 0 70% 0); opacity: 0.9; }
  20%  { transform: translate(4px, -2px); clip-path: inset(60% 0 0 0); opacity: 1; }
  30%  { transform: translate(-3px, 0);   clip-path: inset(20% 0 50% 0); opacity: 0.85; }
  40%  { transform: translate(3px, 1px);  clip-path: none; opacity: 1; }
  50%  { transform: translate(-5px,-1px); clip-path: inset(40% 0 30% 0); opacity: 0.9; }
  60%  { transform: translate(5px, 2px);  clip-path: none; opacity: 1; }
  70%  { transform: translate(-2px, 0);   clip-path: inset(0 0 80% 0); opacity: 0.95; }
  80%  { transform: translate(2px,-2px);  clip-path: none; opacity: 1; }
  90%  { transform: translate(-1px, 1px); clip-path: inset(75% 0 0 0); opacity: 0.9; }
  100% { transform: translate(0,0);       clip-path: none; opacity: 1; }
}

/* Заглушка слева в хедере, чтобы навигация не смещалась */
.header__logo--placeholder {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

/* =====================================================
   HEADER
   ===================================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  height: 60px;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.header__left {
  width: 60px;
  flex-shrink: 0;
}

.header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 24px;
  flex-shrink: 0;
}

.header__slogan {
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.header__slogan-track {
  display: flex;
  gap: 20px;
  align-items: center;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1), opacity 0.35s ease;
}
.header__slogan.visible .header__slogan-track {
  transform: translateY(0);
  opacity: 1;
}
.header__slogan-track span {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--gray-ui);
  white-space: nowrap;
  flex-shrink: 0;
}
.header__slogan-track span:nth-child(even) {
  opacity: 0.3;
}

.header__cart {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px;
  transition: opacity var(--transition);
}
.header__cart:hover { opacity: 0.6; }

.cart-count {
  position: absolute;
  top: 0; right: 0;
  background: var(--fg);
  color: var(--bg);
  font-size: 9px;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.cart-count.visible { opacity: 1; }

/* THEME TOGGLE */
.header__theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 22px;
  color: var(--gray-ui);
  transition: color var(--transition);
}
.header__theme:hover { color: var(--fg); }

.theme-icon { display: none; }
body:not(.light) .theme-icon--dark { display: block; }
body.light .theme-icon--light { display: block; }

.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.header__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--fg);
  transition: var(--transition);
}

/* =====================================================
   MOBILE NAV
   ===================================================== */
.mobile-nav {
  position: fixed;
  top: 0; right: -100%;
  width: min(320px, 80vw);
  height: 100vh;
  z-index: 200;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 80px 32px 40px;
  gap: 8px;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
}
.mobile-nav.open { right: 0; }

.mobile-nav__close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 18px;
  color: var(--gray);
  transition: color var(--transition);
}
.mobile-nav__close:hover { color: var(--fg); }

.mobile-nav__link {
  font-size: 18px;
  letter-spacing: 0.2em;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--gray-ui-light);
  transition: color var(--transition);
}
.mobile-nav__link:hover { color: var(--fg); }

.mobile-nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0,0,0,0.6);
}
.mobile-nav__overlay.active { display: block; }

/* =====================================================
   HERO
   ===================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* overflow убран — логотип fixed и не обрезается */
}

.hero__media {
  position: absolute;
  inset: 0;
  background: #000;
}

.hero__gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__fallback {
  display: none;
  width: 100%;
  height: 100%;
  background: #050505;
  align-items: center;
  justify-content: center;
}

.hero__glitch {
  font-family: var(--font-gothic);
  font-size: clamp(60px, 15vw, 180px);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--white);
  position: relative;
  animation: glitch-base 4s infinite;
}
.hero__glitch::before,
.hero__glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  left: 0;
}
.hero__glitch::before {
  color: #0ff;
  animation: glitch-1 4s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}
.hero__glitch::after {
  color: #f0f;
  animation: glitch-2 4s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-base {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 1px); }
  94% { transform: translate(2px, -1px); }
  96% { transform: translate(-1px, 2px); }
}
@keyframes glitch-1 {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  92% { transform: translate(-4px, 0); opacity: 0.8; }
  96% { transform: translate(4px, 0); opacity: 0.6; }
}
@keyframes glitch-2 {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  93% { transform: translate(4px, 0); opacity: 0.8; }
  97% { transform: translate(-4px, 0); opacity: 0.6; }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.2) 40%,
    rgba(0,0,0,0.2) 60%,
    rgba(0,0,0,0.85) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  /* сдвигаем вниз, чтобы не конкурировать с большим лого */
  margin-top: 460px;
}

.hero__title {
  font-family: var(--font-gothic);
  font-size: clamp(56px, 14vw, 160px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 16px;
  text-shadow: 0 0 60px rgba(0,0,0,0.9), 0 0 120px rgba(0,0,0,0.6);
}

.hero__sub {
  font-size: clamp(10px, 2vw, 13px);
  letter-spacing: 0.4em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 40px;
}

.hero__cta {
  display: inline-block;
  border: 1px solid #fff;
  color: #fff;
  padding: 14px 40px;
  font-size: 11px;
  letter-spacing: 0.3em;
  transition: background var(--transition), color var(--transition);
}
.hero__cta:hover {
  background: #fff;
  color: #000;
}

.hero__ticker {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 3;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid var(--border);
  overflow: hidden;
  padding: 10px 0;
  white-space: nowrap;
}

.ticker__track {
  display: inline-flex;
  gap: 40px;
  will-change: transform;
}
.ticker__track span {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gray);
  flex-shrink: 0;
}

/* =====================================================
   CATALOG
   ===================================================== */
.catalog {
  padding: 80px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.catalog__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}

.catalog__title {
  font-size: clamp(24px, 4vw, 40px);
  letter-spacing: 0.2em;
  font-weight: 700;
}

.catalog__filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.2em;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  color: var(--gray-ui);
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--fg);
  color: var(--fg);
}

/* SKELETON LOADER */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--card-bg) 25%, #1c1c1c 50%, var(--card-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 0;
}
body.light .skeleton {
  background: linear-gradient(90deg, #ddd8d2 25%, #ccc8c2 50%, #ddd8d2 75%);
  background-size: 200% 100%;
}
.product-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.product-skeleton__img {
  width: 100%;
  aspect-ratio: 3/4;
}
.product-skeleton__info {
  padding: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-skeleton__name {
  height: 11px;
  width: 60%;
}
.product-skeleton__price {
  height: 11px;
  width: 35%;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* PRODUCT CARD */
.product-card {
  position: relative;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.product-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--card-bg);
}

.product-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.product-card__img--main { opacity: 1; }
.product-card__img--hover { opacity: 0; }

.product-card__img-wrap:hover .product-card__img--main { opacity: 0; transform: scale(1.03); }
.product-card__img-wrap:hover .product-card__img--hover { opacity: 1; transform: scale(1.03); }

.product-card__badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 9px;
  letter-spacing: 0.2em;
  padding: 4px 8px;
  font-weight: 700;
  /* NEW — белый бейдж всегда */
  background: #fff;
  color: #000;
}
.product-card__badge--sold {
  /* SOLD OUT — чёрный бейдж с красной точкой */
  background: #0a0a0a;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
/* в светлой теме SOLD OUT инвертируем */
body.light .product-card__badge--sold {
  background: #fff;
  color: #0a0a0a;
  border: 1px solid rgba(0,0,0,0.2);
}

.product-card__quick {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.25em;
  padding: 14px;
  background: rgba(0,0,0,0.88);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.product-card__quick--sold {
  color: var(--gray);
  cursor: not-allowed;
}
.product-card__img-wrap:hover .product-card__quick {
  opacity: 1;
  transform: translateY(0);
}

.product-card__info {
  padding: 14px 2px 20px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.product-card__name {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.15em;
}

.product-card__price {
  font-size: 12px;
  color: var(--gray-light);
  white-space: nowrap;
}

/* placeholder image fallback — только для main, hover не трогаем */
.product-card__img--main[src="placeholder.svg"] {
  object-fit: cover;
  opacity: 1;
}
body.light .product-card__img--main[src="placeholder.svg"] {
  filter: invert(1);
}

/* =====================================================
   PRODUCT MODAL
   ===================================================== */
.pmodal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.pmodal.open { opacity: 1; pointer-events: all; }

.pmodal__box {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  max-width: 980px; width: 100%;
  max-height: 90vh;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transform: translateY(24px);
  transition: transform 0.25s ease;
}
.pmodal.open .pmodal__box { transform: translateY(0); }

.pmodal__close {
  position: absolute; top: 14px; right: 14px; z-index: 20;
  background: none; border: none; color: var(--fg);
  font-size: 18px; cursor: pointer; line-height: 1;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.5; transition: opacity 0.2s;
}
.pmodal__close:hover { opacity: 1; }

/* --- GALLERY --- */
.pmodal__gallery {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 56px 1fr;
  height: 100%;
}

.pmodal__thumbs {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 6px;
  overflow-y: auto;
  background: var(--bg, #000);
  scrollbar-width: none;
}
.pmodal__thumbs::-webkit-scrollbar { display: none; }

.pmodal__thumb {
  width: 44px; height: 58px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.pmodal__thumb:hover { opacity: 0.7; }
.pmodal__thumb.active { opacity: 1; border-color: var(--fg); }

.pmodal__main-wrap {
  position: relative;
  overflow: hidden;
}
.pmodal__main-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}
.pmodal__main-img.fade { opacity: 0; }

.pmodal__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.4); border: none; color: #fff;
  font-size: 28px; line-height: 1;
  width: 40px; height: 60px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.pmodal__main-wrap:hover .pmodal__arrow { opacity: 1; }
.pmodal__arrow--prev { left: 0; }
.pmodal__arrow--next { right: 0; }
.pmodal__arrow:hover { background: rgba(0,0,0,0.7); }

.pmodal__counter {
  position: absolute; bottom: 12px; left: 0; right: 0;
  text-align: center;
  font-size: 9px; letter-spacing: 0.25em; color: rgba(255,255,255,0.5);
  pointer-events: none;
}

/* --- INFO --- */
.pmodal__info {
  padding: 36px 32px 36px;
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
}
.pmodal__meta {
  font-size: 9px; letter-spacing: 0.35em; color: var(--gray-ui);
  display: flex; gap: 12px; align-items: center;
}
.pmodal__badge {
  display: inline-block; padding: 2px 8px;
  font-size: 8px; letter-spacing: 0.15em;
}
.pmodal__badge--new { background: #fff; color: #000; }
.pmodal__badge--sold { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: var(--fg); }
.pmodal__name {
  font-size: clamp(20px, 2.5vw, 30px);
  letter-spacing: 0.12em; line-height: 1.1; margin: 0;
}
.pmodal__price { font-size: 20px; letter-spacing: 0.08em; }
.pmodal__desc {
  font-size: 12px; line-height: 1.85;
  color: var(--gray-ui-light); margin: 0;
}
.pmodal__sizes-label {
  font-size: 9px; letter-spacing: 0.3em; color: var(--gray-ui);
  margin-bottom: 10px;
}
.pmodal__size-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.pmodal__size-btn {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  background: transparent; color: var(--fg);
  font-family: var(--font); font-size: 11px; letter-spacing: 0.15em;
  cursor: pointer; transition: all 0.15s;
}
.pmodal__size-btn:hover { border-color: var(--fg); }
.pmodal__size-btn.selected { background: var(--fg); color: var(--bg); }

.pmodal__actions { display: flex; flex-direction: column; gap: 10px; }
.pmodal__cta {
  display: block; text-align: center;
  padding: 16px 32px;
  background: var(--fg); color: var(--bg);
  font-family: var(--font); font-size: 11px; letter-spacing: 0.25em;
  border: none; cursor: pointer;
  transition: opacity 0.2s; text-decoration: none;
}
.pmodal__cta:hover { opacity: 0.85; }
.pmodal__cta--sold {
  background: transparent; color: var(--gray-ui);
  border: 1px solid var(--border-color); cursor: not-allowed;
}
.pmodal__ship {
  font-size: 9px; letter-spacing: 0.15em;
  color: var(--gray-ui); line-height: 1.7;
  border-top: 1px solid var(--border-color);
  padding-top: 16px; margin-top: auto;
}

@media (max-width: 700px) {
  .pmodal__box {
    grid-template-columns: 1fr;
    display: flex; flex-direction: column;
    height: 100dvh;
  }
  .pmodal__gallery {
    flex-shrink: 0;
    grid-column: 1;
    grid-template-columns: 48px 1fr;
    height: 55dvh;
    max-height: none;
  }
  .pmodal__info {
    flex: 1; overflow-y: auto;
    padding: 20px 16px 32px; gap: 12px;
    max-height: none;
  }
  .pmodal__thumbs { padding: 4px; }
  .pmodal__thumb { width: 36px; height: 48px; }
  .pmodal__arrow { opacity: 1; }
}

/* =====================================================
   TG BLOCK
   ===================================================== */
.tg-block {
  padding: 80px 32px;
  border-top: 1px solid var(--border);
}

.tg-block__inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.tg-block[data-reveal].revealed .tg-block__inner {
  opacity: 1; transform: translateY(0);
}
.tg-block[data-reveal].revealed { opacity: 1; transform: translateY(0); }

.tg-block__icon {
  color: var(--gray);
  flex-shrink: 0;
}

.tg-block__title {
  font-size: clamp(20px, 3vw, 32px);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.tg-block__desc {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 20px;
}

.tg-block__perks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tg-block__perks li {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--gray);
}

.tg-block__btn {
  display: inline-block;
  border: 1px solid var(--white);
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.25em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.tg-block__btn:hover {
  background: var(--white);
  color: var(--black);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 32px 32px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 48px;
}

.footer__logo {
  font-family: var(--font-gothic);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 12px;
}

.footer__tagline {
  font-size: 10px;
  color: var(--gray);
  letter-spacing: 0.2em;
  margin-bottom: 24px;
}

.footer__socials {
  display: flex;
  gap: 16px;
}
.footer__socials a {
  color: var(--gray);
  transition: color var(--transition);
}
.footer__socials a:hover { color: var(--white); }

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer__col-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  color: var(--white);
  font-weight: 700;
}

.footer__col a {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gray);
  padding: 4px 0;
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--gray);
  letter-spacing: 0.1em;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__admin-link {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.1);
  transition: color 0.3s;
}
.footer__admin-link:hover { color: rgba(255,255,255,0.45); }
body.light .footer__admin-link { color: rgba(0,0,0,0.1); }
body.light .footer__admin-link:hover { color: rgba(0,0,0,0.35); }

/* =====================================================
   CART SIDEBAR
   ===================================================== */
.cart-sidebar {
  position: fixed;
  top: 0; right: -480px;
  width: min(480px, 100vw);
  height: 100vh;
  z-index: 300;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.cart-sidebar.open { right: 0; }

.cart-sidebar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--sidebar-bg);
  z-index: 1;
}
.cart-sidebar__header h2 {
  font-size: 14px;
  letter-spacing: 0.25em;
}
.cart-sidebar__close {
  font-size: 18px;
  color: var(--gray);
  transition: color var(--transition);
}
.cart-sidebar__close:hover { color: var(--white); }

.cart-sidebar__items {
  flex: 1;
  padding: 24px;
}

.cart-sidebar__empty {
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 0.2em;
  text-align: center;
  margin-top: 60px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item__name {
  font-size: 12px;
  letter-spacing: 0.1em;
}
.cart-item__price {
  font-size: 12px;
  color: var(--gray-light);
}
.cart-item__remove {
  color: var(--gray);
  font-size: 14px;
  margin-left: 16px;
  transition: color var(--transition);
}
.cart-item__remove:hover { color: var(--white); }

.cart-sidebar__bottom {
  padding: 20px 24px 28px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-sidebar__total {
  font-size: 13px;
  letter-spacing: 0.2em;
}
.cart-sidebar__total span { font-weight: 700; }

.cart-msg-wrap { position: relative; }
.cart-msg-label {
  font-size: 9px; letter-spacing: 0.25em;
  color: var(--gray-ui); margin-bottom: 8px;
}
.cart-msg-text {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  color: var(--fg);
  font-family: var(--font);
  font-size: 11px; line-height: 1.75;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  resize: none; outline: none;
  scrollbar-width: thin;
}
.cart-copy-btn {
  width: 100%; margin-top: 8px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--gray-ui);
  font-family: var(--font); font-size: 9px; letter-spacing: 0.25em;
  cursor: pointer; transition: all 0.2s;
}
.cart-copy-btn:hover, .cart-copy-btn.copied {
  border-color: var(--fg); color: var(--fg);
}

.cart-sidebar__submit {
  display: block; text-align: center;
  font-family: var(--font);
  font-size: 11px; letter-spacing: 0.3em;
  padding: 16px;
  background: #fff; color: #000;
  font-weight: 700; text-decoration: none;
  transition: opacity 0.2s;
}
.cart-sidebar__submit:hover { opacity: 0.85; }

.cart-hint {
  font-size: 10px; color: var(--gray-ui);
  letter-spacing: 0.08em; line-height: 1.6;
  text-align: center; margin: 0;
}

.cart-sidebar__overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(0,0,0,0.65);
}
.cart-sidebar__overlay.active { display: block; }

/* =====================================================
   ORDER SUCCESS (unused — kept for possible future use)
   ===================================================== */
.order-success__box p {
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 0.15em;
  margin-bottom: 32px;
}
.order-success__box button {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.25em;
  padding: 12px 32px;
  border: 1px solid var(--white);
  color: var(--white);
  transition: all var(--transition);
}
.order-success__box button:hover {
  background: var(--white);
  color: var(--black);
}

/* =====================================================
   SCROLL REVEAL
   ===================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header { padding: 0 16px; }
  .header__nav { display: none; }
  .header__burger { display: flex; }

  .catalog { padding: 48px 12px; }
  .catalog__title { font-size: clamp(20px, 6vw, 32px); }
  .catalog__header { margin-bottom: 24px; gap: 16px; }
  .catalog__filters { gap: 4px; flex-wrap: wrap; }
  .filter-btn { padding: 7px 14px; font-size: 9px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }

  /* hero */
  .hero__content { margin-top: 280px; }

  /* ticker */
  .ticker__track span { font-size: 10px; }

  /* modal */
  .pmodal__box {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    max-height: 100dvh;
    border-radius: 0;
  }
  .pmodal__gallery {
    grid-column: 1;
    grid-template-columns: 48px 1fr;
    height: 56vw;
    max-height: 320px;
  }
  .pmodal__thumbs { padding: 4px; gap: 4px; }
  .pmodal__thumb { width: 36px; height: 48px; }
  .pmodal__arrow { opacity: 1; }
  .pmodal__info { padding: 20px 16px 24px; gap: 12px; overflow-y: auto; max-height: calc(100dvh - 320px); }
  .pmodal__name { font-size: clamp(16px, 5vw, 24px); }

  /* cart sidebar */
  .cart-sidebar { width: 100%; max-width: 100%; right: -100%; }
  .cart-sidebar.open { right: 0; }

  /* tg block */
  .tg-block { padding: 48px 16px; }
  .tg-block__inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .tg-block__icon { display: none; }
  .tg-block__btn { align-self: center; }
  .tg-block__perks { text-align: left; }

  /* footer */
  .footer { padding: 40px 16px 24px; }
  .footer__top { grid-template-columns: 1fr; gap: 28px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* mobile nav */
  .mobile-nav { width: 85vw; max-width: 320px; }
}

@media (max-width: 480px) {
  .header { padding: 0 12px; }

  /* hero */
  .hero__content { margin-top: 200px; padding: 0 16px; }
  .hero__sub { font-size: 9px; letter-spacing: 0.25em; }
  .hero__cta { padding: 12px 28px; font-size: 10px; }

  /* catalog */
  .catalog { padding: 40px 8px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .catalog__filters { gap: 2px; }
  .filter-btn { padding: 6px 10px; font-size: 8px; letter-spacing: 0.1em; }

  /* modal — full screen */
  .pmodal { padding: 0; }
  .pmodal__box {
    width: 100%; height: 100dvh; border-radius: 0;
    display: flex; flex-direction: column;
  }
  .pmodal__gallery {
    flex-shrink: 0;
    height: 60dvh;
    max-height: none;
    grid-template-columns: 52px 1fr;
  }
  .pmodal__info {
    flex: 1;
    overflow-y: auto;
    max-height: none;
    padding: 16px 16px 32px;
  }
  .pmodal__close { top: 10px; right: 10px; }

  /* cart */
  .cart-sidebar { width: 100%; }
  .cart-msg-text { font-size: 10px; }

  /* footer */
  .footer__cols { grid-template-columns: 1fr; gap: 20px; }
  .tg-block__btn { width: 100%; text-align: center; }
}

@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero__content { margin-top: 160px; }
}
