:root {
  color-scheme: dark;
  --bg: #11120f;
  --panel: rgba(28, 29, 24, 0.78);
  --panel-strong: #202119;
  --line: rgba(239, 224, 180, 0.16);
  --text: #f7f1df;
  --muted: #b6ad95;
  --gold: #d6b25e;
  --green: #5d8f62;
  --red: #9d3f3f;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(93, 143, 98, 0.18), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(214, 178, 94, 0.16), transparent 24%),
    linear-gradient(180deg, #15160f 0%, #0d0e0c 100%);
}

button,
a {
  font: inherit;
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile,
.catalog {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.profile {
  position: sticky;
  top: 16px;
  min-height: calc(100vh - 48px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 8px;
}

.brand-mark {
  width: 82px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 178, 94, 0.48);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(214, 178, 94, 0.24), rgba(93, 143, 98, 0.13)),
    #171811;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.03);
}

.brand-mark.has-image {
  background-position: center;
  background-size: cover;
}

.brand-mark.has-image span {
  opacity: 0;
}

.brand-mark span {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--gold);
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 100%;
  margin: 14px 0 8px;
  font-size: clamp(2.05rem, 8vw, 3.15rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.intro {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.telegram-link {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #0e100d;
  text-decoration: none;
  font-weight: 800;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #f2dc99);
  transition: transform 180ms ease, filter 180ms ease;
}

.telegram-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.telegram-link svg {
  width: 22px;
  fill: currentColor;
}

.notice {
  width: 100%;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(214, 178, 94, 0.2);
  border-radius: 8px;
  background: rgba(14, 15, 12, 0.5);
  text-align: left;
}

.notice strong,
.notice span {
  display: block;
}

.notice strong {
  margin-bottom: 5px;
  color: var(--gold);
}

.notice span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.admin-entry {
  margin-top: 10px;
  color: rgba(247, 241, 223, 0.5);
  font-size: 0.76rem;
  text-decoration: none;
}

.admin-entry:hover {
  color: var(--gold);
}

.catalog {
  min-height: calc(100vh - 48px);
  padding: 14px;
  border-radius: 8px;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.media-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #0f100c;
}

.media-item,
.video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media-item {
  object-fit: cover;
  opacity: 0;
  transition: opacity 180ms ease, transform 260ms ease;
}

.media-item.is-active {
  opacity: 1;
}

.media-frame video.media-item {
  pointer-events: none;
}

.product-card:hover img {
  transform: scale(1.03);
}

.video-preview {
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 36%, rgba(214, 178, 94, 0.28) 42%, transparent 48%),
    radial-gradient(circle at 48% 44%, rgba(93, 143, 98, 0.45), transparent 34%),
    rgba(8, 9, 7, 0.6);
  background-size: 220% 100%, auto, auto;
  animation: videoSweep 2.3s linear infinite;
}

.video-preview span {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(247, 241, 223, 0.28);
}

.media-picker {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.media-switch {
  min-width: 30px;
  min-height: 28px;
  border: 1px solid rgba(247, 241, 223, 0.2);
  border-radius: 8px;
  color: var(--text);
  background: rgba(10, 11, 8, 0.76);
  cursor: pointer;
  font-weight: 800;
  font-size: 0.68rem;
}

.media-switch.is-active {
  color: #10110d;
  background: var(--gold);
}

.product-info {
  padding: 12px;
}

.product-info h2 {
  margin: 4px 0 0;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.description {
  min-height: 40px;
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.price-list {
  margin: 0;
  display: grid;
  gap: 6px;
}

.price-list div {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
  border: 1px solid rgba(247, 241, 223, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.price-list dt,
.price-list dd {
  margin: 0;
}

.price-list dt {
  font-weight: 800;
  font-size: 0.82rem;
}

.price-list dd {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.82rem;
}

@keyframes videoSweep {
  from {
    background-position: 190% 0, 0 0, 0 0;
  }
  to {
    background-position: -30% 0, 0 0, 0 0;
  }
}

@media (max-width: 860px) {
  .page-shell {
    grid-template-columns: 1fr;
    padding: 10px 0;
  }

  .profile {
    position: relative;
    top: auto;
    min-height: auto;
  }

  .brand-mark {
    width: 74px;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .notice {
    margin-top: 16px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 12px, 1440px);
  }

  .profile,
  .catalog {
    padding: 12px;
  }

  .profile {
    align-items: stretch;
  }

  .brand-mark,
  .eyebrow,
  h1,
  .intro {
    align-self: center;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .product-info {
    padding: 9px;
  }

  .product-info h2 {
    font-size: 0.88rem;
  }

  .description {
    min-height: auto;
    font-size: 0.72rem;
  }

  .price-list div {
    min-height: 27px;
    padding: 0 6px;
  }

  .price-list dt,
  .price-list dd {
    font-size: 0.72rem;
  }
}
