:root{
  --bg:#0b1116; --card:#101820; --muted:#9fb0be; --txt:#e8eef4; --accent:#e34234; --green:#27c26a;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; color:var(--txt); background:radial-gradient(1200px 700px at 80% -10%, #213243 0%, #0b1116 50%);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Arial, sans-serif;
}

/* контейнеры */
.wrap{max-width:1200px; margin:0 auto; padding: 0 20px;}
.row{display:flex; align-items:center; justify-content:space-between; gap:16px;}
.muted{opacity:.88}

/* шапка */
#site-header{
  position: sticky; top:0; z-index:1000;
  background: rgba(10,16,22,.85);
  backdrop-filter: blur(6px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.head{ height:64px; }
.logo{display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit}
.logo img{ height:40px; filter: invert(1) brightness(1.12) contrast(1.05); }
.logo span{ font-weight:800; letter-spacing:.02em; font-size:22px; }
.topnav{ display:flex; gap:20px; }
.topnav a{ color:#fff; text-decoration:none; opacity:.9 }
.topnav a:hover{ color: var(--accent); opacity:1 }

/* герой */
.hero{ padding: 24px 0 8px; }
.hero h1{ margin:0 0 6px; font-size: 40px; line-height:1.12; letter-spacing:-.01em; }
.hero .lead{ margin:0 0 14px; }
.actions{ display:flex; gap:12px; flex-wrap:wrap; }
.btn{
  display:inline-block; padding:12px 22px; border-radius:12px; text-decoration:none;
  background: var(--accent); color:#fff; font-weight:700; box-shadow: 0 8px 24px rgba(227,66,52,.3);
  border: 1px solid rgba(255,255,255,.12);
}
.btn:hover{ filter: brightness(1.08); }
.btn.ghost{ background: transparent; border:1px solid rgba(255,255,255,.25); box-shadow:none; color:#fff; }
.btn.ghost:hover{ background: rgba(255,255,255,.06); }

/* full-bleed секция: на всю ширину окна */
.full-bleed{ width:100vw; margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw); }

/* СЛАЙДЕР */
.slider-container{
  position:relative;
  width:100vw;
  height:72vh; min-height:380px; max-height:760px;
  overflow:hidden;
}
.slide{ display:none; width:100%; height:100%; }
.slide.active{ display:block; }
.slide img{ width:100%; height:100%; object-fit:cover; }

.prev,.next{
  position:absolute; top:50%; transform:translateY(-50%);
  width:42px; height:42px; border-radius:50%;
  display:grid; place-items:center; font-size:20px; cursor:pointer;
  color:#fff; border:1px solid rgba(255,255,255,.25);
  background:rgba(16,24,32,.6); backdrop-filter: blur(6px);
}
.prev{ left:14px; } .next{ right:14px; }
.prev:hover,.next:hover{ background:rgba(16,24,32,.85); }

/* карточки преимуществ */
h2{margin: 28px 0 14px}
.grid{ display:grid; gap:16px; }
.g3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.card{
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px; padding:16px;
  background: rgba(16,24,32,.55);
}
.footer{
  display:flex; align-items:center; justify-content:space-between;
  padding:26px 0 42px; color:var(--muted);
}
.footer a{ color:var(--muted); text-decoration:none }
.footer a:hover{ color:#fff }

/* ===== ГЕРОЙ поверх слайдера ===== */
.hero-slider{ position:relative; }
.hero-slider .overlay{
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  padding-top: 0;
}
.hero-slider .overlay .wrap{
  position: absolute;
  bottom: 12%;
  right: 8%;
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 28px 32px;
  border-radius: 12px;
  max-width: 600px;
  pointer-events: auto;
}
.hero-slider .overlay h1,
.hero-slider .overlay .lead {
  color:#fff;
  margin:0 0 16px;
}
.hero-slider .overlay .actions .btn{ margin-right:12px; }

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ "Смотреть каталог" ===== */
.catalog-wrap {
  position: relative;
  display: inline-block;
}
.catalog-btn { position: relative; z-index: 6; }
.catalog-menu {
  position: absolute;
  top: 100%; left: 0;
  min-width: 240px;
  background: rgba(16,24,32,.96);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 8px 0;
  margin-top: 0;
  box-shadow: 0 12px 34px rgba(0,0,0,.35);

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.8s ease-in-out,
              transform 0.8s ease-in-out,
              visibility 0.8s ease-in-out;
  z-index: 10;
}
.catalog-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
}
.catalog-menu a:hover { background: rgba(255,255,255,.08); }
.catalog-wrap:hover .catalog-menu,
.catalog-wrap:focus-within .catalog-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* ===== Хиты продаж ===== */
.hits .prod{
  display:block;
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  overflow:hidden;
  background:rgba(16,24,32,.55);
  text-decoration:none;
  color:#fff;
  transform:translateZ(0);
}
.hits .prod img{
  width:100%; height:240px; object-fit:cover; display:block;
  transition: transform .25s ease;
}
.hits .prod:hover img{ transform: scale(1.04) }
.hits .p-title{ padding:12px 14px; font-weight:700 }

/* адаптив */
@media (max-width:992px){
  .hero h1{ font-size:32px }
  .g3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .slider-container{ height:56vh; min-height:280px; }
  .hero-slider .overlay .wrap{ bottom: 8%; right: 5%; max-width: 90%; }
}
@media (max-width:768px){
  .head{ height:56px }
  .logo img{ height:32px } .logo span{ font-size:20px }
  .topnav{ gap:12px; }
  .hero{ padding-top:16px }
  .hero h1{ font-size:26px }
  .slider-container{ height:40vh; min-height:220px; }
  .g3{ grid-template-columns: 1fr; }
  .hero-slider .overlay .wrap{ position: static; margin: 20px auto 0; display:block; }
}
/* ====== MOBILE HEADER / BURGER ====== */
.burger{
  display:none;
  width:40px; height:40px; border:1px solid rgba(255,255,255,.15);
  border-radius:10px; background:rgba(16,24,32,.6);
  backdrop-filter: blur(6px);
  cursor:pointer; padding:8px; gap:4px;
}
.burger span{
  display:block; height:2px; background:#fff; border-radius:2px;
}
@media (max-width: 992px){
  .topnav{ display:none; }
  .burger{ display:inline-grid; align-content:center }
}

/* затемняющий фон */
.mobile-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.5); z-index: 999;
  opacity:0; visibility:hidden; transition:opacity .25s ease, visibility .25s ease;
}

