/* Тема almaks: первая версия. Палитра: графит + тёплый акцент. */
:root {
  --ink: #101b33;
  --ink-soft: #334155;
  --muted: #64748b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --line: #e2e8f0;
  --accent: #ff6b12;
  --accent-hover: #d6540a;
  --accent-tint: #fff1e6;
  --radius: 14px;
  --radius-sm: 10px;
}

body {
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--ink); }
a:hover, a:focus { color: var(--accent-hover); text-decoration: none; }
h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 700; }

/* Верхняя полоска */
#top { background: var(--ink); border: 0; color: #cfd6de; }
#top a, #top .btn-link, #top .btn-link strong { color: #cfd6de; }
#top a:hover, #top .btn-link:hover { color: var(--accent); }

/* Шапка */
header { background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 0; }
header #logo img { max-height: 56px; }
header #logo h1 { margin: 6px 0 0; font-size: 24px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
header #logo h1 a { color: var(--ink); }
header #logo h1 a:hover { color: var(--accent-hover); }
#search .form-control { border-color: var(--line); background: var(--bg); border-radius: 10px 0 0 10px; height: 46px; }
#search .btn-default { border-color: var(--accent); border-radius: 0 10px 10px 0; height: 46px; background: var(--accent); color: #fff; }
#search .btn-default:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
#cart .btn-inverse { background: var(--ink); border-color: var(--ink); border-radius: 10px; }
#cart .btn-inverse:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Меню категорий — светлые «таблетки» */
#menu { background: transparent; border: 0; border-radius: 0; margin: 0; min-height: 0; }
#menu .navbar-header { min-height: 0; }
#menu .navbar-collapse { border: 0; box-shadow: none; padding: 10px 0; }
#menu .navbar-nav { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
#menu .navbar-nav > li { float: none; }
#menu .navbar-nav > li > a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 13px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
#menu .navbar-nav > li > a:hover, #menu .navbar-nav > li.dropdown.open > a {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}
#menu .dropdown-menu { border: 0; border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 16px 32px rgba(15,23,42,.14); padding: 16px 0; margin-top: 8px; }
#menu .dropdown-menu a { padding: 8px 20px; font-size: 13px; }
#menu .dropdown-menu a:hover { background: var(--accent-tint); color: var(--ink); }
#menu .see-all { font-weight: 600; color: var(--accent-hover); }

/* Блоки и карточки товаров */
.panel, .well, .thumbnail, .product-thumb {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  background: var(--surface);
}
.product-thumb { transition: box-shadow .2s, transform .2s; margin-bottom: 24px; }
.product-thumb:hover { box-shadow: 0 6px 18px rgba(31, 42, 54, .08); transform: translateY(-2px); }
.product-thumb .caption h4 { font-size: 15px; min-height: 42px; }
.product-thumb .caption h4 a { color: var(--ink); }
.product-thumb .price { color: var(--ink); font-weight: 700; font-size: 17px; }
.product-thumb .price-tax { color: var(--muted); font-size: 12px; }

/* Кнопки */
.btn-primary, .btn-warning, .btn-info { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 700; border-radius: var(--radius); }
.btn-primary:hover, .btn-primary:focus, .btn-warning:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--ink); }
.btn-default { border-radius: var(--radius); }

