/* =============================================
   extras.css — поиск на главной, избранное,
   полки «Хиты» / «Вы смотрели», кнопка «Наверх»
   ============================================= */

/* ─── ПОИСК В HERO ─────────────────────────────── */
/* Hero обрезал выпадающие подсказки (overflow:hidden) — режем только по горизонтали */
.hero:has(.hero-search) {
  overflow-x: clip;
  overflow-y: visible;
  z-index: 3;
}
.hero-search {
  width: 100%;
  max-width: 560px;
  margin: 36px 0 8px;
  position: relative;
  z-index: 5;
}
.hero-search__form {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(17,17,17,0.75);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 999px;
  padding: 6px 6px 6px 48px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.hero-search__form:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-dim);
}
.hero-search__icon {
  position: absolute;
  left: 20px;
  color: var(--gold);
  pointer-events: none;
}
.hero-search__form input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--white);
  font: 300 1rem var(--font-body);
  padding: 10px 8px 10px 0;
}
.hero-search__form input::placeholder { color: var(--white-30); }
.hero-search__form input::-webkit-search-cancel-button { filter: invert(0.6); }
.hero-search__btn {
  flex-shrink: 0;
  background: var(--gold);
  color: var(--black);
  border: 0;
  border-radius: 999px;
  padding: 11px 24px;
  font: 500 0.8rem var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.hero-search__btn:hover { background: var(--gold-light); }

.hero-search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--black-soft);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  padding: 6px;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  text-align: left;
}
.hero-search__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--white);
  text-decoration: none;
  transition: background var(--transition-fast);
}
.hero-search__item:hover,
.hero-search__item.is-active { background: var(--white-10); }
.hero-search__thumb {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--black-light);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.hero-search__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-search__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hero-search__text strong {
  font-weight: 400;
  font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-search__text small { color: var(--white-30); font-size: 0.75rem; }
.hero-search__price {
  flex-shrink: 0;
  color: var(--gold);
  font-size: 0.85rem;
  white-space: nowrap;
}
.hero-search__price span { color: var(--white-30); font-size: 0.7rem; }
.hero-search__all {
  display: block;
  text-align: center;
  padding: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--white-10);
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.hero-search__all:hover { color: var(--gold-light); }
.hero-search__empty {
  padding: 16px;
  color: var(--white-60);
  font-size: 0.9rem;
  text-align: center;
}
.hero-search__empty a { color: var(--gold); }

.hero-search__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--white-30);
}
.hero-search__chips button {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white-60);
  border-radius: 999px;
  padding: 5px 12px;
  font: 300 0.75rem var(--font-body);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.hero-search__chips button:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 600px) {
  .hero-search { margin-top: 28px; }
  .hero-search__form { padding-left: 42px; }
  .hero-search__icon { left: 16px; }
  .hero-search__btn { padding: 10px 16px; }
  .hero-search__price { display: none; }
}

/* ─── СЕРДЕЧКО ─────────────────────────────────── */
.fav-btn {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--white-90);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.fav-btn svg { fill: none; transition: fill var(--transition-fast); }
.fav-btn:hover { background: rgba(10,10,10,0.8); color: var(--gold); }
.fav-btn--on { color: var(--gold); }
.fav-btn--on svg { fill: var(--gold); }
.fav-btn--pop { animation: favPop 0.35s ease; }
@keyframes favPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
/* В модальном окне — рядом с кнопкой «В корзину», не поверх фото */
.fav-btn--modal {
  position: static;
  width: 48px; height: 48px;
  background: var(--white-10);
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.modal__actions:has(.fav-btn--modal) { display: flex; gap: 10px; align-items: center; }

/* Значок в шапке */
.nav__fav {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--white-90);
  transition: color var(--transition-fast);
}
.nav__fav:hover { color: var(--gold); }
.nav__fav-count {
  position: absolute;
  top: -6px; right: -9px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--black);
  font-size: 10px;
  font-weight: 500;
  line-height: 17px;
  text-align: center;
}
.nav__fav-count[hidden] { display: none; }
.nav__fav-count--drawer {
  position: static;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}

/* ─── ПОЛКИ («Хиты», «Вы смотрели») ────────────── */
.shelf[hidden] { display: none; }
.shelf + .catalog-preview,
.catalog-preview + .shelf { padding-top: 0; }
.shelf__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.shelf__head .section__title { margin-bottom: 0; }
.shelf__nav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.shelf__all {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  margin-right: 12px;
  white-space: nowrap;
}
.shelf__all:hover { color: var(--gold-light); }
.shelf__arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: none;
  color: var(--white-90);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.shelf__arrow:hover { border-color: var(--gold); color: var(--gold); }

.shelf__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.shelf__track::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .shelf__track { grid-auto-columns: calc((100% - 3 * 20px) / 4); }
}
@media (max-width: 600px) {
  .shelf__head { align-items: flex-start; flex-direction: column; }
  .shelf__arrow { display: none; }
  .shelf__track { grid-auto-columns: 62%; gap: 12px; }
}

