:root {
  --blue: #2e64a4;
  --blue-dark: #3470b8;
  --blue-link: #054cb0;
  --blue-soft: #167fc3;
  --orange: #ff9000;
  --orange-hover: #e68200;
  --wa: #25d366;
  --wa-hover: #1ebe57;
  --text: #333;
  --muted: #666;
  --border: #d9e2ec;
  --bg: #fff;
  --sidebar-title: #2e64a4;
  --active: #ff9000;
  --container: 1180px;
  --radius: 2px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}

.header-top {
  background: #f7f9fc;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.header-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.header-top__inner--right {
  justify-content: flex-end;
}

.header-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
}

.header-cities__item::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--blue-soft);
  vertical-align: middle;
}

.header-top__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-phone {
  font-weight: 700;
  color: var(--blue);
  font-size: 16px;
  white-space: nowrap;
}

.header-main {
  position: relative;
}

.header-main__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  position: relative;
}

.primary-nav {
  min-width: 0;
  justify-self: center;
  max-width: 100%;
}

.primary-nav__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.primary-nav__list > li {
  flex: 0 0 auto;
}

.primary-nav__list > li > a {
  display: block;
  padding: 8px 10px;
  color: var(--blue);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius);
  white-space: nowrap;
}

.primary-nav__list > li.current-menu-item > a,
.primary-nav__list > li > a:hover {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}

.header-search {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  min-width: 0;
  max-width: 200px;
  width: 200px;
}

.header-search input[type="search"] {
  border: 0;
  padding: 10px 10px;
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  font: inherit;
  font-size: 13px;
}

.header-search button {
  border: 0;
  background: var(--blue);
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: #1e4f8c;
  line-height: 1.1;
}

.site-logo:hover {
  opacity: 0.9;
}

.site-logo__badge {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 2px 4px rgba(30, 79, 140, 0.22));
}

.site-logo__badge svg,
.site-logo__img {
  width: 48px;
  height: 48px;
  display: block;
}

.site-logo__wordmark {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.site-logo__name {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1e4f8c;
  line-height: 1.05;
  white-space: nowrap;
}

.site-logo__tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a8ea3;
  padding-left: 4px;
  border-left: 2px solid #ff9000;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 9px;
  cursor: pointer;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--blue);
  margin: 0;
  border-radius: 1px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none !important;
  transition: 0.15s ease;
  white-space: nowrap;
}

.btn-orange {
  background: var(--orange);
  color: #fff !important;
}

.btn-orange:hover {
  background: var(--orange-hover);
}

.btn-wa {
  background: var(--wa);
  color: #fff !important;
}

.btn-wa:hover {
  background: var(--wa-hover);
}

.btn-outline {
  background: #fff;
  border-color: var(--blue);
  color: var(--blue) !important;
}

.btn-outline:hover {
  background: var(--blue);
  color: #fff !important;
}

