:root {
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.10);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.70);
  --border: rgba(255, 255, 255, 0.12);
  --primary: #6d5efc;
  --primary2: #3dd6ed;
  --danger: #ff4d6d;
  --ok: #20c997;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100%; }

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: transparent;
  color: var(--text);
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(109, 94, 252, 0.35), transparent 60%),
    radial-gradient(900px 700px at 80% 20%, rgba(61, 214, 237, 0.25), transparent 55%),
    radial-gradient(900px 700px at 50% 90%, rgba(32, 201, 151, 0.18), transparent 55%);
  background-repeat: no-repeat;
}

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

.container {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  background: rgba(11, 16, 32, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 10px 22px rgba(109, 94, 252, 0.25);
}

.nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav a {
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 720px) {
  .container {
    width: calc(100% - 24px);
  }

  .topbar-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .nav a {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
  }

  .nav .lang-switcher {
    margin-left: auto;
  }
}

.main {
  padding: 28px 0 44px;
}

.hero {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.15;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumbs a:hover {
  color: var(--text);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
}

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

.product-detail-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.15;
}

.product-detail-price {
  margin-top: 14px;
}

.product-detail-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.product-detail-actions .btn {
  flex: 1 1 160px;
}

.product-detail-related {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-categories {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-category-pill {
  text-decoration: none;
}

@media (max-width: 680px) {
  .catalog-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .catalog-categories::-webkit-scrollbar {
    display: none;
  }
}

.grid {
  display: grid;
  gap: 16px;
}

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

@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .grid-3 { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.product-photo {
  width: 100%;
  height: clamp(220px, 22vw, 320px);
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

.product-gallery {
  position: relative;
}

.product-thumbs {
  display: flex;
  gap: 10px;
  padding: 12px 12px 14px;
  background: rgba(0, 0, 0, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.product-thumbs::-webkit-scrollbar {
  display: none;
}

.product-thumb {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  cursor: pointer;
  flex: 0 0 auto;
  width: 64px;
  height: 44px;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.product-thumb.is-active {
  border-color: rgba(61, 214, 237, 0.65);
  box-shadow: 0 0 0 2px rgba(61, 214, 237, 0.18);
}

.product-photo.is-clickable {
  cursor: pointer;
}

.product-photo-placeholder {
  background:
    radial-gradient(700px 220px at 20% 20%, rgba(109, 94, 252, 0.35), transparent 55%),
    radial-gradient(600px 240px at 80% 10%, rgba(61, 214, 237, 0.25), transparent 55%),
    rgba(0, 0, 0, 0.22);
}

.card-body {
  padding: 16px;
}

.card-title {
  font-weight: 650;
  font-size: 18px;
  margin: 0 0 6px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 12px;
}

.pill-active {
  border-color: rgba(109, 94, 252, 0.65);
  background: rgba(109, 94, 252, 0.14);
  color: var(--text);
}

.price-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 12px;
}

.price {
  font-size: 16px;
  font-weight: 650;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.btn:hover { background: rgba(255, 255, 255, 0.10); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 12px 26px rgba(109, 94, 252, 0.22);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-danger {
  background: rgba(255, 77, 109, 0.12);
  border-color: rgba(255, 77, 109, 0.35);
}

.form {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
}

label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
label.field-error { color: rgba(255, 120, 120, 0.95); }
input:not([type=checkbox]):not([type=radio]), textarea, select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  outline: none;
}
textarea { min-height: 96px; resize: vertical; }
input:not([type=checkbox]):not([type=radio]):focus, textarea:focus, select:focus { border-color: rgba(109, 94, 252, 0.65); box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.14); }
label.field-error input:not([type=checkbox]):not([type=radio]),
label.field-error textarea,
label.field-error select {
  border-color: rgba(255, 120, 120, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 120, 120, 0.12);
}
.field-error-text {
  font-size: 12px;
  color: rgba(255, 130, 130, 0.95);
}

input[type=checkbox], input[type=radio] {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  accent-color: var(--primary);
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
}

label.option {
  position: relative;
  display: block;
  cursor: pointer;
  user-select: none;
  color: var(--text);
}

label.option > input[type=checkbox],
label.option > input[type=radio] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.option-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 12px 58px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

label.option .option-body::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

label.option input:checked + .option-body::before {
  border-color: rgba(109, 94, 252, 0.75);
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.85), rgba(61, 214, 237, 0.75));
  box-shadow: 0 10px 24px rgba(109, 94, 252, 0.18);
}

label.option input:checked + .option-body::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 50%;
  width: 7px;
  height: 12px;
  transform: translateY(-55%) rotate(45deg);
  border-right: 3px solid rgba(255, 255, 255, 0.95);
  border-bottom: 3px solid rgba(255, 255, 255, 0.95);
}

label.option:hover .option-body {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

label.option input:checked + .option-body {
  border-color: rgba(109, 94, 252, 0.65);
  background: rgba(109, 94, 252, 0.14);
}

label.option input:focus-visible + .option-body {
  border-color: rgba(109, 94, 252, 0.70);
  box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.16);
}

.option-title {
  font-weight: 650;
  line-height: 1.2;
}

.option-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 77, 109, 0.35);
  background: rgba(255, 77, 109, 0.10);
  color: rgba(255, 255, 255, 0.90);
}

.alert-success {
  border-color: rgba(46, 204, 113, 0.35);
  background: rgba(46, 204, 113, 0.10);
}

.alert-warning {
  border-color: rgba(241, 196, 15, 0.35);
  background: rgba(241, 196, 15, 0.10);
}

.alert-info {
  border-color: rgba(91, 139, 245, 0.45);
  background: rgba(91, 139, 245, 0.12);
}

.steps {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 700;
}
.step.active {
  border-color: rgba(109, 94, 252, 0.6);
  background: rgba(109, 94, 252, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

.split {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
}

.summary {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 16px;
  position: sticky;
  top: 90px;
}

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

.kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.kv:last-child { border-bottom: 0; }

.footer {
  padding: 20px 0 36px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.footer a {
  color: rgba(255, 255, 255, 0.70);
}

.footer a:hover {
  color: rgba(255, 255, 255, 0.92);
}

.prose {
  line-height: 1.6;
}

.prose h2 {
  margin: 18px 0 10px;
  font-size: 18px;
}

.prose p {
  margin: 10px 0;
}

.prose ul {
  margin: 10px 0 10px 18px;
  color: rgba(255, 255, 255, 0.82);
}

.prose li {
  margin: 6px 0;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
