/* ============ Tajima Catalog — общие стили ============ */
:root {
  --black: #111214;
  --dark: #1c1d21;
  --yellow: #f5c400;
  --yellow-dark: #d4a900;
  --white: #ffffff;
  --gray-bg: #f4f4f5;
  --gray-line: #e3e3e6;
  --gray-text: #6b6c72;
  --green: #1e9e4a;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(17, 18, 20, .07);
  --shadow-hover: 0 8px 24px rgba(17, 18, 20, .14);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: 'Montserrat', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ============ Шапка ============ */
.header {
  background: var(--black);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  min-width: 0;
}
.logo__badge { height: 28px; width: auto; flex: none; display: block; }
/* Логотип Висал АН: тёмный SVG — на белой плашке для тёмного фона */
.logo__visalm {
  background: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  flex: none;
}
.logo__visalm img { height: 20px; width: auto; display: block; }
.footer__logo {
  height: 30px;
  width: auto;
  background: #fff;
  border-radius: 6px;
  padding: 5px 10px;
  box-sizing: content-box;
  display: block;
  margin-top: 28px;
}
.order-btn.order-btn--visalm {
  background: #fff;
  color: var(--black);
  border: 1px solid var(--gray-line);
  margin-top: 10px;
}
.order-btn.order-btn--visalm img { height: 26px; width: 26px; border-radius: 6px; object-fit: cover; }
.logo__sub {
  font-size: 11px;
  color: #b9bac0;
  letter-spacing: .04em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Поиск в шапке (тёмная тема) — рядом с поиском в заголовке раздела каталога (светлая тема ниже) */
.header__search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  padding: 4px 4px 4px 14px;
  flex: 1;
  max-width: 260px;
  min-width: 130px;
}
.header__search input {
  background: none; border: none; outline: none; color: #fff; font: inherit; font-size: 13px; width: 100%;
}
.header__search input::placeholder { color: #9a9ba1; }
.header__search button {
  background: var(--yellow); border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 11px; cursor: pointer; flex: none;
}
@media (max-width: 860px) { .header__search { order: 10; max-width: none; flex-basis: 100%; margin-top: 8px; } }

/* Поиск — встроен в заголовок раздела каталога, не в шапку (светлая тема) */
.section__head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.catalog-search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: 20px;
  padding: 4px 4px 4px 16px;
  width: 100%;
  max-width: 320px;
  margin-top: 4px;
}
.catalog-search input {
  background: none;
  border: none;
  outline: none;
  font: inherit;
  font-size: 14px;
  color: var(--black);
  width: 100%;
}
.catalog-search input::placeholder { color: var(--gray-text); }
.catalog-search button {
  background: var(--yellow);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 13px;
  cursor: pointer;
  flex: none;
}
@media (max-width: 700px) { .catalog-search { max-width: none; } }

.header__contacts {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header__phone {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}
.header__phone:hover { color: var(--yellow); }
.msngr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 20px;
  white-space: nowrap;
  transition: transform .15s, filter .15s;
}
.msngr:hover { transform: translateY(-1px); filter: brightness(1.1); }
.msngr svg, .msngr img { width: 16px; height: 16px; flex: none; display: block; }
.msngr--wa { background: #25d366; color: #fff; }
.msngr--tg { background: #2aabee; color: #fff; }
.msngr--max { background: linear-gradient(135deg, #4A7DF5 0%, #7C4CF0 55%, #9B3FE0 100%); color: #fff; }

/* ============ Hero ============ */
.hero {
  background: linear-gradient(135deg, var(--black) 0%, #26272c 60%, #3a3b40 100%);
  color: var(--white);
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(245, 196, 0, .18) 0%, transparent 70%);
}
/* Сетка hero: текст слева, слайдер-витрина справа */
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero__slide {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
}
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 28px 28px 78px;
  box-sizing: border-box;
  transition: opacity .35s;
}
.hero__slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(17, 18, 20, .85);
  color: #fff;
  padding: 12px 16px 15px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 64px;
  display: flex;
  align-items: center;
}
.hero__slide-caption span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero__slide:hover .hero__slide-caption { background: rgba(17, 18, 20, .95); }
.hero__slide-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .18);
}
.hero__slide-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--yellow);
}
@keyframes hs-bar { from { width: 0; } to { width: 100%; } }
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__slide { display: none; }
}