/* Layout */
.site-main {
  padding: 22px 0 48px;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.content-area {
  min-width: 0;
}

.page-title {
  margin: 0 0 16px;
  color: var(--blue-dark);
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
}

.section-title {
  margin: 28px 0 12px;
  color: var(--blue-dark);
  font-size: 22px;
}

.entry-content {
  margin-bottom: 20px;
}

.entry-content ul {
  padding-left: 20px;
}

.entry-content li {
  margin-bottom: 6px;
}

/* Breadcrumbs */
.breadcrumbs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs li:not(:last-child)::after {
  content: "»";
  margin-left: 6px;
  color: #99a;
}

.breadcrumbs a {
  color: var(--blue-link);
}

/* Sidebar */
.catalog-menu {
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.catalog-menu__title {
  background: var(--sidebar-title);
  color: #fff;
  padding: 12px 14px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.catalog-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-menu > ul > .catalog-menu__item > a {
  display: block;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.catalog-menu > ul > .catalog-menu__item.is-active > a,
.catalog-menu > ul > .catalog-menu__item > a:hover {
  background: var(--active);
  color: #fff;
}

.catalog-menu ul ul {
  background: #fffaf3;
}

.catalog-menu ul ul a {
  display: block;
  padding: 8px 14px 8px 28px;
  color: var(--orange);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid #f3e6d4;
}

.catalog-menu ul ul .is-active > a,
.catalog-menu ul ul a:hover {
  font-weight: 700;
  text-decoration: underline;
}

/* Grids */
.series-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.series-card,
.product-card {
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.series-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none !important;
}

.series-card__link:hover,
.series-card__link:focus {
  text-decoration: none !important;
}

.series-card__link:hover .series-card__title {
  text-decoration: underline;
}

.series-card__media,
.product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 268 / 219;
  background: #f5f7fa;
  overflow: hidden;
}

.series-card__media img,
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.series-card__placeholder,
.product-card__placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d7e6f5, #9bb8d8);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
}

.series-card__title {
  display: block;
  padding: 12px 14px 4px;
  color: var(--blue);
  font-weight: 500;
}

.product-card__title {
  display: block;
  padding: 12px 0 4px;
  margin: 0;
  color: var(--blue);
  font-weight: 500;
  text-decoration: none !important;
}

.product-card__title:hover,
.product-card__title:focus {
  text-decoration: underline !important;
}

.product-card__media {
  text-decoration: none !important;
}

.product-card__media:hover {
  text-decoration: none !important;
}

.product-card__body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card__sku {
  color: var(--muted);
  font-size: 13px;
}

.product-card__price {
  color: var(--blue);
  font-weight: 700;
  font-size: 18px;
}

.product-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.product-card__actions .btn {
  padding: 8px 6px;
  font-size: 13px;
}

/* Product single */
.product-single__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  margin-top: 8px;
}

.product-gallery__main {
  border: 1px solid var(--border);
  background: #fafbfc;
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 16px;
}

.product-gallery__main img {
  max-height: 420px;
  object-fit: contain;
}

.product-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.product-gallery__thumb {
  width: 72px;
  height: 72px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 4px;
  cursor: pointer;
}

.product-gallery__thumb.is-active {
  border-color: var(--blue);
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery__placeholder {
  min-height: 320px;
  background: linear-gradient(145deg, #eef3f8, #d5e2ef);
  border: 1px solid var(--border);
}

.product-meta {
  margin-bottom: 10px;
}

.product-chars ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.product-chars li {
  margin-bottom: 4px;
}

.product-chars li span {
  color: var(--muted);
}

.product-colors {
  margin: 14px 0;
}

.product-colors__list {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.product-colors__item {
  width: 36px;
  height: 24px;
  border: 1px solid #bbb;
  display: inline-block;
}

.product-single__price {
  font-size: 24px;
  font-weight: 700;
  color: var(--blue);
  margin: 12px 0;
}

.product-single__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 24px;
}

.product-video {
  margin-top: 16px;
}

.product-video iframe {
  width: 100%;
  min-height: 240px;
  border: 0;
}

/* Footer */
.site-footer {
  background: #1f3f66;
  color: #d7e4f3;
  margin-top: 20px;
}

.site-footer a {
  color: #fff;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  padding: 32px 0;
}

.site-footer__brand strong {
  display: block;
  color: #fff;
  font-size: 18px;
  margin-bottom: 8px;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  text-decoration: none !important;
  color: #fff !important;
}

.site-footer__logo-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.site-footer__logo-mark svg {
  width: 36px;
  height: 36px;
  display: block;
}

.site-footer__logo-text {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer__copy {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 0;
  font-size: 13px;
  color: #a9bdd4;
}

/* Modal + float */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 30, 50, 0.55);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100% - 32px));
  margin: 12vh auto 0;
  background: #fff;
  padding: 28px 24px 24px;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}

.modal__actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.float-wa {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  z-index: 50;
}

.float-wa:hover {
  background: var(--wa-hover);
}

.empty-note {
  color: var(--muted);
}

/* Pagination */
.navigation.pagination {
  margin-top: 24px;
}

.navigation.pagination .nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.navigation.pagination a,
.navigation.pagination span {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  padding: 0 10px;
}

.navigation.pagination .current {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* Responsive */
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    order: 2;
  }

  .content-area {
    order: 1;
  }

  .series-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-single__grid,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: static;
    justify-self: end;
    z-index: 50;
  }

  .primary-nav__list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;
    margin: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 4px 4px;
    flex-direction: column;
    z-index: 60;
    padding: 8px;
    box-shadow: 0 10px 24px rgba(20, 40, 70, 0.16);
  }

  .primary-nav.is-open .primary-nav__list {
    display: flex;
  }

  .primary-nav__list > li > a {
    padding: 12px 14px;
    font-size: 14px;
    white-space: normal;
  }

  .header-top__inner {
    justify-content: center;
    text-align: center;
  }

  .header-main__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "logo toggle"
      "search search";
    gap: 12px;
  }

  .site-logo {
    grid-area: logo;
    min-width: 0;
  }

  .site-logo__name {
    font-size: 14px;
  }

  .site-logo__tag {
    font-size: 10px;
  }

  .primary-nav { grid-area: toggle; }
  .header-search {
    grid-area: search;
    width: 100%;
    max-width: none;
  }

  .product-single__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .product-single__actions .btn,
  .product-card__actions .btn {
    width: 100%;
  }

  .float-wa {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .series-grid,
  .product-grid,
  .product-card__actions {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 22px;
  }

  .header-phone {
    font-size: 14px;
  }

  .btn {
    padding: 11px 14px;
  }

  .product-gallery__main {
    min-height: 240px;
  }

  .header-search input[type="search"] {
    min-width: 0;
    width: 100%;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
