/* Header of the pryalka theme: logo, catalog with the category menu, search, account / wishlist / cart; links row */
:root {
  --ph-text: #2b2b2b;
  --ph-muted: #6c6c6c;
  --ph-line: #ececec;
  --ph-soft: #f5f5f5;
  --ph-link: #1f8bb8;
  --ph-radius: 10px;
  --ph-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ph-shadow-pop: 0 14px 36px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* "Skip to content": the first stop of the keyboard, shown only when it has focus */
.ph-skip {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 2000;
  padding: 8px 14px;
  border-radius: 6px;
  background: #fff;
  color: var(--ph-text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.ph-skip:focus {
  top: 8px;
}

#main:focus {
  outline: none;
}

.ph-header a:focus-visible,
.ph-header button:focus-visible,
.ph-links a:focus-visible {
  outline: 2px solid var(--ph-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/*
 * Main row: sticky. While it is stuck (scroll-state query: Chrome, Yandex Browser; elsewhere it stays as it is) it
 * gets lower with a smaller logo, and a shadow parts it from the page.
 */
.ph-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 1px 0 var(--ph-line);
  container-type: scroll-state;
  /* The core stylesheet pads and borders every header */
  padding: 0;
  border-bottom: 0;
}

.ph-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 80px;
  transition: min-height 0.2s var(--ph-ease);
}

.ph-logo {
  flex: none;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.ph-logo img {
  display: block;
  width: auto;
}

.ph-logo-full {
  height: 52px;
  transition: height 0.2s var(--ph-ease);
}

.ph-logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--ph-accent);
  text-decoration: none;
}

/* Catalog button */
.ph-catalog {
  flex: none;
}

.ph-catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px 0 18px;
  border: 0;
  border-radius: var(--ph-radius);
  background: var(--ph-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}

.ph-catalog-btn:hover,
.ph-catalog-btn[aria-expanded="true"] {
  background: var(--ph-accent-dark);
}

.ph-catalog-btn i {
  width: 16px;
  font-size: 16px;
  text-align: center;
}

.ph-catalog-btn[aria-expanded="true"] .fa-bars::before {
  content: "\f00d";
}

/* While the panel is open the page under it is dimmed; a click there closes the panel */
body:has(#ph-catalog-panel:not([hidden]))::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1020;
  background: rgba(20, 20, 20, 0.35);
}

/* Catalog panel: top categories on the left, the tiles of the active one on the right; header.js sets its height
   to the longest of them, so it has no empty space and does not jump between categories */
.ph-catalog-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 100%;
  min-height: 320px;
  max-height: calc(100vh - 120px);
  border-radius: 0 0 14px 14px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  animation: ph-drop 0.18s var(--ph-ease);
}

@keyframes ph-drawer-in {
  from {
    transform: translateX(-100%);
    box-shadow: 0 0 0 100vmax rgba(20, 20, 20, 0), 8px 0 30px rgba(0, 0, 0, 0);
  }
}

@keyframes ph-drawer-out {
  to {
    transform: translateX(-100%);
    box-shadow: 0 0 0 100vmax rgba(20, 20, 20, 0), 8px 0 30px rgba(0, 0, 0, 0);
  }
}

@keyframes ph-drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* The parts of the drawer of a phone: not in the desktop panel */
.ph-drawer-head,
.ph-drawer-extra,
.ph-sub-back,
.ph-cat-img {
  display: none;
}

.ph-drawer-body {
  display: contents;
}

.ph-cats {
  list-style: none;
  margin: 0;
  padding: 10px;
  width: 270px;
  height: 100%;
  border-right: 1px solid var(--ph-line);
  overflow-y: auto;
}

.ph-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--ph-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.ph-cat-link i {
  font-size: 11px;
  color: #b0b0b0;
}

.ph-cat.active > .ph-cat-link {
  background: var(--ph-tint);
  color: var(--ph-accent);
}

.ph-cat.active > .ph-cat-link i {
  color: var(--ph-accent);
}

