/* V6 category browsing, account favorites and qualitative availability. */
.commerce-page .commerce-category-shortcuts a {
  flex-shrink: 0;
  min-height: 39px;
  border: 1px solid #dfe6ed;
  background: #fff;
  border-radius: 7px;
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 600;
  color: #42576b;
  white-space: nowrap;
}
.commerce-page .commerce-category-shortcuts a:hover {
  background: #f2f5f8;
}
.commerce-page .commerce-category-shortcuts a.is-active {
  background: #163651;
  color: white;
  border-color: #163651;
}
.commerce-category-landing {
  padding: 36px 0 52px;
}
.commerce-category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}
.commerce-category-heading h2 {
  font:
    800 clamp(24px, 3vw, 32px) / 1.2 Manrope,
    sans-serif;
  letter-spacing: -1px;
  margin: 0 0 10px;
}
.commerce-category-heading p {
  color: #617185;
  font-size: 14px;
  line-height: 1.65;
  max-width: 620px;
}
.commerce-category-search {
  display: flex;
  min-width: 290px;
  border: 1px solid #cbd6e0;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}
.commerce-page .commerce-category-search input {
  border: 0;
  border-radius: 0;
  min-width: 0;
  width: 100%;
  padding: 12px 15px;
}
.commerce-category-search button {
  flex-shrink: 0;
  border: 0;
  background: #183a56;
  color: white;
  padding: 12px 17px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.commerce-category-search button:hover {
  background: #254d6c;
}
.commerce-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.commerce-category-card {
  border: 1px solid #dbe3eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.commerce-category-card:hover {
  border-color: #b9cbd9;
  box-shadow: 0 12px 28px #14324b0e;
  transform: translateY(-3px);
}
.commerce-category-image {
  background: #edf2f6;
  aspect-ratio: 1.55;
  overflow: hidden;
}
.commerce-category-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}
.commerce-category-copy {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.commerce-category-copy h3 {
  font:
    800 clamp(18px, 1.8vw, 23px) / 1.3 Manrope,
    sans-serif;
  margin: 0 0 11px;
  letter-spacing: -0.5px;
}
.commerce-category-copy p {
  color: #63768a;
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 23px;
}
.commerce-category-copy > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
}
.commerce-category-copy > span b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff0e3;
  color: #ab4d10;
  font-size: 19px;
}
.commerce-category-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
}
.commerce-category-footer p {
  color: #647789;
  font-size: 13px;
  line-height: 1.6;
}
.commerce-category-footer p a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #244c6b;
}
.commerce-category-footer > button {
  min-height: 44px;
  flex-shrink: 0;
}
.commerce-page .shop-product-card {
  position: relative;
}
.commerce-favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #d6e0e8;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: #fff;
  color: #31536e;
  cursor: pointer;
  transition:
    background 0.16s,
    color 0.16s,
    border-color 0.16s;
}
.shop-product-card > .commerce-favorite-button {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
}
.commerce-favorite-button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.commerce-favorite-button:hover {
  color: #bc5315;
  border-color: #db9e73;
  background: #fff8f1;
}
.commerce-favorite-button.is-saved {
  color: #b54c13;
  border-color: #e9b48f;
  background: #fff2e6;
}
.commerce-favorite-button.is-saved svg {
  fill: currentColor;
}
.commerce-favorite-button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.commerce-favorite-button.with-label {
  position: static;
  width: auto;
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  margin: 0 0 18px;
}
.commerce-product-title h1 {
  margin-bottom: 14px;
}
.commerce-availability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 650;
  color: #367755;
  margin: 0 0 10px;
}
.commerce-availability::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.commerce-availability.is-low_stock {
  color: #976118;
}
.commerce-availability.is-out_of_stock {
  color: #697a88;
}
.commerce-availability.is-on_order {
  color: #3c668e;
}
.commerce-variant-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.commerce-variant-status .commerce-availability {
  margin-bottom: 0;
  font-size: 11px;
}
.commerce-variant-status small {
  font-size: 10px;
  line-height: 1.4;
}
.commerce-variant-status a.shop-link {
  font-size: 11px;
  min-height: 30px;
}
.commerce-custom-positions {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-width: 0;
}
.commerce-custom-positions legend {
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 10px;
}
.commerce-custom-positions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
}
.commerce-custom-positions > small {
  display: block;
  font-size: 11px;
  line-height: 1.6;
  color: #657b8e;
  margin-top: 12px;
}
.commerce-favorites-count {
  margin: 0 0 20px;
  color: #5d7285;
  font-size: 14px;
}
.commerce-empty-heart {
  display: block;
  font-size: 60px;
  color: #c26427;
  margin-bottom: 10px;
}
.pd-header-action.v6-favorites-link {
  position: relative;
  gap: 6px;
}
.pd-header-action.v6-favorites-link svg {
  width: 22px;
  height: 22px;
}
.v6-favorites-count {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #f47a26;
  color: #142e46;
  font-size: 10px;
  font-weight: 750;
}
.v6-favorites-count[hidden] {
  display: none;
}
@media (max-width: 1050px) {
  .commerce-category-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .commerce-category-search {
    width: min(100%, 430px);
    min-width: 0;
  }
  .commerce-category-grid {
    gap: 16px;
  }
  .commerce-category-copy {
    padding: 19px;
  }
  .v6-favorites-link .v5-action-label {
    display: none;
  }
}
@media (max-width: 760px) {
  .commerce-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .commerce-category-grid.is-root {
    grid-template-columns: 1fr;
  }
  .commerce-category-grid.is-root .commerce-category-card {
    display: grid;
    grid-template-columns: 35% minmax(0, 1fr);
  }
  .commerce-category-grid.is-root .commerce-category-image {
    height: 100%;
    aspect-ratio: auto;
  }
  .commerce-category-grid.is-root .commerce-category-copy p {
    margin-bottom: 10px;
  }
  .commerce-category-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .commerce-category-landing {
    padding: 28px 0 36px;
  }
  .commerce-category-copy {
    padding: 17px;
  }
  .commerce-category-copy h3 {
    font-size: 18px;
  }
  .commerce-category-copy p {
    font-size: 12px;
  }
  .commerce-category-copy > span {
    font-size: 12px;
  }
  .commerce-page .commerce-favorites-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .commerce-category-grid:not(.is-root) {
    grid-template-columns: 1fr;
  }
  .commerce-category-grid.is-root .commerce-category-card {
    grid-template-columns: 30% minmax(0, 1fr);
  }
  .commerce-category-grid.is-root .commerce-category-image img {
    padding: 4px;
  }
  .commerce-category-copy {
    padding: 16px 14px;
  }
  .commerce-category-copy h3 {
    font-size: 17px;
  }
  .commerce-category-copy p {
    font-size: 11px;
  }
  .commerce-category-copy > span b {
    width: 29px;
    height: 29px;
  }
  .shop-product-card > .commerce-favorite-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    top: 6px;
    right: 6px;
  }
  .commerce-page .shop-product-badge {
    max-width: calc(100% - 55px);
    font-size: 8px;
    padding: 4px 5px;
  }
  .commerce-page .shop-size-row {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) 96px;
    column-gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .commerce-category-card,
  .commerce-favorite-button {
    transition: none;
  }
  .commerce-category-card:hover {
    transform: none;
  }
}

/* Four 44px actions remain reachable even on the narrowest phone widths. */
.v5-header .pd-header-action.v6-favorites-link > .v6-favorites-count:not([hidden]) {
  display: grid;
}
@media (max-width: 600px) {
  .v5-header .v5-header-main {
    column-gap: 8px;
  }
  .v5-header .header-actions {
    gap: 2px;
  }
}
@media (max-width: 370px) {
  .v5-header .brand > span {
    display: none;
  }
  .v5-header .brand {
    min-height: 44px;
    min-width: 44px;
  }
}
