body.shop-page { background: #f7f9fb; }

/* ─────────── Limelight Shop ─────────── */

/* Floating cart — appears on the right once a book is added */
.shop-cart-float {
  position: fixed;
  top: 50%;
  right: 22px;
  z-index: 285;
  opacity: 0;
  visibility: hidden;
  transform: translate(20px, -50%);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease), visibility 0s 0.45s;
}
.shop-cart-float.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease), visibility 0s;
}

.shop-cart-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(232, 180, 74, 0.55);
  background: linear-gradient(135deg, #0d2938, #0b1824);
  color: var(--gold);
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(5, 12, 20, 0.35);
  animation: cartFloat 3.6s ease-in-out infinite;
  transition: background 0.3s, color 0.3s, border-color 0.3s,
    box-shadow 0.3s, transform 0.3s var(--ease);
}
.shop-cart-btn:hover,
.shop-cart-btn:focus-visible {
  animation: none;
  background: linear-gradient(135deg, var(--gold), #f3cd7d);
  border-color: var(--gold);
  color: var(--dark);
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 22px 46px rgba(232, 180, 74, 0.42);
  outline: none;
}
.cart-ico { display: block; transition: transform 0.3s var(--ease); }
.shop-cart-btn:hover .cart-ico,
.shop-cart-btn:focus-visible .cart-ico { transform: scale(1.1); }

@keyframes cartFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

/* Hover tooltip (opens to the left of the floating cart) */
.shop-cart-btn::after {
  content: attr(data-tip);
  position: absolute;
  top: 50%;
  right: calc(100% + 14px);
  z-index: 5;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--dark);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(5, 12, 20, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translate(6px, -50%);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  pointer-events: none;
}
.shop-cart-btn:hover::after,
.shop-cart-btn:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

/* Count notification badge */
.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 20px;
  background: var(--gold);
  color: var(--dark);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: cartPop 0.45s var(--ease); }
@keyframes cartPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ─────────── Hero ─────────── */
.shop-hero {
  position: relative;
  min-height: 66vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  padding: 150px 24px 80px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 159, 142, 0.28), transparent 46%),
    radial-gradient(circle at 82% 74%, rgba(232, 180, 74, 0.22), transparent 42%),
    linear-gradient(160deg, #0b1824 0%, #0f2433 48%, #0b1824 100%);
}
.shop-hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    radial-gradient(rgba(232, 180, 74, 0.1) 1px, transparent 1px);
  background-size: 92px 92px, 58px 58px;
  background-position: 0 0, 28px 28px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 74%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 74%);
  pointer-events: none;
}
.shop-hero-inner { position: relative; z-index: 2; max-width: 820px; }
.shop-hero .hero-logo {
  width: min(220px, 58vw);
  margin: 0 auto 14px;
  height: auto;
  animation: logoGlow 3.2s ease-in-out infinite 0.8s;
}
.shop-hero .tag {
  background: rgba(232, 180, 74, 0.14);
  color: var(--gold);
  border: 1px solid rgba(232, 180, 74, 0.3);
}
.shop-hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  margin: 6px 0 16px;
}
.shop-hero p {
  color: #c3d2e0;
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  max-width: 620px;
  margin: 0 auto;
}
.shop-hero p strong { color: #fff; }
.shop-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 26px;
  margin-top: 30px;
  color: #a7b8c8;
  font-size: 0.86rem;
}
.shop-meta span { display: inline-flex; align-items: center; gap: 8px; }
.shop-meta i { font-style: normal; }

/* ─────────── Products ─────────── */
.shop-section { padding: clamp(70px, 10vw, 110px) 24px; }

.shop-grid {
  display: grid;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  background: var(--card);
  border: 1px solid rgba(14, 159, 142, 0.1);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 34px 80px rgba(11, 24, 36, 0.2);
}
@keyframes productIn {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  padding: 46px 26px;
  background:
    radial-gradient(circle at 25% 20%, rgba(14, 159, 142, 0.38), transparent 55%),
    radial-gradient(circle at 80% 85%, rgba(232, 180, 74, 0.28), transparent 50%),
    linear-gradient(150deg, #0d2431, #0b1824 65%, #0a1520);
  overflow: hidden;
}
.product-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}
.cover-media-backdrop {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
}
.cover-media-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.05) brightness(0.85);
  transform: scale(1.05);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.cover-media-bg--front { opacity: 0.45; }
