/* Kiki's Reset Room — authoritative Reset Shelf story component.
   The card owns its final geometry; no later stylesheet may override it. */

.story-page .story-body aside.story-product-inline {
  --rs-wine: #4a0618;
  --rs-ruby: #660a28;
  --rs-deep: #35030f;
  --rs-gold: #d7a84f;
  --rs-gold-bright: #f4d58d;
  --rs-cream: #fff8ef;
  --rs-ink: #3a0c16;
  --rs-module-max: 820px;
  --rs-image-max: 270px;

  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(230px, 250px) minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr auto auto auto;
  column-gap: clamp(28px, 4vw, 36px);
  row-gap: 8px;
  align-items: start;
  width: min(var(--rs-module-max), calc(100vw - 48px));
  max-width: none;
  margin: 52px auto 56px;
  padding: clamp(25px, 3vw, 28px);
  overflow: hidden;
  border: 2px solid var(--rs-gold);
  border-radius: 22px;
  background:
    radial-gradient(circle at 73% 20%, rgba(255, 255, 255, 0.055), transparent 24%),
    linear-gradient(135deg, var(--rs-wine) 0%, var(--rs-ruby) 54%, var(--rs-deep) 100%);
  box-shadow:
    inset 0 0 0 6px rgba(244, 213, 141, 0.10),
    inset 0 0 0 7px rgba(215, 168, 79, 0.42),
    0 18px 42px rgba(62, 22, 29, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.story-page .story-body aside.story-product-inline::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--rs-gold), #f9e3a8 50%, var(--rs-gold));
  pointer-events: none;
}

.story-page .story-body aside.story-product-inline::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -16px;
  right: -20px;
  width: 190px;
  height: 270px;
  background: url("/assets/reset-shelf-vines.svg") right top / contain no-repeat;
  opacity: 0.72;
  pointer-events: none;
}

.story-page .story-body aside.story-product-inline > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.story-page .story-body aside.story-product-inline > p {
  grid-column: 2;
  margin: 0;
  color: var(--rs-cream);
  font-family: var(--sans);
}

.story-page .story-body aside.story-product-inline > .story-product-inline__shelf-label {
  grid-column: 2;
  grid-row: 1;
  width: fit-content;
  max-width: calc(100% - 78px);
  margin: 0 0 4px !important;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rs-gold-bright) !important;
  font-family: var(--sans);
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.story-page .story-body aside.story-product-inline > .story-product-inline__shelf-label::after {
  content: "";
  display: block;
  width: min(250px, 100%);
  height: 38px;
  margin-top: 6px;
  background-image:
    url("/assets/reset-shelf-flower.svg"),
    linear-gradient(to right,
      var(--rs-gold-bright) 0%,
      var(--rs-gold-bright) 41%,
      transparent 41%,
      transparent 59%,
      var(--rs-gold-bright) 59%,
      var(--rs-gold-bright) 100%);
  background-position: center, center;
  background-repeat: no-repeat;
  background-size: 34px 34px, 100% 1px;
}

/* A compact, centered media frame. It never stretches to match the copy column. */
.story-page .story-body aside.story-product-inline > p:nth-child(2) {
  grid-column: 1;
  grid-row: 1 / 8;
  align-self: center;
  justify-self: center;
  display: flex;
  width: 100%;
  max-width: 250px;
  height: 320px;
  min-height: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--rs-gold-bright);
  border-radius: 17px;
  background: var(--rs-cream);
  box-shadow:
    inset 0 0 0 7px var(--rs-cream),
    inset 0 0 0 8px rgba(215, 168, 79, 0.62),
    0 12px 26px rgba(25, 0, 7, 0.20);
}

.story-page .story-body aside.story-product-inline > p:nth-child(2) a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.story-page .story-body aside.story-product-inline > p:nth-child(2) img {
  display: block;
  width: auto;
  height: auto;
  max-width: 210px;
  max-height: var(--rs-image-max);
  margin: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  background: var(--rs-cream);
  image-rendering: auto;
  transform: none;
}

.story-page .story-body aside.story-product-inline > p:nth-child(3) {
  grid-row: 2;
  max-width: calc(100% - 34px);
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.04;
  text-wrap: balance;
}

.story-page .story-body aside.story-product-inline > p:nth-child(3) a {
  color: var(--rs-cream);
  text-decoration: none;
}