.ph-sub {
  display: none;
  position: absolute;
  left: 270px;
  right: 0;
  top: 0;
  bottom: 0;
  padding: 18px 22px 22px;
  overflow-y: auto;
}

.ph-cat.active > .ph-sub {
  display: block;
}

.ph-sub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ph-line);
}

.ph-sub-title {
  color: var(--ph-text);
  font-size: 18px;
  font-weight: 700;
}

.ph-sub-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ph-accent);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.ph-sub-all i {
  font-size: 12px;
  transition: transform 0.15s var(--ph-ease);
}

.ph-sub-all:hover {
  color: var(--ph-accent-dark);
}

.ph-sub-all:hover i {
  transform: translateX(3px);
}

.ph-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 4px;
}

.ph-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px 10px;
  border-radius: var(--ph-radius);
  color: var(--ph-text);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.ph-tile:hover {
  background: var(--ph-soft);
  color: var(--ph-accent);
}

.ph-tile-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  transition: transform 0.15s var(--ph-ease);
}

.ph-tile:hover .ph-tile-img {
  transform: scale(1.06);
}

.ph-tile-img img {
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
}

.ph-tile-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--ph-tint);
  color: var(--ph-accent);
  font-size: 22px;
  font-weight: 700;
}

/* Search: a soft grey field, white with the brand ring while typing */
.ph-search {
  flex: 1;
  min-width: 0;
}

.ph-search form {
  margin: 0;
}

.ph-search .form-control {
  height: 44px;
  padding-left: 16px;
  border: 1.5px solid transparent;
  border-right: 0;
  border-radius: var(--ph-radius) 0 0 var(--ph-radius);
  background: var(--ph-soft);
  font-size: 15px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ph-search .form-control::placeholder {
  color: #8a8a8a;
}

.ph-search .form-control:hover {
  background: #efefef;
}

.ph-search .form-control:focus {
  border-color: var(--ph-brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--ph-brand-rgb), 0.14);
}

.ph-search .btn {
  width: 56px;
  border: 0;
  border-radius: 0 var(--ph-radius) var(--ph-radius) 0;
  background: var(--ph-accent);
  color: #fff;
  font-size: 16px;
}

.ph-search .btn:hover {
  background: var(--ph-accent-dark);
}

/* Account, wishlist, cart: an icon with a word, a soft background on hover */
.ph-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.ph-action-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
  padding: 6px 8px;
  border-radius: var(--ph-radius);
  color: var(--ph-text);
  font-size: 12px;
  line-height: 1.1;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.ph-action-link > i {
  font-size: 22px;
  line-height: 1;
}

.ph-action-link:hover,
.ph-action-link[aria-expanded="true"] {
  background: var(--ph-soft);
  color: var(--ph-accent);
}

.ph-action-link.dropdown-toggle::after {
  display: none;
}

.ph-action-text {
  max-width: 96px;
  overflow: hidden;
  color: var(--ph-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}

.ph-action-link:hover .ph-action-text,
.ph-action-link[aria-expanded="true"] .ph-action-text {
  color: var(--ph-accent);
}

.ph-cart-sum {
  color: var(--ph-text);
  font-weight: 700;
}

/* A white ring keeps the count apart from the icon */
.header-action-badge {
  position: absolute;
  top: 0;
  left: calc(50% + 5px);
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--ph-accent);
  box-shadow: 0 0 0 2px #fff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

/* Dropdowns of the account and the cart */
.ph-header .ph-menu {
  margin-top: 8px !important;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--ph-shadow-pop);
  animation: ph-drop 0.15s var(--ph-ease);
}

.ph-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.ph-menu .dropdown-item i {
  width: 16px;
  color: var(--ph-muted);
  text-align: center;
}

.ph-menu .dropdown-item:hover,
.ph-menu .dropdown-item:focus {
  background: var(--ph-tint);
  color: var(--ph-accent);
}

.ph-menu .dropdown-item:hover i,
.ph-menu .dropdown-item:focus i {
  color: var(--ph-accent);
}

.ph-menu .dropdown-header {
  padding: 8px 12px 6px;
  color: var(--ph-text);
  font-size: 14px;
  font-weight: 700;
}

