/* Storefront color roles. Dark overrides use the existing theme stylesheet. */
:root {
  --storefront-text: #16202d;
  --storefront-text-muted: #465467;
  --storefront-surface: var(--color-white, #fff);
  --storefront-border: #dbe3eb;
  --storefront-surface-subtle: #f2f5f8;
  --storefront-accent: #a84916;
}

/* Сетка карточек товаров на витрине */

.shopfront-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: stretch;
}

@media (min-width: 768px) {
  .shopfront-products-grid {
    gap: 16px;
  }
}
/* Жёсткий фикс: картинки товаров не растягивают родительский блок */
.shopfront-products-grid img {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

/* Catalog navigation */

.wz-catalog { display: grid; gap: 1rem; color: var(--storefront-text); }
.wz-catalog__heading { padding-block: .35rem .65rem; }
.wz-catalog h1, .wz-catalog h2 { overflow-wrap: anywhere; }
.wz-catalog h1 { font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 750; line-height: 1.12; letter-spacing: -.035em; }
.wz-catalog__heading p { max-width: 65ch; margin-top: .6rem; color: var(--storefront-text-muted); line-height: 1.55; }
.wz-catalog__roots { display: grid; gap: .9rem; align-items: start; }
.wz-catalog__card { min-width: 0; overflow: hidden; border: 1px solid var(--storefront-border); border-radius: 1rem; background: var(--storefront-surface); }
.wz-catalog__parent { display: block; color: inherit; }
.wz-catalog__parent img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; background: var(--storefront-surface-subtle); }
.wz-catalog__card-title { display: flex; gap: .65rem; justify-content: space-between; align-items: center; padding: .75rem .85rem; min-height: 44px; }
.wz-catalog__card-title h2 { font-size: 1.05rem; line-height: 1.3; font-weight: 700; }
.wz-catalog__card-title span { color: var(--storefront-accent); font-size: 1.2rem; }
.wz-catalog__card .wz-catalog__related { padding: 0 .8rem .85rem; }
.wz-catalog__related h2 { margin-bottom: .55rem; font-size: 1.05rem; font-weight: 700; }
.wz-catalog__link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: 0; padding: 0; list-style: none; }
.wz-catalog__link-grid li { min-width: 0; }
.wz-catalog__link-grid a, .wz-catalog__all { display: flex; align-items: center; min-height: 44px; height: 100%; padding: .45rem .55rem; border: 1px solid var(--storefront-border); border-radius: .55rem; background: var(--storefront-surface-subtle); color: var(--storefront-text); font-size: .875rem; font-weight: 600; line-height: 1.28; overflow-wrap: anywhere; }
.wz-catalog :where(a):hover { color: var(--storefront-accent); }
.wz-catalog :where(a):focus-visible { outline: 2px solid var(--storefront-accent); outline-offset: -2px; }
.wz-catalog [data-category-breadcrumbs] { margin-bottom: 0; color: var(--storefront-text-muted); }
@media (min-width: 48rem) {
  .wz-catalog__roots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
  .wz-catalog > .wz-catalog__related .wz-catalog__link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 75rem) {
  .wz-catalog__roots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wz-catalog__card-title { padding-inline: 1rem; }
}
