/* ============================================================
   Lori Doll promo cards + side tab + cross-sell section
   Shared across homepage, /lori/, and cart/checkout
   ============================================================ */

/* ---------- Rectangular promo card ---------- */
.doll-promo-card {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  padding: 20px 22px;
  border-radius: var(--radius, 12px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  text-decoration: none;
  box-sizing: border-box;
  transition:
    border-color var(--transition, 0.3s ease),
    background var(--transition, 0.3s ease),
    box-shadow var(--transition, 0.3s ease);
}

.doll-promo-card:hover {
  border-color: rgba(77, 208, 225, 0.55);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.doll-promo-card__eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  text-align: center;
}

.doll-promo-card__body {
  display: flex;
  align-items: center;
  gap: 20px;
}

.doll-promo-card__media {
  flex-shrink: 0;
  width: 100px;
  display: block;
  text-decoration: none;
}

.doll-promo-card__media img,
.doll-promo-card__cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.doll-promo-card__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.doll-promo-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cream-light, #f5ede0);
}

.doll-promo-card__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--cream, #e2d1b6);
  opacity: 0.9;
}

.doll-promo-card__cta {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--cyan, #4dd0e1);
  text-decoration: none;
}

.doll-promo-card:hover .doll-promo-card__cta,
.doll-promo-card__cta:hover {
  color: var(--gold);
}

/* Homepage variant — image on the right to contrast the book promo above */
.doll-promo-card--home {
  max-width: 100%;
}

.doll-promo-card--home .doll-promo-card__body {
  flex-direction: row-reverse;
}

.doll-promo-card--home .doll-promo-card__copy {
  align-items: center;
  text-align: center;
}

/* Cart mobile variant — compact row matching cross-sell height */
.doll-promo-card--cart-mobile {
  display: none;
  margin: 0;
  padding: 14px;
  border-radius: var(--radius, 12px);
  background: rgba(213, 190, 118, 0.08);
  border: 1px dashed rgba(213, 190, 118, 0.35);
  box-shadow: none;
}

.doll-promo-card--cart-mobile[hidden] {
  display: none !important;
}

.doll-promo-card--cart-mobile .doll-promo-card__row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.doll-promo-card--cart-mobile .doll-promo-card__media {
  width: 48px;
  display: block;
}