/* выездная панель */
.mobile-panel{
  position:fixed; top:0; right:0; height:100vh; width:84vw; max-width:360px;
  background:#0f151b; border-left:1px solid rgba(255,255,255,.08);
  z-index:1000; transform:translateX(100%);
  transition: transform .28s ease;
  display:flex; flex-direction:column; padding:18px;
}
.mobile-panel .mp-head{
  display:flex; justify-content:space-between; align-items:center; margin-bottom:10px;
  font-weight:700;
}
.mobile-panel .mp-close{
  background:transparent; border:0; color:#fff; font-size:22px; cursor:pointer;
}
.mobile-panel a{
  color:#fff; text-decoration:none; padding:14px 8px; border-radius:10px;
  border:1px solid rgba(255,255,255,.06); margin:6px 0; background:rgba(255,255,255,.02);
}
.mobile-panel a:hover{ background:rgba(255,255,255,.06) }
.mobile-panel .mp-actions{ margin-top:auto; display:grid; gap:10px }

/* состояние "меню открыто" */
body.menu-open{ overflow:hidden }
body.menu-open .mobile-overlay{ opacity:1; visibility:visible }
body.menu-open .mobile-panel{ transform:translateX(0) }

/* Чтобы шапка не перекрывалась слайдером на мобиле */
@media (max-width: 768px){
  #site-header{ position:sticky; top:0; z-index:1001 }
}

