:root {
  --bg: #0b0f16;
  --card: rgba(255,255,255,0.06);
  --stroke: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --glow: rgba(120, 165, 255, 0.25);
  --radius: 18px;
}

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

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(120,165,255,0.15), transparent 55%),
              radial-gradient(900px 500px at 80% 10%, rgba(255,120,180,0.12), transparent 60%),
              var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
.container { width: min(1120px, 92vw); margin: 0 auto; }

/* ===== TOPBAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 22, 0.55);
  border-bottom: 1px solid var(--stroke);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height: 64px;
  padding: 0;
}

/* ===== BRAND ===== */
.brand{
  display:flex;
  align-items:center;
  gap: 14px;
  height: 64px;
  font-weight: 900;
}
.brand span{
  font-size: 20px;
  letter-spacing: .3px;
}

/* логотип */
.brand-logo{
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  top: 7px;
  background: transparent;
  border: none;
  box-shadow: none;
}
.brand-logo img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* ===== HERO ===== */
.hero { padding: 42px 0 10px; }
.hero-title { font-size: clamp(28px, 3vw, 42px); margin: 0; }
.hero-subtitle { color: var(--muted); margin: 10px 0 0; }

.hero-cards {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.info-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.info-title { font-weight: 800; margin-bottom: 6px; }

/* ===== SECTION / GRID ===== */
.section { padding: 26px 0 56px; }
.section-head { display:flex; justify-content:space-between; align-items:flex-end; gap: 16px; }
.section-head h2 { margin:0; font-size: 22px; }

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

/* ===== CARD ===== */
.card{
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 70px rgba(0,0,0,0.35);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card:hover{
  transform: translateY(-4px);
  box-shadow: 0 25px 90px rgba(0,0,0,0.45);
}

/* =========================
   FIX: РОВНЫЕ КАРТОЧКИ
   По умолчанию делаем вертикальные превью (как TikTok) — 9/16.
   Горизонтальные при необходимости помечай классом is-landscape.
   ========================= */

/* media in card */
.card-media{
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;  /* <-- ВАЖНО: теперь одинаковая высота у всех карточек */
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}

/* совместимость со старым классом */
.card-media.is-portrait { aspect-ratio: 9/16; }

/* если когда-то нужно горизонтальное превью — просто добавь is-landscape */
.card-media.is-landscape { aspect-ratio: 16/10; }

.card-video,
.card-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* одинаково красиво для видео и картинок */
  background: rgba(0,0,0,0.35);
}

.card-placeholder{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.25);
}

/* overlay выключен */
.card-overlay{ display:none !important; }

/* text */
.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-title { font-weight: 800; margin: 0 0 6px; }
.card-desc { color: var(--muted); font-size: 14px; min-height: 38px; }

.price{
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 18px;
  line-height: 1.05;
  margin-top: 2px;
}

.card-actions{
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.card-actions .btn{
  flex: 1;
  text-align: center;
}

/* чтобы кнопки в карточках не ломали сетку из-за min-width */
.card-actions .btn-primary,
.card-actions .btn-ghost{
  min-width: 0 !important;
}

.actions{
  display:flex;
  justify-content:center;
  align-items:center;
}

.card-open{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 900;
  border: 1px solid var(--stroke);
  transition: transform .12s ease, filter .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.06);
  border-color: rgba(255,255,255,0.18);
}
.btn-primary{
  min-width: 190px;
  background: linear-gradient(135deg, rgba(120,165,255,0.35), rgba(255,120,180,0.25));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 18px 60px var(--glow);
}
.btn-ghost{
  min-width: 120px;
  background: rgba(255,255,255,0.06);
}

@media (max-width: 560px){
  .card-bottom{ grid-template-columns: 1fr; gap: 10px; }
  .actions, .card-open{ justify-content: stretch; }
  .btn-primary, .btn-ghost{ width: 100%; min-width: 0; }
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ===== PRODUCT PAGE (FIX: одинаковое отображение медиа) ===== */
.product{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items:start;
}

.product-media{
  border-radius: var(--radius);
  overflow:hidden;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  position: relative;

  width: 100%;
  aspect-ratio: 4 / 5;          /* <-- одинаковая рамка */
  max-height: 74vh;              /* <-- чтобы не было слишком огромным */
}

/* если когда-то будет горизонтальное видео/фото — добавишь is-landscape */
.product-media.is-landscape{
  aspect-ratio: 16 / 10;
}

/* и видео, и картинка заполняют одинаково */
.product-video,
.product-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;             /* <-- одинаково красиво */
  background: rgba(0,0,0,0.35);
}


