/*
 * Phone and tablet drawers (inc/mobile-menu.php, js/mobile-menu.js), the menu and the search: a white
 * drawer from the left, where the burger and the magnifier are, in the header's language: Montserrat,
 * slate ink, orange accents, hairlines, thin icons, soft grey tiles. The catalog groups open one level
 * deeper, sliding in from the right; the root slides a little to the left behind them.
 */

.ses-nav {
  --ink: #212b36;
  --text: #4a5561;
  --muted: #7a838c;
  --pale: #a7aeb5;
  --gold: #f48511;
  --gold-dark: #c96a07;
  --line: #e3e6e9;
  --tile: #f4f6f7;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: 24px;
  position: fixed;
  inset: 0;
  z-index: 100000;
  color: var(--ink);
  font-family: Montserrat, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.ses-nav[hidden] {
  display: none;
}

body.ses-nav-open {
  overflow: hidden;
}

.ses-nav a {
  color: inherit;
  text-decoration: none;
}

/* Buttons start bare; the rules that style one are written ".ses-nav .x" to outweigh this.
   The base styles (css/base.css) paint every hovered or focused button pink: not here. */
.ses-nav button {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: none;
  cursor: pointer;
}

.ses-nav [type="button"]:hover,
.ses-nav [type="button"]:focus {
  background-color: transparent;
  color: inherit;
}

.ses-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ses-nav li {
  margin: 0;
  padding: 0;
}

.ses-nav h2,
.ses-nav p {
  margin: 0;
  padding: 0;
}

.ses-nav :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* A ring only for the keyboard. The base styles ring every focused button, and the drawer moves focus
   itself (into the tabs, back to a group), so on a phone a tapped tab kept a black frame. The grey
   flash Android paints over a tapped element goes too. */
.ses-nav :focus:not(:focus-visible) {
  outline: none;
}

.ses-nav {
  -webkit-tap-highlight-color: transparent;
}

.ses-nav__svg {
  display: block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.ses-nav__overlay {
  position: absolute;
  inset: 0;
  background: rgba(33, 43, 54, 0.4);
  opacity: 0;
  transition: opacity 0.4s;
}

.ses-nav__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  background: #fff;
  box-shadow: 12px 0 40px rgba(33, 43, 54, 0.08);
  outline: 0;
  transform: translateX(-100%);
  transition: transform 0.5s var(--ease);
}

.ses-nav.is-open .ses-nav__overlay {
  opacity: 1;
}

.ses-nav.is-open .ses-nav__panel {
  transform: none;
}

/* Top bar: the header's 64px row, with the cross where the burger was. */

.ses-nav__top {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: 64px;
  padding: 0 12px 0 2px;
  border-bottom: 1px solid var(--line);
}

.ses-nav .ses-nav__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
}

.ses-nav__logo {
  justify-self: center;
  width: 124px;
}

.ses-nav__logo img {
  display: block;
  width: 100%;
  height: auto;
}

/* The two views share the space under the top bar. */

.ses-nav__views {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
}

.ses-nav__view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 20px var(--pad) calc(var(--pad) + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), visibility 0s;
}

.ses-nav__view--sub {
  padding-top: 0;
  transform: translateX(100%);
  visibility: hidden;
  transition-delay: 0s, 0s, 0.5s;
}

.ses-nav.is-deep .ses-nav__view--root {
  opacity: 0;
  transform: translateX(-24%);
  visibility: hidden;
  transition-delay: 0s, 0s, 0.5s;
}

.ses-nav.is-deep .ses-nav__view--sub {
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}

/* Section titles */

.ses-nav .ses-nav__eyebrow {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ses-nav__section {
  margin-top: 30px;
}

.ses-nav__view--root > .ses-nav__section:first-child {
  margin-top: 4px;
}

/* Picture tiles: product shots on the soft grey */

.ses-nav__tile {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--tile);
}

.ses-nav__tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Root: catalog groups */

.ses-nav__groups li {
  border-bottom: 1px solid var(--line);
}

.ses-nav .ses-nav__group {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 0;
}

.ses-nav__group-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ses-nav__group-name {
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.ses-nav__group-count {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.ses-nav__group .ses-nav__svg {
  width: 20px;
  height: 20px;
  color: var(--pale);
  transition: transform 0.3s var(--ease), color 0.3s;
}

.ses-nav__group:active .ses-nav__svg {
  color: var(--gold-dark);
  transform: translateX(3px);
}

/* The gift sets: a link among the catalog's rows, its count after an orange gift. */

.ses-nav__gifts .ses-nav__group-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-dark);
}

.ses-nav__gifts .ses-nav__group-count .ses-icon {
  color: var(--gold);
}

.ses-nav__gifts .ses-nav__group > .ses-icon {
  flex: 0 0 auto;
  transition: transform 0.3s var(--ease), color 0.3s;
}

.ses-nav__gifts .ses-nav__group:active > .ses-icon {
  color: var(--gold-dark);
  transform: translateX(3px);
}

/* "Всі продукти", "Дивитись усе": gold-dark tracked capitals with an arrow. */

.ses-nav .ses-nav__more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--gold-dark);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ses-nav__more .ses-nav__svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.ses-nav__more:active .ses-nav__svg {
  transform: translateX(4px);
}

/* Root: main links */

