@import url("https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;800&family=Manrope:wght@400;600;700&display=swap");

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --text: #f5f5f5;
  --muted: #bfbfbf;
  --accent: #ffd400;
  --accent-dark: #c7a600;
  --card: #151515;
  --border: #2b2b2b;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --topbar-offset: 104px;
}

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

html,
body {
  height: 100%;
  margin: 0;
}

body.theme {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 600px at 80% 10%, rgba(255, 212, 0, 0.12), transparent 60%),
    radial-gradient(800px 500px at 20% 80%, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  padding-top: var(--topbar-offset);
}

main {
  flex: 1 0 auto;
}

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

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 10, 0.8);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Unbounded", sans-serif;
  text-transform: uppercase;
}

.brand__mark {
  background: var(--accent);
  color: #000;
  padding: 8px 10px;
  font-weight: 800;
  border-radius: 8px;
}

.brand__text {
  font-weight: 600;
  letter-spacing: 1px;
}

.brand--compact .brand__mark {
  padding: 6px 8px;
}

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

.nav__link {
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.nav__link.is-active,
.nav__link:hover {
  color: var(--text);
  border-color: var(--accent);
}

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

.btn {
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Manrope", sans-serif;
}

.btn--primary {
  background: var(--accent);
  color: #000;
}

.btn--primary:hover {
  background: var(--accent-dark);
}

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn--primary:disabled,
.btn--primary[disabled] {
  background: #666;
  border-color: #666;
  color: #efefef;
}

.btn--cart {
  position: relative;
  min-width: 150px;
  padding-left: 24px;
  padding-right: 24px;
  justify-content: center;
  text-align: center;
}

.btn--cart > span[data-i18n="nav_cart"] {
  display: inline-block;
  min-width: 100%;
  text-align: center;
}

.top-cart-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #000;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-weight: 700;
}

