:root {
  --ink: #f3f7f6;
  --muted: #9fb0b4;
  --navy: #050d11;
  --panel: #0b171c;
  --panel-2: #10232a;
  --line: rgba(136, 182, 190, .2);
  --teal: #38d4c5;
  --teal-soft: #83eee2;
  --gold: #efb85a;
  --danger: #ff7b7b;
  --radius: 22px;
  --shadow: 0 26px 70px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html { background: var(--navy); color: var(--ink); font-family: Manrope, "Segoe UI", sans-serif; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 9% 0%, rgba(56, 212, 197, .1), transparent 30rem),
    radial-gradient(circle at 92% 34%, rgba(239, 184, 90, .05), transparent 34rem),
    linear-gradient(180deg, #050d11, #071318 52%, #040b0f);
}
a { color: inherit; }
button, input, select { font: inherit; }

.store-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 12px clamp(20px, 5vw, 80px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(5, 13, 17, .82);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--teal);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 24px rgba(56, 212, 197, .08), 0 0 20px rgba(56, 212, 197, .08);
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 13px; letter-spacing: .18em; }
.brand-copy small { color: #70858b; font-size: 9px; letter-spacing: .22em; }
.store-header nav { display: flex; gap: clamp(14px, 2.4vw, 30px); align-items: center; }
.store-header nav a { color: #c6d3d6; font-size: 13px; font-weight: 700; text-decoration: none; transition: color .2s ease; }
.store-header nav a:hover { color: var(--teal-soft); }
.cart-link span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 5px;
  border-radius: 99px;
  background: var(--teal);
  color: #04201d;
  font-size: 11px;
}

main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 104px; }
.eyebrow { margin: 0 0 14px; color: var(--teal); font-size: 11px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.lead { max-width: 740px; color: #b8c7ca; font-size: 18px; line-height: 1.72; }

.store-hero {
  min-height: 610px;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  margin: -24px 0 70px;
  padding: clamp(34px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #071317;
  box-shadow: var(--shadow);
}
.store-hero-media, .store-hero-media video, .store-hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.store-hero-media video { object-fit: cover; opacity: .72; }
.store-hero-shade {
  background:
    linear-gradient(90deg, rgba(3, 9, 12, .96) 0%, rgba(3, 9, 12, .72) 46%, rgba(3, 9, 12, .16) 82%),
    linear-gradient(0deg, rgba(3, 9, 12, .92), transparent 55%);
}
.store-hero-content, .hero-copy { width: min(690px, 63%); position: relative; z-index: 2; }
.store-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(45px, 6.5vw, 82px);
  line-height: .95;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.store-hero-content > p:not(.eyebrow), .hero-copy > p:not(.eyebrow) { max-width: 610px; color: #becbce; font-size: 17px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-stats { display: flex; gap: 34px; margin-top: 42px; }
.hero-stats span { display: grid; gap: 3px; }
.hero-stats b { color: var(--teal-soft); font-size: 21px; }
.hero-stats span { color: #83969b; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hero-constellation { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-orbit { position: absolute; right: 8%; top: 16%; width: 330px; height: 330px; border: 1px solid rgba(56, 212, 197, .16); border-radius: 50%; }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; inset: 17%; border: 1px solid rgba(255, 255, 255, .1); border-radius: 50%; }
.hero-orbit::after { inset: 38%; background: rgba(56, 212, 197, .08); box-shadow: 0 0 60px rgba(56, 212, 197, .12); }
.hero-product-icon {
  position: absolute;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding: 14px;
  border: 1px solid rgba(131, 238, 226, .28);
  border-radius: 22px;
  background: rgba(8, 24, 29, .82);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .38);
  backdrop-filter: blur(10px);
}
.hero-product-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.4)); }
.hero-product-icon.icon-hitch { right: 25%; top: 10%; }
.hero-product-icon.icon-queue { right: 5%; top: 39%; }
.hero-product-icon.icon-pft { right: 27%; top: 68%; }
.signal-label { position: absolute; right: 7%; bottom: 8%; color: rgba(192, 228, 226, .54); font-size: 9px; font-weight: 900; letter-spacing: .18em; line-height: 1.6; text-align: right; }

.catalog-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: end; margin-bottom: 30px; }
.catalog-intro h2 { max-width: 650px; margin: 0; font-size: clamp(34px, 4.5vw, 58px); line-height: 1.02; letter-spacing: -.045em; }
.catalog-intro p:last-child { margin: 0 0 4px; color: var(--muted); line-height: 1.7; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0 28px; border-top: 1px solid var(--line); }
.catalog-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.catalog-count strong { color: var(--ink); }
.catalog-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter-button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(13, 30, 36, .75);
  color: #98aaae;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: .2s ease;
}
.filter-button:hover, .filter-button.is-active { border-color: var(--teal); background: rgba(56, 212, 197, .12); color: var(--teal-soft); }