/* Главный блок на главной странице */
.hero {
  background: linear-gradient(120deg, var(--ink) 0%, #2d3d4f 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 56px 48px;
  margin: 20px 0 32px;
}
.hero h1 { color: #fff; font-size: 34px; line-height: 1.25; margin-top: 0; }
.hero p { color: #d7dee6; font-size: 16px; max-width: 640px; }
.hero .btn { margin-top: 12px; padding: 10px 22px; font-size: 15px; }
.hero .accent { color: var(--accent); }

.advantages { margin: 0 0 32px; }
.advantages .item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; height: 100%; }
.advantages .item i { color: var(--accent); font-size: 22px; }
.advantages .item h4 { margin: 10px 0 6px; font-size: 15px; }
.advantages .item p { margin: 0; color: var(--muted); font-size: 13px; }

/* Карточка товара */
#product .breadcrumb { background: transparent; padding-left: 0; }
#product .thumbnails img { border-radius: var(--radius); }
#product h1 { font-size: 26px; line-height: 1.3; }
#product .price-group .price { color: var(--ink); font-size: 26px; font-weight: 700; }
#button-cart { font-size: 15px; padding: 11px 26px; }
#product .nav-tabs > li.active > a { color: var(--ink); border-bottom: 3px solid var(--accent); }
#product .nav-tabs > li > a { color: var(--muted); }

/* Подвал */
footer { background: var(--ink); color: #aab4c0; margin-top: 40px; padding: 40px 0 20px; border-top: 4px solid var(--accent); }
footer h5 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
footer a { color: #cfd6de; }
footer a:hover { color: var(--accent); }
footer hr { border-color: #33414f; }

@media (max-width: 767px) {
  .hero { padding: 32px 22px; }
  .hero h1 { font-size: 24px; }
  #product h1 { font-size: 22px; }
}

/* ===== Каталог: список товаров и категории ===== */
#column-left .list-group { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
#column-left .list-group-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink-soft); padding: 10px 14px; }
#column-left .list-group-item:last-child { border-bottom: 0; }
#column-left .list-group-item:hover { color: var(--accent-hover); background: #fffaf0; }
#column-left .list-group-item.active, #column-left a.list-group-item.active { background: #fff4df; color: var(--ink); font-weight: 700; border-left: 3px solid var(--accent); }
#column-left .list-group-item .badge { background: var(--bg); color: var(--muted); }
#column-left .panel-heading, #column-left .panel-title { color: var(--ink); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; }
#column-left .panel { border: 0; box-shadow: none; }
#column-left .panel-body { padding: 0; }

#content h2 { font-size: 24px; margin-top: 4px; margin-bottom: 16px; }
#content .category-desc { color: var(--muted); }

/* Панель сортировки и отображения */
#content .well.well-sm { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; margin-bottom: 18px; padding: 10px 14px; }
#content .btn-group .btn-default { background: var(--surface); border-color: var(--line); color: var(--ink-soft); }
#content .btn-group .btn-default.active, #content .btn-group .btn-default:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
#content .form-control.input-sm, #content select.form-control { border-color: var(--line); border-radius: var(--radius); }

/* Карточка товара в списке */
.product-layout .product-thumb { display: flex; flex-direction: column; height: calc(100% - 24px); }
.product-layout .product-thumb .image { display: flex; align-items: center; justify-content: center; height: 220px; padding: 14px; background: #fff; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.product-layout .product-thumb .image img { max-height: 190px; width: auto; max-width: 100%; object-fit: contain; }
.product-layout .product-thumb .caption { padding: 14px 16px 10px; flex: 1; }
.product-layout .product-thumb .caption h4 { font-size: 15px; line-height: 1.35; min-height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-layout .product-thumb .caption p { color: var(--muted); font-size: 12px; line-height: 1.5; min-height: 54px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 8px; }
.product-layout .product-thumb .price { margin: 4px 0 0; }
.product-layout .product-thumb .button-group { display: flex; border-top: 1px solid var(--line); background: #fafbfc; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.product-layout .product-thumb .button-group button { flex: 0 0 auto; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ink-soft); padding: 9px 12px; }
.product-layout .product-thumb .button-group button:first-child { flex: 1 1 auto; text-align: left; font-weight: 700; border-left: 0; }
.product-layout .product-thumb .button-group button:hover { background: var(--accent); color: var(--ink); }

/* Пагинация */
.pagination > li > a, .pagination > li > span { border-color: var(--line); color: var(--ink-soft); border-radius: var(--radius) !important; margin: 0 2px; }
.pagination > .active > span, .pagination > .active > a { background: var(--ink); border-color: var(--ink); }
.pagination > li > a:hover { background: #fff4df; border-color: var(--accent); color: var(--ink); }

/* ===== Структура как у вирона.рф (список преимуществ, нижняя панель на телефоне) ===== */
body, button, input, select, textarea { font-family: 'Inter', Arial, sans-serif; }
body { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
h1, h2, h3, h4, h5 { font-family: 'Poppins', Arial, sans-serif; font-weight: 700; letter-spacing: -.01em; }
#content h2 { font-size: 23px; }

.features { display: flex; flex-direction: column; gap: 22px; margin: 8px 0 36px; padding: 28px 28px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.features .feature { display: flex; align-items: flex-start; gap: 18px; }
.features .feature > i { flex: 0 0 44px; font-size: 34px; color: var(--accent); text-align: center; margin-top: 2px; }
.features .feature h4 { margin: 0 0 4px; font-size: 16px; color: var(--ink); }
.features .feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* Нижняя панель навигации на телефоне */
.mobile-tabbar { display: none; }
@media (max-width: 767px) {
  body { padding-bottom: 64px; }
  .mobile-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(31, 42, 54, .08); }
  .mobile-tabbar a { flex: 1 1 0; text-align: center; padding: 8px 2px 6px; font-size: 11px; color: var(--muted); line-height: 1.2; }
  .mobile-tabbar a i { display: block; font-size: 18px; margin-bottom: 3px; color: var(--ink); }
  .mobile-tabbar a:hover, .mobile-tabbar a:focus { color: var(--accent-hover); }
  .mobile-tabbar a:hover i { color: var(--accent-hover); }
  .features { padding: 20px 18px 4px; }
  .features .feature > i { font-size: 28px; flex-basis: 36px; }
}
