/* Keep the alternate configurations on separate tap targets inside each look card.
   Older markup has a text separator between the links. */
#main .editAlternates {
  display: grid;
  justify-items: start;
  margin-top: .25rem;
  font-size: 0;
  line-height: 0;
}

#main .editAlternates a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  font-size: .875rem;
  line-height: 1.35;
}

#main .productBody {
  min-width: 0;
}

#main .productBody h1 {
  overflow-wrap: anywhere;
}

@media (max-width: 730px) {
  #main .productBody h1 {
    font-size: clamp(2.45rem, 9.5vw, 3.4rem);
  }
}

@media (pointer: coarse), (max-width: 1024px) {
  #main .productBody :is(.under, .crumb),
  #main .collection > p > .under,
  #main .filters button,
  #panel .panelActions .under {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  #panel .panelActions {
    flex-wrap: wrap;
    gap: 8px 16px;
  }
}

/* The checkout's language switch and the disclosure for a basket item's
   configuration are independent controls on phones and tablets. */
@media (pointer: coarse), (max-width: 1024px) {
  #nav .language {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 44px;
    min-height: 44px;
  }

  #lines .line-details summary {
    min-height: 44px;
    padding-block: .65rem;
  }
}

.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.catalog-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
}

@media (max-width: 730px) {
  .catalog-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

.catalog-page header a,
.catalog-page .groups a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Order references, buyer email addresses and garment specifications can be
   longer than the width available inside a receipt card. */
#content .card,
main > #status,
main > #error {
  overflow-wrap: anywhere;
}

#order-continue {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 340px) {
  #head .nav {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    height: auto;
    padding: 4px 12px;
  }

  #head .nav .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  #head .nav .left,
  #head .nav .right {
    grid-row: 2;
  }

  #head .nav .right {
    justify-self: end;
  }

  #collection .sectionhead p:has(> a.under + a.under) {
    display: grid;
    justify-items: start;
    font-size: 0;
    line-height: 0;
  }

  #collection .sectionhead p > a.under {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: .875rem;
    line-height: 1.35;
  }
}

/* Keep the native select boxes in normal inline flow within a block label.
   This prevents their intrinsic option widths widening the checkout in WebKit. */
#choose-form label {
  display: block;
}

#choose-form label > span {
  display: block;
  margin-bottom: .3rem;
}

/* Keep long coat names inside the mobile WebKit viewport while preserving
   native keyboard, touch and screen-reader access to both selectors. */
#dbMix label.field {
  display: block;
}

#dbMix label.field > span {
  display: block;
  margin-bottom: .3rem;
}

#dbMix label.field > select {
  width: 100%;
  max-width: 100%;
}