.catalog-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: 22px; }
.product-card {
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(16, 37, 44, .96), rgba(7, 19, 24, .98));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
.product-card.featured { grid-column: span 6; }
.product-card[hidden] { display: none; }
.product-card:hover { transform: translateY(-5px); border-color: rgba(56, 212, 197, .5); box-shadow: 0 28px 68px rgba(0, 0, 0, .34); }
.product-visual {
  height: 225px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(rgba(4, 13, 17, .1), rgba(4, 13, 17, .76)), var(--hero);
  background-position: center;
  background-size: cover;
  text-decoration: none;
}
.featured .product-visual { height: 285px; }
.product-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, transparent 36%, rgba(56, 212, 197, .17));
  transition: opacity .25s ease, transform .5s ease;
}
.product-card:hover .product-visual::before { transform: scale(1.06); }
.product-visual::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 34px;
  height: 1px;
  background: var(--teal);
  box-shadow: 0 5px 0 rgba(56, 212, 197, .5);
}
.product-visual img {
  width: 96px;
  height: 96px;
  position: relative;
  z-index: 1;
  object-fit: contain;
  filter: drop-shadow(0 14px 25px rgba(0, 0, 0, .65));
  transition: transform .3s ease;
}
.featured .product-visual img { width: 122px; height: 122px; }
.product-card:hover .product-visual img { transform: scale(1.06); }
.product-card-body { padding: 25px; }
.product-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.platform-tag { color: #7f9297; }
.product-card h2 { margin: 11px 0 10px; font-size: clamp(23px, 2.2vw, 30px); letter-spacing: -.025em; }
.product-card h2 a { text-decoration: none; }
.product-card p { min-height: 76px; margin-bottom: 0; color: #aebec2; font-size: 14px; line-height: 1.66; }
.product-card-foot { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.product-card-foot strong { display: block; font-size: 20px; }
.product-card-foot small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.status-chip { display: inline-block; margin-top: 16px; padding: 6px 9px; border-radius: 6px; background: #20343c; color: #bdcbd0; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.status-chip.app-store { background: #173a35; color: #89dfd2; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font: 800 12px Manrope, sans-serif; text-decoration: none; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--teal); color: #05201d; box-shadow: 0 8px 24px rgba(56, 212, 197, .15); }
.button.primary:hover { background: var(--teal-soft); }
.button.secondary { border-color: #36525c; background: rgba(18, 39, 47, .82); color: #d8e5e8; }
.button.secondary:hover { border-color: var(--teal); }
.button.disabled { background: #27373d; color: #839399; cursor: not-allowed; }
.button.wide { width: 100%; min-height: 50px; }

.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 28px; color: var(--muted); text-decoration: none; font-size: 13px; }
.back-link:hover { color: var(--teal); }
.product-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); gap: clamp(36px, 6vw, 76px); align-items: start; }
.detail-visual {
  min-height: 620px;
  position: sticky;
  top: 104px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background-image: linear-gradient(rgba(5, 15, 20, .08), rgba(5, 15, 20, .7)), var(--hero);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}
.detail-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 45%, rgba(56, 212, 197, .17)); }
.detail-visual img { width: 190px; height: 190px; position: relative; z-index: 2; object-fit: contain; filter: drop-shadow(0 20px 32px #000); }
.detail-watermark { position: absolute; right: -12px; bottom: 18px; z-index: 1; color: rgba(255,255,255,.08); font-size: clamp(52px, 8vw, 100px); font-weight: 900; letter-spacing: -.06em; white-space: nowrap; }
.detail-copy { padding-top: 18px; }
.detail-copy h1, .narrow h1, .auth-shell h1, .account-head h1, .downloads h1 { margin: 0 0 22px; font-size: clamp(40px, 5.6vw, 68px); line-height: 1; letter-spacing: -.05em; }
.detail-copy .lead { font-size: 17px; }
.buy-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 25px 0 10px; padding: 22px 0; border-block: 1px solid var(--line); }
.buy-panel strong { display: block; font-size: 28px; }
.buy-panel span { display: block; color: var(--muted); font-size: 11px; }
.availability { color: var(--gold); font-size: 11px; }
.detail-copy h2 { margin-top: 34px; }
.detail-copy ul { padding-left: 20px; color: #bdcbd0; line-height: 2; }
.delivery-note { margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.delivery-note p { margin: 5px 0 0; color: var(--muted); line-height: 1.6; }
.channel-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.channel-actions a { max-width: 210px; }
.channel-actions img { display: block; max-width: 180px; max-height: 54px; object-fit: contain; }
.channel-pending { color: var(--gold) !important; font-size: 10px !important; }

.narrow { width: min(780px, 100%); margin: 0 auto; }
.empty-state, .checkout-hold { padding: 46px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); text-align: center; }
.empty-state h2, .checkout-hold h2 { margin-top: 0; }
.empty-state p, .checkout-hold p, .muted { color: var(--muted); line-height: 1.7; }
.cart-list { border-top: 1px solid var(--line); }
.cart-row { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 18px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-row img { width: 56px; height: 56px; object-fit: contain; }
.cart-row span { display: block; color: var(--muted); font-size: 11px; }
.text-button { border: 0; background: none; color: #aebdc2; cursor: pointer; text-decoration: underline; }
.cart-total { display: flex; justify-content: space-between; padding: 28px 0; font-size: 23px; }

.auth-shell { display: grid; grid-template-columns: 1fr 440px; gap: 80px; align-items: start; }
.auth-shell h1 { font-size: 56px; }
.auth-shell > div > p:last-child { color: var(--muted); font-size: 17px; line-height: 1.7; }
.auth-card, .account-panel { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.auth-card { padding: 30px; }
.auth-card label { display: block; margin-bottom: 18px; color: #c9d5d8; font-size: 11px; font-weight: 800; }
.auth-card input, .admin-form input, .admin-form select { width: 100%; display: block; margin-top: 7px; padding: 13px; border: 1px solid #33515c; border-radius: 8px; background: #08171d; color: white; }
.switch { color: var(--muted); font-size: 11px; text-align: center; }
.switch a { color: var(--teal); }
.account-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.account-head h1 { margin-bottom: 8px; font-size: 48px; }
.account-head p:last-child { color: var(--muted); }
.account-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.account-panel { padding: 25px; }
.account-panel h2 { margin-top: 0; }
.license-card { display: grid; gap: 13px; padding: 18px 0; border-top: 1px solid var(--line); }
.license-card span { display: block; color: var(--muted); font-size: 10px; }
.license-card code { overflow-wrap: anywhere; padding: 10px; border-radius: 6px; background: #071318; color: var(--gold); }
.order-row, .release-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line); text-decoration: none; }
.order-row small, .release-row small { display: block; margin-top: 4px; color: var(--muted); }
.checkout-summary { margin-top: 25px; border-top: 1px solid var(--line); }
.checkout-summary > div { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--line); }
.checkout-summary .total { font-size: 21px; }
.flash { max-width: 800px; margin: 0 auto 18px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.flash.success { border-color: #2f796e; }
.flash.error { border-color: #8e3f45; }
.flash.notice { border-color: #806a3e; }
.downloads { padding-top: 30px; }
.release-row { margin: 10px 0; padding: 19px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.release-row b { color: var(--teal); }
.verification-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -8px 0 24px; padding: 14px 18px; border: 1px solid #6d5929; border-radius: 9px; background: #2f2816; color: #f1d58d; }
.admin-metrics { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 11px; }
.admin-metrics b { margin-right: 4px; color: var(--ink); font-size: 20px; }
.admin-check { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.admin-check span, .admin-check small { display: block; }
.admin-check small { margin-top: 3px; color: var(--muted); }
.admin-form label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 11px; }
.admin-section { margin-top: 24px; }

footer { width: min(1240px, calc(100% - 40px)); display: flex; justify-content: space-between; gap: 30px; margin: 0 auto; padding: 38px 0 55px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer strong, footer span { display: block; }
footer strong { margin-bottom: 5px; color: var(--ink); letter-spacing: .1em; }
footer > div:last-child { display: flex; flex-wrap: wrap; gap: 25px; }
footer a { text-decoration: none; }

.invoice-body { background: white; color: #17242a; }
.invoice { width: 800px; max-width: calc(100% - 40px); margin: 40px auto; }
.invoice header { display: flex; justify-content: space-between; padding-bottom: 20px; border-bottom: 3px solid #17242a; }
.invoice header span { display: block; color: #627078; }
.invoice header h1 { margin: 0; }
.invoice-meta { display: flex; justify-content: space-between; margin: 35px 0; }
.invoice-meta span, .invoice-meta b { display: block; }
.invoice table { width: 100%; border-collapse: collapse; }
.invoice th, .invoice td { padding: 14px; border-bottom: 1px solid #cbd3d6; text-align: left; }
.invoice th:last-child, .invoice td:last-child { text-align: right; }
.invoice-actions { display: flex; gap: 20px; margin-top: 30px; }

@media (max-width: 980px) {
  .store-hero-content, .hero-copy { width: 75%; }
  .hero-constellation { opacity: .58; }
  .catalog-intro { grid-template-columns: 1fr; gap: 18px; }
  .product-card, .product-card.featured { grid-column: span 6; }
  .featured .product-visual, .product-visual { height: 240px; }
  .product-detail { grid-template-columns: 1fr; }
  .detail-visual { min-height: 500px; position: relative; top: auto; }
}

@media (max-width: 720px) {
  .store-header { align-items: flex-start; padding: 14px 20px; }
  .brand-copy { display: none; }
  .store-header nav { justify-content: flex-end; gap: 13px; }
  main { width: min(100% - 28px, 1240px); padding-top: 36px; }
  .store-hero { min-height: 590px; margin-top: -10px; margin-bottom: 52px; padding: 30px 24px; border-radius: 22px; }
  .store-hero-media video { opacity: .48; }
  .store-hero-shade { background: linear-gradient(0deg, rgba(3,9,12,.98) 0%, rgba(3,9,12,.7) 70%, rgba(3,9,12,.2)); }
  .store-hero-content, .hero-copy { width: 100%; }
  .store-hero h1 { font-size: clamp(42px, 13vw, 62px); }
  .hero-stats { gap: 20px; }
  .hero-constellation { display: none; }
  .catalog-toolbar { align-items: flex-start; flex-direction: column; }
  .catalog-filters { justify-content: flex-start; }
  .product-card, .product-card.featured { grid-column: span 12; }
  .featured .product-visual, .product-visual { height: 235px; }
  .product-card p { min-height: 0; }
  .auth-shell, .account-grid { grid-template-columns: 1fr; gap: 32px; }
  .detail-visual { min-height: 390px; }
  .detail-visual img { width: 145px; height: 145px; }
  .account-head { align-items: flex-start; }
  .cart-row { grid-template-columns: 50px 1fr auto; }
  .cart-row form { grid-column: 2; }
  footer { flex-direction: column; }
}

@media (max-width: 480px) {
  .store-header nav a:not(.cart-link) { font-size: 11px; }
  .store-header nav { gap: 10px; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .hero-stats strong { font-size: 18px; }
  .hero-actions .button { flex: 1; }
  .product-card-foot, .buy-panel { align-items: stretch; flex-direction: column; }
  .product-card-foot .button, .buy-panel .button { width: 100%; }
  .channel-actions { align-items: flex-start; }
  .empty-state, .checkout-hold { padding: 30px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .store-hero video { display: none; }
}

@media print {
  .invoice-actions { display: none; }
  .invoice { margin: 0; }
  .invoice-body { background: white; }
}