.ph-menu .dropdown-divider {
  margin: 6px 4px;
  border-color: var(--ph-line);
}

.ph-header .ph-cart-menu {
  width: 380px;
  padding: 6px 0 8px;
}

.ph-cart-items {
  max-height: 340px;
  overflow-y: auto;
}

.ph-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
}

.ph-cart-item + .ph-cart-item {
  border-top: 1px solid var(--ph-line);
}

.ph-cart-thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
}

.ph-cart-info {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
}

.ph-cart-name {
  color: var(--ph-text);
  font-weight: 600;
  text-decoration: none;
}

.ph-cart-name:hover {
  color: var(--ph-accent);
}

.ph-cart-item form {
  margin: 0;
}

.ph-cart-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #a0a0a0;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.ph-cart-remove:hover {
  background: var(--ph-tint);
  color: var(--ph-accent);
}

.ph-cart-totals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
  padding: 12px 14px 10px;
  border-top: 1px solid var(--ph-line);
  font-size: 15px;
}

.ph-cart-totals strong {
  font-size: 18px;
}

.ph-cart-buttons {
  display: flex;
  gap: 8px;
  padding: 0 14px;
}

.ph-cart-buttons .btn {
  flex: 1;
  height: 42px;
  border-radius: var(--ph-radius);
  font-weight: 600;
  line-height: 28px;
}

.ph-cart-buttons .btn-light {
  background: var(--ph-soft);
  border-color: var(--ph-soft);
}

.ph-cart-empty {
  padding: 22px 16px;
  color: var(--ph-muted);
  text-align: center;
}

/* Links row: sections on the left, the phone and the social networks on the right */
.ph-links {
  border-bottom: 1px solid var(--ph-line);
  background: #fff;
  font-size: 14px;
}

.ph-links-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

.ph-links-list {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ph-links-list a,
.ph-phone {
  color: #444;
  text-decoration: none;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
  white-space: nowrap;
  transition: color 0.15s;
}

.ph-links-list a:hover {
  color: var(--ph-accent);
  text-decoration: underline;
}

.ph-link-sale {
  color: var(--ph-accent) !important;
  font-weight: 600;
}

.ph-link-sale i {
  margin-left: 2px;
  font-size: 12px;
}

.ph-contacts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ph-phone {
  margin-right: 8px;
  color: var(--ph-text);
  font-weight: 700;
}

.ph-phone:hover {
  color: var(--ph-accent);
}

.ph-phone i {
  margin-right: 6px;
  color: var(--ph-brand);
}

.ph-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ph-soft);
  color: #555;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.ph-social:hover {
  background: var(--ph-brand);
  color: #fff;
}

/* Laptop and desktop, stuck: lower, the same logo smaller (no change of its shape), a shadow under it */
@media (min-width: 992px) {
  @container scroll-state(stuck: top) {
    .ph-main {
      min-height: 64px;
    }

    .ph-logo-full {
      height: 40px;
    }
  }
}

.ph-bar {
  transition: box-shadow 0.2s var(--ph-ease);
}

@container scroll-state(stuck: top) {
  .ph-bar {
    box-shadow: 0 1px 0 var(--ph-line), 0 8px 20px rgba(0, 0, 0, 0.07);
  }
}

/* The bottom bar is for phones and tablets only */
.ph-tabbar {
  display: none;
}

/*
 * Tablet and phone, as on a marketplace: the header is one sticky row (the logo and the search); the catalog,
 * the cart, the wish list and the profile are in the bar at the bottom of the screen.
 */
