/* V47 — one artwork window and a stable reading order across the storefront.
   Source-photo geometry belongs to product-scenes/original-photos; never crop
   or stretch those foregrounds to compensate for different file dimensions. */
body .official-product-grid,
body .products,
body .atelier-edit-grid { align-items:stretch; }
body .official-category-card>div,
body .official-category-card>div.bottle-scene-v34,
body .official-category-rail .official-category-card>div,
body .official-beauty-categories .official-category-card>div {
  display:flex;flex-direction:column;
  width:100%;height:auto;min-height:0;aspect-ratio:auto;padding:0;
  border-radius:16px;overflow:hidden;
}
body .official-category-card .official-category-geometry,
body .official-category-card .official-category-placeholder {
  display:block;position:relative;flex:none;width:100%;height:auto;
  min-height:0;aspect-ratio:1;margin:0;padding:0;overflow:hidden;
}
body .official-category-card>div>img:not([data-pagoto-geometry]):not(.product-scene-photo-v47) {
  display:block;position:static;flex:none;width:100%;height:auto;aspect-ratio:1;
  max-width:none;max-height:none;margin:0;padding:0;object-fit:contain;
}
body .official-category-card>div>small,
body .official-category-card>div.bottle-scene-v34>small,
body .official-category-card[data-campaign-category]>div>small {
  display:flex;align-items:center;justify-content:center;position:static;inset:auto;
  box-sizing:border-box;flex:none;width:100%;max-width:none;min-height:80px;
  margin:0;padding:8px 12px;background:#f8f5f0;color:#635865;
  font-size:11px;line-height:1.45;text-align:center;overflow-wrap:anywhere;
}

/* A square image followed by a separate, readable source caption. The caption
   never covers a bottle label and no brand adds extra padding to the image. */
body .official-product[data-official-world] .official-product-image,
body .official-product[data-official-world] .official-product-image.bottle-scene-v34 {
  display:flex;flex-direction:column;position:relative;
  width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:auto;
  padding:0;margin:0;border:1px solid #342c3c12!important;
  border-radius:20px!important;overflow:hidden;isolation:isolate;
  background-color:#f8f5f0!important;box-shadow:none;
}
body .official-product[data-official-world] .official-product-image>a {
  display:block;position:relative;flex:none;width:100%;height:auto;
  min-width:0;min-height:0;aspect-ratio:1;padding:0;margin:0;
  overflow:hidden;border-radius:0;background:transparent;
}
body .official-product[data-official-world] .official-product-views {
  display:block;position:absolute;inset:0;width:100%;height:100%;
  min-width:0;min-height:0;aspect-ratio:1;overflow:hidden;border-radius:0!important;
}
body .official-product[data-official-world] .official-product-image img:not([data-pagoto-geometry]):not(.product-scene-photo-v47) {
  display:block;width:100%;height:100%;max-width:none;max-height:none;
  padding:0;margin:0;object-fit:contain;object-position:center;
  border-radius:0;filter:none;mix-blend-mode:normal;transform:none!important;
}
body .official-product[data-official-world] .official-product-image .official-art-caption {
  display:flex;align-items:center;justify-content:center;position:static;
  inset:auto;box-sizing:border-box;flex:none;width:100%;max-width:none;
  min-height:48px;margin:0;padding:8px 12px;border-radius:0;
  background:#f8f5f0;color:#635865;font-size:11px;line-height:1.45;
  letter-spacing:0;text-align:center;overflow-wrap:anywhere;
}
body .official-product[data-official-world] { min-width:0;height:100%; }
body .official-product[data-official-world] .official-product-copy {
  display:flex;flex-direction:column;flex:1;min-width:0;padding-top:16px;
}
body .official-product[data-official-world] .official-product-brand {
  margin:0 0 8px;min-height:1.6em;line-height:1.6;overflow-wrap:anywhere;
}
body .official-product[data-official-world] h3 {
  margin:0;min-height:4.35em;font-size:16px;line-height:1.45;
  overflow-wrap:anywhere;text-wrap:pretty;
}
body .official-product[data-official-world] .official-product-category {
  margin:9px 0 14px;min-height:3em;line-height:1.5;overflow-wrap:anywhere;
}
body .official-product[data-official-world] .official-product-actions {
  margin-top:auto;min-width:0;align-items:center;flex-wrap:wrap;gap:6px 12px;
}
body .official-product[data-official-world] .official-product-actions a {
  min-height:44px;max-width:100%;line-height:1.45;white-space:normal;
}

/* Collection previews used to place Pagoto provenance above the brand and
   beauty provenance below the description. Keep both beneath the copy. */
