/* ============================================================
   Лестницы на каркасе — базовые стили
   ============================================================ */

:root {
  --accent: #e8732c;          /* основной оранжевый */
  --accent-dark: #c95e1e;
  --accent-light: #fbf3a5cc;  /* фон кнопки "Продукция" */
  --accent-soft: #fbe3cc;
  --text: #1a1a1a;
  --text-muted: #555;
  --border: #e5e5e5;
  --white: #fff;
  --header-height: 96px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.4;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   ШАПКА
   ============================================================ */

.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-height);
}

/* --- Логотип --- */

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.logo__icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.logo__title {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: #1a1a4d;
  line-height: 1.15;
  color: #23233f;
}

.logo__subtitle {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.3;
}

/* --- Кнопка "Продукция" --- */

.btn-catalog {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  transition: background .2s, box-shadow .2s;
  flex-shrink: 0;
}

.btn-catalog:hover {
  background: #f8d5ae;
  box-shadow: 0 4px 12px rgba(232, 115, 44, .25);
}

.icon-burger { width: 20px; height: 14px; color: #333; }

/* --- Корзина --- */

.cart {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.cart__icon { width: 48px; height: 48px; }

.cart__count {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}

/* --- Адрес и режим работы --- */

.address {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  border: 1px dashed var(--accent);
  border-radius: 12px;
  flex-shrink: 0;
}

.address__icon { width: 34px; height: 34px; flex-shrink: 0; }

.address__street {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.address__hours {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Контакты --- */

.contacts {
  margin-left: auto;
  text-align: left;
  flex-shrink: 0;
}

.contacts__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  transition: color .2s;
}

.contacts__phone:hover { color: var(--accent); }

.contacts__tg { width: 26px; height: 26px; }

.contacts__email {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-muted);
}

.contacts__email:hover { color: var(--accent); }

.contacts__callback {
  display: inline-block;
  margin-top: 4px;
  margin-left: 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contacts__callback:hover { color: var(--accent-dark); }

/* --- Мобильный бургер --- */

.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}

.header__burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
}

/* --- Кнопка наверх --- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 90;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.to-top.visible { opacity: 1; pointer-events: auto; }

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 1400px) {
  .logo__subtitle { max-width: 260px; }
  .header__inner { gap: 20px; }
  .btn-catalog { padding: 14px 20px; font-size: 16px; }
}

@media (max-width: 1200px) {
  .address__hours { display: none; }
  .address__street { font-size: 14px; }
  .contacts__email { display: none; }
  .contacts__callback { margin-left: 0; display: block; }
}

@media (max-width: 1024px) {
  .logo__subtitle { display: none; }
  .address { display: none; }
}

@media (max-width: 760px) {
  :root { --header-height: 64px; }
  .container { padding: 0 16px; }

  .header__inner { gap: 12px; }
  .btn-catalog { display: none; }
  .cart { width: 40px; height: 40px; }
  .cart__icon { width: 40px; height: 40px; }
  .contacts { display: none; }
  .logo__icon { width: 40px; height: 40px; }
  .logo__title { font-size: 18px; }

  .header__burger { display: flex; }
}
