/* Xfashionclub — светлый ювелирный стиль */
:root {
  --bg: #faf7f2;
  --paper: #ffffff;
  --ink: #1f1b16;
  --muted: #7a7166;
  --line: #e9e2d7;
  --gold: #a8864f;
  --gold-dark: #8a6c3c;
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 22px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--gold-dark); margin: 0 0 12px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: rgba(250, 247, 242, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.logo img { height: 40px; width: auto; }
.logo .logo-short { display: none; height: 26px; }
.top-nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top-nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.top-nav a:not(.btn):hover { color: var(--ink); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px;
  border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff; font: 500 15px var(--sans);
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 18px; font-size: 14px; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Первый экран */
.hero { padding: 64px 0; background: radial-gradient(900px 420px at 90% 0%, #efe4d2 0%, transparent 60%); }
.hero-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.05fr 1fr; gap: 64px; } }
.hero h1 em { font-style: italic; color: var(--gold-dark); }
.hero-art { position: relative; aspect-ratio: 1 / 1; }
.hero-ph { position: absolute; overflow: hidden; border-radius: var(--radius); background: #efe8dc; box-shadow: 0 18px 40px -22px rgba(31, 27, 22, .45); }
.hero-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 1.4s ease, transform 7s ease-out; }
.hero-ph img.fade-in { opacity: 0; transform: scale(1.06); }
.hero-ph img.fade-out { opacity: 0; }
.hero-ph:hover img { transform: scale(1.04); }
.hero-ph-0 { left: 0; top: 6%; width: 58%; height: 72%; z-index: 1; }
/* обе маленькие карточки заходят на край большой — одинаково, «лесенкой» */
.hero-ph-1 { right: 0; top: 0; width: 46%; height: 46%; z-index: 2; }
.hero-ph-2 { right: 8%; bottom: 0; width: 42%; height: 46%; z-index: 3; }
@media (max-width: 899px) { .hero-art { aspect-ratio: 4 / 3; } }

/* Преимущества */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.trust-in { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .trust-in { grid-template-columns: repeat(4, 1fr); } }
.trust-in > div { padding: 22px 16px; display: grid; gap: 2px; font-size: 14px; border-left: 1px solid var(--line); }
.trust-in > div:nth-child(odd) { border-left: 0; }
@media (min-width: 900px) { .trust-in > div:nth-child(odd) { border-left: 1px solid var(--line); } .trust-in > div:first-child { border-left: 0; } }
@media (max-width: 899px) { .trust-in > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.trust b { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.trust span { color: var(--muted); }

/* Разделы плитками */
.cats { padding-top: 64px; }
.sec-head { margin-bottom: 22px; }
.sec-head h2 { margin: 0; }
.cat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .cat-tiles { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; } }
.tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: #fff; background: #d9cdb9; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(20, 16, 12, .62)); }
.tile:hover img { transform: scale(1.05); }
.tile-name { position: absolute; left: 16px; bottom: 30px; z-index: 1; font-family: var(--serif); font-size: 26px; line-height: 1; }
.tile-count { position: absolute; left: 16px; bottom: 12px; z-index: 1; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }

/* Telegram-блок */
.tg-band { background: #1c1a17; color: var(--bg); margin-top: 8px; }
.tg-in { display: grid; gap: 24px; align-items: center; padding: 56px 16px; }
@media (min-width: 820px) { .tg-in { grid-template-columns: 1fr auto; gap: 48px; } }
.tg-band p { color: #cfc6b8; max-width: 560px; margin: 0; }
.tg-band .eyebrow { color: var(--gold); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1c1a17; }
.btn-gold:hover { background: #c3a26b; border-color: #c3a26b; }
.lead { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 0 28px; }
.hero-act { display: flex; flex-wrap: wrap; gap: 12px; }

/* Каталог */
#catalog { padding-top: 48px; scroll-margin-top: 64px; }
.cat-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cat-head h2 { margin: 0; }
.search input { width: min(320px, 100%); height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); font: 16px var(--sans); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--gold); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 26px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  text-decoration: none; font-size: 14px; white-space: nowrap; }
.chip span { color: var(--muted); margin-left: 4px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on span { color: #cfc6b8; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; margin-bottom: 56px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; text-decoration: none; }
.card-img { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: #efe8dc; margin-bottom: 12px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .4s; }
.card-img .card-img-2 { position: absolute; inset: 0; opacity: 0; }
@media (hover: hover) { .card:hover .card-img-2 { opacity: 1; } }
.card:hover .card-img img { transform: scale(1.03); }
.badge { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(250, 247, 242, .92);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.card-cat { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.card-title { font-family: var(--serif); font-size: 20px; line-height: 1.2; margin: 4px 0 6px; }
.card-price { font-weight: 600; }
.empty { padding: 40px 0 80px; color: var(--muted); font-size: 18px; }

/* Доставка */
.info { display: grid; gap: 40px; padding: 56px 16px; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
@media (min-width: 820px) { .info { grid-template-columns: 1fr 1fr; } }
.ticks, .steps { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 0 0 12px 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border: 1.5px solid var(--gold); border-radius: 50%; }
.steps { counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--serif); font-size: 18px; }

/* Товар */
.crumbs { padding-top: 20px; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs span { margin: 0 6px; }
.product { display: grid; gap: 32px; padding-top: 20px; padding-bottom: 56px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; } .gallery { position: sticky; top: 88px; } }
.gallery-main { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: #efe8dc; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.thumb { flex: none; width: 72px; aspect-ratio: 1; padding: 0; border: 1.5px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { border-color: var(--ink); }
.price { font-size: 26px; font-weight: 600; margin: 0 0 24px; }
.price .muted { font-size: 15px; font-weight: 400; }
.spec { padding: 18px 0; border-top: 1px solid var(--line); }
.spec h3 { display: flex; justify-content: space-between; gap: 12px; }
.spec-price { font-family: var(--sans); font-size: 16px; font-weight: 600; white-space: nowrap; }
.spec p { margin: 0 0 12px; }
.spec dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; font-size: 15px; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }
.buy-act { display: flex; flex-wrap: wrap; gap: 12px; padding: 22px 0; border-top: 1px solid var(--line); }
.buy-act .btn { flex: 1 1 200px; }
.form-box { padding: 24px; margin-bottom: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 88px; }
.form-box h2 { font-size: 26px; }
.note { padding: 22px 24px; background: #f4eee4; border-radius: var(--radius); }
.note h3 { margin-bottom: 12px; }

/* Форма */
.order { display: grid; gap: 14px; }
.order label { display: grid; gap: 6px; font-size: 14px; }
.order input:not([type=checkbox]), .order textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); font: 16px var(--sans); color: var(--ink); }
.order input:focus, .order textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
.order .check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.order .check input { margin-top: 3px; accent-color: var(--ink); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.order-msg { margin: 0; padding: 12px 14px; border-radius: 10px; background: #eef5ec; color: #2f5a2a; }
.order-msg.err { background: #fbeeee; color: #8a2b2b; }

/* Текстовые страницы */
.text-page, .empty-page { max-width: 760px; padding-top: 48px; padding-bottom: 72px; }
.text-page h2 { font-size: 24px; margin-top: 1.4em; }

/* Подвал */
.foot { background: #1c1a17; color: var(--bg); padding: 48px 0; font-size: 15px; }
.foot-logo { height: 46px; width: auto; margin-bottom: 14px; }
.foot-muted { color: #a59c8f; }
.foot-in { display: grid; gap: 24px; }
@media (min-width: 720px) { .foot-in { grid-template-columns: 2fr 1fr 1fr; } }
.foot p { margin: 0 0 6px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--gold); }

/* Нижняя панель «Заказать» на телефоне */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(250, 247, 242, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); transform: translateY(100%); transition: transform .25s; }
.buybar div { display: grid; line-height: 1.25; min-width: 0; }
.buybar span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar.show { transform: none; }
@media (max-width: 899px) { .buybar { display: flex; } }

@media (max-width: 560px) {
  .top-nav a:not(.btn) { display: none; }
  .logo .logo-full { display: none; }
  .logo .logo-short { display: block; }
  .top-in { height: 60px; }
  .hero { padding: 36px 0 40px; }
  .card-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
/* чтобы панель «Заказать» не закрывала низ подвала */
@media (max-width: 899px) { body:has(.buybar) .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } }

/* Фильтр по металлу */
.chips-mat { margin-top: -14px; }
.chip-mat { display: inline-flex; align-items: center; gap: 7px; background: transparent; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.dot-silver { background: linear-gradient(135deg, #f1f1f3, #b9bcc2); }
.dot-gold { background: linear-gradient(135deg, #f3dc9b, #b8893a); }
.dot-bijou { background: linear-gradient(135deg, #efe3e0, #b99a8f); }
.dot-vgold { background: linear-gradient(135deg, #f7e6b8, #c9a25a); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 2px #fff, 0 0 0 3px #d9c08a; }

/* Видео в галерее */
.gallery-main video, .gallery-main iframe { width: 100%; height: 100%; object-fit: cover; border: 0; background: #000; display: block; }
.thumb { position: relative; }
.thumb-video::after { content: ""; position: absolute; inset: 0; background: rgba(20, 16, 12, .35); }
.play { position: absolute; left: 50%; top: 50%; z-index: 1; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(250, 247, 242, .95); }
.play::before { content: ""; position: absolute; left: 10px; top: 7px; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent var(--ink); }
.badge-video { left: auto; right: 10px; background: rgba(28, 26, 23, .82); color: #fff; }

/* Посты только с видео: кадр видео вместо фото */
.card-img video, .tile video, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

/* Колонки страницы товара не растягиваются содержимым (много миниатюр) — иначе галерея шире экрана */
.product > * { min-width: 0; }
.gallery, .gallery-main, .thumbs { max-width: 100%; }
.thumbs { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.thumb { scroll-snap-align: start; }
@media (max-width: 560px) { .thumb { width: 64px; } }

/* Коллаж на первом экране: плавная смена фото, медленный «наезд» камеры */
.hero-ph img.live { animation: hero-drift 9s ease-out both; }
@keyframes hero-drift { from { transform: scale(1.06); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero-ph img { transition: opacity .3s; } .hero-ph img.live { animation: none; } }

/* «Показать ещё» и страницы */
.more { display: grid; justify-items: center; gap: 14px; margin: -20px 0 64px; }
.more-count { margin: 0; color: var(--muted); font-size: 14px; }
.more .btn { min-width: 240px; }
.pager { display: flex; gap: 18px; font-size: 14px; color: var(--muted); }
.pager a { text-decoration: none; color: var(--ink); }