.story-page .story-body aside.story-product-inline > p:nth-child(3) a:hover,
.story-page .story-body aside.story-product-inline > p:nth-child(3) a:focus-visible {
  color: var(--rs-cream);
  text-decoration: underline;
  text-decoration-color: var(--rs-gold-bright);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.story-page .story-body aside.story-product-inline > p:nth-child(4) {
  grid-row: 3;
  margin: 0 0 4px;
  color: var(--rs-gold-bright);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.42;
}

.story-page .story-body aside.story-product-inline > p:nth-child(4) em {
  font-style: normal;
}

.story-page .story-body aside.story-product-inline > p:nth-child(5) {
  grid-row: 4;
  max-width: 46ch;
  margin: 0 0 14px;
  color: var(--rs-cream);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.54;
}

.story-page .story-body aside.story-product-inline > .story-product-inline__cta {
  grid-row: 5;
}

.story-page .story-body aside.story-product-inline > .story-product-inline__cta a {
  display: inline-flex;
  width: fit-content;
  min-width: 184px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 2px solid var(--rs-gold);
  border-radius: 11px;
  background: linear-gradient(#fff9e9, #f1d28e);
  box-shadow: 0 9px 21px rgba(25, 0, 7, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  color: var(--rs-ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.story-page .story-body aside.story-product-inline a:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 4px;
  box-shadow: 0 0 0 8px #8d3851;
}

.story-page .story-body aside.story-product-inline > .story-product-inline__cta a:hover,
.story-page .story-body aside.story-product-inline > .story-product-inline__cta a:focus-visible {
  border-color: var(--rs-gold-bright);
  background: var(--rs-gold-bright);
  color: var(--rs-ink);
  text-decoration: none;
}

.story-page .story-body aside.story-product-inline > .story-product-inline__trust {
  grid-row: 6;
  margin: 4px 0 0;
  color: var(--rs-cream);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
  opacity: 0.86;
}

.story-page .story-body aside.story-product-inline > .story-product-inline__all {
  grid-row: 7;
  margin: 2px 0 0;
}

.story-page .story-body aside.story-product-inline > .story-product-inline__all a {
  color: var(--rs-gold-bright);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.story-page .story-body aside.story-product-inline > .story-product-inline__all a:hover,
.story-page .story-body aside.story-product-inline > .story-product-inline__all a:focus-visible {
  color: var(--rs-cream);
  text-decoration-thickness: 2px;
}

@media (min-width: 841px) {
  .story-page .story-body aside.story-product-inline {
    left: 50%;
    transform: translateX(-50%);
  }

  @media (hover: hover) and (pointer: fine) {
    .story-page .story-body aside.story-product-inline:hover {
      transform: translate(-50%, -2px);
      border-color: var(--rs-gold-bright);
      box-shadow:
        inset 0 0 0 6px rgba(244, 213, 141, 0.11),
        inset 0 0 0 7px rgba(215, 168, 79, 0.48),
        0 22px 48px rgba(62, 22, 29, 0.25);
    }
  }
}

@media (max-width: 840px) {
  .story-page .story-body aside.story-product-inline {
    --rs-image-max: 210px;

    left: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 9px;
    width: 100%;
    margin: 40px auto 42px;
    padding: 20px;
    transform: none;
    border-radius: 19px;
  }

  /* Keep the side vine artwork desktop-only; it is clipped in the single-column mobile card. */
  .story-page .story-body aside.story-product-inline::after {
    content: none;
    display: none;
  }

  .story-page .story-body aside.story-product-inline > p,
  .story-page .story-body aside.story-product-inline > .story-product-inline__shelf-label {
    grid-column: 1;
  }

  .story-page .story-body aside.story-product-inline > .story-product-inline__shelf-label {
    grid-row: auto;
    order: 1;
    max-width: calc(100% - 72px);
    margin-bottom: 1px !important;
    font-size: 11px !important;
    letter-spacing: 0.16em;
  }

  .story-page .story-body aside.story-product-inline > .story-product-inline__shelf-label::after {
    width: min(230px, 100%);
    height: 32px;
    margin-top: 4px;
    background-size: 28px 28px, 100% 1px;
  }

  .story-page .story-body aside.story-product-inline > p:nth-child(2) {
    grid-column: 1;
    grid-row: auto;
    order: 2;
    width: min(100%, 320px);
    max-width: 320px;
    height: 240px;
    margin: 0 auto 5px;
    padding: 14px;
  }

  .story-page .story-body aside.story-product-inline > p:nth-child(2) img {
    max-width: 220px;
    max-height: var(--rs-image-max);
  }

  .story-page .story-body aside.story-product-inline > p:nth-child(3) {
    grid-row: auto;
    order: 3;
    max-width: 100%;
    margin-bottom: 3px;
    font-size: clamp(28px, 8vw, 32px);
    line-height: 1.05;
  }

  .story-page .story-body aside.story-product-inline > p:nth-child(4) {
    grid-row: auto;
    order: 4;
    font-size: 15px;
  }

  .story-page .story-body aside.story-product-inline > p:nth-child(5) {
    grid-row: auto;
    order: 5;
    max-width: 100%;
    margin-bottom: 11px;
    font-size: 15px;
    line-height: 1.5;
  }

  .story-page .story-body aside.story-product-inline > .story-product-inline__cta {
    grid-row: auto;
    order: 6;
  }

  .story-page .story-body aside.story-product-inline > .story-product-inline__cta a {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .story-page .story-body aside.story-product-inline > .story-product-inline__trust {
    grid-row: auto;
    order: 7;
  }

  .story-page .story-body aside.story-product-inline > .story-product-inline__all {
    grid-row: auto;
    order: 8;
  }
}

@media (max-width: 520px) {
  .story-page .story-body aside.story-product-inline {
    --rs-image-max: 190px;
    margin: 34px auto 38px;
    padding: 18px;
    border-radius: 17px;
  }

  .story-page .story-body aside.story-product-inline > p:nth-child(2) {
    height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-page .story-body aside.story-product-inline,
  .story-page .story-body aside.story-product-inline *,
  .story-page .story-body aside.story-product-inline *::before,
  .story-page .story-body aside.story-product-inline *::after {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .story-page .story-body aside.story-product-inline {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }

  .story-page .story-body aside.story-product-inline::after {
    display: none;
  }

  .story-page .story-body aside.story-product-inline > p,
  .story-page .story-body aside.story-product-inline > .story-product-inline__shelf-label,
  .story-page .story-body aside.story-product-inline > p:nth-child(3) a {
    color: CanvasText !important;
  }
}
