:root {
  --bg: #f2f3f4;
  --bg-elevated: #ffffff;
  --bg-soft: #f8f8f8;
  --text: #0d0f12;
  --muted: #6b717a;
  --border: #e6e8ec;
  --accent: #2f6edb;
  --accent-soft: #e8f1ff;
  --success: #daf7e7;
  --success-text: #1d6b41;
  --shadow-soft: 0 14px 32px rgba(17, 18, 23, 0.08);
  --shadow-card: 0 12px 24px rgba(17, 18, 23, 0.06);
  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: radial-gradient(1200px 620px at 12% -20%, #f9f6f2 0%, rgba(249, 246, 242, 0) 60%),
    linear-gradient(180deg, #f3f4f6 0%, #eef1f4 100%);
  color: var(--text);
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.brand-logo {
  width: 28px;
  height: 28px;
}

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

.nav-link {
  font-weight: 600;
  color: #2b2f36;
}

.nav-link.nav-telegram {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(17, 18, 23, 0.06);
  font-weight: 600;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  background: #0f1114;
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
}

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

.cart-total.is-hidden {
  display: none;
}

/* ─── Hero ─────────────────────────────── */

.hero {
  margin: 32px 0 18px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.hero-content {
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.hero-title {
  font-size: 44px;
  line-height: 1.05;
  font-weight: 800;
}

.hero-text {
  font-size: 16px;
  color: var(--muted);
  max-width: 460px;
}

.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f1f1;
  font-size: 13px;
  font-weight: 600;
  color: #4b4f56;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-image {
  height: 100%;
  background: #e8e6e0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ─── Buttons ───────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 18, 23, 0.12);
}

.btn-primary {
  background: #0f1114;
  color: #fff;
}

.btn-outline {
  background: #fff;
  border-color: #cbd7f5;
  color: #2b55b4;
}

.btn-ghost {
  background: #fff;
  border-color: var(--border);
  color: #4a4f57;
}

.btn-pill {
  padding: 8px 16px;
  font-size: 14px;
}

.btn.is-added {
  background: #0f1114;
  color: #fff;
}

/* ─── Filter bar ────────────────────────── */

.filter-bar {
  margin: 22px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  gap: 12px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
}

.filter-tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #555b65;
  background: #f3f4f5;
  border: 1px solid transparent;
}

.filter-tab.active {
  background: #0f1114;
  color: #fff;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f5f6;
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid #e0e3e8;
}

.filter-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 260px;
  font-size: 14px;
}

/* ─── Catalog ───────────────────────────── */

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

.section-label {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.section-title {
  font-size: 38px;
  font-weight: 800;
  margin-top: 6px;
}

.found-count {
  font-size: 14px;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 70px;
}

/* ─── Product card ──────────────────────── */

.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(17, 18, 23, 0.12);
}

.product-image {
  border-radius: 20px;
  overflow: hidden;
  background: #f4f3f0;
  display: block;
}

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


.product-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.price-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.price-old {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}

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

.product-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-status {
  font-size: 13px;
  color: #0b7a4f;
  background: #e2f6ed;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.product-status.preorder {
  background: #f1ecff;
  color: #5a3aa8;
}

.product-card.is-hidden {
  display: none;
}

/* ─── Inner pages ───────────────────────── */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 36px 0 24px;
}

.page-title {
  font-size: 38px;
  font-weight: 800;
}

.page-subtitle {
  font-size: 16px;
  color: var(--muted);
}

.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: 1.65fr 0.85fr;
  gap: 24px;
  padding-bottom: 80px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr 150px;
  gap: 18px;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  align-items: center;
}

.cart-thumb {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  overflow: hidden;
  background: #f2f2f2;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-item-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border: 1px solid #e0e3e8;
  border-radius: 999px;
  background: #f7f8f9;
  font-weight: 700;
}

.qty-control button {
  font-size: 16px;
}

.link-danger {
  color: #c34949;
  font-weight: 600;
}

.cart-item-meta {
  text-align: right;
  font-weight: 700;
  font-size: 16px;
}

.cart-item-meta span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.summary-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 96px;
  height: fit-content;
}

.summary-title {
  font-size: 18px;
  font-weight: 800;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.summary-total {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-state {
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  color: var(--muted);
}

.form-card {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-group label {
  font-weight: 700;
  color: #4a4f57;
}

.form-group input,
.form-group textarea {
  border-radius: 14px;
  border: 1px solid #e2e4ea;
  background: #f7f8fa;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  background: #fff;
  border-color: #9bb7ff;
  box-shadow: 0 0 0 3px rgba(155, 183, 255, 0.2);
}

/* ─── Product detail page ───────────────── */

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  padding: 36px 0 80px;
}

.product-media {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #f2f2f2;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

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

.product-panel {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.back-link {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

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

.meta-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 700;
  color: #4a4f57;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
}

.product-price .price-old {
  font-size: 14px;
}

.product-features {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.product-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.size-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-options .chip {
  background: #ffffff;
  border: 1px solid #e3e5ea;
}

/* Кликабельные размеры на странице товара */
.chip-size {
  cursor: pointer;
  min-width: 48px;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip-size:hover {
  border-color: #0f1114;
}

.chip-size.is-active {
  background: #0f1114;
  color: #fff;
  border-color: #0f1114;
}

/* Блок выбора размера + подсказка */
.size-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.size-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

.size-hint.is-error {
  color: #c34949;
  font-weight: 600;
}

/* Бейдж размера в корзине */
.cart-size-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #f3f4f6;
  border: 1px solid #e3e5ea;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #4a4f57;
}

/* ─── Footer ────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  background: #f6f7f9;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-brand {
  max-width: 420px;
}

.footer-brand .brand {
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── Toast ─────────────────────────────── */

.toast {
  position: fixed;
  top: 22px;
  right: 22px;
  background: var(--success);
  color: var(--success-text);
  border: 1px solid #bfead3;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-title {
  font-weight: 800;
  margin-bottom: 4px;
}

/* ─── Reveal animation ──────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

body.loaded .reveal {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ────────────────────────── */

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

  .hero-image {
    height: 420px;
  }

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

  .cart-layout,
  .checkout-layout,
  .product-layout {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }
}

@media (max-width: 780px) {
  .nav {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
    gap: 12px;
  }

  .filter-bar {
    flex-direction: column;
    border-radius: 24px;
  }

  .filter-search input {
    width: 100%;
  }

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

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

  .cart-item-meta {
    text-align: left;
  }

  .hero-title {
    font-size: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .btn {
    transition: none;
  }
}
