/* ==========================================================================
   MedalShop.ru — стили. Дизайн: тёмный премиум + золото, каталог на светлом.
   ========================================================================== */

:root {
  --bg: #131316;
  --bg-outer: #0e0e11;
  --bg-raise: #18181d;
  --bg-chip: #1d1d22;
  --border: #26262c;
  --border-2: #2c2c33;
  --border-3: #3a3a42;
  --text: #f2f0ea;
  --muted: #c9c7c0;
  --dim: #9c9a93;
  --faint: #6f6f78;
  --gold: #d4af37;
  --gold-hover: #e8c968;
  --on-gold: #17130a;
  --light-bg: #f4f4f6;
  --light-card: #ffffff;
  --light-text: #1a1a1f;
  --font-head: 'Unbounded', sans-serif;
  --font-body: 'Golos Text', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-outer);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  background: var(--bg);
  overflow: clip;
}

img { max-width: 100%; }

h1, h2 {
  font-family: var(--font-head);
  font-weight: 600;
  margin: 0;
  text-wrap: pretty;
}

h2 { font-size: 32px; margin-bottom: 12px; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }

.section { padding: 88px 72px; }

.section-subtitle {
  font-size: 17px;
  color: var(--dim);
  margin: 0 0 40px;
  max-width: 640px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-lg { font-size: 17px; font-weight: 700; padding: 16px 30px; }

.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-hover); color: var(--on-gold); }

.btn-outline { border: 1px solid var(--border-3); color: var(--text); font-weight: 500; }
.btn-outline:hover { border-color: var(--gold); color: var(--text); }

.btn-outline-gold { border: 1px solid var(--gold); color: var(--gold); }
.btn-outline-gold:hover { background: var(--gold); color: var(--on-gold); }

.btn:disabled { opacity: 0.75; cursor: default; }

/* ---------- Шапка ---------- */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 72px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--text);
}

.logo span { color: var(--gold); }

.nav { display: flex; gap: 32px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--gold-hover); }

/* ---------- Первый экран ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 48px;
  padding: 0 72px;
  align-items: stretch;
  background: radial-gradient(900px 480px at 78% 30%, rgba(212, 175, 55, 0.14), transparent 65%), var(--bg);
}

/* Вариант без картинки (картинку добавим позже) */
.hero-solo { grid-template-columns: 1fr; }

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 88px 0;
}

.kicker {
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 { font-size: 46px; line-height: 1.18; }

.hero-subtitle {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  max-width: 560px;
}

.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.hero-media {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

.hero-media img {
  width: 400px;
  display: block;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6));
}

.badges { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

.badge {
  background: var(--bg-chip);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 14px 18px;
  min-width: 96px;
}

.badge-value {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  color: var(--gold);
}

.badge-label { font-size: 13px; color: var(--dim); margin-top: 4px; }

/* ---------- Полоса доверия ---------- */

.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 72px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-item {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.trust-item b { color: var(--text); }

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* ---------- Технология ---------- */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tech-col {
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 28px;
}

.tech-col.is-featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.10), rgba(212, 175, 55, 0.02));
}

.tech-col-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  color: var(--dim);
  margin-bottom: 20px;
}

.tech-col.is-featured .tech-col-title { color: var(--gold); }

.tech-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dim);
}

.tech-col.is-featured ul { color: var(--text); }

/* ---------- Каталог ---------- */

.catalog { background: var(--light-bg); color: var(--light-text); }

.catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.catalog-head .section-subtitle { color: var(--faint); margin-bottom: 0; }

.catalog-note { font-size: 15px; color: var(--faint); white-space: nowrap; }

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

.card {
  background: var(--light-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(20, 20, 30, 0.07);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 8px 28px rgba(20, 20, 30, 0.14); }

.card-media { position: relative; overflow: hidden; }

.card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* Зоны перелистывания при наведении (десктоп) */
.card-zones { position: absolute; inset: 0; display: flex; }
.card-zones span { flex: 1; }

/* Стрелки (мобильные и другие устройства без hover) */
.card-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  border: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent);
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.card-prev { left: 0; justify-content: flex-start; }