.cover-media-bg--back { opacity: 0; }
.product-media.show-back-cover .cover-media-bg--front { opacity: 0; }
.product-media.show-back-cover .cover-media-bg--back { opacity: 0.45; }
.cover-media-bg.is-active { opacity: 0.45; }

/* Facilitator guide back cover alignment tweak */
.cover-face.cover-adjust-down { object-position: center 70%; }
.cover-reflection.cover-adjust-down { transform: translate(-50%, -40%) scale(1.18); }
.cover-media-bg.cover-adjust-down { object-position: center 70%; }
.product-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  padding: 6px 13px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--gold), #f3cd7d);
  color: var(--dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.product-cover-wrap { position: relative; z-index: 2; }
.product-photo {
  width: min(230px, 62vw);
  border-radius: 10px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
  transform: rotate(-2deg);
  transition: transform 0.5s var(--ease);
}
.product-card:hover .product-photo { transform: rotate(0) scale(1.02); }

/* Front/back cover viewer */
.cover-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.cover-stage {
  position: relative;
  width: min(260px, 70vw);
  height: 360px;
  display: grid;
  place-items: center;
  overflow: visible;
}
.cover-reflection {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88%;
  height: 88%;
  object-fit: contain;
  transform: translate(-50%, -46%) scale(1.18);
  filter: blur(28px) saturate(1.15);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.cover-reflection--front { opacity: 0.55; }
.cover-reflection--back { opacity: 0; }
.cover-viewer.is-back .cover-reflection--front { opacity: 0; }
.cover-viewer.is-back .cover-reflection--back { opacity: 0.55; }
.cover-flip {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.cover-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
  backface-visibility: hidden;
  transition: transform 0.6s var(--ease), opacity 0.35s ease;
  background: transparent;
}
.cover-face--front {
  transform: rotate(-2deg) rotateY(0deg);
  opacity: 1;
  z-index: 2;
}
.cover-face--back {
  transform: rotate(-2deg) rotateY(180deg);
  opacity: 0;
  z-index: 1;
}
.cover-viewer.is-back .cover-face--front {
  transform: rotate(-2deg) rotateY(-180deg);
  opacity: 0;
}
.cover-viewer.is-back .cover-face--back {
  transform: rotate(-2deg) rotateY(0deg);
  opacity: 1;
  z-index: 2;
}
.product-card:hover .cover-face--front { transform: rotate(0) scale(1.02) rotateY(0deg); }
.product-card:hover .cover-face--back { transform: rotate(0) scale(1.02) rotateY(180deg); }
.product-card:hover .cover-viewer.is-back .cover-face--front { transform: rotate(0) scale(1.02) rotateY(-180deg); }
.product-card:hover .cover-viewer.is-back .cover-face--back { transform: rotate(0) scale(1.02) rotateY(0deg); }
.cover-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}
.cover-toggle-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.cover-toggle-btn:hover { color: #fff; }
.cover-toggle-btn.is-active {
  background: linear-gradient(135deg, var(--gold), #f3cd7d);
  color: var(--dark);
}

/* Generated cover (used until a real cover photo is supplied) */
.cover-art {
  position: relative;
  width: 222px;
  max-width: 64vw;
  aspect-ratio: 2 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 22px 24px 34px;
  border-radius: 5px 12px 12px 5px;
  background:
    radial-gradient(circle at 75% 12%, rgba(232, 180, 74, 0.24), transparent 45%),
    linear-gradient(155deg, #143847 0%, #0e2130 46%, #081119 100%);
  border: 1px solid rgba(232, 180, 74, 0.28);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.55),
    inset -10px 0 24px rgba(0, 0, 0, 0.35);
  transform: rotate(-3deg);
  transition: transform 0.55s var(--ease);
  overflow: hidden;
}
.cover-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.09) 48%, transparent 58%);
  pointer-events: none;
}
.product-card:hover .cover-art { transform: rotate(0) translateY(-4px) scale(1.02); }
.cover-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 13px;
  background: linear-gradient(90deg, #050d14, #1c4254 60%, rgba(255, 255, 255, 0.08));
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
}
.cover-top { display: flex; align-items: center; gap: 7px; }
.cover-mark { color: var(--gold); font-size: 0.72rem; }
.cover-brand {
  font-size: 0.52rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9fb4c4;
}
.cover-mid { position: relative; }
.cover-rule {
  display: block;
  width: 42px;
  height: 2px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.cover-title {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  line-height: 1.02;
  color: #fff;
  letter-spacing: 0.2px;
}
.cover-title em {
  display: block;
  font-style: normal;
  color: var(--gold);
  font-size: 2.35rem;
}
.cover-title--long { font-size: 1.6rem; }
.cover-title--long em { font-size: 1.78rem; }
.cover-sub {
  margin-top: 12px;
  font-size: 0.6rem;
  line-height: 1.55;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #a9bac9;
  max-width: 140px;
}
.cover-author {
  font-size: 0.58rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--gold);
}

