/* Shared storefront proportions and controls. Keep editorial imagery independent. */

:root {
  --me-product-ratio: .75;
  --me-button-radius: 16px;
  --controls-btn-border-radius: 16px;
}

body {
  --controls-btn-border-radius: var(--me-button-radius) !important;
}

body :is(button, .button, .btn, .co-button, [role="button"],
  input[type="submit"], input[type="button"], input[type="reset"],
  .pagination-link, .pagination-span, .pagination-next, .pagination-prev,
  a[class*="btn"], a[class*="button"], .tabs__head-item,
  .me-editorial-link, .me-hero-copy__button, .me-marketplace-link) {
  border-radius: var(--me-button-radius) !important;
}

body .option-value.is-radio > span {
  border-radius: var(--me-button-radius) !important;
}

/* Explicit foreground/background pairs also cover visited and hover states. */
#main-content .me-editorial-link,
#main-content .me-editorial-link:visited {
  gap: 10px;
  color: #fff8ed;
  background: #49372c;
  border-color: #49372c;
}

#main-content .me-editorial-link--light,
#main-content .me-editorial-link--light:visited {
  color: #49372c;
  background: #fff8ed;
  border-color: #bca58c;
}

.me-hero-marketplaces {
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 16px 16px 16px auto;
  padding: 12px 14px;
  border: 1px solid rgba(151, 114, 75, .25);
  border-radius: 22px;
  background: #fff8eb;
  text-align: center;
}

.me-hero-copy .me-hero-copy__button {
  border-color: #49372c;
  background: #49372c;
  color: #fff8ed;
}

.me-hero-marketplaces .me-hero-marketplaces__label {
  margin: 0 0 6px;
  color: #66503d;
  font-size: 12px;
}

.me-hero-marketplaces .me-hero-marketplaces__links {
  justify-content: center;
  gap: 10px;
}

.me-hero-marketplaces .me-marketplace-link {
  min-height: 44px;
  padding: 10px 16px;
  border-color: #d0b89a;
  background: #fffaf0;
  color: #49372c;
}

:is(.me-editorial-link, .me-product-detail > summary):focus-visible {
  outline: 2px solid #70563e;
  outline-offset: 4px;
}

@media (hover: hover) {
  .me-hero-copy .me-hero-copy__button:hover {
    border-color: #70563e;
    background: #70563e;
    color: #fff8ed;
  }
  #main-content .me-editorial-link:hover {
    background: #70563e;
    border-color: #70563e;
    color: #fff8ed;
  }
  #main-content .me-editorial-link--light:hover {
    background: #f4e8d5;
    color: #49372c;
  }
}

/* InSales uses a padding-based ratio, including in dynamically added cards. */
body :is(.product-preview__photo, .product-card__photo) .img-ratio,
body :is(.product__photo, .product__photo-tumb).img-ratio {
  --img-ratio: var(--me-product-ratio) !important;
  height: 0 !important;
  padding-top: calc(100% / var(--me-product-ratio)) !important;
  aspect-ratio: auto;
}

body :is(.product-preview__photo, .product-card__photo) img,
body :is(.product__photo, .product__photo-tumb) img {
  object-fit: contain !important;
}

.me-product-story__media {
  aspect-ratio: 3 / 4 !important;
}

.me-product-story__image {
  object-fit: contain;
}

/* A separate review card stays on the right, above the photograph. */
.me-banner--intro > .me-hero-rating {
  position: absolute;
  z-index: 3;
  top: clamp(24px, 3.6vw, 56px);
  right: clamp(24px, 3.6vw, 56px);
  display: flex;
  width: 282px;
  max-width: calc(100% - 40px);
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 22px 24px;
  border: 1px solid #edd593;
  border-radius: 22px;
  background: #fff9e7;
  box-shadow: 0 8px 30px rgba(108, 74, 26, .13);
  color: #49372c;
  font: 400 13px/1.5 Arial, sans-serif;
  text-decoration: none;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.me-hero-rating .me-hero-rating__stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #ffcc00;
  line-height: 1;
  letter-spacing: 0;
}

.me-hero-rating__stars svg {
  display: block;
  flex: none;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.me-hero-rating .me-hero-rating__score {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.me-hero-rating .me-hero-rating__score strong {
  color: #332820;
  font: 600 36px/1 Arial, sans-serif;
  letter-spacing: -.04em;
}

.me-hero-rating__score > span {
  font-size: 12px;
  font-weight: 600;
}

.me-hero-rating__arrow {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 2px;
}

.me-marketplace-link > span {
  display: inline-flex;
  align-items: center;
}

.me-hero-rating .me-hero-rating__reviews {
  max-width: none;
  color: #66523e;
  font-size: 12px;
  line-height: 1.5;
}

.me-hero-rating__reviews b {
  color: #49372c;
  font-weight: 700;
}

@media (hover: hover) {
  .me-banner--intro > .me-hero-rating:hover {
    background: #fff3ce;
    box-shadow: 0 10px 32px rgba(108, 74, 26, .19);
  }
  .me-hero-rating:hover .me-hero-rating__score {
    text-decoration: none;
  }
  .me-hero-rating:hover .me-hero-rating__score > span {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

@media (max-width: 767px) {
  .me-banner--intro > .me-hero-rating {
    position: relative;
    order: 2;
    top: auto;
    right: auto;
    align-self: flex-end;
    width: 258px;
    gap: 8px;
    margin: 24px 20px 0;
    padding: 16px 20px;
    border-radius: 20px;
  }
  .me-hero-rating .me-hero-rating__score strong {
    font-size: 32px;
  }
  .widget-type_system_widget_v4_banner_list_22 > .me-hero-media {
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .me-hero-rating { transition: none !important; }
}

/* Keep both shop links together in the lower right, including the mobile photo. */
.me-banner--intro > .me-hero-marketplaces {
  position: absolute;
  z-index: 3;
  right: clamp(16px, 3.6vw, 56px);
  bottom: clamp(16px, 3.6vw, 56px);
  margin: 0;
}

.page_layout > header .widget-type_system_widget_v4_header_12 .header__content > .header__area-collections {
  display: none;
}
#me-categories,
#me-categories .me-categories__inner,
#me-categories .me-categories__link {
  border: 0;
  box-shadow: none;
}
#me-categories .me-categories__inner {
  overflow: visible;
  scroll-snap-type: none;
}
