:root {
  --bg: #f4f7ff;
  --bg-soft: #e9f0ff;
  --panel: #ffffff;
  --text: #121523;
  --muted: #6f7587;
  --brand: #2f7dff;
  --brand-2: #ff475f;
  --accent: #b0172e;
  --danger: #d6263d;
  --ok: #2b9c72;
  --ring: 0 0 0 4px rgba(47, 125, 255, 0.25);
  --radius: 18px;
  --shadow-1: 0 18px 36px rgba(28, 55, 112, 0.12);
  --shadow-2: 0 26px 74px rgba(28, 55, 112, 0.18);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "M PLUS 1p", "Zen Maru Gothic", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1400px 860px at 82% -18%, rgba(47, 125, 255, 0.2) 0%, rgba(255, 71, 95, 0.16) 30%, var(--bg) 60%) no-repeat fixed;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: 0.2px;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
select {
  font: inherit;
  color: inherit;
  background: #f7f9ff;
  border: 1px solid #d8deed;
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

input:focus,
select:focus,
button:focus {
  outline: none;
  box-shadow: var(--ring);
}

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

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(140%) blur(8px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.82));
  border-bottom: 1px solid #dce4f4;
  box-shadow: 0 14px 30px rgba(28, 55, 112, 0.12);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--brand), var(--brand-2), #1a2b88, #ff9cae, var(--brand));
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.32), var(--shadow-1);
}

.nav-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.nav-links a {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
  background: linear-gradient(90deg, rgba(47, 125, 255, 0.18), rgba(255, 71, 95, 0.14));
}

.search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search input {
  width: clamp(160px, 32vw, 360px);
  background: #eef3ff;
  border-color: #d8deed;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #e9f1ff, #cfe0ff);
  border: 1px solid #b8ceff;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.btn.primary {
  background: linear-gradient(180deg, #ff7b33, #c71f30);
  border-color: #ffafb2;
  color: #fff7f8;
  font-weight: 700;
}

.btn.ghost {
  background: transparent;
  border-color: #d8deed;
}

.cart-btn {
  position: relative;
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand-2);
  color: #fff7f7;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #ffd5d7;
  box-shadow: 0 6px 14px rgba(255, 71, 95, 0.32);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 5rem) 0 2rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 0.9rem;
  letter-spacing: 0.3px;
}

.hero p {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin: 0 0 1.6rem;
}

.hero .cta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.watch-orb {
  position: relative;
  border-radius: var(--radius);
  background: radial-gradient(880px 540px at 12% 14%, rgba(87, 199, 255, 0.28), rgba(0, 0, 0, 0) 60%),
    linear-gradient(160deg, #ffffff, #f3f5ff 60%, #e9eeff);
  border: 1px solid #dfe7fa;
  box-shadow: inset 0 0 80px rgba(255, 71, 95, 0.1), 0 30px 90px rgba(28, 55, 112, 0.2);
  aspect-ratio: 1/1;
  overflow: hidden;
}

.watch-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  filter: contrast(1.05) saturate(1.05);
}

#contactForm input,
#contactForm textarea {
  width: 100%;
}

.floating {
  position: absolute;
  inset: auto;
  right: 20px;
  bottom: 20px;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dde5f3;
  border-radius: 12px;
  color: var(--muted);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-1);
}

/* Sections */
section {
  padding: 2.2rem 0;
}

.section-title {
  font-size: 1.6rem;
  margin: 0 0 1rem;
  letter-spacing: 0.4px;
}

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

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature {
  background: linear-gradient(180deg, rgba(87, 199, 255, 0.14), rgba(255, 123, 51, 0.12));
  border: 1px solid #dbe6f7;
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-1);
  min-height: 110px;
  display: grid;
  align-content: center;
  gap: 0.4rem;
}

.feature h3 {
  margin: 0;
  font-size: 1rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Products */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f3f7ff 60%, #e8eeff);
  border: 1px solid #dce4f4;
  box-shadow: var(--shadow-1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-2);
  box-shadow: var(--shadow-2);
}

.card-media {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #eef3ff;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 0.6s ease;
}

.card:hover .card-media img {
  transform: scale(1.12);
}

.card-body {
  padding: 1rem;
  display: grid;
  gap: 0.4rem;
}

.title {
  font-weight: 700;
}

.price {
  color: var(--brand-2);
  font-weight: 800;
  letter-spacing: 0.4px;
}

.label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(47, 125, 255, 0.16);
  border: 1px solid rgba(47, 125, 255, 0.7);
  color: #0f1c30;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.qty {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.2rem;
}

.qty button {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #f2f6ff;
  border: 1px solid #d9e2f2;
}

.load-more {
  display: grid;
  place-items: center;
  margin-top: 1rem;
}

/* Cart Drawer */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 90vw);
  background: linear-gradient(180deg, #f8fbff, #f1f5ff);
  border-left: 1px solid #dce4f4;
  box-shadow: -30px 0 80px rgba(28, 55, 112, 0.18);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 10000;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer header,
.drawer footer {
  padding: 1rem;
  border-bottom: 1px solid #dce4f4;
}

#openCartMobile {
  display: none;
}

.drawer footer {
  border-top: 1px solid #dce4f4;
  border-bottom: 0;
  display: grid;
  gap: 0.6rem;
}

.drawer .items {
  padding: 1rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.cart-item {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  background: #f7faff;
  border: 1px solid #dce4f4;
  border-radius: 14px;
  padding: 0.6rem;
  justify-content: space-between;
}

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.ci-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.ci-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.ci-actions {
  display: grid;
  gap: 0.3rem;
  justify-items: end;
}

.ci-actions .qty {
  gap: 0.3rem;
}

/* Sheet / Modal */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 32, 0.32);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 55;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  inset: 10% auto auto 50%;
  transform: translateX(-50%) translateY(-12px) scale(0.98);
  width: min(720px, 94vw);
  background: #ffffff;
  border: 1px solid #dce4f4;
  border-radius: 18px;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 70;
}

.sheet.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
  z-index: 10000;
}

.sheet header,
.sheet footer {
  padding: 1rem;
  border-bottom: 1px solid #dce4f4;
}

.sheet footer {
  border-bottom: 0;
  border-top: 1px solid #dce4f4;
}

.sheet .content {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr 1fr;
}

.sheet .content .span-2 {
  grid-column: span 2;
}

.success {
  display: none;
  padding: 1rem;
  background: rgba(43, 156, 114, 0.1);
  color: var(--ok);
  border: 1px solid #bfe8d4;
  border-radius: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  transition: all 0.25s ease;
  background: #ffffff;
  color: var(--ok);
  border: 1px solid #bfe8d4;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  box-shadow: var(--shadow-2);
  z-index: 80;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Footer */
footer.site {
  margin-top: 2rem;
  padding: 2rem 0;
  border-top: 1px solid #dce4f4;
  color: var(--muted);
}

/* ===== Header Base ===== */
header.site {
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 14px 32px rgba(28, 55, 112, 0.12);
}

header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.3s ease;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

/* ===== Burger button ===== */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ===== When open ===== */
/* — исправленный крестик для бургер-меню — */
.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

.content.success-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ===== Mobile Nav ===== */
@media (max-width: 768px) {
  .sheet .content .span-2 {
    grid-column: span 1;
  }

  label input {
    width: 100%;
  }

  .burger {
    display: flex;
  }

  #openCartMobile {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .actions {
    display: none;
    /* можно убрать, если хочешь показывать корзину на мобилках */
  }
}

/* Responsive */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

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

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

  .sheet .content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav {
    grid-template-columns: 1fr auto;
  }

  .search {
    display: none;
  }

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

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

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