/* Чуть ниже слайдер на мобиле, чтобы заголовки читались */
@media (max-width: 768px){
  .slider-container{ height: 52vh; min-height: 320px; }
}

/* Плашка на слайдере — немного меньше на мобайле */
@media (max-width: 768px){
  .hero-slider .overlay .wrap{
    right: 4%;
    left: 4%;
    bottom: 10%;
    max-width: none;
    padding: 20px;
  }
}
/* На мобильных убираем hover-выпадение у кнопки "Смотреть каталог" — будем вести на catalog.html */
@media (max-width: 992px){
  .catalog-wrap .catalog-menu{ display:none !important; }
}
/* ===== Мобильные правки hero-плашки и кнопок ===== */
@media (max-width: 768px){
  /* плашка компактнее и ниже */
  .hero-slider .overlay .wrap{
    right: 4%;
    left: 4%;
    bottom: 6%;
    padding: 16px;
    max-width: none;
    background: rgba(0,0,0,.82);
    border-radius: 12px;
  }

  /* размеры текста на плашке */
  .hero-slider .overlay h1{
    font-size: 22px;
    line-height: 1.2;
    margin: 0 0 8px;
  }
  .hero-slider .overlay .lead{
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 12px;
  }

  /* кнопки — в колонку и на всю ширину */
  .actions{
    flex-direction: column;
    gap: 10px;
  }
  .actions .btn{
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    border-radius: 12px;
  }

  /* сам слайдер чуть ниже, чтобы «шапка» не перекрывала */
  .slider-container{
    height: 50vh;
    min-height: 320px;
  }
}

/* ===== Бургер: гарантированно показать справа на мобилке ===== */
@media (max-width: 992px){
  .burger{
    display: inline-grid !important;
    margin-left: auto;        /* уводим вправо */
    place-content: center;
  }
  .burger span{ width: 100%; }
}
/* ===== Моб. кнопка "Смотреть каталог" в шапке ===== */
.mobile-cta{ display:none; }
@media (max-width: 768px){
  .mobile-cta{ display:block; margin-left:auto; }
  .mobile-cta .btn-sm{
    padding:10px 14px;
    border-radius:10px;
    font-size:14px;
  }
}

/* ===== Перестановка секций на мобиле: сначала ХИТЫ, потом ПРЕИМУЩЕСТВА ===== */
@media (max-width: 768px){
  /* превращаем контейнер main.wrap в колонку, чтобы заработал order */
  main.wrap{
    display:flex;
    flex-direction:column;
  }
  .hits{ order:1; margin-top:12px; }   /* Сразу под слайдер */
  .features{ order:2; }                /* Ниже */
}

/* ===== Уточнение высоты слайдера на мобиле (единое правило) ===== */
@media (max-width: 768px){
  .slider-container{
    height:50vh; /* одна финальная высота на мобиле */
    min-height:320px;
  }
}
/* ===== Mobile-first упрощение хедера/героя ===== */
@media (max-width: 768px) {
  /* прячем большой оверлей с заголовком и кнопками поверх слайдера */
  .hero-slider .overlay { display: none !important; }

  /* высота слайдера на мобилке побольше, чтобы карусель «дышала» */
  .slider-container { 
    height: 64vh; 
    min-height: 360px; 
    max-height: 700px; 
  }

  /* отступы вокруг карусели */
  .full-bleed { margin-top: 0; }
  .slider-wrapper { padding-top: 8px; }

  /* шапка + мобильная CTA справа */
  #site-header { height: 56px; }
  .head { height: 56px; }
  .topnav { display: none; }                 /* меню-лента скрыта на мобилке */
  .mobile-cta { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff; 
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(227,66,52,.28);
  }

  /* Хиты сразу после карусели */
  section.hits { padding-top: 18px; }
}

/* чуть плавнее стрелки слайдера на мобилке */
.prev, .next { transition: background .25s ease, opacity .25s ease; }