@media (max-width: 991.98px) {
  :root {
    --ph-tabbar-h: 58px;
  }

  body {
    padding-bottom: calc(var(--ph-tabbar-h) + env(safe-area-inset-bottom));
  }

  /* A page without the bar (the checkout): no room kept for it */
  body.ph-no-tabbar {
    --ph-tabbar-h: 0px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .ph-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "logo search";
    align-items: center;
    gap: 12px;
    min-height: 0;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .ph-logo {
    grid-area: logo;
  }

  .ph-logo-full {
    height: 34px;
  }

  .ph-search {
    grid-area: search;
  }

  /* The catalog panel stays (the bar opens it), its button and the actions go to the bar */
  .ph-catalog {
    display: contents;
  }

  .ph-catalog-btn,
  .ph-actions {
    display: none;
  }

  .ph-search .form-control,
  .ph-search .btn {
    height: 44px;
  }

  /* 16px: iOS does not zoom into the field */
  .ph-search .form-control {
    padding-left: 14px;
    font-size: 16px;
  }

  .ph-search .btn {
    width: 48px;
  }

  .ph-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    height: calc(var(--ph-tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 -1px 0 var(--ph-line), 0 -6px 20px rgba(0, 0, 0, 0.05);
  }

  .ph-tab {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #8a8a8a;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
  }

  .ph-tab i {
    font-size: 21px;
    transition: transform 0.15s var(--ph-ease);
  }

  .ph-tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ph-tab.active,
  .ph-tab[aria-expanded="true"] {
    color: var(--ph-accent);
  }

  .ph-tab:active i {
    transform: scale(0.9);
  }

  .ph-tab[aria-expanded="true"] .fa-table-cells-large::before {
    content: "\f00d";
  }

  .ph-tab-badge {
    position: absolute;
    top: 5px;
    left: calc(50% + 5px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--ph-accent);
    box-shadow: 0 0 0 2px #fff;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
  }

  .ph-tab-badge[hidden] {
    display: none;
  }

  /* What is fixed at the bottom of a page stands on the bar */
  .ft-top {
    bottom: calc(var(--ph-tabbar-h) + env(safe-area-inset-bottom) + 12px);
  }

  body .pc-bar {
    bottom: calc(var(--ph-tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: 10px;
  }

  body #cookie {
    bottom: calc(var(--ph-tabbar-h) + env(safe-area-inset-bottom));
  }

  body .quick-order-toast {
    bottom: calc(var(--ph-tabbar-h) + env(safe-area-inset-bottom) + 12px);
  }

  html:has(#ph-catalog-panel:not([hidden])) {
    overflow: hidden;
  }

  /* The drawer dims the page itself (its shadow), so the bar stays bright; the layer of the desktop only takes
     the taps on the page */
  body:has(#ph-catalog-panel:not([hidden]))::after {
    background: none;
  }

  /* The catalog: a drawer from the left down to the bar, the bar keeps the button that closes it */
  .ph-catalog-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: calc(var(--ph-tabbar-h) + env(safe-area-inset-bottom));
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: min(400px, 88vw);
    height: auto !important;
    min-height: 0;
    max-height: none;
    padding-top: env(safe-area-inset-top);
    border-radius: 0 16px 0 0;
    box-shadow: 0 0 0 100vmax rgba(20, 20, 20, 0.4), 8px 0 30px rgba(0, 0, 0, 0.18);
    overscroll-behavior: contain;
    animation: ph-drawer-in 0.26s var(--ph-ease);
  }

  .ph-catalog-panel.ph-closing {
    animation: ph-drawer-out 0.2s ease-in forwards;
  }

  .ph-drawer-head {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 6px 0 18px;
    border-bottom: 1px solid var(--ph-line);
  }

  .ph-drawer-title {
    color: var(--ph-text);
    font-size: 19px;
    font-weight: 700;
  }

  .ph-drawer-close,
  .ph-sub-back {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ph-text);
    font-size: 20px;
    -webkit-tap-highlight-color: transparent;
  }

  .ph-drawer-close:active,
  .ph-sub-back:active {
    background: var(--ph-soft);
  }

  .ph-drawer-body {
    display: block;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  /* The top categories: large rows with their picture */
  .ph-cats {
    width: auto;
    height: auto;
    padding: 8px 10px;
    border-right: 0;
    overflow: visible;
  }

  .ph-cat-link {
    justify-content: flex-start;
    gap: 14px;
    padding: 8px;
    border-radius: 12px;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
  }

  .ph-cat.active > .ph-cat-link {
    background: none;
    color: var(--ph-text);
  }

  .ph-cat > .ph-cat-link:active,
  .ph-cat.current > .ph-cat-link {
    background: var(--ph-tint);
  }

  .ph-cat.current > .ph-cat-link {
    color: var(--ph-accent);
  }

  .ph-cat-img {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--ph-soft);
    color: #555;
    font-size: 20px;
    font-weight: 600;
    overflow: hidden;
  }

  .ph-cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .ph-cat-name {
    flex: 1;
    min-width: 0;
  }

  .ph-cat-link i,
  .ph-cat.active > .ph-cat-link i {
    margin-right: 6px;
    color: #b0b0b0;
    font-size: 13px;
  }

  /* A category opens its subcategories as the next screen, over the whole drawer */
  .ph-sub,
  .ph-cat.active > .ph-sub {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: env(safe-area-inset-top) 12px 16px;
    background: #fff;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.26s var(--ph-ease), visibility 0s 0.26s;
  }

  .ph-cat.open > .ph-sub,
  .ph-brands.open > .ph-sub {
    transform: none;
    visibility: visible;
    transition: transform 0.26s var(--ph-ease);
  }

  .ph-sub-head {
    position: sticky;
    top: 0;
    z-index: 1;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    height: 56px;
    margin: 0 -12px 10px;
    padding: 0 14px 0 6px;
    border-bottom: 1px solid var(--ph-line);
    background: #fff;
  }

  .ph-sub-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ph-sub-all {
    font-size: 14px;
  }

  .ph-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .ph-tile {
    gap: 6px;
    padding: 10px 4px 8px;
    font-size: 12.5px;
    -webkit-tap-highlight-color: transparent;
  }

  .ph-tile:active,
  .ph-tile.current {
    background: var(--ph-tint);
  }

  .ph-tile.current {
    color: var(--ph-accent);
    font-weight: 600;
  }

  .ph-tile-img,
  .ph-tile-img img {
    width: 60px;
    height: 60px;
    max-width: 60px;
    max-height: 60px;
  }

  /* Under the categories: the links of the shop, the account, the contacts */
  .ph-drawer-extra {
    display: block;
    padding: 0 10px 20px;
  }

  .ph-drawer-links {
    margin: 0;
    padding: 8px 0;
    border-top: 1px solid var(--ph-line);
    list-style: none;
  }

  .ph-drawer-links > li > a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 8px;
    border-radius: 12px;
    color: var(--ph-text);
    font-size: 15px;
    text-decoration: none;
  }

  .ph-drawer-links > li > a:active {
    background: var(--ph-soft);
  }

  .ph-drawer-links > li > a > i {
    width: 52px;
    color: #9a9a9a;
    font-size: 17px;
    text-align: center;
  }

  .ph-drawer-links > li > a > .ph-brands-more {
    width: auto;
    margin: 0 6px 0 auto;
    color: #b0b0b0;
    font-size: 13px;
  }

  /* Logos are wide: the whole width of the tile, on white */
  .ph-brand-tiles .ph-tile-img,
  .ph-brand-tiles .ph-tile-img img {
    width: 100%;
    max-width: 100%;
    height: 56px;
    max-height: 56px;
    object-fit: contain;
  }

  .ph-drawer-links .ph-link-sale,
  .ph-drawer-links .ph-link-sale i {
    color: var(--ph-accent);
    font-weight: 600;
  }

  .ph-drawer-section {
    padding: 14px 8px 8px;
    border-top: 1px solid var(--ph-line);
  }

  .ph-drawer-label {
    margin-bottom: 10px;
    color: var(--ph-muted);
    font-size: 13px;
    font-weight: 600;
  }

  .ph-drawer-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .ph-drawer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border: 1px solid var(--ph-accent);
    border-radius: var(--ph-radius);
    color: var(--ph-accent);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
  }

  .ph-drawer-btn-main {
    background: var(--ph-accent);
    color: #fff;
  }

  .ph-drawer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .ph-drawer-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 2px;
    border-radius: 12px;
    color: var(--ph-text);
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }

  .ph-drawer-grid a:active {
    background: var(--ph-soft);
  }

  .ph-drawer-grid i {
    color: var(--ph-accent);
    font-size: 19px;
  }

  .ph-drawer-phone {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 0;
    color: var(--ph-text);
    text-decoration: none;
  }

  .ph-drawer-phone i {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ph-accent);
    color: #fff;
    font-size: 17px;
  }

  .ph-drawer-phone span {
    display: flex;
    flex-direction: column;
  }

  .ph-drawer-phone b {
    font-size: 17px;
  }

  .ph-drawer-phone small {
    color: var(--ph-muted);
    font-size: 13px;
  }

  .ph-drawer-mail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 6px 0;
    color: var(--ph-text);
    font-size: 14px;
    text-decoration: none;
  }

  .ph-drawer-mail i {
    width: 44px;
    color: var(--ph-muted);
    font-size: 17px;
    text-align: center;
  }

  .ph-drawer-socials {
    display: flex;
    gap: 10px;
    margin-top: 12px;
  }

  /* The legal part of the footer: the policy, the offer, the requisites */
  .ph-drawer-legal {
    margin-top: 16px;
    padding: 14px 8px 0;
    border-top: 1px solid var(--ph-line);
    color: var(--ph-muted);
    font-size: 12px;
    line-height: 1.45;
  }

  .ph-drawer-legal ul {
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
  }

  .ph-drawer-legal li + li {
    margin-top: 6px;
  }

  .ph-drawer-legal a {
    color: var(--ph-muted);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .ph-drawer-legal p {
    margin: 0 0 8px;
  }

  .ph-drawer-legal span {
    display: block;
  }

  .ph-drawer-socials .ph-social {
    width: 44px;
    height: 44px;
    font-size: 19px;
  }

  .ph-header .ph-cart-menu {
    width: min(380px, 100vw - 24px);
  }

  .ph-links {
    font-size: 13px;
  }

  .ph-links-inner {
    min-height: 38px;
    gap: 12px;
  }

  /* A row that scrolls sideways instead of wrapping */
  .ph-links-list {
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ph-links-list::-webkit-scrollbar {
    display: none;
  }

  .ph-contacts .ph-social {
    display: none;
  }

  .ph-phone {
    margin-right: 0;
  }
}

@media (max-width: 575.98px) {
  /* The phone is the main contact here: a call button instead of the number */
  .ph-links-list li:first-child {
    display: none;
  }

  .ph-phone {
    font-size: 13px;
  }
}

/* Breadcrumbs: a long last item wraps instead of widening the page (the core stylesheet keeps them on one line) */
.breadcrumb > li.breadcrumb-item {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Phone: one line back to the parent section, as on a marketplace ("← Глазки для игрушек") */
@media (max-width: 767.98px) {
  .breadcrumb {
    margin-bottom: 8px;
    padding: 4px 0;
  }

  .breadcrumb > li.breadcrumb-item {
    display: none;
  }

  .breadcrumb > li.breadcrumb-item:nth-last-child(2) {
    display: flex;
    align-items: center;
    font-size: 14px;
  }

  /* Instead of the "/" of the core stylesheet and of Bootstrap */
  .breadcrumb > li.breadcrumb-item:nth-last-child(2)::before {
    content: "\f053" !important;
    display: inline-block !important;
    float: none;
    padding: 0 8px 0 0 !important;
    color: var(--ph-accent) !important;
    font-family: "Font Awesome 7 Free", "Font Awesome 6 Free" !important;
    font-size: 12px;
    font-weight: 900 !important;
  }

  .breadcrumb > li.breadcrumb-item:nth-last-child(2) > a {
    color: var(--ph-text);
  }
}

/* Phone: the alerts of the core stylesheet are 400px wide, wider than the screen */
@media (max-width: 575.98px) {
  #alert {
    left: 12px;
    right: 12px;
    width: auto;
    margin-left: 0;
  }
}

/* No motion for those who asked their system for less */
@media (prefers-reduced-motion: reduce) {
  .ph-header,
  .ph-header *,
  .ph-header *::before,
  .ph-header *::after {
    transition: none !important;
    animation: none !important;
  }
}