.btn--outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn--outline:hover {
  background: rgba(255, 212, 0, 0.1);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.badge {
  background: var(--accent);
  color: #000;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  margin-left: 6px;
}

.hero {
  padding: 64px 0 40px;
}

.hero__inner {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.hero__content h1 {
  font-size: clamp(2.2rem, 3.8vw, 3.6rem);
  margin: 10px 0 16px;
  font-family: "Unbounded", sans-serif;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__card {
  background: var(--card);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  width: min(420px, 100%);
}

.hero__badge {
  background: rgba(255, 212, 0, 0.15);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-block;
  font-weight: 600;
}

.hero__list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.hero__list li {
  padding-left: 18px;
  position: relative;
}

.hero__list li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0 !important;
}

.section {
  padding: 48px 0;
  padding-bottom: 48px;
}

.section--dark {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__head {
  margin-bottom: 24px;
}

.section__head h1,
.section__head h2 {
  font-family: "Unbounded", sans-serif;
}

.section__head p {
  color: var(--muted);
}

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

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#catalog-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.feature,
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.feature h3 {
  margin-top: 0;
}

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

.step {
  display: flex;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.step__num {
  font-family: "Unbounded", sans-serif;
  font-size: 1.4rem;
  color: var(--accent);
}

.section--cta {
  background: linear-gradient(120deg, rgba(255, 212, 0, 0.12), rgba(255, 255, 255, 0.02));
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

.chip {
  border: 1px solid var(--border);
  background: transparent;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}

.chip.is-active,
.chip:hover {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
}

.sort select,
.admin-item input,
.admin-item textarea,
.admin-item select,
.card input,
.card textarea {
  background: #0f0f0f;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
}

.catalog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: var(--shadow);
}

.catalog-image {
  position: relative;
  height: clamp(220px, 26vw, 320px);
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  text-align: center;
  padding: 0;
}

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

.catalog-image__placeholder-text {
  display: block;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.35;
  padding: 0 16px;
  max-width: 90%;
}

.catalog-body {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
}

.price-value {
  font-size: 1.12rem;
  color: var(--text);
}

.stock-label {
  color: var(--accent);
  font-size: 0.55em;
  font-weight: 700;
  text-align: right;
}

.catalog-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.qty-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
}

.qty-btn:disabled {
  color: var(--muted);
  opacity: 0.5;
  cursor: not-allowed;
}

.qty-value {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
}

.contacts {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.map-card {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.map-placeholder {
  color: var(--muted);
  text-align: center;
}

.contact-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.admin-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

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

.admin-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--card);
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-row--media {
  align-items: start;
}

.admin-upload {
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-upload input[type="file"] {
  width: 100%;
  max-width: 100%;
}

.admin-upload-path {
  background: #0f0f0f;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  width: 100%;
}

.status {
  color: var(--muted);
}

.status--error {
  color: #ff7d7d;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

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

.order-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--card);
}

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

.auth-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-register-link {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  width: fit-content;
}

.auth-register-link:hover {
  text-decoration: underline;
}

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

.cart-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cart-qty button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.cart-summary {
  margin-top: 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cart-total-value {
  display: inline-grid;
  gap: 4px;
}

.cart-total-old {
  color: var(--accent);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: 0.95;
}

.cart-total-new {
  color: var(--text);
  font-weight: 700;
}

.cart-total-note {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 4px;
}

.hidden {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: all 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Flags */
.flag {
  width: 18px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
  margin-right: 6px;
  background-color: #1a1a1a;
  overflow: hidden;
}

.flag--ru {
  background: linear-gradient(#ffffff 0 33%, #0057b7 33% 66%, #d52b1e 66% 100%);
}

.flag--en {
  background-image: url("/assets/img/flag-en.svg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.footer {
  display: none !important;
}

@media (max-width: 760px) {
  .container {
    width: 94vw;
  }

  .topbar__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

  .nav {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .topbar__actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

  .catalog-image {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .catalog-image img {
    object-fit: contain;
  }

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

  .product-gallery__img,
  .product-gallery__placeholder {
    width: 100%;
    min-height: unset;
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .catalog-actions,
  .product-main__actions {
    width: 100%;
    justify-content: space-between;
  }
}

.catalog-title-link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.catalog-title-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.product-main h3,
.product-specs h3 {
  margin-top: 0;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.product-gallery__img {
  width: 100%;
  height: clamp(280px, 34vw, 520px);
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f0f0f;
  cursor: zoom-in;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-gallery__img:hover {
  transform: scale(1.01);
  border-color: var(--accent);
}

.product-gallery__placeholder {
  min-height: clamp(280px, 34vw, 520px);
  border: 1px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.product-gallery__hint {
  margin: 10px 2px 0;
}

.product-specs__text {
  white-space: pre-wrap;
  margin: 0;
  color: var(--text);
  font-family: inherit;
}

@media (max-width: 1200px) {
  #catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

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

@media (max-width: 640px) {
  #catalog-grid {
    grid-template-columns: 1fr;
  }
}

.product-main__actions {
  margin: 12px 0 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.center-notice {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  color: var(--accent);
  font-size: clamp(18px, 2.8vw, 32px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  user-select: none;
}

.product-zoom {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.product-zoom.is-open {
  opacity: 1;
  pointer-events: auto;
}

.product-zoom__dialog {
  width: min(94vw, 1280px);
  max-height: 94vh;
  display: grid;
  gap: 10px;
}

.product-zoom__toolbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.product-zoom__btn {
  min-width: 54px;
}

.product-zoom__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #070707;
  padding: 16px;
  touch-action: none;
}

.product-zoom__frame.is-draggable {
  cursor: grab;
}

.product-zoom__frame.is-dragging {
  cursor: grabbing;
}

.product-zoom__img {
  max-width: 100%;
  max-height: calc(94vh - 90px);
  transform-origin: center center;
  transition: transform 0.08s ease-out;
  user-select: none;
  pointer-events: none;
}