.product-body { padding: clamp(28px, 4vw, 46px); display: flex; flex-direction: column; }
.product-kicker {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 30px;
  background: rgba(14, 159, 142, 0.1);
  color: var(--teal-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.product-body h3 {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  margin-bottom: 6px;
}
.product-sub {
  color: var(--teal-dark);
  font-weight: 500;
  font-size: 0.98rem;
  margin-bottom: 16px;
}
.product-desc { color: var(--muted); font-size: 0.98rem; line-height: 1.7; }
.product-details {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.product-details li {
  position: relative;
  padding-left: 26px;
  color: var(--ink);
  font-size: 0.9rem;
}
.product-details li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}
.product-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 30px;
}
.product-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
.product-price strong {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: var(--ink);
  line-height: 1;
}
.product-price span {
  font-size: 0.7rem;
  letter-spacing: 1.4px;
  color: var(--muted);
  font-weight: 600;
}
.product-compare { color: #9aa9b3; font-size: 0.95rem; margin-left: 4px; }
.product-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.product-add { padding: 14px 28px; }
.product-add[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.product-amazon {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal-dark);
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(11, 125, 112, 0.35);
  transition: color 0.2s, border-color 0.2s;
}
.product-amazon:hover { color: var(--ink); border-color: var(--ink); }

.shop-empty, .shop-noscript {
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 16px;
  padding: 40px 24px;
  box-shadow: var(--shadow);
}

/* ─────────── Perks ─────────── */
.shop-perks {
  padding: clamp(60px, 8vw, 96px) 24px;
  background: linear-gradient(180deg, var(--bg), #eef4f6);
}
.perk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.perk {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 26px;
  border: 1px solid rgba(14, 159, 142, 0.08);
  box-shadow: 0 12px 34px rgba(11, 24, 36, 0.07);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.perk:hover { transform: translateY(-6px); box-shadow: 0 24px 54px rgba(11, 24, 36, 0.13); }
.perk-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 15px;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(14, 159, 142, 0.15), rgba(232, 180, 74, 0.16));
}
.perk h3 { font-size: 1.15rem; margin-bottom: 8px; }
.perk p { color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.perk a { color: var(--teal-dark); font-weight: 600; }
.perk a:hover { text-decoration: underline; }

/* ─────────── About the author ─────────── */
.shop-author {
  padding: clamp(60px, 8vw, 96px) 24px;
  background: linear-gradient(180deg, #eef4f6, var(--bg));
}
.author-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(30px, 5vw, 68px);
  padding: clamp(32px, 5vw, 58px);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(232, 180, 74, 0.2), transparent 44%),
    radial-gradient(circle at 8% 100%, rgba(14, 159, 142, 0.28), transparent 50%),
    linear-gradient(140deg, #0d2938, #0b1824 70%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.author-body { position: relative; z-index: 2; max-width: 720px; }
.author-body .tag {
  background: rgba(232, 180, 74, 0.14);
  color: var(--gold);
  border: 1px solid rgba(232, 180, 74, 0.3);
}
.author-body h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.6rem);
  margin: 8px 0 18px;
  color: #fff;
}
.author-body p { color: #c3d2e0; font-size: 0.98rem; line-height: 1.75; margin-bottom: 12px; }
.author-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-bottom: 2px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(232, 180, 74, 0.4);
  transition: color 0.2s, border-color 0.2s;
}
.author-link:hover { color: #fff; border-color: #fff; }

.author-photo {
  position: relative;
  z-index: 2;
  width: clamp(280px, 32vw, 430px);
  aspect-ratio: 4 / 3;
  margin: 0;
  background: none;
  transform: scale(1);
  transition: transform 0.6s var(--ease);
  /* Soft vignette so the photo melts into the dark card */
  -webkit-mask-image: radial-gradient(
    ellipse 74% 72% at 50% 44%,
    #000 52%,
    rgba(0, 0, 0, 0.72) 72%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 74% 72% at 50% 44%,
    #000 52%,
    rgba(0, 0, 0, 0.72) 72%,
    transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.author-card:hover .author-photo { transform: scale(1.035); }

/* ─────────── Cart drawer ─────────── */
body.shop-locked { overflow: hidden; }

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 290;
  background: rgba(5, 12, 20, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.cart-overlay.show { opacity: 1; }
.cart-overlay[hidden] { display: none; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 300;
  height: 100dvh;
  width: min(430px, 100vw);
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -20px 0 60px rgba(5, 12, 20, 0.35);
  transform: translateX(102%);
  transition: transform 0.45s var(--ease);
  visibility: hidden;
}
.cart-drawer.open { transform: none; visibility: visible; }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #0d2938, #0b1824);
  color: #fff;
  border-bottom: 3px solid var(--gold);
  flex: 0 0 auto;
}
.cart-head h2 { font-size: 1.3rem; }
.cart-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.cart-close:hover { background: rgba(255, 255, 255, 0.12); transform: rotate(90deg); }
.cart-items { flex: 1 1 auto; overflow-y: auto; padding: 8px 22px 16px; }
.cart-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(11, 24, 36, 0.08);
}
.cart-item:last-child { border-bottom: 0; }
.cart-thumb {
  width: 62px;
  aspect-ratio: 2 / 3;
  border-radius: 4px 7px 7px 4px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, #143847, #0b1824 70%);
  border: 1px solid rgba(232, 180, 74, 0.3);
  box-shadow: 0 8px 18px rgba(11, 24, 36, 0.25);
  color: var(--gold);
  font-size: 0.9rem;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-main { min-width: 0; }
.cart-item-main h4 { font-size: 1rem; margin-bottom: 2px; }
.cart-item-kicker {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(11, 24, 36, 0.16);
  border-radius: 30px;
  overflow: hidden;
}
.qty button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.qty button:hover { background: rgba(14, 159, 142, 0.1); }
.qty span { min-width: 26px; text-align: center; font-size: 0.86rem; font-weight: 600; }
.cart-remove {
  display: block;
  margin-top: 7px;
  border: 0;
  background: none;
  padding: 0;
  color: #9a5b55;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.cart-remove:hover { color: #d9534f; text-decoration: underline; }
.cart-item-price { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.cart-empty { text-align: center; padding: 60px 10px; color: var(--muted); }
.cart-empty-ico { display: block; font-size: 2.2rem; margin-bottom: 12px; }
.cart-empty p { margin-bottom: 16px; }
.cart-empty-btn {
  border: 1px solid rgba(11, 24, 36, 0.18);
  background: transparent;
  border-radius: 30px;
  padding: 9px 18px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.cart-empty-btn:hover { background: rgba(14, 159, 142, 0.08); }

.cart-foot {
  flex: 0 0 auto;
  padding: 18px 22px 24px;
  border-top: 1px solid rgba(11, 24, 36, 0.08);
  background: #fbfdfd;
}
.cart-foot[hidden] { display: none; }
.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.cart-line strong { font-size: 1.15rem; }
.cart-line--muted { color: var(--muted); font-size: 0.86rem; }
.cart-ship-note { color: var(--teal-dark); font-size: 0.8rem; margin: 2px 0 14px; min-height: 0; }
.cart-checkout { width: 100%; text-align: center; }
.cart-continue {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
}
.cart-continue:hover { color: var(--ink); }

/* ─────────── Checkout modal ─────────── */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.checkout-modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
.checkout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 20, 0.7);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.checkout-panel {
  position: relative;
  width: min(1010px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  padding: clamp(24px, 3.4vw, 42px);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.35s var(--ease);
}
.checkout-modal.open .checkout-panel { transform: none; }
.checkout-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(11, 24, 36, 0.14);
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.checkout-close:hover { background: var(--bg); transform: rotate(90deg); }
.checkout-head { margin-bottom: 26px; padding-right: 40px; }
.checkout-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); margin: 4px 0 6px; }
.checkout-head p { color: var(--muted); font-size: 0.94rem; }

.checkout-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 3.6vw, 44px);
  align-items: start;
}
.checkout-fields h3,
.checkout-summary h3 {
  font-size: 1.05rem;
  margin: 22px 0 12px;
  color: var(--ink);
}
.checkout-fields h3:first-child,
.checkout-summary h3:first-child { margin-top: 0; }
.co-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-row--3 { grid-template-columns: 1.4fr 0.6fr 0.8fr; }
.co-field { display: block; margin-bottom: 12px; }
.co-field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--muted);
}
.co-field input,
.co-field textarea {
  width: 100%;
  border: 1px solid rgba(11, 24, 36, 0.16);
  border-radius: 11px;
  padding: 11px 13px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fbfdfd;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.co-field textarea { resize: vertical; }
.co-field input:focus,
.co-field textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 159, 142, 0.14);
}

.checkout-summary {
  background: #f6faf9;
  border: 1px solid rgba(14, 159, 142, 0.12);
  border-radius: 18px;
  padding: 22px;
  position: sticky;
  top: 16px;
}
.co-items { display: grid; gap: 9px; margin-bottom: 4px; }
.co-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: baseline;
  font-size: 0.88rem;
}
.co-item-qty { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.co-item-name { color: var(--ink); }
.co-item-price { font-weight: 600; }
.co-empty { color: var(--muted); font-size: 0.88rem; }

.co-totals {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(11, 24, 36, 0.1);
}
.co-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 0.9rem;
  color: var(--ink);
}
.co-line--total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(11, 24, 36, 0.1);
  font-size: 1.02rem;
}
.co-line--total strong { font-family: "Playfair Display", serif; font-size: 1.4rem; }
.checkout-pay { width: 100%; margin-top: 16px; padding: 15px 20px; }
.checkout-pay:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.checkout-fine { color: var(--muted); font-size: 0.72rem; line-height: 1.5; margin-top: 10px; text-align: center; }

