/* Scoped to the homepage product showcase. */
body.home #selectia-doty .home-heading h2 {
  font-size: clamp(44px, 3.5vw, 52px);
}
body.home #selectia-doty .home-heading {
  margin-bottom: 32px;
  align-items: flex-end;
}
body.home #selectia-doty .home-products {
  gap: 24px;
  grid-auto-rows: 1fr;
}
body.home #selectia-doty .home-product {
  border-radius: 6px;
  transition:
    transform 200ms,
    box-shadow 200ms,
    border-color 200ms;
}
body.home #selectia-doty .home-product:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary-soft);
}
body.home #selectia-doty .home-product-image {
  height: 300px;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}
body.home #selectia-doty .home-product-image img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  transition: transform 200ms;
}
body.home #selectia-doty .home-product-image:hover img {
  transform: scale(1.025);
}
body.home #selectia-doty .home-product-copy {
  padding: 20px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.home #selectia-doty .home-product h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 2.8em;
}
body.home #selectia-doty .home-product-type {
  font-size: 14px;
  line-height: 1.5;
  min-height: 3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.home #selectia-doty .home-product-notes {
  font-size: 14px;
  margin: 0;
}
body.home #selectia-doty .home-product-purchase {
  margin-top: auto;
  padding-top: 8px;
}
body.home #selectia-doty .home-product-price {
  font-size: 24px;
  font-weight: 700;
  padding: 0 0 16px;
}
body.home #selectia-doty .doty-price-info {
  display: inline !important;
  font-size: 14px !important;
}
body.home #selectia-doty .doty-price-info:first-of-type::before {
  content: "";
  display: block;
}
body.home #selectia-doty .doty-unit-price::before {
  content: " • ";
}
body.home #selectia-doty .home-button {
  min-height: 50px;
}
body.home #selectia-doty .home-product-purchase > .home-button {
  width: 100%;
  height: 50px;
  padding: 10px 8px;
  font-size: 15px;
}
body.home #selectia-doty .home-card-status {
  min-height: 3em;
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
}
body.home #selectia-doty .home-card-status.is-error {
  color: var(--color-error);
}
body.home #selectia-doty .home-product-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-primary-hover);
  font-size: 14px;
}
body.home #selectia-doty .home-favorite {
  width: 44px;
  height: 44px;
}
body.home #selectia-doty .home-card-rating {
  margin: 0;
  font-size: 14px;
  color: var(--color-primary-hover);
}
body.home #selectia-doty .home-selection-message {
  padding: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
/* Server-rendered products need no second product request. Image placeholders
   occupy the reserved image area until the lazy image finishes loading. */
body.home #selectia-doty .home-product-image.is-loading {
  background: linear-gradient(
    110deg,
    var(--color-background),
    var(--color-surface),
    var(--color-background)
  );
}
body.home #selectia-doty .home-product-image.is-loading img {
  opacity: 0;
}
body.home #selectia-doty .home-product-image.is-missing {
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
}
@media (max-width: 767px) {
  body.home #selectia-doty .home-heading {
    align-items: flex-start;
  }
  body.home #selectia-doty .home-heading h2 {
    font-size: 36px;
  }
  body.home #selectia-doty .home-product-image {
    height: 260px;
    padding: 16px;
  }
  body.home #selectia-doty .home-product-copy {
    padding: 16px 16px 0;
  }
}
@media (max-width: 419px) {
  body.home #selectia-doty .home-product-image {
    height: 300px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.home #selectia-doty .home-product,
  body.home #selectia-doty .home-product-image img {
    transition: none;
    transform: none;
  }
}

/* Reference-driven proportions: full image stage and compact buying details. */
body.home #selectia-doty .home-product-image {
  height: auto;
  aspect-ratio: 1 / 1;
  padding: 8px;
}
body.home #selectia-doty .home-product-copy {
  padding: 8px 18px 18px;
  gap: 8px;
}
body.home #selectia-doty .home-product h3 {
  min-height: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}
