/* The Dkhoni source photos are closely cropped. Give the bottles their own
   white frame at each size so they share a scale with the other houses. */
.card[data-house="dkhoni"] .pic {
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 1;
  padding: 18%;
  object-fit: contain;
  background-color: white;
}

.addline .access-link {
  padding: 7px 10px;
  min-height: 44px;
  font-size: .9rem;
}

.catalog-density {
  display: none;
}

.card .min-retail {
  display: block;
  margin: .1rem 0;
  font-size: .85rem;
  line-height: 1.25;
  color: var(--muted, #47586a);
}

/* Catalog density follows the available desktop width. Keep the existing
   phone and tablet layouts, including their tap targets, below this point. */
@media (min-width: 64em) {
  #catalog {
    --columns: 4;
    --photo-height: clamp(9rem, 11.5vw, 14rem);
    max-width: 160rem;
    margin-inline: auto;
    padding: clamp(1.75rem, 2.6vw, 3rem) clamp(1.5rem, 3vw, 4.5rem) 4rem;
  }

  #catalog .back { margin-bottom: 1rem; }
  #catalog .titleline { gap: 1.5rem; flex-wrap: wrap; }
  #catalog .titleline > div { margin-inline-end: auto; }
  #catalog .titleline h1 { font-size: clamp(3.1rem, 4.2vw, 5rem); }
  #catalog .titleline .eyebrow { margin-bottom: .35rem; }
  #catalog #results { margin: 1rem 0 .65rem; padding-top: .6rem; }
  #catalog #catalogAccess { margin-bottom: .85rem; }

  .catalog-density {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.5rem;
    font-weight: 600;
    cursor: pointer;
  }

  .catalog-density input { accent-color: var(--ink); }
  #catalog #grid { grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: 1.4rem 1rem; }
  #grid .family-title { margin-top: .25em; padding-top: .5em; font-size: clamp(1.6rem, 2vw, 2.2rem); }
  #grid .card .pic {
    height: var(--photo-height);
    width: 100%;
    aspect-ratio: auto;
    object-fit: contain;
  }

  #grid .card[data-house="dkhoni"] .pic { padding: calc(var(--photo-height) * .13); }
  #grid .card .brand { margin: .5rem 0 .2rem; }
  #grid .card h3 {
    font-size: clamp(1.1rem, 1.25vw, 1.3rem);
    line-height: 1.2;
    min-height: 2.4em;
    overflow-wrap: anywhere;
  }
  #grid .card .price { margin-top: .25rem; }
  #grid .card .addline { gap: .45rem; margin-top: .5rem; }
  #grid .card .qty { width: 3.75rem; padding: .25rem .4rem; }
  #grid .card .addline button, #grid .card .access-link {
    min-height: 2.1rem;
    padding: .3rem .7rem;
  }
  #grid .card details { margin-top: .4rem; }

  #catalog:has(.catalog-density input:checked) {
    --photo-height: clamp(7rem, 8vw, 10rem);
  }
}

@media (min-width: 76em) {
  #catalog { --columns: 5; }
}

@media (min-width: 96em) {
  #catalog:has(.catalog-density input:checked) { --columns: 6; }
}

@media (min-width: 136em) {
  #catalog { --columns: 6; }
}
