/* ==========================================================================
   Graphic cover system: flat, editorial cards (HTML + SVG).
   Sizes scale with the cover's own width via container queries.
   ========================================================================== */

.cover {
  --cover-bg: #152039;
  --cover-ink: #f7f4ef;
  --cover-accent: #c4a574;
  container-type: inline-size;
  container-name: cover;
  aspect-ratio: 3 / 4;
  width: 100%;
  border-radius: 16px;
  background: var(--cover-bg);
  color: var(--cover-ink);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 9.5% 9% 9%;
  box-sizing: border-box;
  text-align: left;
}

.cover-mark {
  display: block;
  width: 100%;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 5.6cqi;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--cover-accent);
  opacity: 0.95;
}

.cover-rule {
  width: 18%;
  height: 1px;
  background: var(--cover-accent);
  opacity: 0.55;
  margin: 5% 0 0;
  border: 0;
}

.cover-icon {
  width: 28%;
  max-width: 5.5rem;
  margin: auto 0 7%;
  color: var(--cover-accent);
  display: block;
  flex-shrink: 0;
}

.cover-icon use,
.cover-icon svg {
  width: 100%;
  height: auto;
  display: block;
}

.cover-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 11.2cqi;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--cover-ink);
  margin: 0;
}

/* Colourways */
.cover--sexting      { --cover-bg: #152039; --cover-ink: #f7f4ef; --cover-accent: #c4a574; }
.cover--templates    { --cover-bg: #d7e2d5; --cover-ink: #1a1714; --cover-accent: #3a4a38; }
.cover--promotion    { --cover-bg: #e5d6b5; --cover-ink: #1a1714; --cover-accent: #8a6236; }
.cover--plan         { --cover-bg: #e5d0c3; --cover-ink: #1a1714; --cover-accent: #7a4e3c; }
.cover--aichat       { --cover-bg: #d0dae6; --cover-ink: #152039; --cover-accent: #152039; }
.cover--aiinf        { --cover-bg: #e4d3df; --cover-ink: #261c24; --cover-accent: #6a4860; }
.cover--movies       { --cover-bg: #cbdad6; --cover-ink: #1a1714; --cover-accent: #2c4a44; }
.cover--humiliation  { --cover-bg: #3a4540; --cover-ink: #f4f0ea; --cover-accent: #c4a574; }
.cover--feet         { --cover-bg: #ecd8d1; --cover-ink: #1a1714; --cover-accent: #7a4a40; }
.cover--custom       { --cover-bg: #e5cebf; --cover-ink: #1a1714; --cover-accent: #7a4e3c; }
.cover--rating       { --cover-bg: #d4d0c7; --cover-ink: #1a1714; --cover-accent: #152039; }

/* Hero cluster */
.hero-stage .cover {
  position: absolute;
  bottom: 0;
  box-shadow: 0 18px 36px rgba(21, 32, 57, 0.14);
  will-change: transform;
  border-radius: 14px;
}

.hero-cover--left {
  left: -2%;
  width: 46%;
  transform: translateY(calc(var(--shift) * 0.35)) rotate(-8deg);
  z-index: 1;
}

.hero-cover--right {
  right: -2%;
  width: 46%;
  transform: translateY(calc(var(--shift) * 0.5)) rotate(8deg);
  z-index: 1;
}

.hero-cover--center {
  left: 50%;
  width: 56%;
  transform: translateX(-50%) translateY(calc(var(--shift) * 0.2));
  z-index: 2;
}

/* Featured / PDP */
.bestseller-cover,
.pdp-cover {
  filter: drop-shadow(0 18px 32px rgba(21, 32, 57, 0.14));
}

.bestseller-cover .cover,
.pdp-cover .cover {
  width: 100%;
  border-radius: 18px;
}

/* Product grid thumbs */
.product-card .thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: transparent;
}

.product-card .thumb .cover {
  border-radius: 0;
  height: 100%;
}

/* Bundle fans */
.bundle-fan {
  --fan-w: 5.15rem;
  position: relative;
  height: 11.25rem;
  margin: 0 auto;
  width: min(100%, 22rem);
}

.bundle-fan .cover {
  position: absolute;
  left: 50%;
  bottom: 0.4rem;
  width: var(--fan-w);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(21, 32, 57, 0.16);
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(var(--rot, 0deg)) translateX(var(--x, 0));
}

.bundle-fan--five { height: 11.5rem; --fan-w: 4.4rem; }

.bundle-fan--five .cover {
  bottom: 0;
}

/* Mini collection card inside the bundle aside */
.mini-bundle .bundle-fan {
  height: 9.5rem;
  width: 100%;
  margin: 0 0 1.15rem;
  --fan-w: 3.7rem;
}

@media (prefers-reduced-motion: reduce) {
  .hero-cover--left { transform: rotate(-8deg); }
  .hero-cover--right { transform: rotate(8deg); }
  .hero-cover--center { transform: translateX(-50%); }
}

/* Fan title-face rules live at the end of this file. */

.bundle-fan .cover-mark {
  font-size: 8cqi;
}

.thumb--fan {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--bg-alt, #f5f6f7);
  padding: 0.5rem 0.2rem 0.35rem;
}

.thumb--fan .bundle-fan {
  position: relative;
  height: 100%;
  width: 100%;
  margin: 0;
  --fan-w: 3rem;
}

.bundle-visual {
  filter: none;
  width: min(100%, 22rem);
  margin: 0 auto 1.5rem;
}


.cover-rule { display: none !important; }

.cover-mark::after {
  content: "";
  display: block;
  width: 1.4em;
  height: 1px;
  background: currentColor;
  margin-top: 0.55em;
  opacity: 0.75;
}

.cover .cover-title {
  color: var(--cover-ink);
}

.bundle-fan .cover {
  transform: translateX(-50%) translateX(var(--x, 0px)) rotate(var(--rot, 0deg));
}

/* superseded: fan faces now show titles, not icons */

.bundle-visual {
  overflow: visible;
  padding-bottom: 0.5rem;
}


/* Larger, clearer cover titles */
.cover-icon {
  width: 18%;
  max-width: 3.6rem;
  margin: auto 0 5%;
}

.cover-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: 5.6cqi;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cover-accent);
  margin: 0 0 0.28em;
  line-height: 1.2;
}

.cover-title {
  font-size: 16.8cqi;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

/* Fan: title faces (a stack of books), scaled to fit the viewport */
.bundle-fan {
  --spread: 1;
  max-width: 100%;
}

.bundle-fan .cover {
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: 14% 7% 12%;
  transform: translateX(-50%) translateX(calc(var(--x) * var(--spread))) rotate(var(--rot, 0deg));
}

.bundle-fan .cover-mark,
.bundle-fan .cover-icon,
.bundle-fan .cover-eyebrow,
.bundle-fan .cover-rule {
  display: none !important;
}

.bundle-fan .cover-title {
  display: block;
  font-size: 22cqi;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: auto 0;
  text-align: center;
}

/* Keep all 11 books fully visible inside 390px and 360px, with a little inset. */
.bundle-fan:not(.bundle-fan--five) .cover-title {
  font-size: 26cqi;
  line-height: 1.05;
}
@media (max-width: 430px) {
  .bundle-fan:not(.bundle-fan--five) {
    --spread: 0.56;
    --fan-w: 4.15rem;
    height: 10.1rem;
  }
}
@media (max-width: 370px) {
  .bundle-fan:not(.bundle-fan--five) {
    --spread: 0.48;
    --fan-w: 3.85rem;
    height: 9.5rem;
  }
}

.bundle-visual {
  width: 100%;
  max-width: 22rem;
  overflow: visible;
  display: flex;
  justify-content: center;
}


/* Library / card fans must not swing past the viewport */
.thumb--fan {
  overflow: clip;
}
.thumb--fan .cover,
.product-card .thumb--fan .cover,
.thumb--fan .bundle-fan .cover {
  height: auto !important;
  width: var(--fan-w);
}
.thumb--fan .bundle-fan {
  --spread: 0.5;
}
@media (max-width: 370px) {
  .thumb--fan .bundle-fan {
    --spread: 0.44;
  }
}


/* Road to Top 1% product image (5 guides, packed tight) */
.road-bundle-shot {
  margin: 0 0 1.15rem;
}
.road-bundle-shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}
.product-card .thumb--road {
  aspect-ratio: auto;
  background: #ffffff;
  overflow: hidden;
  padding: 0;
}
.product-card .thumb--road img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}
