/* Фотокатегории на главной; на мобильной странице каталога — горизонтальная лента. */
.category-image, .category-strip-toolbar { display: none; }
.category-tab .category-label { color: inherit; font: inherit; }
.category-grid .category-arrow { display: block; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
@media (min-width: 851px) {
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    background: transparent;
  }
  .category-grid .category {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 3 / 2;
    padding: clamp(18px, 2vw, 26px);
    justify-content: flex-end;
    overflow: hidden;
    border: 1px solid #dce6ef;
    border-radius: 18px;
    background: #102b46;
    color: #fff;
    transition: border-color .25s ease, box-shadow .25s ease;
  }
  .category-grid .category-image {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
    transition: transform .45s ease;
  }
  .category-grid .category::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(6, 24, 42, .04) 20%, rgba(6, 24, 42, .32) 55%, rgba(6, 24, 42, .92) 100%);
    pointer-events: none;
  }
  .category-grid .category-number { display: none; }
  .category-grid .category > b {
    margin: 0;
    max-width: calc(100% - 48px);
    font: 800 clamp(17px, 1.55vw, 22px)/1.35 Manrope, Arial, sans-serif;
    text-shadow: 0 1px 8px rgba(0, 12, 30, .25);
  }
  .category-grid .category > i {
    position: absolute;
    right: clamp(18px, 2vw, 26px);
    bottom: clamp(18px, 2vw, 26px);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    font: 20px/1 Manrope, Arial, sans-serif;
    transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
  }
  .category-grid .category:hover { border-color: #8abdf0; box-shadow: 0 10px 24px rgba(9, 40, 73, .12); }
  .category-grid .category:hover .category-image { transform: scale(1.045); }
  .category-grid .category:hover > i { background: var(--blue); border-color: var(--blue); transform: translateX(3px); }
  .category-grid .category:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
}
@media (max-width: 850px) {
  .category-strip-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
  .category-strip-toolbar p { margin: 0; color: #7f91a3; font: 11px Manrope, Arial, sans-serif; }
  .category-strip-actions { display: flex; gap: 8px; }
  .category-strip-actions button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #d7e3ed; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
  .category-strip-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .category-strip-actions button:hover:not(:disabled) { color: #fff; background: var(--blue); border-color: var(--blue); }
  .category-strip-actions button:disabled { opacity: .3; cursor: default; }
  .category-strip-actions button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
  #categories .section-head { margin-bottom: 20px; }
  .catalog-sidebar { min-width: 0; }
  .catalog-layout { min-width: 0; }
  .category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .category-list {
    --strip-gutter: 24px;
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: calc(100% + var(--strip-gutter) * 2);
    max-width: none;
    margin-inline: calc(-1 * var(--strip-gutter));
    padding: 3px var(--strip-gutter) 9px;
    border: 0;
    background: transparent;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--strip-gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .category-list::-webkit-scrollbar { display: none; }
  .category-grid .category, .category-list .category-tab {
    position: relative;
    isolation: isolate;
    flex: 0 0 152px;
    width: 152px;
    height: 152px;
    min-height: 152px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: 14px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #102b46;
    color: #fff;
    text-align: left;
    text-decoration: none;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    -webkit-tap-highlight-color: transparent;
  }
  .category-grid .category {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
    scroll-snap-align: none;
  }
  .category-grid .category::after, .category-list .category-tab::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 24, 42, .12) 5%, rgba(6, 24, 42, .08) 28%, rgba(6, 24, 42, .88) 100%);
    pointer-events: none;
  }
  .category-grid .category-image, .category-list .category-image { display: block; position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; user-select: none; pointer-events: none; }
  .category-grid .category > b, .category-list .category-label { position: relative; display: block; margin: 0; max-width: none; color: #fff; font: 800 13px/1.35 Manrope, Arial, sans-serif; text-shadow: 0 1px 7px rgba(0, 12, 30, .3); }
  .category-grid .category > i { display: none; }
  .category-grid .category-number, .category-list .category-count { display: none; }
  .category-list .category-tab.selected { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); color: #fff; }
  .category-list .category-tab.selected .category-label, .category-list .category-tab.selected .category-count { color: #fff; }
  .category-list .category-tab.selected::before { content: '✓'; position: absolute; top: 11px; right: 11px; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--blue); color: white; font: 800 12px Manrope, Arial, sans-serif; }
  .category-grid .category:focus-visible, .category-list .category-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
  .category-grid:focus-visible, .category-list:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
  .catalog-sidebar .filter-button { margin-top: 13px; }
  #homeCategoryGrid .category:last-child:not([hidden]) { grid-column: span 2; aspect-ratio: 2 / 1; }
}
@media (max-width: 520px) {
  .category-list { --strip-gutter: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .category-strip-actions button, .category-grid .category, .category-grid .category-image, .category-grid .category > i { transition: none; }
  .category-grid .category:hover .category-image, .category-grid .category:hover > i { transform: none; }
}
