:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #151719;
  --muted: #69707a;
  --line: #e4e7ec;
  --accent: #0f1115;
  --accent-soft: #e9edf3;
  --gold: #c78342;
  --danger: #b42318;
  --ok: #067647;
  font-family: "Segoe UI", "Aptos", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.primary,
.secondary,
.icon-btn,
.cart-btn {
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

button:hover,
.primary:hover,
.secondary:hover,
.icon-btn:hover,
.cart-btn:hover {
  transform: translateY(-1px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(246, 247, 249, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.brand small,
.eyebrow,
.muted {
  color: var(--muted);
}

.brand strong,
.brand small {
  display: block;
}

.nav {
  display: flex;
  gap: 18px;
  flex: 1;
}

.nav a,
.nav button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  text-decoration: none;
  color: var(--muted);
  cursor: pointer;
}

.nav a.active {
  color: var(--ink);
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 10px;
}

.icon-btn,
.cart-btn,
.primary,
.secondary,
.category-rail button,
.product-card button,
.service-card button,
.cart-line button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
}

.icon-btn,
.cart-btn,
.secondary {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 14px;
}

.secondary.dark {
  color: var(--ink);
  background: var(--panel);
}

.cart-btn span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 12px;
}

.hero {
  min-height: calc(100svh - 72px);
  display: flex;
  align-items: flex-start;
  padding: clamp(28px, 6vw, 72px) clamp(16px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(6, 4, 3, 0.58) 0%, rgba(6, 4, 3, 0.26) 34%, rgba(6, 4, 3, 0.08) 62%),
    url("/hero-hiphone.jpg") center / cover no-repeat;
  color: white;
}

.hero-copy {
  width: min(480px, 100%);
  margin-top: clamp(24px, 7svh, 86px);
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(207, 132, 72, 0.38);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(26, 14, 8, 0.62), rgba(7, 5, 4, 0.26));
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  animation: float-in 0.8s ease both;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 560px;
  color: #f2dfce;
  font-size: clamp(17px, 1.7vw, 21px);
}

.hero .eyebrow {
  color: #d49a68;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-actions,
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
}

.primary {
  background: var(--gold);
  color: #111;
  font-weight: 800;
}

