/* ============================================
   RAYES — SOFA FABRICS · ПРЕМИУМ B2B СТИЛИ
   ============================================ */
:root {
  /* ФОН СТАЛ ТЕМНЕЕ, ЧТОБЫ ШАПКА ВЫДЕЛЯЛАСЬ */
  --bg: #F0EFEA; 
  --ink: #111111;
  --muted: #7A7570;
  --line: #E8E5E1;
  
  --gold: #C5A059;
  --gold-dark: #A6823F;

  --max: 1240px;
  --font: 'Montserrat', sans-serif;
  --font-head: 'Cormorant Garamond', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 15px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* Анимации при скролле */
.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; will-change: opacity, transform; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Заголовки */
h1, h2, .hero h1, .stat-num { font-family: var(--font-head); }

/* Шапка (Теперь она идеально белая с прозрачностью, выделяется на фоне --bg) */
header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; }

/* Логотип */
.logo-horizontal { display: flex; align-items: center; gap: 22px; text-decoration: none; }
.logo-icon { height: 38px; width: 38px; object-fit: contain; animation: logoPulse 2s ease-in-out infinite alternate; }
@keyframes logoPulse { 0% { transform: scale(1); } 100% { transform: scale(1.6); } }

.logo-text { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.brand-name { font-family: var(--font-head); font-size: 34px; font-weight: 700; letter-spacing: 6px; margin-right: -6px; line-height: 0.75; margin-bottom: 6px; padding-top: 4px; background: linear-gradient(180deg, #FDF5D3 0%, #D4AF37 40%, #9B772A 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(1px 2px 1px rgba(0,0,0,0.15)) drop-shadow(0px 4px 6px rgba(0,0,0,0.08)); }
.sub-row { display: flex; align-items: center; gap: 8px; }
.brand-sub { font-family: var(--font); font-size: 9px; font-weight: 600; letter-spacing: 3px; margin-right: -3px; color: var(--muted); line-height: 1; }
.line { height: 1px; width: 14px; background-color: var(--gold); opacity: 0.6; }

/* Меню и свечение */
.menu { display: flex; gap: 36px; font-size: 14px; letter-spacing: .5px; }
.menu a { color: var(--muted); transition: all 0.3s ease; font-weight: 500; }
.menu a:hover, .menu a.active { color: var(--gold); text-shadow: 0 0 12px rgba(197, 160, 89, 0.6); }
.burger { display: none; font-size: 24px; cursor: pointer; }

/* Hero баннер */
.hero { height: 85vh; min-height: 560px; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.35)); }
.hero-inner { position: relative; z-index: 2; color: #fff; }
.hero h1 { font-size: clamp(40px, 6vw, 70px); font-weight: 600; letter-spacing: .5px; line-height: 1.1; }
.hero p { font-size: 17px; margin: 24px 0 36px; max-width: 560px; color: rgba(255,255,255,.9); line-height: 1.7; }
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.08); transition: opacity 1.6s ease-in-out; }
.hero-slide.active { opacity: 1; animation: kenburns 6s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }

/* Кнопки */
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 15px 36px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; transition: .25s; cursor: pointer; font-weight: 600; }
.btn:hover { background: transparent; color: var(--ink); }
.btn-gold { border-color: var(--gold); background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn-outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }

/* Плашка преимуществ USP */
.usp-bar { background: #141414; color: #fff; border-bottom: 1px solid rgba(197, 160, 89, 0.2); }
.usp-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding: 24px 32px; }
.usp { flex: 1; min-width: 180px; text-align: center; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #E5E5E5; font-weight: 500;}

/* Секции */
section { padding: 96px 0; }
.eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 16px; }
h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 600; letter-spacing: .5px; margin-bottom: 24px; }
.lead { font-size: 17px; color: var(--muted); max-width: 640px; }

