:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #000000;
  --muted: #333333;
  --primary: #DC143C;
  --primary-hover: #B22222;
  --btn-text: #ffffff;
  --dark: #000000;
  --header-bg: #000000;
  --footer-bg: #000000;
  --footer-text: #ffffff;
  --footer-muted: #cccccc;
  --feature-border: #000000;
  --img-bg: #f7f7f7;
  --detail-bg: #ffffff;
  --detail-border: #e6e6e6;
  --soft: #f5f5f5;
  --th-bg: #111111;
  --th-text: #ffffff;
  --nav-bg: linear-gradient(180deg, #111111 0%, #000000 100%);
}

* {
  box-sizing: border-box;
}

/* Photo protection: prevent drag-save and accidental selection of images */
img {
  -webkit-user-drag: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(1080px, 100% - 2rem);
  margin: 0 auto;
}

main.container {
  padding-bottom: 3rem;
}

.site-header {
  background: var(--header-bg);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.header-phone {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--primary);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}

nav a {
  margin-left: 1.25rem;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

nav a:hover {
  color: var(--primary);
}

.hero {
  padding: 4rem 0 3rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 4vw, 3.75rem);
}

.hero p {
  max-width: 44rem;
  margin: 0 0 1.75rem;
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 0.95rem 1.75rem;
  background: var(--primary);
  color: var(--btn-text);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.button:hover {
  background: var(--primary-hover);
}

.features {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 4rem;
}

.features article {
  background: var(--surface);
  border: 2px solid var(--feature-border);
  border-radius: 18px;
  padding: 1.5rem;
}

.features h2 {
  margin-top: 0;
}

.page-title {
  padding: 3rem 0 1.5rem;
}

.page-title .model-code {
  color: var(--primary);
  font-weight: 700;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.product-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-auto-rows: 1fr;
}

.product-card {
  padding: 1rem;
  border-radius: 14px;
  background: var(--surface);
  border: 2px solid var(--primary);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.product-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  height: 100%;
  justify-content: space-between;
}

.product-info {
  flex: 1;
}

.product-image {
  flex-shrink: 0;
  width: 100%;
  max-width: 220px;
  min-height: 220px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--img-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin: 0 auto;
  padding: 0.75rem;
  box-sizing: border-box;
}

.product-image img {
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: contain;
  border-radius: 8px;
}

.product-spec-link {
  display: inline-block;
  margin-top: auto;
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: var(--btn-text);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: center;
  width: 100%;
}

.product-card h2 {
  margin: 0 0 1rem;
  color: var(--primary);
  text-align: center;
  font-size: 1.25rem;
  min-height: 3.2rem;
}

.product-spec-link:hover {
  background: var(--primary-hover);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
}

.pagination-button {
  border: 1px solid var(--primary);
  background: var(--surface);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-button:hover,
.pagination-button.is-active {
  background: var(--primary);
  color: var(--btn-text);
}

.product-detail {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--detail-border);
  border-radius: 24px;
  background: var(--detail-bg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.product-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.35rem;
  align-items: stretch;
  margin-bottom: 0.1rem;
}

.detail-image {
  max-width: 380px;
  min-height: 360px;
  margin: 0;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid var(--detail-border);
  background: var(--detail-bg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.detail-image img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
}

.product-summary {
  margin-top: 0;
}

.product-summary-card {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--detail-border);
  background: var(--detail-bg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.product-summary-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.08rem;
  line-height: 1.2;
  color: var(--text);
}

.product-summary-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.product-summary-card li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted);
}

.product-summary-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--primary);
}


 .product-detail h2,
 .product-detail h3 {
  margin-bottom: 0.35rem;
  color: var(--text);
}

 .product-detail h3 {
  font-size: 1.04rem;
  line-height: 1.25;
}

 .product-detail p,
 .product-detail li {
  color: var(--muted);
}

 .product-detail ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

 .product-detail table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--detail-border);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  background: var(--detail-bg);
  margin-top: 0.2rem;
}

 .product-detail th,
 .product-detail td {
  border: 1px solid var(--detail-border);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

 .product-detail th {
  background: var(--th-bg);
  color: var(--th-text);
}

 .product-detail td:nth-child(2) {
  color: var(--text);
  font-weight: 600;
}

 .product-detail a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 980px) {
  .product-hero {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    background: var(--nav-bg);
    border-top: 1px solid #222222;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    display: block;
    margin-left: 0;
    padding: 0.85rem 0;
    border-bottom: 1px solid #1f1f1f;
    font-size: 0.98rem;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .detail-image {
    max-width: 100%;
    min-height: auto;
  }

  .detail-image img {
    max-height: 280px;
  }
}

.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--detail-border);
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