.hero__badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  max-width: 700px;
}
.hero h1 span { color: var(--yellow); }
.hero p {
  margin-top: 18px;
  font-size: 17px;
  color: #c9cad0;
  max-width: 560px;
}
.hero__cta {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform .15s, filter .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--yellow { background: var(--yellow); color: var(--black); }
.btn--yellow:hover { background: var(--yellow-dark); }
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, .35);
}
.btn--outline:hover { border-color: var(--yellow); color: var(--yellow); }

/* ============ Преимущества ============ */
.trust {
  background: var(--gray-bg);
  padding: 36px 0;
  border-bottom: 1px solid var(--gray-line);
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.trust__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.trust__icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.trust__item b { display: block; font-size: 15px; }
.trust__item small { color: var(--gray-text); font-size: 13px; }

/* ============ Секции ============ */
.section { padding: 56px 0; }
.section__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  margin-bottom: 8px;
}
.section__subtitle {
  color: var(--gray-text);
  margin-bottom: 32px;
}

/* ============ Плитки категорий ============ */
.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--yellow);
}
.cat-card__icon { color: var(--yellow-dark); }
.cat-card__icon svg, .cat-card__icon img { width: 38px; height: 38px; display: block; object-fit: contain; }
.cat-tab svg, .cat-tab img { width: 15px; height: 15px; vertical-align: -2.5px; margin-right: 5px; object-fit: contain; }
.cat-card__name { font-size: 18px; font-weight: 700; }
.cat-card__count { color: var(--gray-text); font-size: 14px; }
.cat-card__link {
  margin-top: auto;
  padding-top: 10px;
  color: var(--yellow-dark);
  font-weight: 700;
  font-size: 14px;
}

