/* Empty states, overlays and responsive card stability */
body.modal-open,
body.drawer-open {
  overflow: hidden;
}

.desktop-nav {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.desktop-nav nav {
  flex: 0 0 auto;
}

.side-user {
  position: static;
  margin-top: auto;
}

.grid {
  align-items: start;
}

.grid > .empty:only-child {
  grid-column: 1 / -1;
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
}

.card,
.product-card,
.product-body,
.between > * {
  min-width: 0;
}

.product-body h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-head {
  gap: 14px;
  flex-wrap: wrap;
}

.notice-card {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #f0dca7;
  border-radius: 15px;
  color: #76500b;
  background: #fff8e6;
  line-height: 1.65;
}

.notice-card.success {
  border-color: #b9dfc8;
  color: var(--green2);
  background: var(--soft);
}

.modal-backdrop,
.drawer-backdrop {
  overscroll-behavior: contain;
}

.modal-backdrop[aria-hidden="true"],
.cart-drawer[aria-hidden="true"] {
  pointer-events: none;
}

.list-item {
  min-width: 0;
  text-align: left;
}

.list-item > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-height: 720px) and (min-width: 951px) {
  .desktop-nav {
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .brand {
    padding-bottom: 14px;
  }

  .nav-item {
    padding: 8px 11px;
  }

  .side-user {
    margin-top: 12px;
  }
}

@media (max-width: 950px) {
  .desktop-nav {
    display: none;
  }

  .bottom-nav {
    gap: 1px;
  }

  .bottom-nav button {
    flex: 1;
    min-width: 0;
    padding: 4px 1px;
  }

  .shell {
    min-height: 100vh;
  }
}

@media (max-width: 620px) {
  .grid > .empty:only-child {
    min-height: 150px;
  }

  .product-body {
    padding: 12px;
  }

  .product-body .secondary {
    padding: 8px 9px;
    font-size: 12px;
  }

  .modal .modal-actions {
    position: sticky;
    bottom: -18px;
    margin-right: -18px;
    margin-left: -18px;
    padding: 13px 18px;
    border-top: 1px solid var(--line);
    background: white;
  }

  .cart-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .profile-hero {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .profile-hero .ghost {
    align-self: stretch;
  }

  .hero-actions {
    flex-wrap: wrap;
  }
}
