/* hide empty pagination (single page) */
.pagination:empty{display:none}

/* error pages (404 / 403 / 500) */
.error-page{min-height:56vh;display:flex;align-items:center;text-align:center;padding-block:40px}
.error-page>div{width:100%}
.error-code{display:block;font-size:clamp(90px,16vw,150px);line-height:1;font-weight:700;color:var(--red);letter-spacing:-2px}
.error-page h1{margin:6px 0 14px;font-size:clamp(26px,4vw,40px)}
.error-page p{max-width:540px;margin:0 auto;color:var(--muted,#777);font-size:16px;line-height:1.6}
.error-page .hero-buttons{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:30px}

/* legal requisites row in the footer (below the copyright line) */
.footer-requisites{margin-top:14px;display:flex;flex-direction:column;gap:4px;color:#999;font-size:12px;line-height:1.5}
@media (max-width:600px){.footer-requisites{margin-top:12px}}

/* general form error message (server-side / validation) */
.form-note.form-error,.esp-form-error{margin:0 0 14px;padding:12px 16px;border-radius:6px;background:#fdeceb;border:1px solid var(--red);color:var(--red);font-size:14px;line-height:1.45}
.compact-form .form-note.form-error,.compact-form .esp-form-error,.selection-modal-form .form-note.form-error,.selection-modal-form .esp-form-error{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.45);color:#fff}

/* homepage category grid: разная ширина плиток + плотная укладка = ровно при любом числе */
.category-grid{height:auto!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:296px!important;grid-auto-flow:row dense!important;gap:16px}
.category,.category.wide,.category.full{grid-column:span 1!important}
.category:nth-child(6n+1),.category:nth-child(6n+6){grid-column:span 2!important}   /* широкая чередуется: то слева, то справа */
@media (max-width:900px){
  .category-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:240px!important}
  .category,.category.wide,.category.full{grid-column:span 1!important}
  .category:nth-child(4n+1){grid-column:span 2!important}
}
@media (max-width:600px){
  .category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:172px!important}
  .category,.category.wide,.category.full,.category:nth-child(3n+1),.category:nth-child(4n+1){grid-column:span 1!important}
}

/* описание товара: список характеристик */
.content-copy .product-spec-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:9px 32px}
.content-copy .product-spec-list li{position:relative;padding-left:17px;font-size:15px;line-height:1.5;color:#333}
.content-copy .product-spec-list li:before{content:"";position:absolute;left:0;top:9px;width:5px;height:5px;border-radius:50%;background:var(--red)}
/* Старая цена (до скидки) */
.product-price s{margin-left:8px;color:#9a9a9a;font-weight:500;font-size:.72em;text-decoration:line-through}
.product-card-price-old{margin-right:auto;color:#9a9a9a;font-weight:500;font-size:.82em;text-decoration:line-through;white-space:nowrap}
/* Футер: длинные меню (Каталог) — показ первых 5 пунктов + «Показать все»/«Скрыть» */
.footer-links.fl-collapsed>a:nth-of-type(n+6){display:none}
.footer-links-toggle{display:inline-block;margin-top:6px;padding:0;background:none;border:0;color:var(--red);font:inherit;font-weight:500;cursor:pointer;text-align:left}
.footer-links-toggle:hover{text-decoration:underline}

/* Brands hub — filter & sort */
.brands-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.brands-filter {
  flex: 1 1 420px;
}

.brands-filter button {
  padding: 11px 15px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: color 0.35s, background-color 0.35s, border-color 0.35s;
}

.brands-filter button:hover,
.brands-filter button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.brands-toolbar .catalog-sort {
  flex: 0 0 auto;
}

.brand-tile[hidden] {
  display: none !important;
}

.brands-empty {
  margin: 28px 0 0;
  color: #777;
  font-size: 15px;
}

.brands-empty-reset {
  border: 0;
  background: none;
  padding: 0;
  color: var(--red);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 768px) {
  .brands-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .brands-toolbar .catalog-sort {
    width: 100%;
  }
}

/* Brand page — collection filter chips */
.brand-collections-bar {
  margin-bottom: 28px;
}

.brand-collections-filter button {
  padding: 11px 15px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: color 0.35s, background-color 0.35s, border-color 0.35s;
}

.brand-collections-filter button:hover,
.brand-collections-filter button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* О компании — реквизиты под блоками преимуществ */
.about-requisites {
  padding-top: 0;
}

.about-requisites .page-heading {
  margin-bottom: 18px;
}

.about-requisites .requisites-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #555;
  font-size: 15px;
  line-height: 1.6;
}