.pdf-link:hover {
  color: var(--primary-hover);
  background: var(--soft);
}

.pdf-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
}

.pdf-icon svg {
  width: 100%;
  height: 100%;
}

.carousel-section {
  padding: 2rem 0;
}

.carousel-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow: hidden;
  flex: 1;
}

.carousel-track .product-card {
  flex: 0 0 calc(33.333% - 0.667rem);
  min-width: 0;
}

.carousel-btn {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.carousel-btn:hover {
  background: var(--primary);
  color: var(--btn-text);
}

@media (max-width: 768px) {
  .carousel-track .product-card {
    flex: 0 0 calc(50% - 0.5rem);
  }
}

@media (max-width: 480px) {
  .carousel-track .product-card {
    flex: 0 0 100%;
  }
}

.site-footer {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--footer-text);
  background: var(--footer-bg);
  border-top: 3px solid var(--primary);
}

.footer-contacts {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.footer-contacts a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contacts a:hover {
  color: var(--accent);
}

.footer-links {
  margin-top: 0.75rem;
}

.footer-links a {
  color: var(--footer-muted);
  text-decoration: underline;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--footer-text);
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.25rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: var(--dark);
  color: var(--footer-text);
  border: 1px solid var(--primary);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  font-size: 0.95rem;
  line-height: 1.45;
}

.cookie-banner-text {
  flex: 1 1 320px;
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.6rem;
}

.cookie-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cookie-btn-accept {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--btn-text);
}

.cookie-btn-accept:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.cookie-btn-decline {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--btn-text);
}

.cookie-btn-decline:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

@media (max-width: 480px) {
  .cookie-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.9rem 1rem;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}

/* ============================================================
   Автоматические темы по месяцам (theme-01 … theme-12)
   Класс на <html> ставит инлайн-скрипт. При отключённом JS
   используется :root выше (Классика Ametek).
   ============================================================ */

