/* Axis Box Shop — standalone (как в приложении) */
:root {
  --primary: #00ffaa;
  --secondary: #0066ff;
  --bg: #121212;
  --bg2: #0a0a0a;
  --surface: #1a1a1a;
  --surface2: #222;
  --text: #f5f5f5;
  --muted: #aaa;
  --danger: #ff4d6d;
  --border: rgba(255, 255, 255, 0.08);
  --on-primary: #04150f;
  --header-h: 72px;
  --font: "Montserrat", "Noto Sans Armenian", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body.shop-body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Header */
.shop-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.shop-topbar-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.shop-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  flex: 1 1 0;
  min-width: 0;
  margin-right: 0;
  z-index: 2;
  justify-content: flex-start;
}

.shop-logo .brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.shop-logo span span {
  color: var(--primary);
}

.shop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: static;
  left: auto;
  transform: none;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 0 0 auto;
  max-width: none;
  z-index: 1;
}

.shop-nav::-webkit-scrollbar {
  display: none;
}

.shop-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.shop-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.shop-nav a.active,
.shop-nav a:focus-visible {
  color: var(--primary);
  background: rgba(0, 255, 170, 0.12);
  border-color: rgba(0, 255, 170, 0.45);
  outline: none;
}

.lang-pills {
  display: flex;
  gap: 6px;
  flex: none;
  margin-left: 0;
  z-index: 2;
  justify-content: flex-end;
  align-items: center;
}

.shop-top-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  z-index: 2;
}

.lang-pills a {
  width: 42px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-pills a:hover,
.lang-pills a.active {
  border-color: rgba(0, 255, 170, 0.45);
  color: var(--primary);
  background: rgba(0, 255, 170, 0.12);
}

.cart-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: var(--on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Shell */
.shop-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 14px 80px;
}

.shop-hero {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 16px;
  padding: 18px 16px 16px;
}

.shop-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.shop-brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.shop-brand em {
  font-style: normal;
  color: var(--primary);
}

.shop-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.search-row {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.search-row .search-icon {
  display: flex;
  align-items: center;
  padding-left: 12px;
  color: var(--muted);
}

.search-row input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 8px;
  min-width: 0;
}

.search-row input::placeholder {
  color: var(--muted);
}

.search-row .search-btn {
  border: 0;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
  font-size: 13px;
  padding: 0 16px;
  cursor: pointer;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.chip.active {
  background: rgba(0, 255, 170, 0.12);
  border-color: rgba(0, 255, 170, 0.45);
  color: var(--primary);
}

.shop-section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 14px 0 12px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 720px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 980px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 170, 0.28);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg2);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 800;
  font-size: 22px;
  background: var(--bg2);
}

.sale-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
  padding: 3px 7px;
}

.product-info {
  padding: 10px;
}

.product-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  margin-top: 6px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
}

.product-price .old-price {
  display: block;
  text-decoration: line-through;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.shop-empty,
.shop-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 48px 20px;
}

/* Cart drawer */
.cart-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.65);
  justify-content: flex-end;
}

.cart-modal.active {
  display: flex;
}

.cart-modal-content {
  width: min(420px, 100%);
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  font-size: 18px;
  font-weight: 800;
}

.close-cart {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 24px;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.cart-empty {
  text-align: center;
  padding: 48px 12px;
  color: var(--muted);
}

.cart-empty strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 8px;
}

.cart-item {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}

.cart-item-image {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg2);
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-name {
  font-weight: 600;
  font-size: 14px;
}