/* ============ Карточки товаров ============ */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.p-card {
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.p-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.p-card__img {
  aspect-ratio: 1 / 1;
  background: var(--white);
  padding: 18px;
  overflow: hidden;
  position: relative;
}
.p-card__img img { width: 100%; height: 100%; object-fit: contain; }

/* Водяной знак «Акция» — CSS-наложение поверх фото, не запекается в файл
   картинки (важно: в фиде/маркетплейсе должно остаться чистое фото). */
.badge-sale {
  position: absolute;
  top: 10px;
  left: -30px;
  width: 130px;
  transform: rotate(-45deg);
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  padding: 4px 0;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  pointer-events: none;
  z-index: 2;
}
.p-card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  border-top: 1px solid var(--gray-line);
}
.p-card__name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}
.p-card__sku { color: var(--gray-text); font-size: 12.5px; }
.p-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.p-card__price { font-size: 18px; font-weight: 800; }
.stock {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.stock::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.stock--out { color: var(--gray-text); }
.stock--out::before { background: #c8c9ce; }

/* ============ Акции, описание, характеристики ============ */
.price-old { color: var(--gray-text); font-weight: 600; font-size: .75em; margin-left: 6px; }
.price-old--big { font-size: .5em; }
.sale-badge {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  vertical-align: middle;
  margin-left: 8px;
}
.product-page__desc { margin: 0 0 18px; color: #3a3b40; max-width: 560px; }
.product-page__specs { margin-bottom: 22px; }
.product-page__specs h3 { font-size: 16px; margin-bottom: 10px; }
.product-page__specs table { border-collapse: collapse; width: 100%; max-width: 560px; font-size: 14px; }
.product-page__specs td { padding: 7px 10px; border-bottom: 1px solid var(--gray-line); }
.product-page__specs td:first-child { color: var(--gray-text); width: 45%; }

/* ============ Страница категории ============ */
.breadcrumbs {
  padding: 18px 0 0;
  font-size: 13.5px;
  color: var(--gray-text);
}
.breadcrumbs a:hover { color: var(--yellow-dark); }
.cat-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 30px;
}
.cat-tab {
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--gray-line);
  background: var(--white);
  cursor: pointer;
  transition: all .15s;
}
.cat-tab:hover { border-color: var(--yellow); }
.cat-tab.active { background: var(--black); color: var(--yellow); border-color: var(--black); }

/* ============ Карточка товара ============ */
.product-page {
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: 48px;
  padding: 36px 0 64px;
}
.product-page__img {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 30px;
  aspect-ratio: 1 / 1;
  background: var(--white);
  overflow: hidden;
  position: relative;
}
.product-page__img img { width: 100%; height: 100%; object-fit: contain; }
.product-page h1 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; line-height: 1.25; }
.product-page__sku { color: var(--gray-text); margin-top: 10px; font-size: 14.5px; }
.product-page__price-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 22px 0 6px;
  flex-wrap: wrap;
}
.product-page__price { font-size: 34px; font-weight: 800; }
.product-page__note { color: var(--gray-text); font-size: 13px; margin-bottom: 24px; }
.order-box {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 10px;
}
.order-box__title { font-weight: 700; margin-bottom: 14px; }
.order-box__btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  transition: transform .15s, filter .15s;
}
.order-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.order-btn svg, .order-btn img { width: 22px; height: 22px; flex: none; display: block; object-fit: contain; }
.order-btn--wa { background: #25d366; }
.order-btn--tg { background: #2aabee; }
.order-btn--max { background: linear-gradient(135deg, #4A7DF5 0%, #7C4CF0 55%, #9B3FE0 100%); }
.order-btn--phone { background: var(--black); color: var(--yellow); }
.order-box__source {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--gray-text);
  text-decoration: underline;
}
.order-box__source:hover { color: var(--black); }

/* ============ О компании ============ */
.about {
  background: var(--black);
  color: var(--white);
  padding: 56px 0;
}
.about h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.about h2 span { color: var(--yellow); }
.about p { margin-top: 16px; color: #c9cad0; max-width: 760px; }

/* ============ Подвал ============ */
.footer {
  background: var(--dark);
  color: #b9bac0;
  padding: 40px 0 30px;
  font-size: 14px;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.footer b { color: var(--white); display: block; margin-bottom: 10px; font-size: 15px; }
.footer a:hover { color: var(--yellow); }
.footer__contact { display: block; margin-bottom: 6px; }
/* Колонки подвала — flex, чтобы логотип и карта прижимались к низу на одну линию */
.footer__grid > div { display: flex; flex-direction: column; align-items: flex-start; }
.footer__logolink { display: block; margin-top: auto; padding-top: 18px; }
.footer__logolink .footer__logo { margin-top: 0; }
.footer__map { display: block; margin-top: auto; padding-top: 18px; max-width: 210px; width: 100%; }
.footer__map img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #34353b;
  display: block;
  transition: filter .2s;
}
.footer__map:hover img { filter: brightness(1.15); }
.footer__bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid #34353b;
  font-size: 12.5px;
  color: #85868d;
}

/* ============ Адаптив ============ */
@media (max-width: 860px) {
  .product-page { grid-template-columns: 1fr; gap: 28px; }
  .header__phone { font-size: 14px; }
  /* .header__search переходит на новую строку с этой же ширины (order:10 выше) —
     без flex-wrap здесь родитель остаётся nowrap, а flex-basis:100% у поиска
     ломает шапку, сжимая логотип и контакты */
  .header__inner { flex-wrap: wrap; row-gap: 4px; }
}
@media (max-width: 640px) {
  .logo__badge { height: 24px; }
  .header__contacts .msngr span { display: none; }
  .msngr { padding: 8px 10px; }
  .hero { padding: 44px 0 52px; }
}