body .products .product {
  display:flex;flex-direction:column;min-width:0;height:100%;
}
body .products .product .product-picture {
  position:relative;display:block;flex:none;order:1;
  width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:1;
  margin:0;padding:0;border:1px solid #342c3c12!important;
  border-radius:20px!important;overflow:hidden;isolation:isolate;
  background-color:#f8f5f0!important;box-shadow:none;
}
body .products .product .product-picture::before,
body .products .product .product-picture::after { display:none; }
body .products .product .product-picture>a {
  display:block;position:absolute;inset:0;width:100%;height:100%;
  min-height:0;aspect-ratio:1;padding:0;margin:0;
}
body .products .product .product-picture img:not([data-pagoto-geometry]):not(.product-scene-photo-v47) {
  display:block;width:100%;height:100%;max-width:none;max-height:none;
  padding:0;margin:0;object-fit:contain;object-position:center;
  border-radius:0;filter:none;mix-blend-mode:normal;transform:none!important;
}
body .products .product .brand {
  order:2;margin:16px 0 8px;min-height:1.6em;line-height:1.6;
}
body .products .product h3 {
  order:3;margin:0 0 9px;min-height:2.9em;font-size:16px;line-height:1.45;
  overflow-wrap:anywhere;text-wrap:pretty;
}
body .products .product .caption {
  order:4;margin:0 0 12px;font-size:13px;line-height:1.6;min-height:3.2em;
}
body .products .product .media-note-v44,
body .products .product .beauty-v26-featured-caption {
  order:5;margin:0 0 14px;padding:0;font-size:11px;line-height:1.5;
  color:#635865;overflow-wrap:anywhere;
}
body .products .product .compare-choice { order:6;margin-top:auto; }
body .products .product .product-action,
body .products .product>.text-link { order:7;margin-top:auto;min-height:44px; }
body .products .product .purchase-actions-v34 { order:8;margin-top:12px; }
body .products .product .heart,
body .official-product[data-official-world] .official-save {
  top:12px;right:12px;width:44px;height:44px;min-width:44px;min-height:44px;
  z-index:4;
}
body .products .product .badge {
  left:10px;top:12px;max-width:calc(100% - 72px);
  font-size:9px;line-height:1.4;white-space:normal;
}

/* The editorial shelf uses the same square slot for a JPEG, a transparent
   cutout and a source photo. Background treatments stay inside this slot. */
body .atelier-edit-grid { gap:20px; }
body .atelier-edit {
  display:flex;flex-direction:column;min-width:0;height:100%;border-radius:20px;
}
body .atelier-edit .atelier-edit-number {
  display:flex;align-items:center;min-height:52px;margin:0;padding:16px;
  font-size:11px;line-height:1.5;overflow-wrap:anywhere;
}
body .atelier-edit .atelier-edit-media {
  display:block;position:relative;flex:none;width:100%;height:auto;min-width:0;
  min-height:0;aspect-ratio:1;overflow:hidden;isolation:isolate;background:#f8f5f0;
}
body .atelier-edit .atelier-edit-media>img:not(.product-scene-photo-v47) {
  display:block;position:absolute;inset:0;width:100%;height:100%;
  max-width:none;max-height:none;aspect-ratio:auto;margin:0;padding:0;
  border-radius:0;object-fit:contain;object-position:center;
  mix-blend-mode:normal;transform:none;filter:none;
}
body .atelier-edit>div {
  display:flex;flex-direction:column;flex:1;min-width:0;
  padding:20px;border-top:1px solid #32263620;
}
body .atelier-edit h3 {
  min-height:3.45em;margin:0 0 20px;font-size:clamp(21px,1.8vw,26px);
  line-height:1.15;letter-spacing:-.035em;overflow-wrap:anywhere;text-wrap:pretty;
}
body .atelier-edit>div>span { margin-top:auto;line-height:1.5; }

/* Match controls to the available column, including long purchase labels. */
body .official-product .purchase-actions-v34,
body .products .product .purchase-actions-v34 {
  grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;
}
body .official-product .purchase-actions-v34 button,
body .products .product .purchase-actions-v34 button {
  min-width:0;min-height:46px;white-space:normal;overflow-wrap:anywhere;
}
@media(max-width:760px) {
  body .official-product[data-official-world] h3,
  body .products .product h3 { font-size:15px; }
  body .official-product[data-official-world] .official-product-actions {
    align-items:flex-start;flex-direction:column;gap:0;
  }
  body .atelier-edit-grid { gap:16px; }
  body .atelier-edit h3 { font-size:23px; }
}
@media(max-width:480px) {
  body .official-product-grid,
  body .atelier-companions>.official-product-grid,
  body .atelier-recent .official-product-grid,
  body .products,
  body .products.editorial-list,
  body .atelier-edit-grid { grid-template-columns:minmax(0,1fr);gap:28px; }
  body .official-product[data-official-world] h3,
  body .products .product h3 { min-height:0;font-size:18px; }
  body .official-product[data-official-world] .official-product-category,
  body .products .product .caption { min-height:0; }
  body .official-product[data-official-world] .official-product-actions {
    flex-direction:row;align-items:center;gap:6px 12px;
  }
  body .atelier-edit h3 { min-height:0;font-size:26px; }
}