.hero .primary {
  background: linear-gradient(135deg, #d88442, #f1b174);
}

.hero .secondary {
  color: #f5c49b;
  background: rgba(48, 23, 10, 0.28);
  border-color: rgba(224, 138, 76, 0.52);
}

.primary.block {
  width: 100%;
}

.secondary {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

section:not(.hero) {
  padding: 56px clamp(16px, 5vw, 72px);
  scroll-margin-top: 90px;
}

.page-shell {
  min-height: 72svh;
}

.inner-page {
  padding-top: 18px;
}

.section-head,
.split-band,
.contacts {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(300px, 1.4fr);
  gap: 28px;
  align-items: start;
}

.contacts {
  position: relative;
  overflow: hidden;
  margin: 0 clamp(16px, 5vw, 72px) 56px;
  padding: clamp(28px, 4vw, 44px) !important;
  border: 1px solid rgba(199, 131, 66, 0.28);
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 8%, rgba(199, 131, 66, 0.22), transparent 34%),
    linear-gradient(135deg, #141518 0%, #1f1b18 52%, #0f1115 100%);
  color: white;
  box-shadow: 0 28px 90px rgba(15, 17, 21, 0.14);
}

.contacts::after {
  content: "";
  position: absolute;
  inset: auto -12% -44% 48%;
  height: 260px;
  background: radial-gradient(circle, rgba(229, 153, 82, 0.28), transparent 68%);
  pointer-events: none;
}

.contacts-copy,
.contacts-panel {
  position: relative;
  z-index: 1;
}

.contacts h2 {
  max-width: 640px;
  color: #fff8f1;
}

.contacts p {
  color: #d7c7ba;
}

.contacts .eyebrow {
  color: #f0a966;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
  font-style: normal;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff5ec;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.contact-link:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 169, 102, 0.58);
  background: rgba(240, 169, 102, 0.12);
}

.contact-icon {
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(240, 169, 102, 0.14);
  color: #f0a966;
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.mobile-telegram-link {
  display: none;
}

.contacts-panel {
  display: grid;
  gap: 16px;
}

.telegram-qr-card {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.telegram-qr-card img {
  display: block;
  width: 176px;
  height: 176px;
  padding: 10px;
  border-radius: 20px;
  background: #fff;
  object-fit: contain;
}

.telegram-qr-card a {
  display: block;
  border-radius: 20px;
  transition: transform 0.18s ease;
}

.telegram-qr-card a:hover {
  transform: scale(1.02);
}

.telegram-qr-card strong {
  display: block;
  color: #fff;
  font-size: 22px;
}

.section-head.compact {
  align-items: center;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

.filters input,
.filters select,
.cart-summary input,
.checkout-form input,
.checkout-form select,
.checkout-form textarea,
.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: white;
}

.category-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 22px 0;
}

.category-rail button,
.category-rail a {
  text-decoration: none;
  white-space: nowrap;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.category-rail button.active,
.category-rail a.active {
  background: var(--accent);
  color: white;
}

.category-rail span,
.category-showcase span {
  color: var(--muted);
  font-size: 13px;
}

.category-rail a.active span {
  color: rgba(255, 255, 255, 0.7);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
  align-items: stretch;
}

.product-card,
.service-card,
.info-band article,
.profile-card,
.profile-grid article,
.auth-form,
.cart-summary {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.product-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #eef1f5, #f9fafb);
  text-decoration: none;
}

.product-media > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.product-gallery {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
}

.product-gallery img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background: white;
}

.product-body {
  display: grid;
  gap: 8px;
  padding-top: 14px;
}

.product-card h3,
.service-card h3,
.info-band h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.product-card h3 {
  min-height: 2.45em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card h3 a {
  text-decoration: none;
}

.product-meta,
.product-desc {
  margin: 0;
  line-height: 1.35;
}

.product-meta {
  min-height: 2.7em;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.product-desc {
  min-height: 3.9em;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.flag-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  vertical-align: middle;
}

.flag-row img {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(15, 17, 21, 0.1);
}

.product-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.price {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.product-card button,
.service-card button,
.cart-line button {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
}

.service-list,
.info-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card button {
  margin-top: auto;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px 120px 96px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 20px;
  align-items: start;
}

.cart-list {
  display: grid;
  gap: 12px;
}

.cart-summary,
.checkout-aside {
  position: sticky;
  top: 96px;
}

.cart-line .muted {
  display: block;
  margin-top: 4px;
}

.qty {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 6px;
  align-items: center;
  text-align: center;
}

.qty button {
  padding: 8px;
  background: var(--accent-soft);
  color: var(--ink);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 8, 10, 0.46);
  backdrop-filter: blur(4px);
}

.drawer-panel {
  position: relative;
  margin-left: auto;
  width: min(520px, 100%);
  min-height: 100%;
  max-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 24px;
  background: #fff;
  overflow-y: auto;
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.2);
}

.close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.drawer-cart-list {
  display: grid;
  gap: 12px;
  align-content: start;
}

.drawer .cart-line {
  grid-template-columns: 1fr;
}

.drawer .cart-line button {
  width: auto;
}

.drawer-footer {
  position: sticky;
  bottom: -24px;
  display: grid;
  gap: 12px;
  margin: 0 -24px -24px;
  padding: 18px 24px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), #fff 28%);
  border-top: 1px solid var(--line);
}

.drawer-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
}

.checkout-form {
  display: grid;
  gap: 14px;
  max-width: 980px;
}

.checkout-form label {
  display: grid;
  gap: 7px;
}

.checkout-note {
  padding: 12px 14px;
  border: 1px solid #f0d2b4;
  border-radius: 14px;
  background: #fff7ed;
  color: #8a4b17;
}

.profile-note {
  border-color: var(--line);
  background: var(--accent-soft);
  color: var(--muted);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.checkout-aside {
  display: grid;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.checkout-aside p {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.form-grid,
.account-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checkout-form textarea {
  min-height: 110px;
  resize: vertical;
}

.summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--accent-soft);
  border-radius: 14px;
}

.offer {
  display: flex;
  gap: 10px;
  align-items: start;
  color: var(--muted);
}

.offer input {
  width: auto;
  margin-top: 4px;
}

.offer a {
  color: var(--ink);
  font-weight: 700;
}

.profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-card h3 {
  margin: 0 0 4px;
}

.bonus-pill {
  padding: 12px 16px;
  border-radius: 999px;
  background: #fff6ed;
  color: #9a5b1f;
  font-weight: 800;
}

.order-row {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.page-hero {
  padding: clamp(34px, 6vw, 72px) clamp(16px, 5vw, 72px);
}

.compact-hero {
  min-height: 280px;
  display: grid;
  align-content: end;
  background:
    linear-gradient(135deg, rgba(14, 15, 18, 0.9), rgba(72, 39, 17, 0.62)),
    url("/hero-hiphone.jpg") center / cover no-repeat;
  color: white;
}

.compact-hero h1,
.auth-form h1,
.product-detail-info h1,
.route-empty h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.compact-hero p:not(.eyebrow) {
  max-width: 680px;
  color: #f2dfce;
  font-size: 18px;
}

.home-section {
  padding: 56px clamp(16px, 5vw, 72px);
}

.category-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.category-showcase a {
  min-height: 104px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  text-decoration: none;
  font-weight: 800;
}

.product-page {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 5vw, 72px) clamp(16px, 5vw, 72px);
}

.product-detail-media {
  display: grid;
  place-items: center;
  min-height: min(620px, 72svh);
  border-radius: 32px;
  background: linear-gradient(145deg, #eef1f5, #ffffff);
  overflow: hidden;
}

.product-detail-media img {
  width: min(100%, 620px);
  aspect-ratio: 1;
  object-fit: contain;
}

.product-detail-info {
  display: grid;
  gap: 16px;
}

.crumb {
  width: fit-content;
  color: var(--muted);
  text-decoration: none;
}

.detail-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-specs span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.detail-price {
  font-size: clamp(30px, 4vw, 46px);
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-page {
  min-height: calc(100svh - 210px);
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 72px);
}

.auth-page .auth-form {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
}

.route-empty,
.empty-state {
  display: grid;
  gap: 14px;
  place-items: start;
  padding: clamp(36px, 6vw, 84px) clamp(16px, 5vw, 72px);
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.footer {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(200px, 1fr) minmax(190px, 1fr) minmax(160px, 0.7fr);
  gap: 24px;
  padding: 34px clamp(16px, 5vw, 72px);
  background: #101216;
  color: white;
}

.footer p {
  color: #aeb5c0;
}

.footer a {
  display: block;
  color: #f2dfce;
  text-decoration: none;
  margin-top: 8px;
  transition: color 0.18s ease, transform 0.18s ease;
}

.footer a:hover {
  color: #f0a966;
  transform: translateX(2px);
}

.footer-brand {
  margin-top: 0 !important;
  font-size: 24px;
  font-weight: 900;
}

.contacts iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 18px;
}

.notice {
  padding: 12px;
  border-radius: 12px;
  background: #ecfdf3;
  color: var(--ok);
}

.error {
  padding: 12px;
  border-radius: 12px;
  background: #fef3f2;
  color: var(--danger);
}

@media (max-width: 920px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .hero,
  .section-head,
  .split-band,
  .contacts,
  .cart-layout,
  .checkout-layout,
  .product-page,
  .form-grid,
  .account-grid,
  .profile-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 40px;
    padding-bottom: 42svh;
    background-position: 60% center;
  }

  .cart-line {
    grid-template-columns: 1fr;
  }

  .contacts {
    margin-bottom: 32px;
  }

  .contact-list {
    grid-template-columns: 1fr;
  }

  .telegram-qr-card {
    grid-template-columns: 150px 1fr;
  }

  .telegram-qr-card img {
    width: 150px;
    height: 150px;
  }

  .cart-summary,
  .checkout-aside {
    position: static;
  }

  .cart-line button {
    width: auto;
  }
}

@media (max-width: 560px) {
  .actions {
    width: 100%;
  }

  .icon-btn,
  .cart-btn {
    flex: 1;
    text-align: center;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .contacts {
    margin-left: 12px;
    margin-right: 12px;
    border-radius: 24px;
  }

  .contacts h2 {
    font-size: clamp(28px, 11vw, 42px);
  }

  .mobile-telegram-link {
    display: flex;
  }

  .telegram-qr-card {
    display: none;
  }

  .contacts iframe {
    min-height: 300px;
  }

  .profile-card {
    align-items: stretch;
    flex-direction: column;
  }
}