body.home #selectia-doty .home-product-type {
  min-height: 0;
  font-size: 14px;
}
body.home #selectia-doty .home-product-purchase {
  padding-top: 8px;
}
body.home #selectia-doty .home-product-price {
  font-size: 28px;
  padding-bottom: 12px;
}
body.home #selectia-doty .home-product-purchase > .home-button {
  height: 54px;
  font-size: 17px;
  font-weight: 600;
}
body.home #selectia-doty .home-favorite {
  background: #faf8f6;
  box-shadow: 0 2px 4px rgb(41 29 25 / 8%);
  top: 12px;
  right: 12px;
}
body.home #selectia-doty .home-card-status {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  overflow: hidden;
  clip-path: inset(50%);
  margin: 0;
}
body.home #selectia-doty .home-card-status.is-error {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  margin: 8px 0 0;
}
@media (max-width: 767px) {
  body.home #selectia-doty .home-product h3 {
    font-size: 18px;
  }
  body.home #selectia-doty .home-product-copy {
    padding: 8px 14px 14px;
  }
  body.home #selectia-doty .home-product-purchase > .home-button {
    font-size: 15px;
  }
}

/* These six existing recommendation images contain wide white source margins.
   The bounded enlargement removes only those margins, preserving the subjects. */
body.home #selectia-doty .home-product:is([data-product-id="205"], [data-product-id="1957"], [data-product-id="1867"], [data-product-id="1825"], [data-product-id="1814"], [data-product-id="1804"]) .home-product-image img { transform: scale(1.35); }
body.home #selectia-doty .home-favorite { border-radius: 50%; }

/* Make room for the existing product-page subtitle within the same card. */
body.home #selectia-doty .home-product { container-type: inline-size; }
body.home #selectia-doty .home-product-image { aspect-ratio: auto; height: calc(100cqw - 50px); }
body.home #selectia-doty .home-product-subtitle { font-size: 14px; line-height: 21px; height: 42px; min-height: 42px; margin: 0; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Compact subtitle-to-price spacing and secondary price details. */
body.home #selectia-doty .home-product-purchase {
  margin-top: 0;
  padding-top: 10px;
}
body.home #selectia-doty .home-product-price {
  line-height: 1.1;
}
body.home #selectia-doty .home-product-price > .amount {
  display: block;
  margin-bottom: 4px;
}
body.home #selectia-doty .doty-price-info {
  font-size: 12px !important;
  line-height: 18px;
  margin: 0;
}
body.home #selectia-doty .doty-price-info:first-of-type::before {
  display: none;
}

/* Fragrance notes above each product name, within the existing card height. */
body.home #selectia-doty .home-product-notes {
  font-size: 14px;
  line-height: 21px;
  height: 42px;
  min-height: 42px;
  margin: 0;
  color: var(--color-primary);
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.home #selectia-doty .home-product:has(.home-product-notes) .home-product-image {
  height: calc(100cqw - 100px);
}

/* Keep notes close to the title and return their unused space to the image. */
body.home #selectia-doty .home-product-notes {
  height: auto;
  min-height: 0;
  margin-bottom: -6px;
}
body.home #selectia-doty .home-product:has(.home-product-notes) .home-product-image {
  height: calc(100cqw - 73px);
}

/* Align purchase buttons across equal-height cards, including longer names. */
body.home #selectia-doty .home-product-purchase {
  margin-top: auto;
}

/* Keep both notes and product names to one line without growing the cards. */
body.home #selectia-doty .home-product-notes,
body.home #selectia-doty .home-product h3 {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  min-height: 0;
  height: auto;
  -webkit-line-clamp: unset;
}
body.home #selectia-doty .home-product-name {
  display: block;
  min-width: 0;
  max-width: 100%;
}

body.home .home-menu summary::after { content: none; display: none; }
body.home .home-menu summary .menu-parent-link { display: inline; padding: 0; color: inherit; background: transparent; }
body.home .home-menu summary .menu-parent-link:hover,
body.home .home-menu summary .menu-parent-link:focus-visible { color: var(--color-accent); background: transparent; }

/* Compact the product section after removing its eyebrow label. */
body.home #selectia-doty { padding-top: 16px; }
body.home #selectia-doty .home-heading { margin-bottom: 20px; }
