.entry-main {
  padding-block: clamp(22px, 3.8vw, 54px) clamp(64px, 8vw, 112px);
}

.entry-trail, .entry-trail [data-entry-crumb] {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 9px;
  color: #545650;
  font-size: 13px;
}

.entry-trail { min-height: 44px; margin-bottom: clamp(8px, 2vw, 24px); }
.entry-trail .record-back { margin: 0; }
.entry-trail a { text-decoration: underline; text-underline-offset: 4px; }
.entry-trail [aria-current] { color: #252624; }

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "gallery heading" "gallery info";
  align-items: start;
  gap: clamp(20px, 2.35vw, 32px) clamp(32px, 6vw, 96px);
}

.entry-masthead { grid-area: heading; padding-top: clamp(12px, 3.6vw, 50px); }
.entry-gallery { grid-area: gallery; }
.entry-info { grid-area: info; }

.entry-kicker {
  margin: 0 0 13px;
  color: #545650;
  font-size: 12px;
  font-weight: 600;
}

.entry-masthead h1 {
  margin: 0;
  font: 500 clamp(37px, 5.3vw, 80px)/1 var(--display);
  letter-spacing: -.07em;
  overflow-wrap: anywhere;
}

.entry-identity { margin: 12px 0 0; color: #444641; font-size: clamp(15px, 2vw, 21px); }
.entry-components { line-height: 1.45; }
.entry-components a, .entry-use a { text-decoration: underline; text-underline-offset: 3px; }
.entry-use { margin: 18px 0 0; color: #555750; font-size: 13px; line-height: 1.5; }

.entry-gallery-stage {
  position: relative;
  aspect-ratio: 1;
  background: #ededea;
  border: 1px solid #dedfda;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
}

.entry-view { position: absolute; inset: 0; }
.entry-view > .vial-photo { width: 100%; height: 100%; }
.entry-info .cart-product-options { justify-content: flex-start; align-items: center; gap: 9px 17px; margin-bottom: 12px; }
.entry-compound { margin: 0 0 15px; border-top: 1px solid #dbded8; }
.entry-compound summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.entry-compound summary::after { content: '+'; margin-left: auto; }
.entry-compound[open] summary::after { content: '−'; }
.entry-compound p { margin: 0 0 12px; color: #525b54; }

.entry-label-detail > .vial-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 207%;
  height: 207%;
  transform: translate(-50%, -57.9%);
}

.entry-gallery-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
  padding: 4px;
  border: 1px solid #dedfda;
  border-radius: 9px;
  background: #efefed;
}

.entry-gallery-controls button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #4f514c;
  font: 600 13px/1.3 var(--body);
  cursor: pointer;
}

.entry-gallery-controls button:hover { background: #e5e6e1; color: #202120; }
.entry-gallery-controls button[aria-pressed="true"] { border-color: #90928c; background: #fff; color: #202120; }

.entry-lot {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 3px 11px;
  padding: 15px;
  border: 1px solid #dedfda;
  border-radius: 9px;
  background: #efefed;
}

.entry-lot h2 { margin: 0; color: #242523; font: 600 14px/1.45 var(--display); }
.entry-lot p { margin: 3px 0 0; color: #555750; font-size: 13px; line-height: 1.4; }
.entry-lot a { grid-column: 2; justify-self: start; }

.entry-lot svg, .entry-related svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry-lot a, .entry-related-heading a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: #252624;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.entry-info .record-actions { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.entry-info .record-actions .button { min-width: 144px; }
.entry-info .record-actions span { color: #555750; font-size: 13px; }

.entry-related {
  margin-top: clamp(55px, 8vw, 110px);
  padding-top: clamp(26px, 3.4vw, 48px);
  border-top: 1px solid #dedfda;
}

.entry-related-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 14px; }
.entry-related-heading h2 { margin: 0; font: 500 clamp(29px, 4vw, 54px)/1 var(--display); letter-spacing: -.056em; }
.entry-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.entry-related-card { min-width: 0; }

.entry-related-image {
  aspect-ratio: 6 / 5;
  overflow: hidden;
  background: #e1dfe1;
  border: 1px solid #e1e2dd;
  border-radius: 9px;
}

.entry-related-image .vial-photo { width: 100%; height: 100%; }
.entry-related-image .vial-photo img { object-fit: cover; }
.entry-related-card > span {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  padding: 10px 4px 0;
  font: 600 clamp(13px, 1.7vw, 19px)/1.3 var(--display);
  overflow-wrap: anywhere;
}

.entry-related-card:is(:hover,:focus-visible) > span { text-decoration: underline; text-underline-offset: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .entry-view:not([hidden]) { animation: entry-appear .3s ease-out; }
  @keyframes entry-appear { from { opacity: .6; } to { opacity: 1; } }
}

@media (max-width: 720px) {
  .entry-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "heading" "gallery" "info"; grid-template-rows: auto; }
  .entry-masthead { padding-top: 0; }
  .entry-related-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 45%);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 2px 2px 10px;
  }
  .entry-related-card { scroll-snap-align: start; }
}