.doll-promo-card--cart-mobile .doll-promo-card__cover {
  width: 48px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.doll-promo-card--cart-mobile .doll-promo-card__copy {
  align-items: flex-start;
  text-align: left;
  gap: 2px;
}

.doll-promo-card--cart-mobile .doll-promo-card__eyebrow {
  margin-bottom: 0;
  text-align: left;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.doll-promo-card--cart-mobile .doll-promo-card__title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  line-height: 1.25;
}

.doll-promo-card--cart-mobile .doll-promo-card__subtitle {
  font-size: 0.82rem;
  opacity: 0.85;
  line-height: 1.3;
}

.doll-promo-card--cart-mobile .doll-promo-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.doll-promo-card--cart-mobile .doll-promo-card__add {
  padding: 9px 10px;
  border: none;
  border-radius: 999px;
  background: var(--gold);
  color: var(--darker, #0a1628);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.doll-promo-card--cart-mobile .doll-promo-card__add:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.doll-promo-card--cart-mobile .doll-promo-card__view-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 10px;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-sizing: border-box;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .doll-promo-card:not(.doll-promo-card--cart-mobile) .doll-promo-card__body,
  .doll-promo-card--home .doll-promo-card__body {
    flex-direction: column;
    text-align: center;
  }

  .doll-promo-card:not(.doll-promo-card--cart-mobile) .doll-promo-card__media {
    width: 112px;
    margin: 0 auto;
  }

  .doll-promo-card:not(.doll-promo-card--cart-mobile) .doll-promo-card__copy {
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .doll-promo-card--cart-mobile:not([hidden]) {
    display: block;
  }
}

@media (min-width: 901px) {
  .doll-promo-card--cart-mobile {
    display: none !important;
  }
}

/* ---------- Fixed side callout (desktop) — default open ---------- */
.doll-side-tab {
  position: fixed;
  right: 20px;
  top: clamp(96px, 14vh, 140px);
  z-index: 40;
  display: none;
  flex-direction: column;
  width: min(240px, calc(100vw - 40px));
  padding: 12px;
  border-radius: var(--radius, 12px);
  border: 1px solid rgba(213, 190, 118, 0.5);
  background: rgba(0, 28, 68, 0.96);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  color: inherit;
  transform: none;
  transition:
    opacity 0.2s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.doll-side-tab.is-dismissed {
  display: none !important;
}

@keyframes doll-side-enter {
  from {
    opacity: 0;
    transform: translateX(28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes doll-side-lori-mobile-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes doll-cart-mobile-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doll-side-tab--lori.is-entering {
  animation: doll-side-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.doll-side-tab--cart.is-entering {
  animation: doll-side-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.doll-promo-card--cart-mobile.is-entering {
  animation: doll-cart-mobile-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 900px) {
  .doll-side-tab--lori.is-entering {
    animation-name: doll-side-lori-mobile-enter;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doll-side-tab.is-entering,
  .doll-promo-card--cart-mobile.is-entering {
    animation: none;
  }
}

.doll-side-tab.is-hidden,
.doll-side-tab[hidden] {
  display: none !important;
  pointer-events: none;
}

.doll-side-tab__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.doll-side-tab__img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.doll-side-tab__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.doll-side-tab__title {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cream-light, #f5ede0);
  padding: 0 4px 4px;
}

.doll-side-tab__link:hover .doll-side-tab__title {
  color: var(--gold);
}

.doll-side-tab__add {
  margin-top: 6px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  border-radius: 999px;
  background: var(--gold);
  color: var(--darker, #0a1628);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    filter 0.2s ease,
    transform 0.15s ease;
}

.doll-side-tab__add:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.doll-side-tab__add:active {
  transform: translateY(0);
}

.doll-side-tab__add[hidden] {
  display: none;
}

/* Close — mobile Lori popup only */
.doll-side-tab__close {
  display: none;
}

@media (max-width: 900px) {
  .doll-side-tab--lori .doll-side-tab__close {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 5;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: 2px solid rgba(0, 28, 68, 0.95);
    border-radius: 50%;
    background: var(--gold);
    color: #0a1628;
    font-family: var(--font-body), Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  }

  .doll-side-tab--lori .doll-side-tab__close:hover {
    background: var(--cream-light, #f5ede0);
  }
}

/* Lori: desktop + mobile popup */
.doll-side-tab--lori:not([hidden]):not(.is-hidden):not(.is-dismissed) {
  display: flex;
}

/* Cart side callout: desktop only, no close */
@media (min-width: 901px) {
  .doll-side-tab--cart:not([hidden]):not(.is-hidden) {
    display: flex;
  }
}

@media (max-width: 900px) {
  .doll-side-tab--cart {
    display: none !important;
  }

  .doll-side-tab--lori {
    right: 12px;
    top: auto;
    bottom: 16px;
    width: min(220px, calc(100vw - 24px));
  }
}

/* ---------- Lori book page cross-sell section ---------- */
.doll-cross-sell {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  position: relative;
  background: transparent;
  overflow: hidden;
  padding: var(--section-pad, 80px 24px);
  --band-fill: var(--band-fill-strong, 0.11);
  scroll-margin-top: 88px;
}

.doll-cross-sell:has(.book-gallery--inline) {
  overflow: visible;
}

.doll-cross-sell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, var(--band-fill, 0.11)) var(--band-edge-fade, 16%),
    rgba(255, 255, 255, var(--band-fill, 0.11)) calc(100% - var(--band-edge-fade, 16%)),
    transparent 100%
  );
}

.doll-cross-sell > * {
  position: relative;
  z-index: 1;
}

.doll-cross-sell__inner {
  max-width: var(--max-width, 1100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
}

.doll-cross-sell__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.doll-cross-sell__hero {
  width: min(100%, 280px);
  height: auto;
  border-radius: var(--radius, 12px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    4px 4px 0 rgba(213, 190, 118, 0.15);
}

.doll-cross-sell__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.doll-cross-sell__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: var(--cream-light, #f5ede0);
  margin: 0;
}

.doll-cross-sell__blurb {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted, rgba(226, 209, 182, 0.7));
  max-width: 52ch;
}

.doll-cross-sell__subtitle {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.doll-cross-sell__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.doll-cross-sell__content > .book-gallery--inline {
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .doll-cross-sell__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .doll-cross-sell__content {
    align-items: center;
    min-width: 0;
  }

  .doll-cross-sell__content > .book-gallery--inline {
    align-self: stretch;
  }

  .doll-cross-sell__blurb {
    max-width: none;
  }

  .doll-cross-sell__actions {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .doll-cross-sell__actions {
    flex-direction: column;
    width: 100%;
  }

  .doll-cross-sell__actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
