.main-nav {
  position: relative;
  z-index: 80;
}

.main-nav > .shop-menu {
  display: contents;
  min-width: 0;
}

.main-nav > .shop-menu > .shop-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  line-height: 1;
}

.main-nav > .shop-menu > .shop-trigger > span:first-child {
  display: inline-flex;
  align-items: center;
  height: 52px;
}

.menu-caret {
  width: 7px;
  height: 7px;
  margin-top: 0;
  border-right: 1px solid var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.shop-menu:hover .menu-caret,
.shop-menu:focus-within .menu-caret,
.shop-menu.is-open .menu-caret {
  margin-top: 0;
  transform: rotate(225deg);
}

.shop-popover {
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  z-index: 150;
  display: grid;
  grid-template-columns: minmax(220px, .32fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 44px);
  width: min(1080px, calc(100vw - 48px));
  padding: clamp(22px, 3vw, 34px);
  background: linear-gradient(180deg, rgba(255, 253, 247, .99), rgba(246, 232, 211, .99));
  border: 1px solid var(--gold-line);
  border-radius: 2px;
  box-shadow: 0 34px 90px rgba(39, 29, 18, .18);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.shop-popover::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -22px;
  height: 22px;
}

.shop-popover::after {
  content: none;
}

.shop-menu:hover .shop-popover,
.shop-menu:focus-within .shop-popover,
.shop-menu.is-open .shop-popover {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translate(-50%, 0);
}

.shop-popover-head {
  display: grid;
  align-content: start;
  gap: 10px;
  margin-bottom: 0;
  padding: 0 clamp(18px, 2.4vw, 30px) 0 0;
  border-right: 1px solid rgba(185, 138, 59, .24);
  border-bottom: 0;
}

.shop-popover-head span {
  color: var(--gold-dark);
  font-family: Arial, sans-serif;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.shop-popover-head strong {
  color: var(--ink);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 500;
  line-height: 1.16;
}

.shop-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(185, 138, 59, .24);
  border: 1px solid rgba(185, 138, 59, .22);
}

.shop-category-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-content: start;
  min-height: 164px;
  padding: 22px 18px;
  background: rgba(255, 250, 241, .92);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.shop-category-card:hover,
.shop-category-card:focus {
  background: #fffdf7;
  border-color: transparent;
  outline: 0;
  transform: translateY(-2px);
}

.category-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(185, 138, 59, .46);
  border-radius: 2px;
  background:
    radial-gradient(circle at 50% 50%, #fff8de 0 20%, transparent 21%),
    conic-gradient(from 20deg, #b98a3b, #f0d79a, #b98a3b);
}

.category-icon::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(17, 17, 17, .22);
  border-radius: 50%;
}

.category-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.category-copy strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
}

.category-copy small {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

@media (max-width: 1120px) {
  .main-nav {
    overflow: visible;
  }

  .shop-popover {
    grid-template-columns: 1fr;
  }

  .shop-popover-head {
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(185, 138, 59, .22);
  }

  .shop-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .main-nav > .shop-menu > .shop-trigger,
  .main-nav > .shop-menu > .shop-trigger > span:first-child {
    height: 36px;
    min-height: 36px;
  }

  .shop-popover {
    top: calc(100% + 8px);
    left: 10px;
    right: 10px;
    width: auto;
    max-height: min(560px, calc(100vh - 210px));
    overflow: auto;
    padding: 14px;
    transform: translateY(10px);
  }

  .shop-trigger {
    width: 100%;
    min-width: 0;
  }

  .shop-menu:hover .shop-popover,
  .shop-menu:focus-within .shop-popover,
  .shop-menu.is-open .shop-popover {
    transform: translateY(0);
  }

  .shop-popover::after {
    display: none;
  }

  .shop-category-grid {
    grid-template-columns: 1fr;
  }

  .shop-category-card {
    min-height: 72px;
  }

  .shop-popover-head strong {
    font-size: 20px;
  }
}