.card-next {
  right: 0;
  justify-content: flex-end;
  background: linear-gradient(-90deg, rgba(0, 0, 0, 0.18), transparent);
}

/* На устройствах с мышью листаем наведением, стрелки не нужны */
@media (hover: hover) and (pointer: fine) {
  .card-arrow { display: none; }
}

/* На тач-устройствах наоборот — зоны наведения не работают */
@media (hover: none), (pointer: coarse) {
  .card-zones { display: none; }
}

.card-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

.card-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.35);
}

.card-dots span.is-active { background: var(--gold); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-price { font-weight: 700; font-size: 16px; }

.card-price span { font-weight: 400; color: var(--faint); font-size: 13px; }

.card-tag {
  background: var(--light-text);
  color: var(--text);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.card-more {
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--light-text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 42px;
}

.card-more:hover { background: var(--gold); }

/* ---------- Двухколоночные блоки ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.col-text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }

.col-text h2 { margin-bottom: 0; }

.col-text p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ---------- Оптовые цены ---------- */

.price-table {
  border: 1px solid var(--border-2);
  border-radius: 16px;
  overflow: hidden;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
}

.price-row:last-child { border-bottom: none; }

.price-qty { font-size: 16px; color: var(--muted); }

.price-value {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
}

.price-row.is-best { background: rgba(212, 175, 55, 0.08); }
.price-row.is-best .price-value { color: var(--gold); }

/* ---------- Свой дизайн ---------- */

.custom {
  background: linear-gradient(180deg, var(--bg-raise), var(--bg));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.custom-photo { border-radius: 16px; display: block; width: 100%; }

.custom-placeholder {
  aspect-ratio: 14 / 9;
  border-radius: 16px;
  background: repeating-linear-gradient(-45deg, #1d1d22 0 14px, #202027 14px 28px);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.custom-placeholder span {
  color: var(--faint);
  font-family: monospace;
  font-size: 15px;
  text-align: center;
}

/* ---------- Как заказать ---------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.step {
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 24px;
}

.step-num {
  font-family: var(--font-head);
  font-size: 15px;
  color: var(--gold);
  margin-bottom: 14px;
}

.step-title { font-weight: 600; font-size: 17px; margin-bottom: 8px; }

.step-text { font-size: 15px; line-height: 1.5; color: var(--dim); }

/* ---------- Отзывы ---------- */

.reviews { padding-top: 0; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.review {
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 26px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #17171b;
}

.review-stars { color: var(--gold); font-size: 15px; letter-spacing: 2px; }

.review blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.review figcaption { margin-top: auto; }

.review-author { font-weight: 600; font-size: 15px; }

.review-org { font-size: 13px; color: var(--faint); margin-top: 2px; }

/* ---------- Форма заявки ---------- */

.lead {
  background: radial-gradient(700px 400px at 30% 20%, rgba(212, 175, 55, 0.10), transparent 65%), var(--bg-raise);
  border-top: 1px solid var(--border);
}

.lead .two-col { align-items: start; }

.contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 17px;
}

.contact-phone { color: var(--text); font-weight: 600; }
.contact-phone:hover { color: var(--gold-hover); }

.lead-form { display: flex; flex-direction: column; gap: 14px; }

.lead-form input,
.lead-form textarea {
  background: var(--bg-chip);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 15px 18px;
  font-size: 16px;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  width: 100%;
}

.lead-form textarea { resize: vertical; }

.lead-form input:focus,
.lead-form textarea:focus { border-color: var(--gold); }

.lead-form ::placeholder { color: var(--faint); }

/* Ловушка для ботов — скрыта от людей */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
}

.form-error {
  border: 1px solid #a4413c;
  background: rgba(164, 65, 60, 0.12);
  color: #e8a29e;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
}

.form-success {
  border: 1px solid var(--gold);
  background: rgba(212, 175, 55, 0.10);
  color: var(--gold-hover);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
}

/* ---------- Футер ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 32px 72px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--faint);
}

.footer .logo { font-size: 16px; }

/* ---------- Модальная галерея ---------- */

.modal { position: fixed; inset: 0; z-index: 100; }

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.88);
}

.modal-panel {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 56px 72px 40px;
}

.modal-img {
  max-width: 100%;
  max-height: calc(100% - 60px);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}

.modal-close:hover { color: var(--gold-hover); }

.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--border-3);
  background: rgba(19, 19, 22, 0.8);
  color: var(--text);
  font-size: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-arrow:hover { border-color: var(--gold); color: var(--gold-hover); }

