:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #111827;
  --muted: #6b7280;
  --line: #dfe5ef;
  --primary: #1677ff;
  --primary-dark: #0f172a;
  --button: #1677ff;
  --button-text: #ffffff;
  --danger: #d92d20;
  --success: #12b76a;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 26px;
  --radius-sm: 18px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: "Aptos", "Manrope", "SF Pro Display", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(22, 119, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(15, 23, 42, 0.09), transparent 24rem),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 42%, #f8fafc 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.shell {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 18px 18px 42px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 18px;
  background: linear-gradient(180deg, rgba(245, 247, 251, 0.96), rgba(245, 247, 251, 0.72));
  backdrop-filter: blur(22px);
}

.brand,
.cart-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(223, 229, 239, 0.92);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.brand {
  min-width: 0;
  gap: 12px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--primary), #5aa7ff);
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  max-width: 280px;
  font-size: 15px;
}

.brand small {
  max-width: 280px;
  color: var(--muted);
  font-size: 12px;
}

.cart-button {
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
}

.cart-button strong,
.mobile-nav span {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-dark);
  color: #fff;
  font-size: 13px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  gap: 24px;
  min-height: 380px;
  overflow: hidden;
  padding: clamp(24px, 5vw, 58px);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 245, 255, 0.82)),
    radial-gradient(circle at 74% 34%, rgba(22, 119, 255, 0.26), transparent 20rem);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -8% -34% 42%;
  height: 74%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(22, 119, 255, 0.22), rgba(17, 24, 39, 0.08));
  filter: blur(8px);
  transform: rotate(-8deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.92;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: #475467;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.hero-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 680px;
  margin-top: 8px;
}

.search {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.search input,
.comment-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.search input {
  height: 58px;
  padding: 0 18px;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.search input:focus,
.comment-box textarea:focus {
  border-color: rgba(22, 119, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

.ghost-button,
.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: 18px;
  font-weight: 900;
}

.ghost-button {
  padding: 0 20px;
  border: 1px solid rgba(22, 119, 255, 0.18);
  background: rgba(22, 119, 255, 0.08);
  color: var(--primary);
}

.hero-stage {
  position: relative;
  z-index: 1;
  min-height: 300px;
}

.device-card {
  position: absolute;
  display: grid;
  place-items: end center;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(232, 239, 249, 0.72)),
    radial-gradient(circle at 50% 20%, rgba(22, 119, 255, 0.2), transparent 10rem);
  box-shadow: var(--shadow);
}

.device-card span {
  position: absolute;
  inset: 26px 42px 62px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, #111827, #344054),
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.32), transparent 5rem);
}

.device-card strong {
  position: relative;
  z-index: 1;
  color: #344054;
  font-size: 14px;
}

.device-main {
  right: 7%;
  bottom: 4%;
  width: min(270px, 62%);
  height: 330px;
  transform: rotate(7deg);
}

.device-small {
  left: 3%;
  top: 13%;
  width: 160px;
  height: 210px;
  transform: rotate(-8deg);
}

.device-small span {
  inset: 34px 40px 76px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 45%, #1677ff, #0f172a 68%);
}