.checkout-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 10px 6px;
}
.checkout-success[hidden] { display: none; }
.checkout-success .success-mark { margin-bottom: 14px; }
.checkout-success h2 { font-size: 2rem; margin: 4px 0 10px; }
.checkout-success > p { color: var(--muted); max-width: 520px; }
.success-ref {
  margin-top: 10px !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.6px;
  color: var(--ink) !important;
  font-weight: 600;
}
.checkout-success .success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.btn-ghost-dark {
  display: inline-block;
  border: 1px solid rgba(11, 24, 36, 0.2);
  background: transparent;
  color: var(--ink);
  padding: 14px 26px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.25s, transform 0.25s;
}
.btn-ghost-dark:hover { background: rgba(11, 24, 36, 0.06); transform: translateY(-2px); }

/* Reuse the site's success check animation */
.success-mark svg { width: 64px; height: 64px; }
.success-mark circle { stroke: var(--teal); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: drawCircle 0.7s var(--ease) forwards; }
.success-mark path { stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: drawCheck 0.5s 0.45s var(--ease) forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

/* ─────────── Toast ─────────── */
.shop-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  z-index: 340;
  max-width: min(92vw, 420px);
  padding: 12px 20px;
  border-radius: 40px;
  background: rgba(11, 24, 36, 0.96);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 16px 40px rgba(5, 12, 20, 0.4);
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}
.shop-toast.show { opacity: 1; transform: translate(-50%, 0); }
.shop-toast[hidden] { display: none; }

