/* The photograph and controls share one box. Product details use the same starting line in every column. */
.brl-family-photo, .catalogue-serum-frame, article .brl4-card-gallery,
article .rm-gallery--compact, article .ea-gallery--compact, article .pl-gallery-compact {
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.brl-family-card .brl-family-photo, .catalog-card > .catalogue-serum-frame,
.plt-family-card > .catalogue-serum-frame, article.sr-product-tile > .catalogue-serum-frame,
article .rm-gallery--compact, article .pl-gallery-compact, #app article .brl4-card-gallery {
  width: 100%; height: auto; aspect-ratio: 1; flex: 0 0 auto;
}
.ea-family-card .ea-family-photo:has(> .ea-gallery), .ea-family-card .ea-family-photo.catalogue-serum-frame,
.ea-family-card .ea-family-photo > .ea-gallery--compact, article.seo-card > .catalogue-serum-frame {
  width: 100%; height: auto; aspect-ratio: 4 / 5;
}
.catalogue-serum-frame > a, .brl-family-card .brl-family-photo > a,
.catalogue-serum-frame > a > .product-image, .brl-family-card .brl-family-photo > a > .product-image {
  display: block; position: relative; width: 100%; height: 100%; margin: 0; padding: 0;
}
article .catalogue-serum-frame > a img, article .catalogue-serum-frame > a > .product-image img {
  display: block; width: 100%; height: 100%; inset: 0; max-height: none; object-fit: cover; transform: none;
}
article .catalogue-serum-frame[data-serum-view="3"] > a img { object-fit: contain; }
#app article .brl4-card-gallery .brl-capsule-stage, article .rm-gallery--compact .rm-gallery-stage,
article .pl-gallery-compact .pl-gallery-stage, article .ea-gallery--compact .ea-gallery-stage,
.ea-family-card .ea-family-photo > .ea-gallery--compact .ea-gallery-stage {
  width: 100%; height: 100% !important; aspect-ratio: auto; padding: 0; margin: 0;
}
article .rm-gallery--compact .rm-gallery-track, article .rm-gallery--compact .rm-gallery-slide,
article .pl-gallery-compact .pl-gallery-track, article .pl-gallery-compact .pl-gallery-slide,
article .ea-gallery--compact .ea-gallery-track, article .ea-gallery--compact .ea-gallery-slide { height: 100%; }
#app article .brl4-card-gallery .brl4-image { width: 100% !important; height: 100% !important; object-fit: contain !important; }
#app .brl-family-card .brl4-format-pill { display: none; }
article .catalogue-photo-ready :is(.brl4-gallery-footer,.rm-gallery-controls,.pl-gallery-controls,.ea-gallery-controls,.rm-gallery-help,.ea-gallery-help) { display:none !important; }
/* Pocket-sized, keyboard-accessible controls leave the label and format badge visible. */
article .catalogue-image-nav {
  position: absolute; inset: auto auto 8px 50%; z-index: 5; transform: translateX(-50%);
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  width: max-content; max-width: calc(100% - 12px); margin: 0; padding: 0 2px;
  border: 1px solid rgb(34 30 27 / 19%); border-radius: 999px; background: rgb(255 255 255 / 95%);
  color: #262321; box-shadow: 0 1px 5px rgb(0 0 0 / 12%); font-family: inherit;
}
article .catalogue-image-nav > button, #app article .catalogue-image-nav > button {
  position: static !important; inset: auto !important; transform: none !important;
  display: grid; place-items: center; flex: none; width: 34px; min-width: 34px; height: 34px; min-height: 34px;
  padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; color: inherit;
  box-shadow: none; cursor: pointer; font: 400 24px/1 Arial,sans-serif; touch-action: manipulation;
}
article .catalogue-image-nav > button:focus-visible, #app article .catalogue-image-nav > button:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
article .catalogue-image-nav > button:hover, #app article .catalogue-image-nav > button:hover { background: rgb(120 116 110 / 15%); }
article .catalogue-image-nav .catalogue-view-count {
  display: inline; position: static; padding: 0 3px; margin: 0; border: 0; border-radius: 0; background: transparent;
  color: inherit; font-family: inherit; font-size: 12px; font-weight: 650; line-height: 1.2;
  letter-spacing: .025em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
article .catalogue-image-nav .catalogue-audible-caption { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
article.catalog-card .catalogue-image-nav, article.plt-family-card .catalogue-image-nav { background: rgb(21 22 25 / 94%); color: #fff; border-color: rgb(255 255 255 / 35%); }
.brl-family-card .brl-family-body { flex: 1 1 auto; }
.brl-family-card .brl-family-body > .brl-card-actions, .plt-family-card .qs-info > .qs-actions { margin-top: auto; }
.ea-family-card .ea-family-body > .ea-family-links, .catalog-card .catalog-info > .catalog-bottom { margin-top: auto; }
@media (pointer: coarse) {
  article .catalogue-image-nav > button, #app article .catalogue-image-nav > button { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
}

/* The legacy shop gives every direct div equal flex space, including the image. */
article.seo-card.ea-family-card > .ea-family-photo {
  display: block; position: relative; flex: none; box-sizing: border-box;
  min-height: 0; width: 100%; height: auto; padding: 0; aspect-ratio: 4 / 5;
}
article.seo-card.ea-family-card > .ea-family-photo > :is(.ea-family-art,.ea-gallery--compact) {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
}

/* Every Amino serum cards share a square photo and a separate row for gallery controls. */
.sr-collection[data-brand="ea"] .sr-native-collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 24px);
}
@media (min-width: 1024px) {
  .sr-collection[data-brand="ea"] .sr-native-collection-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 359px) {
  .sr-collection[data-brand="ea"] .sr-native-collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.seo-card.ea-serum-card {
  --serum-inset: clamp(12px, 1.5vw, 20px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
article.seo-card.ea-serum-card > div.ea-serum-media {
  display: grid;
  flex: none;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: start;
  gap: 8px;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  padding: var(--serum-inset) var(--serum-inset) 0;
}
.ea-serum-card .ea-serum-media > .seo-art,
.ea-serum-card .ea-serum-media > .seo-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  object-fit: contain;
}
.ea-serum-card .ea-serum-media > .catalogue-image-nav {
  position: static;
  transform: none;
  margin: 0;
}
article.seo-card.ea-serum-card > div.ea-serum-info {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 14px var(--serum-inset) var(--serum-inset);
}
.ea-serum-card .ea-serum-info > .eyebrow {
  margin: 0 0 6px;
  line-height: 1.35;
}
.ea-serum-card .ea-serum-info > h3 {
  margin: 0 0 6px;
  font-size: clamp(1.0625rem, 1.6vw, 1.375rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ea-serum-card .ea-serum-size {
  margin-top: auto;
  color: #56565c;
  font-size: 0.875rem;
  line-height: 1.4;
  white-space: nowrap;
}
.ea-serum-card .ea-serum-info > .ea-serum-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin: 8px 0 0;
  line-height: 1.35;
}
.ea-serum-card .ea-serum-price > strong,
.ea-serum-card .ea-serum-price > del {
  margin: 0;
  white-space: nowrap;
}
.ea-serum-card .ea-serum-info > .ea-quick-details {
  align-self: flex-start;
  margin: 0;
  min-height: 44px;
}
.ea-serum-card .ea-serum-info > .ea-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.25rem), 1fr));
  align-items: stretch;
  gap: 6px;
  margin: 0;
}
.ea-serum-card .ea-card-actions > .button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 5px;
}
.ea-serum-card .ea-serum-info > .ea-card-status:empty {
  min-height: 0;
  margin: 0;
}
@media (pointer: coarse) {
  .ea-serum-card .ea-serum-media .catalogue-image-nav > button {
    width: 44px;
    height: 44px;
  }
}

/* Leave the fixed contact rail outside the serum grid. */
.sr-collection.sr-ui[data-brand="ea"] {
  width: min(1240px, 100%);
  padding-inline: 76px;
}
@media (max-width: 740px) {
  .sr-collection.sr-ui[data-brand="ea"] {
    padding-inline: clamp(16px, 4vw, 30px) 76px;
  }
}
@media (max-width: 480px) {
  .sr-collection.sr-ui[data-brand="ea"] {
    padding-inline: 16px 64px;
  }
  .ea-serum-card .ea-serum-info > .eyebrow {
    letter-spacing: 0.06em;
  }
}
@media (max-width: 374px) {
  .sr-collection.sr-ui[data-brand="ea"] .sr-native-collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
