.catalog-dropbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 10px 0;
  color: var(--kid-plum);
}
.catalog-drop-anchor { position: relative; min-width: 0; }
.catalog-drop-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 45px;
  padding: 8px 14px;
  border: 1px solid var(--kid-edge);
  border-radius: 9px;
  background: var(--kid-cream);
  color: inherit;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.catalog-drop-toggle[aria-expanded="true"] { border-color: var(--kid-plum); }
.catalog-drop-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 2px 3px 0;
  border: solid var(--kid-plum);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.catalog-drop-toggle[aria-expanded="true"] .catalog-drop-chevron {
  margin-bottom: -2px;
  transform: rotate(225deg);
}
.catalog-drop-panel {
  position: absolute;
  inset-block-start: calc(100% + 7px);
  inset-inline-start: 0;
  inline-size: min(327px, calc(100vw - 32px));
  border: 1px solid var(--kid-edge);
  border-radius: 11px;
  background: var(--kid-cream);
  box-shadow: 0 8px 21px rgba(102,57,80,.11);
  overflow: hidden;
}
.catalog-drop-options {
  position: relative;
  display: grid;
  gap: 1px;
  max-block-size: min(28rem, 55dvh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 7px;
}
.catalog-drop-options button {
  position: relative;
  display: flex;
  align-items: center;
  text-align: start;
  min-width: 0;
  min-height: 40px;
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .94rem;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.catalog-drop-options button[aria-pressed="true"] {
  background: var(--kid-rose);
  font-weight: 650;
}
.catalog-drop-options button:hover { background: white; }
.catalog-drop-toggle:focus-visible, .catalog-drop-options button:focus-visible {
  outline: 2px solid var(--kid-plum);
  outline-offset: -2px;
}
.catalog-dropbar [hidden] { display: none; }
@media (min-width:1100px) {
  .catalog-dropdown-open main.wrap { padding-inline-start: 351px; }
  .catalog-dropdown-open #products { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:660px) {
  .catalog-dropbar {
    display: grid;
    gap: 6px;
    padding-block-start: 7px;
  }
  .catalog-dropbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-drop-anchor, .catalog-drop-panel { inline-size: 100%; }
  .catalog-drop-panel { grid-column: 1 / -1; }
  .catalog-drop-toggle { min-width: 0; width: 100%; gap: 8px; }
  .catalog-drop-panel { position: relative; inset: auto; margin-block-start: 7px; }
  .catalog-drop-options { max-block-size: min(28rem, 50dvh); }
  .catalog-drop-options button { min-height: 44px; }
}

.catalog-mobile-height { display: none; }
@media (min-width: 661px) and (max-width: 1099px) {
  .catalog-dropbar { display: grid; }
  .catalog-drop-panel { position: relative; inset: auto; }
}
.catalog-page #catalog-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}
#catalog-active-filters li { min-width: 0; max-width: 100%; }
#catalog-active-filters button {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--kid-edge);
  border-radius: 17px;
  background: var(--kid-rose);
  color: var(--kid-plum);
  font-size: 13px;
  text-align: start;
  overflow-wrap: anywhere;
}
#catalog-active-filters button > :first-child { min-width: 0; }
#catalog-active-filters button > :last-child { font-size: 17px; line-height: 1; }

.catalog-page #products .product > .media {
  flex: none;
  aspect-ratio: 4 / 5;
}
.catalog-page #products .product > .media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-page #products .product-copy {
  display: grid;
  grid-template-rows: 1.35em 2.85em 2.9em minmax(2.6em, 1fr);
  gap: 3px;
  min-width: 0;
  align-content: start;
}
.catalog-page #products .product-qualifiers {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}
.catalog-page #products .product-qualifiers > * {
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-page #products .product-rating {
  max-width: 53%;
  flex: 0 0 auto;
  color: var(--kid-plum);
  font-size: 11px;
}
.catalog-page #products .product-title,
.catalog-page #products .product-size {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.35;
}
.catalog-page #products .price-line {
  align-self: end;
  min-width: 0;
  margin: 0;
}
.catalog-page #products .price-line > :first-child { min-width: 0; overflow-wrap: anywhere; }

.detail-mobile-buy { display: none; }
@media (max-width: 660px) {
  .catalog-mobile-height { display: flex; }
  .catalog-page .catalog { padding-block-start: 14px; }
  .catalog-page .section-heading { margin-block-end: 9px; }
  .catalog-page .catalog-controls { border: 0; }
  .catalog-page .size-filter:not([open]),
  .catalog-page .size-filter > summary,
  .catalog-page .catalog-controls .height-actions,
  .catalog-page #size-note { display: none; }
  .catalog-page .size-filter[open] > .size-panel { padding: 7px 0 8px; }
  #catalog-active-filters button { min-height: 40px; }
  .catalog-page .results-meta { margin-block: 4px 7px; }
  .catalog-page .catalog-pagination:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px 8px;
    margin-block-end: 10px;
  }
  .catalog-page .catalog-pagination p { font-size: 12px; }
  .catalog-page #products .product-copy {
    padding: 8px 8px 10px;
    grid-template-rows: 1.35em 3.9em 2.45em minmax(1.95em, 1fr);
  }
  .catalog-page #products .product-title {
    font-size: 14px;
    -webkit-line-clamp: 3;
  }
  .catalog-page #details { scroll-padding-block-end: 7rem; }
  .catalog-page #details .detail-heading > .detail-price { display: none; }
  .catalog-page #details .detail-actions { grid-template-columns: minmax(0,1fr); }

  .detail-mobile-buy {
    position: sticky;
    inset-block-end: 0;
    z-index: 3;
    display: block;
    padding: 9px 12px max(9px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--kid-edge);
    background: var(--kid-cream);
    color: var(--ink);
  }
  .detail-mobile-buy-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(104px, auto);
    align-items: center;
    gap: 8px;
  }
  .detail-mobile-buy-summary { min-width: 0; }
  .detail-mobile-buy-summary p { margin: 0; font-weight: 650; line-height: 1.2; }
  #detail-mobile-height {
    border: 0;
    padding: 0;
    min-height: 28px;
    background: transparent;
    color: var(--kid-plum);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-align: start;
  }
  #detail-mobile-action #add-to-cart {
    min-height: 44px;
    width: 100%;
    padding-inline: 8px;
    border-color: var(--kid-plum);
    background: var(--kid-plum);
    color: white;
  }
  #detail-mobile-action #add-to-cart:disabled { opacity: .58; }
  #detail-mobile-feedback {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    column-gap: 8px;
    font-size: 13px;
  }
  #detail-mobile-feedback .action-status { margin: 0; }
  #detail-mobile-feedback .action-status:empty { display: none; }
  #detail-mobile-feedback #open-cart-after-add {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: var(--kid-plum);
    text-decoration: underline;
  }
}
