/* Fluid width with breathing room, without returning to a fixed-width layout. */
:root {
  --page-gutter: clamp(16px, 2.5vw, 40px);
  --panel-gutter: clamp(20px, 3vw, 56px);
}

.container {
  width: calc(100% - var(--page-gutter) * 2);
  max-width: none;
  margin-inline: auto;
}

.header > .search { min-width: 0; max-width: none; }
.header .catalog-button, .header .phone, .header .account, .header .cart { flex-shrink: 0; }
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.catalog-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.delivery-map { max-width: none; }

/* Standalone coloured panels have an outer white margin and inner padding.
   Their nested container must not subtract the page gutters a second time. */
.info-hero,
.delivery,
.delivery-call {
  width: calc(100% - var(--page-gutter) * 2);
  margin: var(--page-gutter) auto;
  padding-inline: var(--panel-gutter);
  border-radius: var(--radius-panel);
}

.info-hero.delivery-map-hero { padding-inline: var(--panel-gutter); }
.info-hero > .container,
.delivery > .container,
.delivery-call > .container { width: 100%; }

/* Keep image panels balanced as the grid expands on large monitors. */
@media (min-width: 1101px) {
  .product .product-visual { height: clamp(176px, 14vw, 280px); }
  .category-grid .category { max-height: 360px; }
  .product-main-photo { max-height: 640px; }
}

/* The labelled header still fits on compact laptops without squeezing icons. */
@media (min-width: 851px) and (max-width: 1100px) {
  .header { gap: 12px; }
  .header .brand { min-width: 0; flex-shrink: 0; }
  .header .catalog-button { padding-inline: 13px; }
  .header .phone { font-size: 12px; }
  .nav .container { gap: 22px; }
  .nav span { font-size: 10px; }
}

@media (max-width: 1050px) {
  .catalog-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-list { --strip-gutter: var(--page-gutter); }
}