html.theme-01 { /* Январь · Индастриал */
  --primary: #ff6a00; --primary-hover: #e05c00; --btn-text: #ffffff;
  --dark: #2b2b2e; --bg: #f4f4f2; --surface: #ffffff; --text: #232326; --muted: #5c5c62;
  --header-bg: linear-gradient(180deg, #3a3a3f, #2b2b2e); --footer-bg: #2b2b2e;
  --feature-border: #d8d8da; --img-bg: #eef0f0; --detail-border: #e2e2e4; --soft: #ececea;
}

html.theme-02 { /* Февраль · Холодный синий */
  --primary: #1e6fd9; --primary-hover: #185bb4; --btn-text: #ffffff;
  --dark: #10233f; --bg: #f5f8fc; --surface: #ffffff; --text: #16233a; --muted: #4f6076;
  --header-bg: linear-gradient(180deg, #16355f, #10233f); --footer-bg: #10233f;
  --feature-border: #dbe4f0; --img-bg: #eef3f9; --detail-border: #dbe4ef; --soft: #eef3f9;
}

html.theme-03 { /* Март · Весенний изумруд */
  --primary: #00a651; --primary-hover: #008f45; --btn-text: #ffffff;
  --dark: #0a3d2c; --bg: #f6faf8; --surface: #ffffff; --text: #183228; --muted: #52695e;
  --header-bg: linear-gradient(180deg, #0e5239, #0a3d2c); --footer-bg: #0a3d2c;
  --feature-border: #dcebe2; --img-bg: #eef6f1; --detail-border: #dbeae1; --soft: #eef6f1;
}

html.theme-04 { /* Апрель · Мята */
  --primary: #0e9f9f; --primary-hover: #0b8686; --btn-text: #ffffff;
  --dark: #0c3333; --bg: #f2fbfb; --surface: #ffffff; --text: #163030; --muted: #4f6a6a;
  --header-bg: linear-gradient(180deg, #114b4b, #0c3333); --footer-bg: #0c3333;
  --feature-border: #d3ebeb; --img-bg: #ecf7f7; --detail-border: #d3ebeb; --soft: #ecf7f7;
}

html.theme-05 { /* Май · Летний зелёный */
  --primary: #3aa13a; --primary-hover: #2f8b2f; --btn-text: #ffffff;
  --dark: #1c3a1c; --bg: #f7faf5; --surface: #ffffff; --text: #1c2f1c; --muted: #557055;
  --header-bg: linear-gradient(180deg, #275227, #1c3a1c); --footer-bg: #1c3a1c;
  --feature-border: #dcebdc; --img-bg: #eff7ee; --detail-border: #dcebd9; --soft: #eff7ee;
}

html.theme-06 { /* Июнь · Солнечный */
  --primary: #f39c12; --primary-hover: #d98a0b; --btn-text: #201505;
  --dark: #3d2e10; --bg: #fdfaf2; --surface: #ffffff; --text: #33270f; --muted: #6b5d3f;
  --header-bg: linear-gradient(180deg, #574214, #3d2e10); --footer-bg: #3d2e10;
  --feature-border: #f0e4c4; --img-bg: #faf4e2; --detail-border: #efe3c2; --soft: #faf4e2;
}

html.theme-07 { /* Июль · Тропический голубой */
  --primary: #14a3c7; --primary-hover: #1089a8; --btn-text: #ffffff;
  --dark: #0d2f3a; --bg: #f3fbfd; --surface: #ffffff; --text: #14323c; --muted: #4f6c75;
  --header-bg: linear-gradient(180deg, #123f4d, #0d2f3a); --footer-bg: #0d2f3a;
  --feature-border: #d3edf3; --img-bg: #ecf8fb; --detail-border: #d3edf3; --soft: #ecf8fb;
}

html.theme-08 { /* Август · Классика Ametek */
  --primary: #DC143C; --primary-hover: #B22222; --btn-text: #ffffff;
  --dark: #000000; --bg: #ffffff; --surface: #ffffff; --text: #000000; --muted: #333333;
  --header-bg: #000000; --footer-bg: #000000;
  --feature-border: #000000; --img-bg: #f7f7f7; --detail-border: #e6e6e6; --soft: #f5f5f5;
}

html.theme-09 { /* Сентябрь · Осенний янтарь */
  --primary: #d97706; --primary-hover: #bc6404; --btn-text: #241303;
  --dark: #3a2410; --bg: #fdf8f0; --surface: #ffffff; --text: #322314; --muted: #6b5a45;
  --header-bg: linear-gradient(180deg, #543616, #3a2410); --footer-bg: #3a2410;
  --feature-border: #f0e0c6; --img-bg: #faf1e2; --detail-border: #efe0c6; --soft: #faf1e2;
}

html.theme-10 { /* Октябрь · Тёмный техно */
  --primary: #00e5ff; --primary-hover: #00c2d9; --btn-text: #051015;
  --dark: #0b0f14; --bg: #0b0f14; --surface: #121a22; --text: #e8eef3; --muted: #8fa3b2;
  --header-bg: rgba(11, 15, 20, 0.9); --footer-bg: #0b0f14;
  --feature-border: #1f2c37; --img-bg: #0e151c; --detail-border: #1f2c37; --soft: #121a22;
  --th-bg: #1f2c37; --th-text: #e8eef3;
}

html.theme-11 { /* Ноябрь · Графит */
  --primary: #64748b; --primary-hover: #516174; --btn-text: #ffffff;
  --dark: #1e293b; --bg: #f6f7f9; --surface: #ffffff; --text: #1a2230; --muted: #55616f;
  --header-bg: linear-gradient(180deg, #2a3a52, #1e293b); --footer-bg: #1e293b;
  --feature-border: #e0e4ea; --img-bg: #eef0f4; --detail-border: #e0e4ea; --soft: #eef0f4;
}

html.theme-12 { /* Декабрь · Бизнес-синий + золото */
  --primary: #0b3d91; --primary-hover: #082e6e; --btn-text: #ffffff;
  --dark: #0b2238; --bg: #f7f9fc; --surface: #ffffff; --text: #182033; --muted: #5a6478;
  --header-bg: linear-gradient(90deg, #0b2238, #123c5f); --footer-bg: #0b2238;
  --feature-border: #e3e8f0; --img-bg: #f0f3f8; --detail-border: #e2e7ef; --soft: #f0f3f8;
}
