:root {
  --bg: #070809;
  --bg-soft: #111317;
  --graphite: #1a1e23;
  --steel: #2b323a;
  --text: #eceef1;
  --muted: #a8b0ba;
  --brass: #a78653;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

main img {
  cursor: zoom-in;
}

.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.08em;
  font-size: 1.1rem;
}

.topbar-nav {
  display: none;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(7, 8, 9, 0.7);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.68);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-panel {
  margin-left: auto;
  width: min(86vw, 360px);
  height: 100%;
  background: #0f1216;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem;
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.mobile-menu.open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-nav {
  margin-top: 2.2rem;
  display: grid;
  gap: 0.35rem;
}

.mobile-menu-nav a {
  color: var(--text);
  text-decoration: none;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.no-scroll {
  overflow: hidden;
}

.topbar-nav .cart-toggle {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.38rem;
  line-height: 1;
  transition: color 220ms ease, text-shadow 220ms ease;
}

.topbar-nav .cart-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.topbar-nav .cart-toggle:hover {
  color: #d1b07c;
  text-shadow: 0 0 12px rgba(167, 134, 83, 0.45);
}

.topbar-nav .cart-toggle.active {
  color: #e2c38f;
  text-shadow: 0 0 14px rgba(167, 134, 83, 0.52);
}

.topbar-nav .cart-toggle:hover::after,
.topbar-nav .cart-toggle.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

/* Невидимый мост до выпадающего меню (без padding на блоке — иначе «Коллекция» визуально выше Магазин/Мастер). */
.nav-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.65rem;
}

.topbar-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.38rem;
  line-height: 1;
  transition: color 220ms ease, text-shadow 220ms ease;
}

.topbar-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.topbar-nav a:hover {
  color: #d1b07c;
  text-shadow: 0 0 12px rgba(167, 134, 83, 0.45);
}

.topbar-nav a.active {
  color: #e2c38f;
  text-shadow: 0 0 14px rgba(167, 134, 83, 0.52);
}

.topbar-nav a:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.topbar-nav a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.1rem);
  left: 0;
  min-width: 15rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  background: rgba(8, 10, 12, 0.68);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 0.18rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 30;
}

.dropdown-menu a {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  font-size: 1.38rem;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.35rem 0.4rem;
  border-radius: 0.4rem;
  color: #d4d9df;
}

.dropdown-menu a:hover {
  color: #d4d9df;
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-menu a.active {
  color: #d4d9df;
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-menu a::after {
  display: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.section {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg);
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--section-bg);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 5, 6, 0.16), rgba(4, 5, 6, 0.6)),
    radial-gradient(circle at 20% 20%, rgba(167, 134, 83, 0.12), rgba(0, 0, 0, 0) 38%);
}

.section-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 7rem 0 5rem;
}

.hero h1,
h2,
h3 {
  margin: 0 0 0.8rem;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 8vw, 5rem);
  max-width: 11ch;
  line-height: 1;
}

.hero .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero::before {
  display: none;
}

.hero .overlay {
  z-index: 2;
}

.hero .section-inner {
  z-index: 3;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.lead {
  max-width: 50ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  line-height: 1.55;
  font-weight: 500;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(236, 238, 241, 0.3);
  color: var(--text);
  text-decoration: none;
  background: rgba(7, 8, 9, 0.5);
  padding: 0.75rem 1.15rem;
  margin-top: 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--brass);
  box-shadow: 0 0 26px rgba(167, 134, 83, 0.34);
}