/* Пиллары */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 56px; }
.pillar h3 { font-size: 22px; margin-bottom: 12px; font-weight: 600; font-family: var(--font-head); }
.pillar p { color: var(--muted); font-size: 14px; }
.pillar .num { font-size: 13px; color: var(--gold); letter-spacing: 2px; margin-bottom: 20px; border-top: 1px solid var(--line); padding-top: 16px; font-weight: 600; }

/* Статистика */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-num { font-size: clamp(48px, 5vw, 72px); font-weight: 600; letter-spacing: 1px; line-height: 1; color: var(--ink); }
.stat-lbl { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-top: 12px; font-weight: 600; }

/* Каталог и карточки */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.filters select, .filters input { padding: 12px 18px; border: 1px solid var(--line); background: #fff; font-family: inherit; font-size: 14px; color: var(--ink); cursor: pointer; outline: none;}
.filters input { cursor: text; min-width: 220px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card { background: #fff; border: 1px solid var(--line); overflow: hidden; transition: .3s; display: block;}
.card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.08); transform: translateY(-4px); border-color: var(--gold); }
.card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.card:hover .thumb img { transform: scale(1.05); }
.card-body { padding: 24px; }
.card .tag { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.card h3 { font-size: 24px; font-weight: 600; margin: 8px 0; font-family: var(--font-head);}
.card .meta { font-size: 13px; color: var(--muted); }
.swatches { display: flex; gap: 6px; margin-top: 14px; }
.swatch-mini { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); overflow: hidden; }
.swatch-mini img { width: 100%; height: 100%; object-fit: cover; }

/* Страница коллекции и ЛУПА */
.coll-head { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.coll-head .cover { aspect-ratio: 1; object-fit: cover; width: 100%; border: 1px solid var(--line); }
.spec { width: 100%; border-collapse: collapse; margin-top: 24px; }
.spec td { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec td:first-child { color: var(--muted); width: 45%; }
.colors-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 40px; }
.swatch { cursor: crosshair; }
.swatch .img { aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); position: relative; border-radius: 4px;}
.swatch .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease-out; transform-origin: center center; }
.swatch .img:hover img { transform: scale(2.5); transition: transform 0.1s linear; }
.swatch .cname { font-size: 13px; margin-top: 10px; font-weight: 500;}
.swatch .ccode { font-size: 11px; color: var(--muted); }