.mini-card {
  scroll-snap-align: start;
  display: block;
  background: var(--black-mid);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: var(--white);
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition);
}
.mini-card:hover { border-color: rgba(201,168,76,0.25); transform: translateY(-4px); }
.mini-card__img {
  position: relative;
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 40%, #2a2418 0%, var(--black-light) 70%);
  overflow: hidden;
}
.mini-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.mini-card:hover .mini-card__img img { transform: scale(1.05); }
.mini-card__ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-style: italic;
  color: rgba(201,168,76,0.45);
}
.mini-card__info { padding: 14px 16px 16px; }
.mini-card__brand {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.mini-card__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 8px;
}
.mini-card__price { font-size: 0.9rem; color: var(--white-90); }
.mini-card__price span { color: var(--white-30); font-size: 0.75rem; }

/* ─── КНОПКА «НАВЕРХ» ──────────────────────────── */
.to-top {
  position: fixed;
  left: 20px;
  bottom: 28px;
  z-index: 140;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.35);
  background: rgba(17,17,17,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}
.to-top--visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--gold); color: var(--black); }

@media (prefers-reduced-motion: reduce) {
  .fav-btn--pop { animation: none; }
  .to-top, .mini-card { transition: none; }
}

/* ─── ЗАГЛУШКА ВМЕСТО ФОТО (монограмма) ────────── */
.product__placeholder {
  background: radial-gradient(circle at 50% 40%, #2a2418 0%, var(--black-light) 70%);
  gap: 6px;
}
.product__placeholder .product__placeholder-letter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 5rem;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(201,168,76,0.5);
}
.product__placeholder .product__placeholder-note {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white-30);
}

/* ─── СЛАЙДЕР НА ПЕРВОМ ЭКРАНЕ ─────────────────── */
.hero--slider { min-height: auto; padding: 120px 0 56px; }
.hero--slider .hero__content { padding-top: 0; width: 100%; }

.hs { position: relative; }
/* Все слайды в одной ячейке — высота по самому высокому, без прыжков */
.hs-track { display: grid; }
.hs-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0s linear 0.7s;
}
.hs-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0s;
}
.hs-slide__eyebrow {
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.hs-slide__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 22px;
}
.hs-slide__title em { font-style: italic; color: var(--gold-light); }
.hs-slide__desc {
  max-width: 440px;
  color: var(--white-60);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 32px;
}

/* Картинки */
.hs-visual {
  position: relative;
  aspect-ratio: 5 / 4;
  max-height: 520px;
  width: 100%;
}
.hs-visual img {
  position: absolute;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55);
  border: 1px solid rgba(201,168,76,0.18);
  background: var(--black-light);
}
.hs-visual--single img {
  inset: 0 12%;
  width: 76%; height: 100%;
}
.hs-visual--single::before {
  content: '';
  position: absolute;
  inset: 10% 20%;
  background: radial-gradient(circle, rgba(201,168,76,0.28), transparent 70%);
  filter: blur(40px);
}
.hs-visual__img { width: 46%; height: 78%; transition: transform 0.9s ease; }
.hs-visual__img--1 { left: 0;    top: 14%; transform: rotate(-6deg); }
.hs-visual__img--2 { left: 27%;  top: 0;   z-index: 2; }
.hs-visual__img--3 { right: 0;   top: 18%; transform: rotate(6deg); }
.hs-slide.is-active .hs-visual__img--1 { transform: rotate(-8deg) translateX(-6px); }
.hs-slide.is-active .hs-visual__img--3 { transform: rotate(8deg) translateX(6px); }

/* Управление */
.hs-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.hs-dots { display: flex; gap: 8px; }
.hs-dot {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--white-30);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}
.hs-dot:hover { background: var(--white-60); }
.hs-dot.is-active { width: 28px; background: var(--gold); }
.hs-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: none;
  color: var(--white-90);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.hs-arrow:hover { border-color: var(--gold); color: var(--gold); }

.hero--slider .hero-search { margin-top: 44px; }
.hero--slider .hero__brands { margin-top: 28px; }

@media (max-width: 899px) {
  .hero--slider { padding: 96px 0 40px; }
  .hs-slide { grid-template-columns: 1fr; gap: 24px; }
  .hs-visual { order: -1; aspect-ratio: 4 / 3; max-height: 340px; }
  .hs-slide__eyebrow { margin-bottom: 12px; }
  .hs-slide__title { margin-bottom: 14px; }
  .hs-slide__desc { margin-bottom: 22px; }
  .hs-slide .btn { width: 100%; justify-content: center; }
  .hs-controls { justify-content: center; }
  .hs-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-slide, .hs-slide.is-active, .hs-visual__img { transition: none; transform: none; }
}
