/* === Полный модельный ряд: две «плывущие» строки плашек + модалка модуля === */

/* ряды — на всю ширину экрана (плашки едут от края до края) */
.modline__rows { margin-top: var(--space-6); display: flex; flex-direction: column; gap: 8px; }

/* подпись ряда (со столешницей / без) — выровнена по контейнеру */
.modline__label {
  max-width: var(--container-max); margin-left: auto; margin-right: auto;
  padding: 0 var(--container-padding);
  font-family: var(--mono); font-size: var(--caption); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-dim);
}
.modline__label:not(:first-child) { margin-top: var(--space-3); }

/* подсказка между едущими рядами */
.modline__hint {
  max-width: var(--container-max); margin: var(--space-3) auto;
  padding: 0 var(--container-padding); text-align: center;
  font-family: var(--mono); font-size: var(--caption); letter-spacing: 0.06em; color: var(--ink-dim);
}

/* строка-бегущая лента */
/* ряд = горизонтальный скролл-контейнер: можно тащить рукой/мышью, авто-прокрутка на JS */
.modline__row {
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  cursor: grab; touch-action: pan-x;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.modline__row::-webkit-scrollbar { display: none; }
.modline__row.is-grab { cursor: grabbing; }
.modline__track { display: flex; gap: var(--space-3); width: max-content; }

/* карточка модуля */
.modcard {
  flex: none; width: 250px;
  display: flex; flex-direction: column;     /* фото сверху, текст снизу */
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: border-color var(--t-hover) var(--ease), transform var(--t-hover) var(--ease);
}
.modcard:hover { border-color: var(--accent); transform: translateY(-3px); }
.modcard__photo {
  display: block;                          /* span → блок, иначе aspect-ratio схлопывается */
  position: relative; width: 100%; aspect-ratio: 4 / 5; background: #fff; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.modcard__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.modcard__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.modcard__name { font-size: var(--body-s); font-weight: 700; color: var(--ink); line-height: 1.25; }
.modcard__price { font-family: var(--mono); font-size: var(--body-s); color: var(--accent); }

.modline__note { margin-top: var(--space-4); font-size: var(--body-s); color: var(--ink-muted); }
.modline__note a { color: var(--accent); border-bottom: 1px solid transparent; }
.modline__note a:hover { border-bottom-color: var(--accent); }

/* ===== модалка модуля ===== */
.modmodal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(10,11,13,0.75); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--t-hover) var(--ease); }
.modmodal.is-open { opacity: 1; }
.modmodal[hidden] { display: none; }
.modmodal__panel {
  width: min(560px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--bg-secondary); border: 1px solid var(--border-strong);
  border-radius: var(--radius); position: relative;
}
.modmodal__photo { aspect-ratio: 4 / 3; background: #fff; position: relative; border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.modmodal__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.modmodal__body { padding: var(--space-4); display: flex; flex-direction: column; gap: 12px; }
.modmodal__art { font-family: var(--mono); font-size: var(--caption); color: var(--ink-dim); letter-spacing: 0.06em; }
.modmodal__name { font-family: var(--display); font-size: var(--h3); font-weight: 700; color: var(--ink); line-height: 1.15; margin-top: -6px; }
.modmodal__desc { font-size: var(--body); line-height: 1.5; color: var(--ink-muted); }
.modmodal__specs { width: 100%; border-collapse: collapse; font-size: 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.modmodal__specs td { padding: 10px 14px; vertical-align: top; }
.modmodal__specs tr:nth-child(even) { background: rgba(127,127,127,0.07); }
.modmodal__spk { color: var(--ink-muted); white-space: nowrap; padding-right: 16px; }
.modmodal__spv { color: var(--ink); text-align: right; font-weight: 600; }
.modmodal__price { font-family: var(--mono); font-size: var(--h3); color: var(--accent); font-weight: 700; }
.modmodal__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.modmodal__actions .btn { margin: 0; }
.modmodal__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(10,11,13,0.6); border: 1px solid var(--border-strong); color: #fff;
  cursor: pointer; display: grid; place-items: center; font-size: 16px;
}
.modmodal__close:hover { background: rgba(10,11,13,0.85); }

/* --- адаптив --- */
@media (max-width: 560px) {
  .modcard { width: 132px; }
  .modcard__name { font-size: 11.5px; }
  .modcard__price { font-size: 11px; }
  .modcard__body { padding: 8px 10px; gap: 2px; }
}


/* === Premium Line: ряд-ссылка в тоне лендинга, люкс за счёт фото === */
.premline__label { margin-top: var(--space-4); }
.premline__label span { color: var(--accent); font-weight: 700; letter-spacing: .14em; }

.premline {
  position: relative; display: block; overflow: hidden; text-decoration: none;
  padding: 10px 0 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.premline__track {
  display: flex; gap: var(--space-3); width: max-content;
  animation: premline-run 52s linear infinite;
}
.premline:hover .premline__track { animation-play-state: paused; }
@keyframes premline-run { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .premline__track { animation: none; } }

.premcard {
  flex: none; position: relative; width: 300px; aspect-ratio: 4/3;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(242, 98, 46, .28);
  box-shadow: 0 6px 26px rgba(0, 0, 0, .35);
}
.premcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 62%; transition: transform .5s ease; }
.premline:hover .premcard img { transform: scale(1.03); }
.premcard__cap {
  position: absolute; inset: auto 0 0 0; padding: 34px 14px 11px;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 12, .82));
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.premcard__name { font-size: var(--body-s); font-weight: 700; color: #f4f5f7; line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.premcard__soon { font-family: var(--mono); font-size: var(--caption); color: #ffb37a;
  letter-spacing: .1em; text-transform: uppercase; flex: none; }

.premline__cta {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) translateY(8px);
  background: var(--accent); color: #17130d; font-weight: 800; font-size: 15px;
  padding: 13px 26px; border-radius: 999px; opacity: 0; transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .45); pointer-events: none; white-space: nowrap;
}
.premline:hover .premline__cta { opacity: 1; transform: translate(-50%, -50%); }
@media (hover: none) {
  .premline__cta { opacity: 1; transform: none; left: auto; top: auto; right: 14px; bottom: 20px;
    font-size: 13px; padding: 10px 18px; }
  .premcard { width: 240px; }
}

/* === Выравнивание: карточки модельного ряда = размер премиум-карточек (300×225) === */
.modcard { width: 300px; height: 225px; }
.modcard__photo { aspect-ratio: auto; flex: 1 1 auto; min-height: 0; }
.modcard__body { padding: 8px 13px 10px; gap: 2px; }
.modcard__name { font-size: 12.5px; line-height: 1.2; }
.modcard__price { font-size: 12px; }
@media (hover: none) {
  .modcard { width: 240px; height: 180px; }
  .modcard__name { font-size: 11.5px; }
}