.hero-price {
  position: absolute;
  right: 0;
  top: 14%;
  display: grid;
  gap: 4px;
  max-width: 210px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.hero-price small {
  color: var(--muted);
}

.hero-price b {
  color: var(--primary-dark);
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.benefits article {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
}

.benefits strong {
  font-size: 15px;
}

.benefits span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 106px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
}

.rail-title {
  display: grid;
  gap: 3px;
}

.rail-title strong {
  font-size: 18px;
}

.rail-title span {
  color: var(--muted);
  font-size: 12px;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.category-button.active,
.category-button:hover {
  border-color: rgba(22, 119, 255, 0.2);
  background: rgba(22, 119, 255, 0.1);
  color: var(--primary);
}

.category-button span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-button span:last-child {
  color: currentColor;
  opacity: 0.62;
  font-weight: 800;
}

.content {
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

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

.status.error {
  color: var(--danger);
}

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

.product-card {
  position: relative;
  display: grid;
  min-height: 300px;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(223, 229, 239, 0.94);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  text-align: left;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 119, 255, 0.34);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
}

.product-visual {
  display: grid;
  min-height: 132px;
  place-items: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.84), transparent 5rem),
    linear-gradient(145deg, #eff6ff, #dbeafe 48%, #f8fafc);
  color: var(--primary);
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.product-category {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-card strong {
  font-size: 21px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-meta em {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #475467;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.price-row {
  align-self: end;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.price-row b {
  color: var(--primary-dark);
  font-size: 16px;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.drawer.open {
  display: flex;
}

.drawer-panel {
  width: min(720px, 100%);
  height: 100%;
  overflow: auto;
  padding: 30px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.close-button {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 24px;
}

.product-head {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin: 46px 0 20px;
}

.product-image {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 24%, rgba(22, 119, 255, 0.25), transparent 8rem),
    linear-gradient(145deg, #ffffff, #dbeafe);
  color: var(--primary);
  font-size: 42px;
  font-weight: 950;
  box-shadow: var(--soft-shadow);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.product-sections,
.variants,
.cart-list {
  display: grid;
  gap: 10px;
}

.product-sections {
  margin-bottom: 16px;
}

.info-section,
.variant,
.cart-item,
.empty {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
}

.info-section {
  padding: 16px;
}

.info-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.spec-list,
.info-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.spec-list div,
.info-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.spec-list dt,
.info-item span,
.variant small,
.cart-item small,
.hint {
  color: var(--muted);
}

.spec-list dt,
.info-item span {
  font-size: 12px;
}

.spec-list dd {
  margin: 0;
  font-weight: 900;
}

.info-item em {
  color: var(--primary);
  font-style: normal;
  font-weight: 900;
}

.variant,
.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.variant p,
.cart-item p {
  margin: 0;
  font-weight: 850;
}

.add-button,
.remove-button {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  font-weight: 900;
}

.add-button {
  padding: 0 14px;
  background: var(--button);
  color: var(--button-text);
}

.remove-button {
  width: 40px;
  background: rgba(217, 45, 32, 0.1);
  color: var(--danger);
}

.cart-panel {
  width: min(540px, 100%);
}

.comment-box {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.comment-box textarea {
  resize: vertical;
  padding: 14px;
  border-radius: 18px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.cart-total strong {
  font-size: 30px;
  letter-spacing: -0.05em;
}

.primary-button {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, var(--primary), #0057d9);
  color: #fff;
  box-shadow: 0 16px 34px rgba(22, 119, 255, 0.24);
}

.secondary-button {
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(22, 119, 255, 0.22);
  background: rgba(22, 119, 255, 0.08);
  color: var(--primary);
}

.document-panel {
  width: min(780px, 100%);
}

.document-body {
  overflow: auto;
  min-height: 70vh;
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.empty {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.footer-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 4px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-docs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
}

.mobile-nav {
  position: fixed;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 14px;
  z-index: 35;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(223, 229, 239, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.mobile-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  font-weight: 850;
}

.mobile-nav button:hover {
  background: var(--surface-2);
}

.admin-shell {
  width: min(1180px, 100%);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
  align-items: start;
}

.admin-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--soft-shadow);
}

.admin-panel h1 {
  color: var(--primary-dark);
  font-size: clamp(36px, 6vw, 58px);
}

.admin-lead {
  max-width: 640px;
  color: var(--muted);
}

.admin-results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.admin-result {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.admin-result:hover {
  border-color: var(--primary);
}

.admin-result span {
  color: var(--muted);
  font-size: 12px;
}

.editor-panel {
  position: sticky;
  top: 88px;
}

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

  .hero-stage {
    min-height: 250px;
  }

  .layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .rail,
  .editor-panel {
    position: static;
  }

  .category-list {
    display: flex;
    overflow: auto;
    padding-bottom: 4px;
  }

  .category-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 156px;
  }

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

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

@media (max-width: 620px) {
  .shell {
    padding: 12px 12px 92px;
  }

  .topbar {
    padding-top: 6px;
  }

  .brand {
    max-width: calc(100vw - 106px);
  }

  .brand strong,
  .brand small {
    max-width: calc(100vw - 178px);
  }

  .cart-button span {
    display: none;
  }

  .hero {
    min-height: 0;
    padding: 24px;
    border-radius: 30px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    display: none;
  }

  h1 {
    font-size: 48px;
  }

  .section-head {
    display: grid;
  }

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

  .product-card {
    min-height: 270px;
  }

  .drawer-panel {
    padding: 22px 16px 92px;
  }

  .product-head {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .product-image {
    max-height: 240px;
  }

  .variant,
  .cart-item {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
