/* Shared responsive shell and merchandise grids. Loaded after page styles. */
.header-inner {
  gap: 24px;
  min-width: 0;
}
.header-inner > .wordmark {
  flex-shrink: 0;
}
.header-actions {
  flex-shrink: 0;
}
.header-inner > nav {
  min-width: 0;
}
.identity-departments {
  flex-wrap: nowrap;
  gap: clamp(20px, 2.6vw, 38px);
}
.identity-departments a {
  flex-shrink: 0;
  white-space: nowrap;
}
.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}
.product-card {
  min-width: 0;
}
.product-card .card-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.product-card .card-info > div {
  min-width: 0;
}
.product-card .card-info > span {
  flex-shrink: 0;
  white-space: nowrap;
}
.product-card h3 {
  overflow-wrap: anywhere;
}
.product-card .card-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.shop-results .product-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}
.product-card .compare-toggle {
  max-width: 100%;
  text-align: left;
  line-height: 1.5;
}
@media (max-width: 1100px) {
  .header-inner > nav {
    display: none;
  }
  .header-actions .menu-button {
    display: block;
    min-height: 44px;
    margin: 0 8px 0 0;
    font-size: 12px;
  }
  .header-inner {
    height: 84px;
  }
  .header-actions {
    gap: 10px;
  }
  .identity-departments {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #fff8 transparent;
    min-height: 52px;
    gap: 26px;
    padding-block: 0;
  }
  .identity-departments a {
    min-height: 52px;
  }
  .identity-departments a:last-child {
    margin-left: 0;
  }
  .identity-departments::-webkit-scrollbar {
    height: 3px;
  }
  .identity-departments::-webkit-scrollbar-thumb {
    background: #fff8;
  }
}
@media (min-width: 651px) and (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 18px;
  }
  .shop-results .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-card .card-info {
    flex-wrap: wrap;
    gap: 6px;
  }
  .product-card .card-info > div {
    flex-basis: 100%;
  }
}
@media (max-width: 650px) {
  .header-inner {
    height: 76px;
    gap: 12px;
    margin: 0 20px;
  }
  .header-inner > .wordmark {
    font-size: 39px;
    letter-spacing: -3.5px;
  }
  .header-actions {
    gap: 2px;
  }
  .header-actions .menu-button {
    margin-right: 4px;
    font-size: 11px;
  }
  .header-actions .icon-button {
    min-width: 40px;
    padding: 9px;
  }
  .identity-departments {
    padding-inline: 20px;
    gap: 24px;
  }
  .identity-departments a {
    font-size: 11px;
    letter-spacing: 0.04em;
    min-height: 48px;
  }
  .product-grid,
  .shop-results .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 14px;
  }
  .product-card .card-info {
    flex-direction: column;
    gap: 6px;
  }
  .product-card .card-info h3 {
    font-size: 13px;
    line-height: 1.45;
  }
  .product-card .card-info p {
    margin-top: 4px;
    line-height: 1.5;
  }
  .product-card .card-info > span {
    font-size: 14px;
  }
  .product-card .card-image > button {
    width: 40px;
    height: 40px;
  }
  .product-card .compare-toggle {
    font-size: 10px;
    min-height: 44px;
  }
  .category-grid {
    gap: 20px;
  }
  .header-wishlist .wishlist-dropdown {
    position: fixed;
    top: 76px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100svh - 100px);
    overflow: auto;
  }
}
@media (max-width: 370px) {
  .header-inner {
    margin-inline: 12px;
    gap: 6px;
  }
  .header-inner > .wordmark {
    font-size: 33px;
    letter-spacing: -3px;
  }
  .header-actions .menu-button {
    margin-right: 0;
  }
  .header-actions .icon-button {
    min-width: 36px;
    padding: 7px;
  }
  .bag-button {
    gap: 5px;
  }
  .product-grid,
  .shop-results .product-grid {
    gap: 24px 10px;
  }
}
@media (min-width: 1600px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .shop-results .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Mobile shopping hierarchy: menu, brand, search, bag. Secondary destinations live in the drawer. */
.mobile-menu-trigger {
  display: none;
}
.mobile-menu-trigger svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.menu-secondary {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}
#shop-menu .menu-secondary a {
  font-size: 14px;
  min-height: 44px;
  padding: 10px 0;
}
#shop-menu {
  max-height: calc(100svh - 24px);
  overflow-y: auto;
}
@media (max-width: 1100px) {
  .mobile-menu-trigger {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
  }
  .header-inner > .wordmark {
    margin-right: auto;
  }
}
@media (max-width: 650px) {
  .header-inner {
    gap: 10px;
    height: 72px;
    margin-inline: 14px;
  }
  .header-inner > .wordmark {
    font-size: 37px;
    letter-spacing: -3.5px;
  }
  .header-actions .header-wishlist,
  .header-actions .account-button {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .icon-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .bag-button {
    min-height: 44px;
    gap: 6px;
    font-size: 12px;
  }
  .identity-departments {
    min-height: 44px;
  }
  .identity-departments a {
    min-height: 44px;
  }
  .mobile-menu-trigger {
    width: 44px;
    flex-shrink: 0;
  }
  #shop-menu {
    margin: 0 auto 0 0;
    height: 100svh;
    max-height: 100svh;
    width: min(390px, calc(100vw - 28px));
    max-width: none;
    border: 0;
    padding: 24px;
  }
  #shop-menu .dialog-head h2 {
    font-size: 27px;
  }
  .header-wishlist .wishlist-dropdown {
    top: 72px;
  }
}
@media (max-width: 370px) {
  .header-inner {
    margin-inline: 10px;
    gap: 6px;
  }
  .header-inner > .wordmark {
    font-size: 33px;
    letter-spacing: -3px;
  }
  .header-actions {
    gap: 2px;
  }
}

/* Compact header: right-aligned navigation and a single bag control. */
.header-actions {
  gap: 2px;
}
.header-actions .icon-button,
.bag-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  place-items: center;
}
.bag-button {
  position: relative;
  display: grid;
}
.bag-button svg {
  display: block;
  width: 23px;
  height: 23px;
}
.bag-button #bag-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  width: auto;
  height: 18px;
  padding: 0 4px;
  border: 2px solid var(--paper);
  border-radius: 20px;
  background: var(--coral);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.bag-button .visually-hidden {
  border: 0;
  padding: 0;
}
@media (min-width: 1101px) {
  .header-inner > nav {
    margin-left: auto;
    gap: 28px;
  }
  .header-inner {
    gap: 32px;
  }
}