.cart-item-price {
  color: var(--primary);
  font-weight: 700;
  margin-top: 4px;
  font-size: 14px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.quantity-value {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
}

.remove-item-btn {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--danger);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.cart-footer {
  padding: 16px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-total {
  font-size: 12px;
  color: var(--muted);
}

.cart-total strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  margin-top: 2px;
}

.app-btn {
  border: 0;
  border-radius: 14px;
  padding: 14px 22px;
  font-weight: 800;
  cursor: pointer;
  background: var(--primary);
  color: var(--on-primary);
  white-space: nowrap;
}

.app-btn:hover {
  filter: brightness(1.06);
}

.app-btn.block {
  width: 100%;
  text-align: center;
}

.app-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Product modal */
.product-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(0, 0, 0, 0.72);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.product-modal.active {
  display: flex;
}

.product-modal-sheet {
  background: var(--bg);
  width: min(480px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  position: relative;
}

.product-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
}

.product-modal-image {
  width: 100%;
  aspect-ratio: 1;
  max-height: 420px;
  object-fit: cover;
  background: var(--bg2);
}

.product-modal-body {
  padding: 16px;
}

.product-modal-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.product-modal-price {
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
}

.product-modal-old {
  display: block;
  color: var(--muted);
  text-decoration: line-through;
  font-size: 14px;
}

.product-modal-sale {
  color: var(--danger);
  font-weight: 700;
  font-size: 13px;
  margin-top: 4px;
}

.product-modal-meta {
  color: var(--muted);
  margin-top: 10px;
  font-size: 13px;
}

.product-modal-desc {
  color: var(--muted);
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.55;
}

.product-modal-actions {
  position: sticky;
  bottom: 0;
  padding: 16px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

/* Checkout */
.checkout-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 14px 80px;
}

.checkout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}

.checkout-card h2 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 12px;
}

.checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.checkout-line:last-child {
  border-bottom: 0;
}

.checkout-line strong {
  color: var(--text);
  font-weight: 600;
}

.checkout-total {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 800;
}

.checkout-total span:last-child {
  color: var(--primary);
  font-size: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(0, 255, 170, 0.45);
}

.status {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.status.ok {
  color: var(--primary);
}

.status.err {
  color: var(--danger);
}

/* Payment step */
.pay-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 16px;
}

.pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pay-option:hover {
  border-color: rgba(0, 255, 170, 0.35);
}

.pay-option.active {
  border-color: rgba(0, 255, 170, 0.5);
  background: rgba(0, 255, 170, 0.1);
  color: var(--primary);
}

.pay-option .pay-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  flex-shrink: 0;
  position: relative;
}

.pay-option.active .pay-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--primary);
}

.pay-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.pay-back:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
}

/* Thanks modal */
.thanks-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.thanks-modal.active {
  display: flex;
}

.thanks-card {
  width: min(400px, 100%);
  background: linear-gradient(165deg, #1a1a1a 0%, #121212 100%);
  border: 1px solid rgba(0, 255, 170, 0.25);
  border-radius: 20px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.thanks-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(0, 255, 170, 0.12);
  border: 1px solid rgba(0, 255, 170, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 28px;
  font-weight: 800;
}

.thanks-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
}

.thanks-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.thanks-order {
  font-size: 12px;
  color: #777;
  word-break: break-all;
  margin-bottom: 18px !important;
}

.shop-footer {
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 24px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.shop-footer a {
  color: var(--primary);
}

@media (max-width: 720px) {
  .shop-nav {
    display: none;
  }

  .cart-modal {
    align-items: flex-end;
  }

  .cart-modal-content {
    width: 100%;
    height: min(88vh, 100%);
    border-radius: 16px 16px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

/* App download promo popup */
.app-promo-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.72);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: appPromoFade 0.25s ease;
}

.app-promo-modal.active {
  display: flex;
}

@keyframes appPromoFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.app-promo-card {
  position: relative;
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  animation: appPromoPop 0.28s ease;
}

@keyframes appPromoPop {
  from { transform: translateY(12px) scale(0.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.app-promo-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.app-promo-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: rgba(0, 255, 170, 0.12);
  border: 1px solid rgba(0, 255, 170, 0.35);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
  padding: 0;
}

.app-promo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-promo-title {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
}

.app-promo-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.app-promo-download {
  display: block;
  text-decoration: none;
  margin-bottom: 10px;
}

.app-promo-later {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 10px;
  cursor: pointer;
}

.app-promo-later:hover {
  color: var(--text);
}