/* если понадобится горизонтальный вариант — добавишь класс is-landscape */
.product-media.is-landscape{
  aspect-ratio: 16 / 10;
}

/* и видео, и картинка одинаково заполняют блок */
.product-video,
.product-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;        /* <-- одинаковый вид */
  background: rgba(0,0,0,0.35);
}

.product-info{
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--stroke);
  padding: 16px;
}


.product-video{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: rgba(0,0,0,0.35);
}

.product-info{
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--stroke);
  padding: 16px;
}
.product-title { margin: 0 0 8px; }
.product-price { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.product-short { color: var(--muted); margin-top: 0; }
.product-full { margin-top: 10px; line-height: 1.5; color: rgba(255,255,255,0.86); }
.product-actions { display:flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* бейджи (если используешь на странице товара) */
.product-badges{
  position:absolute;
  top: 12px;
  right: 12px;
  display:flex;
  gap: 10px;
  z-index: 5;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.95);
  font-weight: 900;
  font-size: 14px;
}
.like-btn{ cursor:pointer; }
.like-btn.liked{
  border-color: rgba(255,120,180,0.55);
  box-shadow: 0 10px 35px rgba(255,120,180,0.18);
}

.product-stats{
  display:flex;
  gap:10px;
  margin:8px 0 12px;
}

/* ===== GALLERY ===== */
.gallery-title { margin-top: 28px; }
.gallery{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.gallery-item{
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
}
.gallery img{
  width:100%;
  height: 160px;
  object-fit: cover;
  display:block;
}

/* ===== FOOTER ===== */
.footer{
  border-top: 1px solid var(--stroke);
  background: rgba(10, 14, 22, 0.55);
  backdrop-filter: blur(10px);
  padding: 22px 0;
}

/* footer-inner делаем НЕ flex, чтобы копирайт был снизу */
.footer-inner{ display:block !important; }

.footer-title{ font-weight: 900; margin-bottom: 6px; }
.link{ color: rgba(180, 210, 255, 0.95); }
.link:hover{ text-decoration: underline; }

/* соцсети */
.socials{
  display:flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.social-btn{
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  transition: transform .12s ease, filter .12s ease, border-color .12s ease;
}
.social-btn:hover{
  transform: translateY(-2px);
  filter: brightness(1.06);
  border-color: rgba(255,255,255,0.18);
}
.social-btn img{
  width: 26px;
  height: 26px;
  display:block;
}

/* колонки футера: соцсети слева, поддержка справа */
.footer-cols{
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: start !important;
  gap: 40px !important;
  width: 100% !important;
}

.footer-col{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.footer-col-right{ margin-left: auto; }

.support-btn{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
  font-weight:900;
  transition:.15s;
  width:fit-content;
}
.support-btn:hover{
  transform:translateY(-1px);
  filter: brightness(1.06);
}
.support-btn img{
  width:52px;
  height:52px;
  object-fit:contain;
  display:block;
}

/* копирайт всегда снизу */
.footer-copy{
  display:block !important;
  width:100% !important;
  margin-top:16px !important;
  border-top:1px solid rgba(255,255,255,0.10) !important;
  padding-top:14px !important;
  grid-column: 1 / -1 !important;
}

/* ===== RESPONSIVE GENERAL ===== */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-cards { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

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

/* ===== MOBILE HEADER sizes (без навигационной каши) ===== */
@media (max-width: 720px){
  .topbar-inner{
    height: 56px;
    padding: 0 8px;
  }

  /* логотип уменьшаем на мобиле */
  .brand-logo{
    width: 96px;
    height: 96px;
    top: 2px;
  }

  .brand span{ font-size: 16px; }
}

@media (max-width: 420px){
  .brand span{ display:none; }
}

/* адаптив футера: на телефоне донат ниже соцсетей */
@media (max-width: 720px){
  .footer-cols{
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .footer-col-right{ margin-left:0; }
}

/* =========================
   NAV (PC + MOBILE BURGER) — FINAL (КЛИКАЕТСЯ НОРМАЛЬНО)
   ========================= */

.topbar{ z-index: 1000; }

.nav{
  display:flex;
  align-items:center;
  gap: 14px;
  color: var(--muted);
  font-weight: 600;
  position: relative;
}

.nav a:hover{ color: var(--text); }

/* ссылки на ПК */
.nav-links{
  display:flex;
  gap: 16px;
  align-items:center;
}

/* кнопка админки (иконка) */
.nav-admin{
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:12px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
  transition:.15s;
  flex: 0 0 auto;

  position: relative;
  z-index: 4000;
}
.nav-admin:hover{
  filter: brightness(1.08);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
.nav-admin svg{
  width:20px;
  height:20px;
  color: rgba(255,255,255,0.92);
}

/* бургер (по умолчанию скрыт на ПК) */
.nav-toggle{
  display:none;

  /* ВАЖНО: делаем нормальную тач-зону */
  min-width:44px;
  min-height:44px;

  border-radius:12px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);

  cursor:pointer;

  /* ВАЖНО: никакого padding, чтобы не было “мертвых зон” */
  padding:0;

  /* ВАЖНО: центрируем линии */
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap: 5px;

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;

  position: relative;
  z-index: 5000;
}

/* Линии бургера НЕ должны ловить клики */
.nav-toggle span{
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: rgba(255,255,255,0.85);
  display:block;

  pointer-events: none;   /* <-- КЛЮЧЕВО */
}

/* ===== MOBILE ===== */
/* ===== FIX: бургер плохо нажимается (перекрывает .brand) ===== */
@media (max-width: 720px){

  /* чтобы слои работали предсказуемо */
  .topbar-inner{
    position: relative;
  }

  /* Бренд слева НЕ должен накрывать правую часть */
  .brand{
    position: relative;
    z-index: 1;
    flex: 0 1 auto;
    max-width: 55%;
    overflow: hidden;
  }

  /* Логотип на мобиле реально уменьшаем и НЕ “вылезаем” вниз */
  .brand-logo{
    width: 72px !important;
    height: 72px !important;
    top: 0 !important;
    pointer-events: none; /* картинка не ловит тап */
  }

  /* Навигацию поднимаем выше бренда */
  .nav{
    position: relative;
    z-index: 10;
    flex: 0 0 auto;
  }

  /* Кнопки справа — самый верхний слой */
  .nav-toggle,
  .nav-admin{
    position: relative;
    z-index: 9999;
  }
}

/* =========================
   Comments
   ========================= */
.input{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06);
  color:#fff;
  outline:none;
}
.input:focus{
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
}

.comments{
  margin-top: 18px;
}

.comment-form{
  margin-top: 12px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.comment-form-grid{
  display:grid;
  grid-template-columns: 1fr 220px;
  gap: 10px;
}
@media (max-width: 640px){
  .comment-form-grid{ grid-template-columns: 1fr; }
}

.comment-empty{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.03);
}

.comment-list{
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.comment-item{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.comment-top{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}

.comment-author{
  display:flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.comment-emoji{
  font-size: 18px;
}

.comment-text{
  line-height: 1.5;
  word-break: break-word;
}
/* =========================
   Comment Warning Block
   ========================= */

.comment-warning{
  display:flex;
  gap:16px;
  align-items:flex-start;

  margin-top: 22px;
  margin-bottom: 14px;

  padding:14px 16px;
  border-radius:16px;

  background: rgba(255, 214, 102, 0.08);
  border:1px solid rgba(255, 214, 102, 0.35);

  box-shadow: 0 10px 35px rgba(0,0,0,0.25);
}

.comment-warning-icon{
  flex:0 0 auto;
}

.comment-warning-icon img{
  width:42px;
  height:42px;
  display:block;
}

.comment-warning-text{
  font-size:14px;
  line-height:1.5;
  color: rgba(255,255,255,0.92);
}

.comment-warning-text a{
  color:#ffb347;
  font-weight:700;
  text-decoration:none;
}

.comment-warning-text a:hover{
  text-decoration:underline;
}

/* mobile */
@media (max-width:600px){
  .comment-warning{
    flex-direction:column;
    gap:10px;
  }
}
