/* ============================================================
   НМ-Скотч — сайт продажи клейкой ленты
   Основной: #22557c | Дополнительный: #e38d31
   ============================================================ */

:root {
  --primary: #22557c;
  --primary-dark: #1a4260;
  --primary-light: #2d6a99;
  --accent: #e38d31;
  --accent-dark: #c97a26;
  --dark: #1c2b3a;
  --text: #2c3e50;
  --muted: #6b7a89;
  --light: #f5f7fa;
  --border: #e2e8f0;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(34, 85, 124, 0.08);
  --shadow-hover: 0 8px 30px rgba(34, 85, 124, 0.15);
  --radius: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Верхняя линия ─── */
.topline {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
}
.topline .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.topline a { color: #cfe3f2; transition: color .2s; }
.topline a:hover { color: #fff; }
.topline-phone { font-weight: 600; color: #fff !important; }
.topline-city, .topline-mail { color: #cfe3f2; }

/* ─── Шапка ─── */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 20px;
}
.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}
.nav a:hover, .nav a.active { color: var(--primary); }
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }

.header-cta {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: var(--radius);
  transition: background .2s;
  white-space: nowrap;
}
.header-cta:hover { background: var(--accent-dark); }

/* Бургер */
.burger {
  display: none;
  background: none;
  border: none;
  width: 30px; height: 24px;
  flex-direction: column;
  justify-content: space-between;
}
.burger span {
  display: block;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: .3s;
}

/* ─── Герой / слайдер ─── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  overflow: hidden;
}
.hero .swiper { height: 100%; }
.hero-slide {
  display: flex;
  align-items: center;
  min-height: 480px;
  padding: 60px 0;
}
.hero-content { max-width: 560px; }
.hero-content h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -1px;
}
.hero-content h1 span { color: var(--accent); }
.hero-content p {
  font-size: 18px;
  color: #cfe3f2;
  margin-bottom: 28px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: all .2s;
  border: 2px solid transparent;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }

.hero .swiper-pagination-bullet { background: #fff; opacity: .4; }
.hero .swiper-pagination-bullet-active { background: var(--accent); opacity: 1; }
.hero .swiper-button-prev, .hero .swiper-button-next { color: #fff; }

/* ─── Преимущества ─── */
.features {
  padding: 70px 0;
  background: var(--light);
}
.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 40px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
  transition: transform .25s, box-shadow .25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-icon {
  width: 52px; height: 52px;
  background: rgba(227, 141, 49, .12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--muted); }

/* ─── Каталог на главной ─── */
.catalog-home { padding: 70px 0; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.cat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
}
.cat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); border-color: var(--primary-light); }
.cat-card-img { height: 180px; background: var(--light); display: flex; align-items: center; justify-content: center; }
.cat-card-img img { max-height: 140px; }
.cat-card-body { padding: 20px; }
.cat-card-body h3 { font-size: 17px; color: var(--primary); margin-bottom: 6px; }
.cat-card-body p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.cat-card-body a { color: var(--accent); font-weight: 600; font-size: 14px; }
.cat-card-body a:hover { color: var(--accent-dark); }

/* ─── Преимущества-цифры ─── */
.stats { background: var(--primary); color: #fff; padding: 60px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stat-num { font-size: 40px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 14px; color: #cfe3f2; margin-top: 6px; }

/* ─── Текстовый блок ─── */
.info-text { padding: 70px 0; }
.info-text h2 { color: var(--primary); font-size: 28px; margin-bottom: 16px; }
.info-text p { color: var(--muted); margin-bottom: 14px; max-width: 800px; }

/* ─── Форма обратной связи ─── */
.contact-cta { background: var(--light); padding: 70px 0; }
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-title { text-align: center; font-size: 24px; color: var(--primary); margin-bottom: 24px; font-weight: 700; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(227,141,49,.15);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  transition: background .2s;
}
.form-submit:hover { background: var(--accent-dark); }
.form-success {
  text-align: center;
  color: #2e7d32;
  font-weight: 600;
  padding: 12px;
  background: #e8f5e9;
  border-radius: var(--radius);
  margin-top: 12px;
  display: none;
}

/* ─── Страницы каталога ─── */
.page { padding: 40px 0 70px; }
.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  padding-top: 20px;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: var(--muted); }
.breadcrumbs .sep { margin: 0 8px; color: #c0c9d2; }
.page-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}
.catalog-layout { display: flex; gap: 30px; }

/* Сайдбар */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  align-self: flex-start;
}
.sidebar-title { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.sidebar ul li { margin-bottom: 4px; }
.sidebar ul li a {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  transition: all .2s;
}
.sidebar ul li a:hover { background: rgba(34,85,124,.06); color: var(--primary); }
.sidebar ul li a.active { background: var(--primary); color: #fff; font-weight: 500; }
.sidebar ul li ul { padding-left: 14px; margin-top: 2px; }

/* Продукты */
.products-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .25s;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); border-color: var(--primary-light); }
.product-img {
  height: 200px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.product-img img { max-height: 160px; object-fit: contain; }
.product-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 16px; color: var(--primary); margin-bottom: 8px; font-weight: 600; }
.product-desc { font-size: 13px; color: var(--muted); flex: 1; margin-bottom: 14px; }
.product-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  transition: color .2s;
}
.product-link:hover { color: var(--accent-dark); text-decoration: underline; }

/* ─── Карточка товара ─── */
.product-detail { display: flex; gap: 40px; }
.product-detail-img {
  flex: 1;
  background: var(--light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  min-height: 400px;
}
.product-detail-img img { max-height: 320px; }
.product-detail-info { flex: 1; }
.product-detail-info h1 { font-size: 30px; color: var(--primary); margin-bottom: 16px; }
.product-spec { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; }
.product-spec-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.product-spec-item:last-child { border-bottom: none; }
.product-spec-item .k { color: var(--muted); }
.product-spec-item .v { font-weight: 600; color: var(--primary); }
.product-detail-desc { color: var(--muted); margin-bottom: 24px; line-height: 1.7; }
.price {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 20px;
}
.price .rub { font-size: 20px; }

/* ─── Подвал ─── */
.footer { background: var(--dark); color: #93a4b5; padding: 60px 0 0; font-size: 14px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
}
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { color: #93a4b5; transition: color .2s; }
.footer ul li a:hover { color: var(--accent); }
.footer p { margin-bottom: 8px; }
.footer-logo { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-logo span { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  color: #6b7a89;
}

/* Кнопка вверх */
.to-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 46px; height: 46px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  transition: all .3s;
  z-index: 90;
}
.to-top:hover { background: var(--accent); }
.to-top.show { display: flex; }

/* ─── Адаптив ─── */
@media (max-width: 992px) {
  .catalog-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .product-detail { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0; right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 80px 30px 30px;
    box-shadow: -4px 0 20px rgba(0,0,0,.1);
    transition: right .3s;
    z-index: 200;
    gap: 20px;
  }
  .nav.open { right: 0; }
  .burger { display: flex; }
  .header-cta { display: none; }
  .hero-slide { min-height: 400px; padding: 40px 0; }
  .hero-content h1 { font-size: 32px; }
  .section-title { font-size: 26px; }
  .topline .container { justify-content: center; }
  .topline-city { display: none; }
}