/* ─────────── Responsive ─────────── */
@media (max-width: 900px) {
  .product-card { grid-template-columns: minmax(240px, 320px) 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}
@keyframes bookFloatMobile {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}

/* Gentle book movement on all screen sizes (mobile, tablet and laptop). */
.cover-stage {
  animation: bookFloatMobile 4.5s ease-in-out infinite;
  will-change: transform;
}
.product-card:nth-child(2) .cover-stage { animation-duration: 5s; animation-delay: -1.2s; }
.product-card:nth-child(3) .cover-stage { animation-duration: 4.2s; animation-delay: -2.1s; }

@media (max-width: 760px) {
  .product-card { grid-template-columns: 1fr; }
  .product-media { padding: 40px 24px; }
  .cover-art { width: 200px; }
  .product-body { padding: 30px 24px 34px; }
  .product-foot { padding-top: 24px; }
  .author-card { grid-template-columns: 1fr; }
  .author-photo {
    order: -1;
    justify-self: center;
    width: 100%;
    max-width: 460px;
  }
}
@media (max-width: 560px) {
  .co-row, .co-row--3 { grid-template-columns: 1fr; }
  .checkout-panel { padding: 22px 18px 26px; border-radius: 18px; }
  .product-price strong { font-size: 1.7rem; }
  .product-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .product-add { width: 100%; text-align: center; }
  .product-amazon { text-align: center; padding: 6px 0; }
  .product-foot { align-items: stretch; }
  .shop-cart-float { right: 16px; }
  .shop-cart-btn { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .cover-art,
  .product-photo,
  .cover-stage,
  .shop-toast { animation: none !important; transition: none !important; }
}