.ses-nav .ses-nav__links {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.ses-nav__section + .ses-nav__links {
  margin-top: 26px;
}

.ses-nav__links li {
  border-bottom: 1px solid var(--line);
}

.ses-nav .ses-nav__links a {
  display: block;
  padding: 17px 0;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ses-nav .ses-nav__links a[aria-current="page"],
.ses-nav .ses-nav__info a[aria-current="page"],
.ses-nav .ses-nav__index a[aria-current="page"] .ses-nav__item-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--gold-dark);
}

/* Root: information, two columns of small links */

.ses-nav .ses-nav__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 20px;
  margin-top: 6px;
}

.ses-nav .ses-nav__info a {
  display: block;
  padding: 7px 0;
  color: var(--text);
  font-size: 15px;
  line-height: 20px;
}

/* Root: help strip at the end, porcelain to the drawer's edges */

.ses-nav__foot {
  margin: auto calc(-1 * var(--pad)) calc(-1 * var(--pad) - env(safe-area-inset-bottom));
  padding: 24px var(--pad) calc(var(--pad) + env(safe-area-inset-bottom));
  background: var(--tile);
}

/* The strip sits at the bottom of a short menu and 36px under the last block of a long one. */
.ses-nav__view--root:not(.ses-find) > :nth-last-child(2) {
  margin-bottom: 36px;
}

.ses-nav .ses-nav__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 16px;
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.ses-nav__phone .ses-nav__svg {
  width: 22px;
  height: 22px;
  color: var(--gold-dark);
}

.ses-nav .ses-nav__telegram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border-radius: 8px;
  background: var(--gold);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  transition: background-color 0.2s;
}

.ses-nav .ses-nav__telegram:active {
  background: var(--gold-dark);
}

/* Deeper view: back, group tabs, the index */

.ses-nav .ses-nav__back {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  height: 52px;
  margin-left: -8px;
  padding-right: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ses-nav__back .ses-nav__svg {
  width: 20px;
  height: 20px;
}

.ses-nav__tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 24px;
  margin: 0 calc(-1 * var(--pad));
  padding: 0 var(--pad);
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scroll-padding: 0 var(--pad);
  scrollbar-width: none;
}

.ses-nav__tabs::-webkit-scrollbar {
  display: none;
}

.ses-nav .ses-nav__tab {
  position: relative;
  flex: 0 0 auto;
  padding: 4px 0 14px;
  color: var(--pale);
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 0.3s;
}

.ses-nav__tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.ses-nav .ses-nav__tab[aria-selected="true"] {
  color: var(--ink);
}

.ses-nav__tab[aria-selected="true"]::after {
  transform: none;
}

.ses-nav__tab:focus-visible {
  outline-offset: -2px;
}

.ses-nav__index {
  padding-top: 8px;
}

.ses-nav__index li {
  border-bottom: 1px solid var(--line);
}

.ses-nav .ses-nav__index li a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.ses-nav__index .ses-nav__tile {
  width: 52px;
  height: 52px;
}

.ses-nav__item-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ses-nav__item-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 17px;
  line-height: 1.25;
  transition: color 0.2s;
}

.ses-nav__index a:active .ses-nav__item-name {
  color: var(--gold-dark);
}

.ses-nav__item-count {
  flex: 0 0 auto;
  color: var(--pale);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* Root: social links under the Telegram button */

.ses-nav__social {
  display: flex;
  gap: 4px;
  margin: 14px 0 0 -10px;
}

/*
 * The search drawer (the header's magnifier): the same panel, top bar and motion, with the desktop
 * search panel's field and quick links (their look is in css/header.css, shared through .ses-find).
 * FiboSearch hangs its suggestions right under the field, over the drawer.
 */

.ses-find {
  --icon-box: 44px;
  --icon-inset: 11px;
}

.ses-nav .ses-find .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
  height: 56px;
  padding-right: 80px;
  font-size: 20px;
}

.ses-nav .ses-find .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit,
.ses-nav .ses-find .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover {
  top: 6px;
}

.ses-nav .ses-find .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit .ses-icon {
  width: 24px;
  height: 24px;
}

.ses-nav .ses-find .dgwt-wcas-search-wrapp .dgwt-wcas-preloader {
  top: 0;
  height: 56px;
}

.ses-find .ses-nav__eyebrow {
  margin-bottom: 14px;
}

/*
 * Entrance: the rows rise a few pixels one after another when the drawer opens
 * and when a group is shown (js/mobile-menu.js sets --i and restarts .is-entering).
 */
.ses-nav.is-open .ses-nav__view--root > *,
.ses-nav__index.is-entering li,
.ses-nav__index.is-entering .ses-nav__more {
  animation: ses-nav-rise 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 35ms + 60ms);
}

@keyframes ses-nav-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (hover: hover) {
  .ses-nav__icon:hover {
    background: var(--tile);
  }

  .ses-nav__group:hover .ses-nav__svg {
    color: var(--gold-dark);
    transform: translateX(3px);
  }

  .ses-nav .ses-nav__links a:hover,
  .ses-nav .ses-nav__info a:hover,
  .ses-nav__index a:hover .ses-nav__item-name,
  .ses-nav .ses-nav__back:hover {
    color: var(--gold-dark);
  }

  .ses-nav__more:hover .ses-nav__svg {
    transform: translateX(4px);
  }

  .ses-nav .ses-nav__tab:hover {
    color: var(--ink);
  }

  .ses-nav .ses-nav__telegram:hover {
    background: var(--gold-dark);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ses-nav,
  .ses-nav * {
    transition: none !important;
    animation: none !important;
  }
}
