/* джи.shop — стили. Мир: подъём из предрассветной темноты в дневное небо, посадка в светлый каталог. */

:root {
  --ink: #0b0c0e;
  --ink-2: #14171c;
  --paper: #ffffff;
  --tile: #f4f5f7;
  --line: #e3e5e9;
  --text: #15181d;
  --muted: #586070;
  --accent: #0a66ff;
  --accent-ink: #0850cc;
  --danger: #c4311a;
  --on-dark: #f2f4f7;
  --on-dark-muted: rgba(242, 244, 247, 0.74);

  --font-display: 'Exo 2', 'Arial Narrow', system-ui, sans-serif;
  --font-text: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 64px;
  --radius: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 100; background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 16px; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- логотип: маска из аватарки, цвет = currentColor ---------- */
.logo {
  display: block; width: 80px; aspect-ratio: 900 / 357; background: currentColor;
  -webkit-mask: url(/assets/logo.png) center / contain no-repeat;
  mask: url(/assets/logo.png) center / contain no-repeat;
}
.logo--light { color: #fff; width: 96px; }

/* ---------- навигация (как на dji.com: светлая полоса сверху) ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding-inline: var(--gutter); background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line); color: var(--ink); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); }
.nav__logo { display: block; border-radius: 6px; }
.nav__links { display: flex; gap: 32px; font-size: .9375rem; font-weight: 500; }
.nav__links a { text-decoration: none; }
.nav__links a:hover { color: var(--accent); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: .9375rem; text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(10, 102, 255, .7); }
.btn--primary:hover { background: var(--accent-ink); box-shadow: 0 14px 28px -10px rgba(10, 102, 255, .8); }
.btn--dark { background: var(--ink); color: #fff; height: 44px; padding: 0 24px; }
.btn--dark:hover:not(:disabled) { background: var(--accent); }
.btn--dark:disabled { background: #c9ced6; color: #4a5260; cursor: not-allowed; }
.btn--ghost { background: transparent; border: 1.5px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--block { width: 100%; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .75; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9375rem; text-decoration: none; }
.link-arrow::after {
  content: ""; width: 10px; height: 10px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 1l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 1l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- герой ---------- */
.hero { background: #000; color: var(--on-dark); text-align: center; padding: clamp(40px, 5vw, 64px) var(--gutter) 0; overflow: hidden; }
.hero__title { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: clamp(2.25rem, 4.6vw, 3.75rem); line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; max-width: 24ch; margin-inline: auto; }
.hero__lead { margin: 24px auto 0; max-width: 36rem; font-size: clamp(1rem, 1.6vw, 1.1875rem); color: var(--on-dark-muted); }
.hero__actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 28px; margin-top: 32px; }
.hero__img { width: min(700px, 86%); margin: clamp(16px, 2vw, 24px) auto 0; }
.hero__img img { width: 100%; height: auto; }
.hero .link-arrow { color: #fff; }

/* ---------- каталог ---------- */
.catalog { padding: clamp(72px, 10vw, 128px) 0 clamp(80px, 10vw, 136px); background: var(--paper); position: relative; z-index: 1; }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); max-width: 40rem; }
h2 { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.0625rem; max-width: 34rem; }

.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.grid > .card { flex: 0 0 100%; }
@media (min-width: 680px) { .grid > .card { flex-basis: calc((100% - 24px) / 2); } }
@media (min-width: 1100px) { .grid > .card { flex-basis: calc((100% - 48px) / 3); } }
.card { display: flex; flex-direction: column; background: var(--tile); border-radius: var(--radius); overflow: hidden; }
.card:hover { box-shadow: 0 24px 44px -28px rgba(11, 12, 14, .3); }
.card__media { flex: none; position: relative; aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 38%, #fff 0%, #e9ecf0 100%); }
.card__slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.card__slides::-webkit-scrollbar { display: none; }
.card__slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.card__dots { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; padding: 0 8px; background: rgba(255, 255, 255, .88); border-radius: 999px; }
.card__dots button { width: 20px; height: 24px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0; }
.card__dots button::after { content: ""; width: 8px; height: 8px; border-radius: 99px; background: rgba(11, 12, 14, .26); }
.card__dots button[aria-selected="true"]::after { transform: scaleX(2.75); background: var(--ink); }
.badge { position: absolute; top: 16px; left: 16px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 600; padding: 6px 12px; border-radius: 99px; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 26px; }
.card__body h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.card__text { margin-top: 8px; color: var(--muted); font-size: .9375rem; }
.card__buy { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 22px; }
.price { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.625rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.price--soon { font-size: 1.125rem; font-style: normal; font-weight: 700; color: var(--muted); letter-spacing: 0; }

.card__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: .8125rem; color: var(--muted); }
.cond { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 14px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--ink) calc(var(--f) * 100%), #d3d7de calc(var(--f) * 100%)); }

/* ---------- как это работает ---------- */
.how { padding: clamp(64px, 9vw, 112px) 0; background: var(--tile); }
.how__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.how__list > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid #d5d9df; }
.how__list > div:last-child { border-bottom: 1px solid #d5d9df; }
.how__list dt { font-weight: 600; font-size: 1.125rem; }
.how__list dd { color: var(--muted); max-width: 52ch; }
.how__list a { color: var(--accent-ink); text-underline-offset: 3px; }

/* ---------- футер ---------- */
.foot { background: var(--ink); color: rgba(255, 255, 255, .72); padding: clamp(56px, 7vw, 88px) 0 40px; font-size: .9375rem; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.foot__brand p { margin-top: 20px; }
.foot__col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.foot__col h3 { color: #fff; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot__legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .8125rem; max-width: 1280px; color: rgba(255, 255, 255, .56); }

/* ---------- окно заказа ---------- */
.sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100vw); height: 100vh; height: 100dvh; max-width: none; max-height: none; padding: 0; border: 0; background: var(--paper); color: var(--text); box-shadow: -24px 0 64px rgba(11, 12, 14, .22); }
.sheet[open] { }
.sheet::backdrop { background: rgba(11, 12, 14, .52); }
.sheet[open]::backdrop { }


.sheet__form { position: relative; display: flex; flex-direction: column; height: 100%; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 16px; }
.sheet__head h2 { font-size: 1.75rem; }
.sheet__head h2:focus { outline: none; }
.sheet__product { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.icon-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--tile); cursor: pointer; }
.icon-btn:hover { background: #e6e9ee; }
.sheet__body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.qty { display: flex; align-items: center; justify-content: space-between; }
.qty__label { font-weight: 600; font-size: .9375rem; }
.qty__ctl { display: flex; align-items: center; gap: 4px; background: var(--tile); border-radius: 999px; padding: 4px; }
.qty__ctl button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; font-size: 1.25rem; cursor: pointer; }
.qty__ctl button:hover:not(:disabled) { background: var(--ink); color: #fff; }
.qty__ctl button:disabled { opacity: .4; cursor: not-allowed; }
.qty__ctl output { min-width: 40px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--text); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; }
.field input { height: 48px; padding-block: 0; }
.field input::placeholder, .field textarea::placeholder { color: #8a92a0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10, 102, 255, .16); }
.was-validated :is(input, textarea):invalid { border-color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .875rem; color: var(--muted); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 1.5px solid #b4bac5; border-radius: 7px; background: #fff; cursor: pointer; display: grid; place-items: center; }
.check input::after { content: ""; width: 12px; height: 12px; background: #fff; transform: scale(0); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6.5l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6.5l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { transform: scale(1); }
.was-validated .check input:invalid { border-color: var(--danger); }
.check a { color: var(--accent-ink); text-underline-offset: 3px; }
.form-error { color: var(--danger); font-size: .9375rem; font-weight: 500; }
.sheet__foot { padding: 16px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 12px; background: #fff; }
.total { display: flex; align-items: baseline; justify-content: space-between; }
.total span { color: var(--muted); font-size: .9375rem; }
.total strong { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.sheet__note { font-size: .8125rem; color: var(--muted); text-align: center; }
.sheet__done { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 32px; }
.sheet__done[hidden], .form-error[hidden] { display: none; }
.sheet__done svg { color: var(--accent); }
.sheet__done p { color: var(--muted); max-width: 28ch; }

/* ---------- юридические страницы ---------- */
.doc-nav { position: sticky; top: 0; z-index: 10; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding-inline: var(--gutter); background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.doc-nav .nav__links a { opacity: 1; }
.doc { max-width: 760px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 96px; }
.doc h1 { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.doc .meta { margin-top: 12px; color: var(--muted); font-size: .9375rem; }
.doc h2 { font-size: 1.375rem; margin: 40px 0 12px; line-height: 1.2; }
.doc p, .doc li { margin-bottom: 12px; }
.doc ul, .doc ol { padding-left: 1.4em; margin: 0 0 12px; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: .9375rem; }
.doc td, .doc th { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc a { color: var(--accent-ink); text-underline-offset: 3px; }
.status-page { min-height: 100svh; display: grid; place-items: center; padding: 32px; text-align: center; }
.status-page main { display: grid; gap: 16px; justify-items: center; max-width: 30rem; }
.status-page p { color: var(--muted); }

/* ---------- адаптив ---------- */
@media (max-width: 900px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
  .how__grid { grid-template-columns: 1fr; }
  .how__list > div { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  .nav__links { gap: 20px; }
  .nav__links a:not(:first-child) { display: none; }
  .card__buy { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .sheet { inset: auto 0 0 0; width: 100%; height: auto; max-height: 94dvh; border-radius: 28px 28px 0 0; box-shadow: 0 -24px 64px rgba(11, 12, 14, .25); }
  .sheet[open] { }
  
  .sheet__form { max-height: 94dvh; }
}


/* ---------- товарные страницы и «Информация» ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .875rem; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs i { font-style: normal; opacity: .5; }
.doc--wide { max-width: 1120px; }
.pp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.pp__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pp__gallery img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 20px; background: var(--tile); }
.pp__gallery img:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.pp__info { position: sticky; top: calc(var(--nav-h) + 24px); }
.pp__info h1 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.08; }
.pp__info .card__sub { margin-top: 12px; font-size: .9375rem; }
.pp__buy { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 24px 0 8px; }
.pp__buy .price { font-size: 2rem; }
.pp__note { color: var(--muted); font-size: .875rem; margin-bottom: 20px !important; }
.pp__specs, .pp__more { margin-top: clamp(40px, 6vw, 72px); }
.pp__src { color: var(--muted); font-size: .875rem; }
.pp__more ul { padding-left: 1.2em; }
.pp__more a, .doc a:not(.btn) { color: var(--accent-ink); }
.doc a.btn--primary { color: #fff; }
.info { padding: clamp(56px, 8vw, 96px) 0; background: var(--paper); }
.info__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.info__list a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 24px; border-radius: 20px; background: var(--tile); text-decoration: none; color: var(--text); }
.info__list a:hover { background: #eaecf0; }
.info__list strong { font-size: 1.0625rem; }
.info__list span, .info__list time { color: var(--muted); font-size: .9375rem; }
.info__list time { font-size: .8125rem; }
.info__list--page { grid-template-columns: 1fr; }
.info__all { margin-top: 20px; }
.card__link { text-decoration: none; color: inherit; }
.card__link:hover { color: var(--accent-ink); }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 40px 0 0; padding: 20px 24px; border-radius: 20px; background: var(--tile); }
.cta div { display: flex; flex-direction: column; }
.cta span { color: var(--muted); font-size: .9375rem; }
@media (max-width: 900px) { .pp { grid-template-columns: 1fr; } .pp__info { position: static; } }

/* стрелки листания фото в карточке */
.card__nav { position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; margin-top: -20px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; box-shadow: 0 4px 14px rgba(11, 12, 14, .18); }
.card__nav--prev { left: 12px; }
.card__nav--next { right: 12px; }
.card__nav:hover:not(:disabled) { background: #fff; color: var(--accent); }
.card__nav:disabled { opacity: 0; pointer-events: none; }
.card__slides { cursor: grab; }

.doc figure { margin: 28px 0; }
.doc figure img { width: 100%; height: auto; border-radius: 16px; background: var(--tile); }
.doc figcaption { margin-top: 10px; color: var(--muted); font-size: .875rem; }

.doc figure.portrait { max-width: 360px; }
.fig-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0 8px; }
.fig-row figure { margin: 0; }
.fig-row img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; display: block; }
.fig-cap { color: var(--muted); font-size: .875rem; }

.doc figure.portrait.big { max-width: 600px; }
