/* Gift finder: keep the list in view while ideas are selected. */
.context-panel.gift-panel {
  width: min(1280px, 100vw);
  max-width: 100vw;
}
.gift-panel .context-head {
  padding: 23px 30px 20px;
}
.gift-panel .context-head h2 {
  font-size: 32px;
}
.gift-panel .context-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gift-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  flex: 1;
  min-height: 0;
}
.gift-discover {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 20px 28px 12px;
}
.chooser-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.chooser-intro > span {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #a42c3e;
  font-weight: 700;
}
.chooser-intro p {
  font-size: 11px;
  margin: 0;
  color: #8c7867;
  max-width: 55%;
  text-align: right;
  overflow-wrap: anywhere;
}
.gift-panel .picker-tabs {
  position: static;
  gap: 24px;
  margin: 0 0 16px;
  background: transparent;
  flex-shrink: 0;
}
.gift-panel .picker-tabs button {
  padding: 11px 0;
}
.gift-search-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.chooser-tools {
  flex-shrink: 0;
  position: relative;
}
.chooser-search {
  display: flex;
  border: 1px solid #d4bdac;
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 3px 10px #4d281005;
}
.chooser-search:focus-within {
  outline: 2px solid #a42c3e;
  outline-offset: 2px;
}
.chooser-search input {
  border: 0;
  border-radius: 0;
  padding: 17px 18px;
  font-size: 16px;
  outline: none;
}
.chooser-search button {
  background: #a42c3e;
  color: white;
  width: 58px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.chooser-filters {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.gift-panel .filter-pop {
  position: relative;
  margin: 0;
}
.filter-pop summary {
  list-style: none;
  border: 1px solid #e5d7ca;
  background: #fffdf9;
  border-radius: 8px;
  color: #6c5645;
  font-size: 11px;
  padding: 9px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.filter-pop summary::-webkit-details-marker {
  display: none;
}
.filter-pop summary:after {
  content: "⌄";
  margin-left: 12px;
  color: #a5886f;
}
.filter-pop[open] summary {
  border-color: #a42c3e;
  color: #a42c3e;
  background: #fff4ee;
}
.filter-pop label {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 230px;
  z-index: 20;
  padding: 14px;
  background: #fffdf9;
  border: 1px solid #e0cebc;
  border-radius: 12px;
  box-shadow: 0 8px 30px #3c221822;
}
.filter-pop select {
  margin-top: 7px;
  font-size: 13px;
}
.clear-filters {
  font-size: 10px;
  color: #a42c3e;
  background: none;
  padding: 8px 2px;
  margin-left: auto;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.active-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.active-filter-chips:not(:empty) {
  margin-bottom: 12px;
}
.active-filter-chips button {
  color: #a42c3e;
  background: #f8e9e3;
  border: 1px solid #e7c8bf;
  border-radius: 20px;
  font-size: 11px;
  padding: 6px 10px;
}
.active-filter-chips span {
  margin-left: 8px;
}
.universe-pills {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 2px 0 9px;
}
.universe-pills button {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  background: white;
  border: 1px solid #e6d9cd;
  border-radius: 30px;
  padding: 8px 12px;
  font-size: 11px;
  color: #8b705b;
}
.universe-pills button[aria-pressed="true"] {
  background: #a42c3e;
  border-color: #a42c3e;
  color: white;
}
.chooser-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
}
.chooser-results-head p {
  font-size: 11px;
  color: #8c7967;
  margin: 0;
}
.chooser-sort select {
  font-size: 11px;
  padding: 6px 20px 6px 9px;
  background: transparent;
  border-color: transparent;
  max-width: 180px;
}
#gift-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px 3px 16px;
  scrollbar-width: thin;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.gift-result {
  border-color: #e8dfd6;
  box-shadow: 0 4px 16px #50301b08;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  overflow: visible;
  border-radius: 15px;
}
.gift-result[draggable="true"] {
  cursor: grab;
}
.gift-result[draggable="true"]:active {
  cursor: grabbing;
}
.gift-result.is-chosen {
  border-color: #b15c64;
  box-shadow: 0 0 0 1px #b15c6433;
}
.gift-result .product-art {
  position: relative;
  height: 175px;
  overflow: visible;
  background: #f5f1eb;
  border-radius: 14px 14px 0 0;
  color: #b8a18a;
}
.gift-result .product-art img {
  position: absolute;
  inset: 0;
  border-radius: 14px 14px 0 0;
  padding: 12px;
  background: #f7f4ef;
}
.missing-product-art {
  font-size: 38px;
  filter: grayscale(0.5);
  opacity: 0.6;
}
.gift-heart {
  position: absolute;
  bottom: -19px;
  right: 11px;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #a99b8b;
  font-size: 29px;
  box-shadow: 0 3px 12px #38221a20;
  border: 1px solid #eee5da;
}
.gift-heart[aria-pressed="true"] {
  color: #a42c3e;
  background: #fff2ed;
  border-color: #ebccc3;
}
.gift-heart:disabled {
  opacity: 1;
  color: #788668;
  background: #f0f3e8;
  cursor: default;
}
.featured-badge {
  position: absolute;
  top: 12px;
  left: 10px;
  z-index: 1;
  font-size: 9px;
  padding: 6px 9px;
  background: #f3d59d;
  color: #765129;
  border-radius: 30px;
}
.gift-result .product-info {
  padding: 24px 14px 13px;
  border-radius: 0 0 14px 14px;
  gap: 6px;
}
.gift-result .product-price {
  font-size: 16px !important;
  line-height: 1.3;
}
.gift-result .product-info > small {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: #998270;
  text-transform: uppercase;
}
.gift-result .product-info h3 {
  font-size: 12px;
  margin: 1px 0 9px;
  font-weight: 500;
  line-height: 1.5;
}
.product-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 8px;
  margin-top: auto;
}
.product-card-bottom > span {
  font-size: 9px;
  color: #a18b78;
  max-width: 55%;
  overflow-wrap: anywhere;
}
.choose-text {
  font-size: 10px;
  color: #a42c3e;
  background: transparent;
  padding: 7px 0;
  white-space: nowrap;
  font-weight: 600;
}
.saved-label {
  font-size: 9px;
  color: #788668;
  white-space: nowrap;
}
.gift-panel .chooser-source {
  font-size: 9px;
  line-height: 1.5;
  margin: 10px 0 0;
  color: #a18b78;
  flex-shrink: 0;
}
.selection-pane {
  border-left: 1px solid #e7d9ca;
  background: #f6efe5;
  padding: 25px 20px 15px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.selection-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.selection-heading > span {
  font-size: 35px;
  color: #b46168;
}
.selection-heading h3 {
  font-family: "Playfair Display", serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.selection-heading p {
  font-size: 10px;
  margin: 6px 0 0;
  color: #9c8068;
}
.selection-drop-zone {
  border: 1px dashed #cdb499;
  border-radius: 14px;
  flex: 1;
  min-height: 100px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 9px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.selection-drop-zone.drop-ready {
  border-color: #a42c3e;
  background: #fce8df;
}
.selection-drop-zone.is-over {
  outline: 2px solid #a42c3e;
  outline-offset: -3px;
}
#selection-rows {
  list-style: none;
  padding: 0;
  margin: 0;
}
.empty-selection {
  text-align: center;
  padding: 40px 7px;
  color: #a78b71;
}
.empty-selection > span {
  font-size: 46px;
  display: block;
  margin-bottom: 13px;
  color: #c7a282;
}
.empty-selection strong {
  font-family: "Playfair Display", serif;
  font-size: 19px;
  font-weight: 500;
}
.empty-selection p {
  font-size: 11px;
  margin: 9px 0;
}
.selection-row {
  display: flex;
  align-items: start;
  gap: 9px;
  background: #fffdf9;
  border: 1px solid #e6d6c3;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: grab;
}
.selection-image {
  display: grid;
  place-items: center;
  width: 43px;
  height: 48px;
  flex-shrink: 0;
  background: #f2ebe1;
  border-radius: 5px;
  overflow: hidden;
}
.selection-image img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.selection-image .missing-product-art {
  font-size: 22px;
}
.selection-copy {
  min-width: 0;
  flex: 1;
}
.selection-copy strong {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.selection-copy small {
  font-size: 10px;
  color: #a28a73;
  display: block;
  margin: 5px 0;
}
.selection-row-actions {
  display: flex;
  gap: 3px;
  align-items: center;
}
.selection-row-actions button {
  font-size: 11px;
  background: transparent;
  border: 1px solid #e9dccc;
  border-radius: 5px;
  min-width: 30px;
  min-height: 30px;
  color: #896c55;
}
.selection-row-actions button:last-child {
  border-color: transparent;
  color: #a42c3e;
  font-size: 9px;
  margin-left: auto;
  padding-inline: 3px;
}
.selection-row-actions button:disabled {
  opacity: 0.35;
}
.drag-grip {
  color: #bba48e;
  font-size: 17px;
  margin-left: -4px;
}
.gift-panel .selection-help {
  font-size: 10px;
  color: #a28b74;
  margin: 14px 0 8px;
  line-height: 1.65;
}
.gift-panel .selection-unsaved {
  font-size: 9px;
  color: #a17e64;
  margin: 0;
  line-height: 1.5;
}
.selection-back,
.toggle-selection {
  display: none;
}
.gift-panel .chooser-footer {
  position: static;
  margin: 0;
  padding: 17px 28px;
  flex-shrink: 0;
  gap: 15px;
  flex-wrap: wrap;
}
.chooser-footer-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}
.chooser-footer .btn {
  font-size: 12px;
  padding: 12px 20px;
}
.chooser-footer .btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.chooser-footer [data-error] {
  width: 100%;
  color: #a42c3e;
}
#manual-gift {
  flex: 1;
  overflow: auto;
  padding: 3px;
}
#manual-gift form {
  max-width: 550px;
  margin: 5px auto;
}
@media (min-width: 1450px) {
  .gift-result .product-art {
    height: 205px;
  }
}
@media (max-width: 1100px) {
  .gift-builder {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .gift-discover {
    padding-inline: 20px;
  }
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .selection-pane {
    padding-inline: 15px;
  }
  .chooser-footer > #picker-feedback {
    display: none;
  }
}
@media (max-width: 760px) {
  .context-panel.gift-panel {
    width: 100vw;
    border-radius: 0;
  }
  .gift-panel .context-head {
    padding: 15px 18px 12px;
    gap: 10px;
  }
  .gift-panel .context-head h2 {
    font-size: 25px;
    margin-top: 5px;
    max-width: 270px;
  }
  .gift-panel .context-head .eyebrow {
    font-size: 8px;
  }
  .gift-builder {
    display: flex;
  }
  .gift-discover {
    width: 100%;
    padding: 12px 16px 8px;
  }
  .chooser-intro {
    margin-bottom: 3px;
  }
  .chooser-intro > span {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .chooser-intro p {
    font-size: 9px;
  }
  .gift-panel .picker-tabs {
    margin-bottom: 12px;
    gap: 22px;
  }
  .gift-panel .picker-tabs button {
    font-size: 11px;
    padding: 10px 0;
  }
  .chooser-search {
    margin-bottom: 10px;
  }
  .chooser-search input {
    font-size: 16px;
    padding: 12px;
  }
  .chooser-search button {
    width: 46px;
  }
  .chooser-filters {
    gap: 5px;
    margin-bottom: 9px;
  }
  .filter-pop summary {
    font-size: 10px;
    padding: 7px 8px;
  }
  .filter-pop summary:after {
    margin-left: 6px;
  }
  .filter-pop label {
    width: 210px;
    padding: 12px;
  }
  .filter-pop:nth-child(n + 3) label {
    left: auto;
    right: 0;
  }
  .clear-filters {
    font-size: 9px;
    padding: 5px 0;
  }
  .active-filter-chips:not(:empty) {
    margin-bottom: 8px;
  }
  .active-filter-chips button {
    font-size: 10px;
    padding: 5px 8px;
  }
  .universe-pills {
    padding-bottom: 6px;
  }
  .universe-pills button {
    font-size: 10px;
    padding: 7px 10px;
  }
  .chooser-results-head {
    margin: 1px 0 10px;
  }
  .chooser-results-head p {
    font-size: 10px;
  }
  .chooser-sort select {
    font-size: 10px;
    max-width: 140px;
    padding: 4px 16px 4px 5px;
  }
  .catalog-grid {
    gap: 12px;
  }
  .gift-result .product-art {
    height: 145px;
  }
  .gift-result .product-info {
    padding: 22px 11px 10px;
  }
  .gift-result .product-price {
    font-size: 14px !important;
  }
  .gift-result .product-info h3 {
    font-size: 11px;
  }
  .gift-heart {
    width: 38px;
    height: 38px;
    font-size: 25px;
    right: 8px;
    bottom: -16px;
  }
  .product-card-bottom {
    gap: 5px;
  }
  .product-card-bottom > span {
    font-size: 8px;
  }
  .choose-text {
    font-size: 10px;
  }
  .gift-panel .chooser-source {
    font-size: 8px;
    margin-top: 7px;
  }
  .selection-pane {
    display: none;
    width: 100%;
    border-left: 0;
    padding: 20px;
  }
  .show-selection .gift-discover {
    display: none;
  }
  .show-selection .selection-pane {
    display: flex;
  }
  .selection-back {
    display: block;
    align-self: start;
    margin-bottom: 20px;
    font-size: 12px;
    padding: 6px 0;
  }
  .toggle-selection {
    display: block;
    white-space: nowrap;
    background: #f5e8dd;
    color: #a42c3e;
    padding: 12px;
    border-radius: 10px;
    font-size: 11px;
  }
  .gift-panel .chooser-footer {
    padding: 12px 14px;
    gap: 8px;
  }
  .chooser-footer-actions {
    gap: 10px;
    width: 100%;
    justify-content: space-between;
  }
  .chooser-footer .btn {
    font-size: 11px;
    padding: 12px 14px;
    flex: 1;
  }
  #close-gifts {
    display: none;
  }
  .selection-image {
    width: 52px;
    height: 55px;
  }
  .selection-copy strong {
    font-size: 13px;
  }
  .selection-row-actions button {
    min-width: 38px;
    min-height: 35px;
  }
  .selection-row-actions button:last-child {
    font-size: 10px;
    padding: 7px;
  }
  .gift-panel .selection-help {
    font-size: 11px;
  }
  .selection-heading h3 {
    font-size: 26px;
  }
}
@media (max-width: 360px) {
  .filter-pop summary {
    font-size: 9px;
    padding: 6px;
  }
  .clear-filters {
    margin-left: 0;
  }
  .gift-discover {
    padding-inline: 12px;
  }
  .gift-panel .context-head h2 {
    font-size: 23px;
  }
  .gift-result .product-art {
    height: 120px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gift-result,
  .selection-drop-zone {
    transition: none;
  }
}

/* Accessible labels remain available to assistive technology. */
.gift-panel .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
