/* Live Medusa behavior layered onto the accepted v7 storefront shell. */
#products { scroll-margin-top: 200px; }
.sm-medusa-status {
  box-sizing: border-box;
  grid-column: 1 / -1;
  min-height: 210px;
  padding: 34px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid #eadfe4;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #fff8fb);
  color: #6f6068;
  text-align: center;
}
.sm-medusa-status strong { color: #2c1f26; font-size: 18px; }
.sm-medusa-status button {
  min-height: 44px;
  margin-top: 5px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #e61f68;
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
#products.sm-medusa-search-active .showcase-tabs-v9 { display: none !important; }
#products.sm-medusa-search-active .product-section-head-v9 {
  justify-content: space-between !important;
  align-items: center !important;
  gap: 18px;
}
#products.sm-medusa-search-active .product-section-head-v9 > div {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}
#products.sm-medusa-search-active .product-section-head-v9 h2 {
  margin: 0;
  font-size: clamp(23px, 2.6vw, 34px);
  line-height: 1.12;
}
.sm-medusa-search-reset {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #ecd6df;
  border-radius: 13px;
  background: #fff;
  color: #a9134c;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.sm-medusa-search-reset:hover { background: #fff5f9; border-color: #e69ab7; }
.sm-medusa-search-reset:focus-visible,
.sm-medusa-close:focus-visible,
.sm-medusa-quantity button:focus-visible,
.sm-medusa-cart-remove:focus-visible,
.sm-medusa-product-primary:focus-visible {
  outline: 2px solid #d45584;
  outline-offset: 3px;
}
.v9-products .product-v9 .buy[aria-disabled="true"] {
  background: #d8cbd1;
  box-shadow: none;
  cursor: not-allowed;
}
.sm-medusa-surface {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: grid;
  justify-items: end;
  background: rgba(31, 10, 20, .52);
  backdrop-filter: blur(4px);
}
.sm-medusa-surface[hidden] { display: none !important; }
.sm-medusa-surface__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}
.sm-medusa-cart {
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  width: min(470px, 100%);
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -24px 0 70px rgba(35, 10, 22, .22);
  overflow: hidden;
}
.sm-medusa-cart__head,
.sm-medusa-product__head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee3e8;
}
.sm-medusa-cart__head strong,
.sm-medusa-product__head strong { font-size: 22px; letter-spacing: -.35px; }
.sm-medusa-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid #eadce2;
  border-radius: 13px;
  background: #fff;
  color: #2b1d24;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.sm-medusa-cart__body { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; }
.sm-medusa-cart__empty {
  min-height: 65vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: #786a71;
  text-align: center;
}
.sm-medusa-cart__empty svg { width: 62px; height: 62px; fill: none; stroke: #e61f68; stroke-width: 1.5; }
.sm-medusa-cart__empty strong { color: #2c2026; font-size: 19px; }
.sm-medusa-cart-item {
  padding: 18px 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 15px;
  border-bottom: 1px solid #f0e6ea;
}
.sm-medusa-cart-item__image {
  width: 92px;
  height: 108px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #eee2e7;
  border-radius: 15px;
  background: #fff;
}
.sm-medusa-cart-item__image img { width: 100%; height: 100%; object-fit: contain; }
.sm-medusa-cart-item__copy { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.sm-medusa-cart-item__copy > strong { font-size: 13px; line-height: 1.4; }
.sm-medusa-cart-item__copy > small { color: #8c7d84; font-size: 10px; }
.sm-medusa-cart-item__copy > b { margin-top: auto; font-size: 16px; }
.sm-medusa-cart-item__actions { display: flex; align-items: center; gap: 7px; }
.sm-medusa-quantity { height: 38px; display: grid; grid-template-columns: 36px 34px 36px; align-items: center; border: 1px solid #eadce2; border-radius: 11px; }
.sm-medusa-quantity button { width: 36px; height: 36px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 18px; cursor: pointer; }
.sm-medusa-quantity span { text-align: center; font-size: 12px; font-weight: 850; }
.sm-medusa-cart-remove { margin-left: auto; padding: 8px; border: 0; background: transparent; color: #a7164d; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.sm-medusa-cart__summary { padding-top: 18px; border-top: 1px solid #eadfe4; background: #fff; }
.sm-medusa-cart__total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sm-medusa-cart__total span { color: #776870; font-size: 12px; }
.sm-medusa-cart__total strong { font-size: 24px; }
.sm-medusa-product-primary {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #eb1d69, #cf0f55);
  color: #fff;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(222, 23, 96, .23);
  cursor: pointer;
}
.sm-medusa-product-primary:disabled { background: #d8cbd1; box-shadow: none; cursor: not-allowed; }
.sm-medusa-cart__note { display: block; margin-top: 10px; color: #8b7d84; font-size: 10px; line-height: 1.45; text-align: center; }
.sm-medusa-product-surface { justify-items: center; align-items: center; padding: 22px; }
.sm-medusa-product {
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  padding: 24px;
  border: 1px solid #eadde3;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(35, 10, 22, .28);
  overflow: auto;
}
.sm-medusa-product__content { padding-top: 22px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; }
.sm-medusa-product__media { min-height: 430px; display: grid; place-items: center; border: 1px solid #eee3e8; border-radius: 22px; background: #fff; overflow: hidden; }
.sm-medusa-product__media img { width: 100%; height: 100%; max-height: 500px; object-fit: contain; }
.sm-medusa-product__copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.sm-medusa-product__copy h2 { margin: 4px 0 12px; font-size: clamp(24px, 3vw, 36px); line-height: 1.14; letter-spacing: -.7px; }
.sm-medusa-product__meta { display: flex; flex-wrap: wrap; gap: 8px; color: #806f77; font-size: 10px; }
.sm-medusa-product__availability { padding: 7px 10px; border-radius: 999px; background: #effaf3; color: #18854a; font-weight: 850; }
.sm-medusa-product__price { margin: 22px 0 18px; font-size: 32px; font-weight: 900; }
.sm-medusa-product__description { max-height: 180px; margin: 0; overflow: auto; color: #6f6068; font-size: 12px; line-height: 1.65; }
.sm-medusa-product__buyrow { width: 100%; margin-top: auto; padding-top: 24px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: end; }
.sm-medusa-product__buyrow .sm-medusa-product-primary { margin: 0; }
.sm-medusa-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 620;
  max-width: min(440px, calc(100% - 32px));
  padding: 13px 18px;
  border-radius: 13px;
  background: #32111f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(35, 10, 22, .25);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.sm-medusa-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
body.sm-medusa-locked { overflow: hidden; }

@media (max-width: 760px) {
  #products { scroll-margin-top: 190px; }
  #products.sm-medusa-search-active .product-section-head-v9 { display: grid !important; justify-content: stretch !important; align-items: start !important; }
  .sm-medusa-search-reset { width: 100%; }
  .sm-medusa-cart { width: 100%; padding: 18px 15px; }
  .sm-medusa-product-surface { padding: 0; align-items: end; }
  .sm-medusa-product { width: 100%; max-height: 92vh; padding: 17px 15px 22px; border-radius: 24px 24px 0 0; }
  .sm-medusa-product__content { grid-template-columns: 1fr; gap: 17px; }
  .sm-medusa-product__media { min-height: 285px; }
  .sm-medusa-product__copy h2 { font-size: 24px; }
  .sm-medusa-product__price { margin: 17px 0 12px; font-size: 27px; }
  .sm-medusa-product__description { max-height: 130px; }
  .sm-medusa-product__buyrow { padding-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .sm-medusa-toast { transition: none; }
}