/* Кнопка Корзины в каталоге */
.add-to-cart-btn { background: transparent; border: 1px solid var(--gold); color: var(--gold); padding: 6px 8px; border-radius: 4px; cursor: pointer; font-size: 10px; font-weight: 600; margin-top: 8px; width: 100%; transition: 0.2s; text-transform: uppercase; font-family: var(--font);}
.add-to-cart-btn:hover { background: rgba(197, 160, 89, 0.1); }
.add-to-cart-btn.added { background: var(--gold); color: #fff; }

/* Кнопка Очистить корзину */
.clear-cart-btn { font-size: 10px; color: var(--muted); cursor: pointer; transition: 0.2s; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.clear-cart-btn:hover { color: #d9534f; }

/* Плавающие Мессенджеры */
.floating-messengers { position: fixed; bottom: 32px; right: 32px; display: flex; flex-direction: column; gap: 12px; z-index: 99; }
.msg-btn { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 20px rgba(0,0,0,0.15); transition: 0.3s; font-family: var(--font); font-size: 14px;}
.msg-btn:hover { transform: scale(1.1); color: #fff; }
.msg-tg { background: #229ED9; }
.msg-max { background: #111; border: 2px solid var(--gold); color: var(--gold); }

/* Плавающая Корзина Образцов */
.floating-cart { position: fixed; bottom: 32px; left: 32px; background: var(--gold); color: #fff; padding: 14px 24px; border-radius: 30px; display: none; align-items: center; gap: 12px; z-index: 99; font-weight: 600; box-shadow: 0 10px 20px rgba(197, 160, 89, 0.4); transition: 0.3s; font-size: 14px; text-decoration: none;}
.floating-cart:hover { background: var(--gold-dark); transform: translateY(-3px); color: #fff;}
.floating-cart.visible { display: flex; }
.cart-badge { background: #fff; color: var(--gold); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;}

/* Шаги (Технологии) */
.steps { margin-top: 56px; }
.step { display: grid; grid-template-columns: 80px 1fr; gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); }
.step .n { font-size: 14px; color: var(--gold); letter-spacing: 2px; font-weight: 600;}
.step h3 { font-size: 24px; font-weight: 600; margin-bottom: 10px; font-family: var(--font-head);}
.step p { color: var(--muted); font-size: 15px;}

/* Формы */
.contacts-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 56px; }
.form { display: grid; gap: 18px; max-width: 560px; }
.form input, .form textarea { padding: 14px 16px; border: 1px solid var(--line); background: #fff; font-family: inherit; font-size: 14px; width: 100%; outline: none; }
.form input:focus, .form textarea:focus { border-color: var(--gold); }
.form label { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: block; font-weight: 500;}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* Лайтбокс */
.lightbox { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(15,15,15,.95); align-items: center; justify-content: center; padding: 24px; backdrop-filter: blur(4px); }
.lightbox.open { display: flex; }
.lb-content { max-width: 640px; width: 100%; text-align: center; position: relative;}
.lb-content img { width: 100%; max-height: 75vh; object-fit: cover; border: 1px solid rgba(255,255,255,.1); }
.lb-caption { color: #fff; margin-top: 20px; display: flex; justify-content: space-between; font-size: 14px; letter-spacing: 1px; }
.lb-caption span:last-child { color: rgba(255,255,255,.55); }
.lb-close { position: absolute; top: -40px; right: 0; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; font-weight: 300; transition: color .2s;}
.lb-close:hover { color: var(--gold); }

/* Футер */
footer { background: #0A0A0A; color: #fff; padding: 64px 0 40px; border-top: 1px solid rgba(197, 160, 89, 0.2); }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
footer a { color: rgba(255,255,255,.65); transition: color .2s; }
footer a:hover { color: var(--gold); }
footer h4 { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; color: var(--gold); font-weight: 600;}
footer li { list-style: none; margin-bottom: 12px; font-size: 13px; }
footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 24px; font-size: 12px; color: rgba(255,255,255,.4); }

/* Адаптив */
@media(max-width: 900px) {
  .pillars, .grid, .colors-grid { grid-template-columns: repeat(2, 1fr); }
  .coll-head { grid-template-columns: 1fr; gap: 32px; }
  .colors-grid { grid-template-columns: repeat(3, 1fr); }
  .contacts-wrap { grid-template-columns: 1fr; gap: 40px; }
}
@media(max-width: 700px) {
  .usp-inner { gap: 14px; }
  .usp { min-width: 45%; font-size: 10px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  
  .logo-icon { height: 28px; width: 28px; } 
  .brand-name { font-size: 26px; letter-spacing: 4px; margin-right: -4px; margin-bottom: 5px; }
  .brand-sub { font-size: 7px; letter-spacing: 2px; margin-right: -2px; }
  .line { width: 10px; }
  
  .floating-messengers { bottom: 20px; right: 20px; }
  .floating-cart { bottom: 20px; left: 20px; padding: 10px 18px; font-size: 12px; }
  .msg-btn { width: 48px; height: 48px; font-size: 12px; }
}
@media(max-width: 600px) {
  .container { padding: 0 20px; }
  .menu { display: none; }
  .menu.open { display: flex; position: absolute; top: 80px; left: 0; right: 0; flex-direction: column; background: var(--bg); padding: 24px; gap: 20px; border-bottom: 1px solid var(--line); }
  .burger { display: block; }
  .grid, .pillars, .two, footer .cols { grid-template-columns: 1fr; }
  .colors-grid { grid-template-columns: repeat(2, 1fr); }
  section { padding: 64px 0; }
  .step { grid-template-columns: 1fr; gap: 12px; padding: 32px 0;}
}