.modal-prev { left: 20px; }
.modal-next { right: 20px; }

.modal-caption {
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: var(--muted);
  font-size: 15px;
}

.modal-counter { color: var(--faint); font-size: 13px; }

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 1200px) {
  .section { padding: 72px 40px; }
  .header, .trust, .footer { padding-left: 40px; padding-right: 40px; }
  .hero { padding: 0 40px; grid-template-columns: 1fr 400px; }
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
  .two-col { gap: 40px; }
}

@media (max-width: 960px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-content { padding: 48px 0 56px; order: 2; }
  .hero-media { order: 1; padding-top: 40px; }
  .hero-media img { width: 280px; }
  .hero h1 { font-size: 34px; }
  .trust { grid-template-columns: 1fr 1fr; }
  .tech-grid { grid-template-columns: 1fr; gap: 12px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-note { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .reviews-grid { grid-template-columns: 1fr; gap: 12px; }
  .modal-panel { padding: 56px 16px 32px; }
  .modal-prev { left: 8px; }
  .modal-next { right: 8px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  h2 { font-size: 22px; margin-bottom: 8px; }
  .section { padding: 56px 20px; }
  .section-subtitle { font-size: 15px; margin-bottom: 24px; }
  .header { padding: 16px 20px; }
  .logo { font-size: 17px; }
  .btn-header { font-size: 14px; padding: 10px 16px; }
  .hero { padding: 0 20px; text-align: center; }
  .hero-content { align-items: center; gap: 20px; padding: 24px 0 48px; }
  .hero-solo .hero-content { padding-top: 48px; }
  .hero h1 { font-size: 26px; line-height: 1.25; }
  .hero-subtitle { font-size: 16px; }
  .hero-media { padding-top: 32px; }
  .hero-media img { width: 210px; }
  .hero-actions { flex-direction: column; width: 100%; gap: 12px; }
  .hero-actions .btn { width: 100%; }
  .btn-lg { font-size: 16px; padding: 16px 24px; }
  .badges { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 10px; }
  .badge { min-width: 0; padding: 12px; }
  .badge-value { font-size: 19px; }
  .badge-label { font-size: 12px; margin-top: 2px; }
  .trust { grid-template-columns: 1fr; padding: 32px 20px; gap: 14px; }
  .catalog-head { margin-bottom: 24px; }
  .catalog-grid { gap: 12px; }
  .card-body { padding: 10px 12px 12px; gap: 8px; }
  .card-price { font-size: 14px; }
  .card-price span { font-size: 11px; }
  .card-tag { font-size: 11px; padding: 4px 8px; }
  .card-more { font-size: 13px; min-height: 44px; border-radius: 9px; }
  .price-row { padding: 14px 20px; }
  .price-qty { font-size: 15px; }
  .price-value { font-size: 16px; }
  .col-text .btn { width: 100%; }
  .steps-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .step { display: flex; gap: 16px; align-items: baseline; padding: 18px 20px; }
  .step-num { margin-bottom: 0; font-size: 14px; flex: none; }
  .step-title { font-size: 15px; margin-bottom: 2px; }
  .step-text { font-size: 14px; }
  .reviews-grid { margin-top: 20px; }
  .review { padding: 20px; gap: 14px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 6px; padding: 24px 20px; font-size: 13px; }
}
