.shop-page {
  min-width: 0;
}

.shop-page *,
.shop-page *::before,
.shop-page *::after {
  box-sizing: border-box;
}

.shop-page .container-large {
  margin-right: auto !important;
  margin-left: auto !important;
}

.shop-page .page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shop-page .main-wrapper {
  flex: 1;
}

.shop-page .shop-header .padding-section-large {
  padding-top: 10rem;
  padding-bottom: 3rem;
}

.shop-page .shop-content .padding-section-large {
  padding-top: 0;
}

.shop-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.shop-product-slot {
  display: flex;
  min-width: 0;
}

.shop-status {
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 1rem;
}

.shop-status p {
  margin: 0 0 1rem;
}

.shop-status .button {
  display: inline-flex;
}

.shop-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shop-product {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  border: 1px solid var(--brand-color-border);
  border-radius: var(--brand-radius-large);
  background: linear-gradient(145deg, var(--brand-color-background) 0%, var(--brand-color-surface) 100%);
  box-shadow: 0 1.25rem 3.75rem color-mix(in srgb, var(--brand-color-text) 10%, transparent);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.shop-product-media {
  position: relative;
  flex-shrink: 0;
  align-self: center;
  width: 100%;
  overflow: hidden;
  border-radius: .5rem;
  background-color: var(--brand-color-surface);
}

.shop-product-image {
  display: block;
  width: 100%;
  height: auto;
  /* The ratio is only a loading placeholder; intrinsic dimensions take over. */
  aspect-ratio: auto 16 / 9;
  object-fit: contain;
}

.shop-product-image-fallback {
  display: grid;
  min-height: 10rem;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--brand-color-text);
}

.shop-product-content {
  align-self: stretch;
  min-width: 0;
}

.shop-product-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.shop-product-description {
  max-width: 38rem;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.shop-product-purchase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: auto;
  border-top: 1px solid var(--brand-color-border);
  padding-top: 1.5rem;
}

.shop-product-price {
  margin: 0;
  font-family: var(--brand-font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.shop-product-original-price {
  margin: 0 0 .5rem;
  font-size: 1.125rem;
  line-height: 1.4;
}

.shop-product-recurrence {
  margin: .5rem 0 0;
  font-size: 1rem;
  line-height: 1.4;
}

.shop-product .button:focus-visible,
.shop-status .button:focus-visible {
  outline: 3px solid var(--brand-control-focus-color);
  outline-offset: 4px;
}

.shop-embed-panel {
  border: 1px solid var(--brand-color-border);
  border-radius: var(--brand-radius-large);
  background-color: var(--brand-color-background);
  box-shadow: 0 1.25rem 3.75rem color-mix(in srgb, var(--brand-color-text) 10%, transparent);
  padding: clamp(1rem, 3vw, 2rem);
  overflow: hidden;
}

.shop-embed-note {
  margin-bottom: 1.5rem;
  border-radius: .75rem;
  background-color: var(--brand-color-surface);
  padding: 1rem 1.125rem;
  color: var(--brand-color-text);
  font-size: .9375rem;
  line-height: 1.5;
}

.shop-page .shop-embed-note a {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.shop-page [hidden] {
  display: none !important;
}

#s2f-webshop {
  width: 100%;
  min-height: 42rem;
}

#s2f-webshop iframe {
  display: block;
  width: 100%;
  border: 0;
}

.shop-back-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  font-weight: 700;
}

.shop-back-link svg {
  width: 1rem;
  height: 1rem;
}

@media screen and (max-width: 991px) {
  .shop-page .shop-header .padding-section-large {
    padding-top: 8.75rem;
  }
}

@media screen and (max-width: 767px) {
  .shop-page .shop-header .padding-section-large {
    padding-bottom: 2rem;
  }

  .shop-products {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-product {
    gap: 1.75rem;
    padding: 1.5rem;
  }

  .shop-product-description {
    font-size: 1rem;
  }

  .shop-product-media {
    max-width: 22rem;
    justify-self: center;
  }

  .shop-product-purchase {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-product-price {
    font-size: 3rem;
  }

  .shop-embed-panel {
    padding: .75rem;
  }

  .shop-embed-note {
    margin-bottom: .75rem;
  }

  #s2f-webshop {
    min-height: 36rem;
  }
}

@media screen and (max-width: 479px) {
  .shop-header .heading-style-h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }
}

/* Bridge the current Sara brand tokens to the shared checkout component. */
.shop-page {
  --brand-button-primary-background: var(--brand-color-accent);
  --brand-button-primary-text: var(--brand-color-on-accent);
  --brand-control-text: var(--brand-color-text);
  --brand-control-placeholder: #4a6562;
  --brand-control-radius: var(--brand-radius-medium);
  --brand-control-focus-color: var(--brand-color-accent);
}

.shop-page .shop-status .button,
.shop-page .shop-embed-note .button {
  margin-top: 1rem;
}

.shop-page .shop-product .button {
  min-height: 44px;
}

.shop-page .shop-skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 10000;
  padding: .75rem 1rem;
  border-radius: var(--brand-radius-small);
  background: var(--brand-color-text);
  color: var(--brand-color-background);
  transform: translateY(-200%);
}

.shop-page .shop-skip-link:focus {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .shop-page .button,
  .shop-page .button:hover {
    transform: none;
    transition: none;
  }
}
