*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #06060b;
  --surface: #0e0e16;
  --surface2: #14141f;
  --text: #f0eef5;
  --muted: #6b6880;
  --pink: #ff2d6a;
  --pink-glow: #ff5c8d;
  --red: #ff2244;
  --cherry: #e8003a;
  --green: #00ff88;
  --pixel: 'Press Start 2P', monospace;
  --display: 'Syne', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--display);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: linear-gradient(to bottom, rgba(6, 6, 11, 0.95), transparent);
}

.logo {
  font-family: var(--pixel);
  font-size: clamp(0.55rem, 2vw, 0.7rem);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo span {
  color: var(--pink);
}

.logo__cube {
  width: 14px;
  height: 14px;
  background: var(--pink);
  box-shadow:
    3px 3px 0 var(--cherry),
    0 0 12px var(--pink-glow);
  animation: cubePulse 2s ease-in-out infinite;
}

@keyframes cubePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.nav {
  display: flex;
  gap: 2rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: lowercase;
}

.nav a {
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}

.nav a:hover {
  opacity: 1;
  color: var(--pink);
}

/* Buttons */
.btn {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:active {
  transform: scale(0.96);
}

.btn--glow {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--pink);
  color: white;
  text-transform: lowercase;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  box-shadow:
    0 0 30px rgba(255, 45, 106, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn--glow:hover {
  background: var(--pink-glow);
  box-shadow: 0 0 50px rgba(255, 45, 106, 0.7);
  transform: translateY(-2px);
}

.btn--add {
  width: 100%;
  padding: 0.75rem;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid rgba(255, 45, 106, 0.3);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.btn--add:hover {
  background: rgba(255, 45, 106, 0.15);
  border-color: var(--pink);
  color: var(--pink);
}

.btn--ghost {
  padding: 0.85rem 1.5rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#heroScene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  pointer-events: none;
}

.hero__content .btn {
  pointer-events: auto;
}

.hero__tag {
  font-family: var(--pixel);
  font-size: clamp(0.45rem, 1.5vw, 0.6rem);
  color: var(--muted);
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
}

.hero h1 {
  font-size: clamp(2.5rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero h1 .line {
  display: block;
}

.hero h1 .line:first-child {
  color: var(--pink);
  text-shadow:
    0 0 40px rgba(255, 45, 106, 0.6),
    0 0 80px rgba(255, 45, 106, 0.3);
}

.hero h1 .line--amp {
  font-size: 0.4em;
  color: var(--muted);
  margin: 0.1em 0;
}

.hero h1 .line--cherry {
  color: var(--red);
  text-shadow:
    0 0 40px rgba(255, 34, 68, 0.6),
    0 0 80px rgba(255, 34, 68, 0.3);
}

.hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
  margin-bottom: 2.5rem;
  text-transform: lowercase;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}

.hero__scroll span {
  width: 8px;
  height: 8px;
  background: var(--pink);
  opacity: 0.4;
  animation: scrollBlink 1.4s ease-in-out infinite;
}

.hero__scroll span:nth-child(2) { animation-delay: 0.2s; }
.hero__scroll span:nth-child(3) { animation-delay: 0.4s; }

@keyframes scrollBlink {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(4px); }
}

/* Seller */
.seller {
  padding: 4rem 2rem;
  border-top: 1px solid rgba(255, 45, 106, 0.08);
  border-bottom: 1px solid rgba(255, 45, 106, 0.08);
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 45, 106, 0.06), transparent 45%),
    var(--surface);
}

.seller__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
}

.seller__gallery {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.seller__trading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.seller__frame--trading {
  box-shadow:
    0 0 30px rgba(0, 255, 136, 0.2),
    6px 6px 0 rgba(0, 255, 136, 0.15);
  background: linear-gradient(135deg, var(--green), #00cc6a);
}

.seller__photo--trading {
  width: min(160px, 40vw);
}

.seller__trading-label {
  font-family: var(--pixel);
  font-size: clamp(0.4rem, 1.2vw, 0.5rem);
  color: var(--green);
  letter-spacing: 0.06em;
  text-transform: lowercase;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.35);
}

.seller__photo-wrap {
  position: relative;
  flex-shrink: 0;
}

.seller__frame {
  position: relative;
  padding: 4px;
  background: linear-gradient(135deg, var(--pink), var(--red));
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow:
    0 0 40px rgba(255, 45, 106, 0.35),
    8px 8px 0 rgba(255, 34, 68, 0.25);
}

.seller__photo {
  display: block;
  width: min(260px, 70vw);
  height: auto;
  object-fit: cover;
  object-position: top center;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  background: #000;
}

.seller__badge {
  position: absolute;
  bottom: -10px;
  right: -10px;
  font-family: var(--pixel);
  font-size: 0.45rem;
  padding: 0.5rem 0.75rem;
  background: var(--pink);
  color: white;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  box-shadow: 0 0 20px rgba(255, 45, 106, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.seller__label {
  font-family: var(--pixel);
  font-size: clamp(0.45rem, 1.5vw, 0.55rem);
  color: var(--muted);
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
}

.seller__name {
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pink);
  text-shadow: 0 0 40px rgba(255, 45, 106, 0.4);
  margin-bottom: 1rem;
  line-height: 1;
}

.seller__desc {
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.7;
  max-width: 28rem;
  text-transform: lowercase;
}

@media (min-width: 700px) {
  .seller__inner {
    flex-direction: row;
    text-align: left;
    gap: 3.5rem;
    align-items: center;
  }

  .seller__photo {
    width: 280px;
  }

  .seller__photo--trading {
    width: 180px;
  }
}

/* Shop */
.shop {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.shop__head {
  text-align: center;
  margin-bottom: 3rem;
}

.shop__head h2 {
  font-family: var(--pixel);
  font-size: clamp(0.7rem, 2.5vw, 1rem);
  margin-bottom: 0.75rem;
  color: var(--pink);
}

.shop__head p {
  color: var(--muted);
  text-transform: lowercase;
}

.shop__grid {
  display: grid;
  gap: 2rem;
}

.berry-card {
  background: var(--surface);
  border: 1px solid rgba(255, 45, 106, 0.12);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
}

.berry-card:hover {
  border-color: rgba(255, 45, 106, 0.4);
  box-shadow: 0 0 60px rgba(255, 45, 106, 0.15);
  transform: translateY(-4px);
}

.berry-card__scene {
  height: 280px;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
}

.berry-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.berry-card:hover .berry-card__img {
  transform: scale(1.05);
}

.berry-card__info {
  padding: 1.5rem 2rem 2rem;
}

.berry-card__info h3 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.berry-card[data-berry="malina"] h3 { color: var(--pink); }
.berry-card[data-berry="chereshnya"] h3 { color: var(--red); }

.berry-card__price {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.berry-card__price small {
  font-size: 0.45em;
  color: var(--muted);
  font-weight: 600;
}

/* Cart */
.cart {
  padding: 4rem 2rem 6rem;
  display: flex;
  justify-content: center;
}

.cart__box {
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid rgba(255, 45, 106, 0.15);
  padding: 2.5rem 2rem;
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.cart__box h2 {
  font-family: var(--pixel);
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  text-align: center;
  color: var(--pink);
  margin-bottom: 2rem;
}

.cart__items {
  display: grid;
  gap: 0.75rem;
  min-height: 80px;
  margin-bottom: 1.5rem;
}

.cart__empty {
  color: var(--muted);
  text-align: center;
  padding: 1.5rem;
  text-transform: lowercase;
}

.cart__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart__row-name {
  font-weight: 700;
  text-transform: lowercase;
}

.cart__row-name.malina { color: var(--pink); }
.cart__row-name.chereshnya { color: var(--red); }

.cart__qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart__qty button {
  width: 28px;
  height: 28px;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

.cart__qty button:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.cart__qty span {
  min-width: 2.5rem;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cart__row-price {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 5rem;
  text-align: right;
}

.cart__total {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cart__total strong {
  color: var(--green);
  font-size: 1.4em;
}

.cart__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cart__toast {
  text-align: center;
  margin-top: 1rem;
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: var(--green);
  font-weight: 600;
}

.cart__toast.error {
  color: var(--red);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer p {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* Responsive */
@media (min-width: 700px) {
  .shop__grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .nav {
    gap: 1.25rem;
    font-size: 0.8rem;
  }
}