.btn-primary {
  background: linear-gradient(120deg, #7f6640, #b49360);
  border-color: transparent;
  color: #090909;
  font-weight: 600;
}

.split-grid {
  display: grid;
  gap: 1.5rem;
}

.copy {
  background: rgba(8, 10, 12, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.2rem;
  backdrop-filter: blur(4px);
}

.thumb-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
}

.thumb-grid img {
  height: clamp(220px, 28vw, 360px);
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.thumb-grid img:first-child:last-child {
  grid-column: 1 / -1;
}

.sold-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 74, 74, 0.75);
  background: rgba(56, 10, 10, 0.78);
  color: #ff7b7b;
  box-shadow: 0 0 16px rgba(214, 48, 48, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Oswald", sans-serif;
  font-size: 0.82rem;
}

.narrow {
  text-align: left;
}

.narrow p {
  max-width: 56ch;
  color: var(--muted);
}

.shop {
  background: linear-gradient(180deg, #090a0b, #0f1216);
  min-height: auto;
}

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

.product-grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.product-card {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 134, 83, 0.5);
}

.product-card img {
  height: 240px;
  object-fit: cover;
  transition: transform 280ms ease;
}

.product-meta {
  padding: 1rem;
}

.product-meta p {
  color: var(--muted);
  margin-top: 0;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-weight: 600;
}

.product-total-price {
  display: none;
}

.sold-label {
  color: #d8be8d;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-card-sold {
  border-color: rgba(167, 134, 83, 0.45);
}

.about {
  background: linear-gradient(180deg, #0a0b0d, #0a0b0d);
  min-height: auto;
}

.info-section {
  background: linear-gradient(180deg, #0b0d10, #0a0b0d);
  min-height: auto;
}

.info-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.info-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9rem;
  padding: 1rem;
}

.info-card p {
  margin: 0.35rem 0;
  color: var(--muted);
}

.info-card a {
  color: #d8be8d;
}

.info-note {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.about-grid {
  display: grid;
  gap: 1.4rem;
}

.about-grid img {
  max-height: 560px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.author-avatar {
  width: min(74vw, 360px);
  aspect-ratio: 1 / 1;
  max-height: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid rgba(167, 134, 83, 0.55);
  box-shadow:
    0 0 0 8px rgba(167, 134, 83, 0.1),
    var(--shadow);
  margin: 0 auto;
  transition: transform 280ms ease, box-shadow 280ms ease;
}

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

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.checkout-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.checkout-panel {
  width: min(740px, 96vw);
  background: #0f1216;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 1.2rem;
  position: relative;
}

.close-modal {
  position: absolute;
  right: 0.8rem;
  top: 0.6rem;
  color: var(--muted);
  background: none;
  border: 0;
  font-size: 1.7rem;
  cursor: pointer;
}

.checkout-gallery {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.checkout-gallery--single img {
  height: 130px;
}

.checkout-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

.checkout-item:hover {
  border-color: rgba(167, 134, 83, 0.35);
}

.checkout-item.is-selected {
  border-color: rgba(167, 134, 83, 0.55);
  background: rgba(167, 134, 83, 0.08);
}

.checkout-item img {
  height: 100px;
  object-fit: cover;
  border-radius: 0.55rem;
  pointer-events: none;
  transition: transform 240ms ease;
}

.checkout-item:hover img {
  transform: scale(1.04);
}

.checkout-item-label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.25;
  color: var(--text);
}

.checkout-item-label input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--brass);
  flex-shrink: 0;
  cursor: pointer;
}

.checkout-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.checkout-item-name {
  font-weight: 500;
}

.checkout-item-price {
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 600;
}

.checkout-gallery img {
  height: 130px;
  object-fit: cover;
  border-radius: 0.7rem;
  transition: transform 240ms ease;
}

.checkout-hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.35rem 0 0;
}

.checkout-secondary-actions {
  margin: 0.75rem 0 0.25rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  width: 100%;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.btn-ghost:hover {
  border-color: rgba(167, 134, 83, 0.45);
  color: #e2c38f;
}

.btn:disabled,
.btn.btn-primary:disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.cart-empty {
  color: var(--muted);
  font-size: 0.92rem;
}

.cart-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(42vh, 320px);
  overflow-y: auto;
}

.cart-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-line img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 0.45rem;
}

.cart-line-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cart-line-title {
  font-size: 0.82rem;
  font-weight: 500;
}

.cart-line-price {
  font-size: 0.78rem;
  color: var(--brass);
  font-weight: 600;
}

.cart-remove {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 0.25rem;
}

.cart-remove:hover {
  color: #e2c38f;
}

.cart-panel #cartPayRow.payment-actions {
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .cart-panel #cartPayRow.payment-actions {
    grid-template-columns: 1fr 1fr;
  }

  .cart-panel #cartPayRow .btn-ghost {
    grid-column: 1 / -1;
  }
}

.thumb-grid img:hover,
.product-card img:hover,
.author-avatar:hover,
.checkout-gallery img:hover {
  transform: scale(1.14);
}

.thumb-grid img:hover,
.author-avatar:hover {
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.56);
}

.checkout-price {
  font-size: 1.1rem;
  font-weight: 600;
}

.payment-actions {
  display: grid;
  gap: 0.6rem;
}

.checkout-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.86);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.image-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox img {
  width: auto;
  max-width: min(96vw, 1500px);
  max-height: 92vh;
  border-radius: 0.9rem;
  object-fit: contain;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.72);
}

.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  border: 0;
  background: none;
  color: #f0f1f3;
  font-size: 2.2rem;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  background: rgba(10, 11, 13, 0.68);
  color: #eceef1;
  font-size: 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@media (max-width: 759px) {
  .topbar {
    padding: 0.9rem 1rem;
  }

  .topbar-nav {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .topbar-nav .nav-dropdown,
  .topbar-nav > a {
    display: none;
  }

  .topbar-nav .cart-toggle {
    margin-left: 0.5rem;
    font-size: 1.05rem;
  }

  .section-inner {
    width: min(1200px, 94vw);
    padding: 5.7rem 0 3.5rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 10vw, 2.5rem);
  }

  .lead {
    font-size: 1rem;
  }

  .checkout-panel {
    max-height: 88vh;
    overflow-y: auto;
    padding: 1rem 0.85rem;
  }
}

@media (min-width: 760px) {
  .topbar {
    padding: 1rem 2.2rem;
  }

  .topbar-nav {
    display: flex;
  }

  .split-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

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

  .about-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }

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

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