/* Magical CSS — original kid-rainbow palette back on the new layouts */
:root {
    --kids-coral: #ff6b6b;
    --kids-sun: #ffa500;
    --kids-lemon: #ffe066;
    --kids-mint: #a8edea;
    --kids-lilac: #c9c9ff;
    --kids-pink: #ff9a9e;
    --kids-blush: #fecfef;
    --brand-gold: #c9a227;
    --brand-gold-bright: #f5e6b3;
    --brand-crimson: #b91c1c;
    --brand-ruby: #e11d48;
    --brand-plum: #3a2444;
    --brand-lilac: #e9d5ff;
    --brand-blush: #fce7f3;
    --brand-sky: #dbeafe;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Quicksand', sans-serif;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--kids-pink) 0%, var(--kids-blush) 25%, var(--kids-blush) 50%, var(--kids-lilac) 75%, var(--kids-mint) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

main[role="main"] {
    padding-top: 5.75rem;
}

/* Magical Background */
.magical-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Soft stardust like the book covers */
.magical-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
    animation: stardustDrift 12s ease-in-out infinite;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.95), transparent),
        radial-gradient(1px 1px at 88% 12%, rgba(255, 250, 235, 0.85), transparent),
        radial-gradient(1.5px 1.5px at 42% 76%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 71% 44%, rgba(212, 175, 55, 0.75), transparent),
        radial-gradient(2px 2px at 91% 68%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 8% 88%, rgba(255, 255, 255, 0.65), transparent),
        radial-gradient(1.5px 1.5px at 55% 28%, rgba(244, 114, 182, 0.35), transparent);
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.floating-clouds {
    position: absolute;
    width: 100%;
    height: 100%;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    animation: float 6s ease-in-out infinite;
}

.cloud:before {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
}

.cloud:after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
}

.cloud-1 {
    width: 80px;
    height: 40px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.cloud-1:before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud-1:after {
    width: 60px;
    height: 40px;
    top: -15px;
    right: 10px;
}

.cloud-2 {
    width: 100px;
    height: 50px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.cloud-2:before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 15px;
}

.cloud-2:after {
    width: 70px;
    height: 50px;
    top: -20px;
    right: 15px;
}

.cloud-3 {
    width: 60px;
    height: 30px;
    top: 40%;
    left: 70%;
    animation-delay: 4s;
}

.cloud-3:before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 8px;
}

.cloud-3:after {
    width: 50px;
    height: 30px;
    top: -10px;
    right: 8px;
}

.cloud-4 {
    width: 90px;
    height: 45px;
    top: 80%;
    left: 30%;
    animation-delay: 1s;
}

.cloud-4:before {
    width: 55px;
    height: 55px;
    top: -28px;
    left: 12px;
}

.cloud-4:after {
    width: 65px;
    height: 45px;
    top: -18px;
    right: 12px;
}

.rainbow {
    position: absolute;
    width: 200px;
    height: 100px;
    border-radius: 50%;
    border: 8px solid transparent;
    animation: rainbowFloat 8s ease-in-out infinite;
    opacity: 0.45;
}

.rainbow-1 {
    top: 15%;
    right: 10%;
    border-top-color: #ff6b6b;
    border-right-color: #ffa500;
    border-bottom-color: #ffff00;
    border-left-color: #32cd32;
    animation-delay: 0s;
}

.rainbow-2 {
    top: 70%;
    left: 5%;
    border-top-color: #32cd32;
    border-right-color: #00bfff;
    border-bottom-color: #8a2be2;
    border-left-color: #ff69b4;
    animation-delay: 4s;
}

.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sparkle {
    position: absolute;
    font-size: 20px;
    animation: sparkle 3s ease-in-out infinite;
}

.sparkle-1 {
    top: 25%;
    left: 20%;
    animation-delay: 0s;
}

.sparkle-2 {
    top: 45%;
    right: 25%;
    animation-delay: 1s;
}

.sparkle-3 {
    top: 65%;
    left: 15%;
    animation-delay: 2s;
}

.sparkle-4 {
    top: 35%;
    right: 40%;
    animation-delay: 0.5s;
}

.sparkle-5 {
    top: 75%;
    right: 15%;
    animation-delay: 1.5s;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes rainbowFloat {

    0%,
    100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-15px) scale(1.1);
        opacity: 1;
    }
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
}

@keyframes stardustDrift {

    0%,
    100% {
        opacity: 0.28;
    }

    50% {
        opacity: 0.42;
    }
}

/* 3D Floating Book */
.floating-book-3d {
    position: absolute;
    width: 60px;
    height: 80px;
    transform-style: preserve-3d;
    animation: bookTumble 15s linear infinite;
    pointer-events: none;
    z-index: -1;
}

.book-side {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.book-front {
    transform: translateZ(5px);
    background: linear-gradient(45deg, var(--kids-pink), var(--kids-lilac));
    border-radius: 2px 4px 4px 2px;
}

.book-back {
    transform: translateZ(-5px) rotateY(180deg);
    background: var(--kids-lilac);
    border-radius: 4px 2px 2px 4px;
}

.book-spine {
    position: absolute;
    width: 10px;
    height: 100%;
    left: -5px;
    transform: rotateY(-90deg);
    background: var(--kids-pink);
    border-radius: 2px 0 0 2px;
}

.book-pages-side {
    position: absolute;
    width: 10px;
    height: 100%;
    right: -5px;
    transform: rotateY(90deg);
    background: #fff;
    background-image: linear-gradient(90deg, transparent 90%, rgba(0,0,0,0.05) 100%);
    background-size: 2px 100%;
}

.book-top {
    position: absolute;
    width: 100%;
    height: 10px;
    top: -5px;
    transform: rotateX(90deg);
    background: #fff;
}

.book-bottom {
    position: absolute;
    width: 100%;
    height: 10px;
    bottom: -5px;
    transform: rotateX(-90deg);
    background: #fff;
}

@keyframes bookTumble {
    0% { transform: translate(0, 0) rotateX(0) rotateY(0) rotateZ(0); }
    25% { transform: translate(100px, 100px) rotateX(90deg) rotateY(45deg) rotateZ(20deg); }
    50% { transform: translate(0, 200px) rotateX(180deg) rotateY(90deg) rotateZ(40deg); }
    75% { transform: translate(-100px, 100px) rotateX(270deg) rotateY(135deg) rotateZ(20deg); }
    100% { transform: translate(0, 0) rotateX(360deg) rotateY(180deg) rotateZ(0); }
}

/* Butterfly */
.butterfly {
    position: absolute;
    width: 20px;
    height: 20px;
    transform-style: preserve-3d;
    animation: butterflyFlutter 10s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.wing {
    position: absolute;
    width: 10px;
    height: 20px;
    background: rgba(255, 107, 107, 0.6);
    border-radius: 50% 50% 0 50%;
    transform-origin: right center;
    animation: flap 0.2s ease-in-out infinite alternate;
}

.wing-right {
    left: 10px;
    border-radius: 50% 50% 50% 0;
    transform-origin: left center;
    animation-name: flap-right;
}

@keyframes flap {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(70deg); }
}

@keyframes flap-right {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(-70deg); }
}

@keyframes butterflyFlutter {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(40vw, -20vh) rotate(20deg); }
    50% { transform: translate(80vw, 20vh) rotate(-10deg); }
    75% { transform: translate(40vw, 50vh) rotate(30deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Glowing Orbs */
.glowing-orb {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    filter: blur(20px);
    animation: orbPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -2;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.6; }
}

/* Header — floating “storybook pill” instead of a full-width bar */
.header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 107, 107, 0.15);
    box-shadow: 0 8px 32px rgba(255, 154, 158, 0.15);
    position: fixed;
    top: 1rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(1120px, calc(100% - 2rem));
    padding: 0.25rem 2.5rem;
    border-radius: 25px; /* Elegant square-ish edges */
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0; /* Reduced padding since header has it */
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    border: none;
    max-width: none;
    margin: 0;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(45deg, var(--kids-coral), var(--kids-sun), var(--kids-lemon), #32cd32, #00bfff, #8a2be2);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowText 4s ease-in-out infinite;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
}

.tagline {
    font-size: 0.88rem;
    color: #666;
    margin-top: -5px;
    font-weight: 500;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

body.dark-theme .hamburger span {
    background: #e8e4f0;
}

@media (prefers-reduced-motion: reduce) {
    .hamburger span,
    .nav-links {
        transition: none;
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--kids-coral);
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--kids-coral), var(--kids-sun));
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

@keyframes rainbowText {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes goldShimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Hero — asymmetric editorial layout (not the old 50/50 strip) */
.hero-landing {
    position: relative;
    min-height: calc(100vh - 6rem);
    padding: 2.5rem 1.5rem 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Don’t clip the tilted book / portrait (was hiding the whole cover). */
    overflow-x: hidden;
    overflow-y: visible;
}

.hero-landing__wash {
    position: absolute;
    inset: -30% -20% auto -20%;
    height: 85%;
    background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(255, 235, 240, 0.95) 0%, transparent 62%),
        radial-gradient(ellipse 55% 50% at 85% 35%, rgba(201, 201, 255, 0.65) 0%, transparent 52%),
        radial-gradient(ellipse 45% 40% at 15% 55%, rgba(168, 237, 234, 0.5) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hero-landing__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1180px;
    display: grid;
    /* Second column must not shrink to 0 width (that made the cover area disappear). */
    grid-template-columns: minmax(0, 1.05fr) minmax(min(100%, 300px), 0.95fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.hero-copy-block {
    padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.5rem);
    background: rgba(255, 255, 255, 0.88);
    border: 3px double rgba(255, 107, 107, 0.45);
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(255, 154, 158, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.hero-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #7c6a8e;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.35rem, 5vw, 3.65rem);
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.12;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.6);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.65;
    max-width: 36rem;
}

.hero-ornament {
    height: 4px;
    width: min(220px, 100%);
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, var(--kids-coral), var(--kids-sun), var(--kids-lemon), var(--kids-mint), var(--kids-lilac));
    border: none;
    border-radius: 4px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    border: none;
    font-family: 'Quicksand', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--kids-coral), var(--kids-sun));
    color: #fff;
    box-shadow: 0 4px 18px rgba(255, 107, 107, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 24px rgba(255, 107, 107, 0.45);
}

.btn-secondary {
    background: transparent;
    color: var(--kids-coral);
    border: 2px solid var(--kids-coral);
}

.btn-secondary:hover {
    background: var(--kids-coral);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
}

.btn-outline:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.btn-disabled {
    background: #ffb84d;
    color: #5a3e00;
    cursor: not-allowed;
    border: 2px solid #ffa726;
    opacity: 0.9;
}


.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.hero-portrait {
    position: relative;
    margin: 0;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    perspective: 1600px;
    perspective-origin: 50% 45%;
}

/* Soft halo behind the cover — not a “box”. */
.hero-portrait__ring {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(130%, 480px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(from 210deg, rgba(201, 162, 39, 0.28), rgba(225, 29, 72, 0.15), rgba(196, 181, 253, 0.28), rgba(201, 162, 39, 0.28));
    filter: blur(40px);
    opacity: 0.75;
    z-index: 0;
    pointer-events: none;
}

/* No frame — plain wrapper so the book can “pop” in 3D without a frosted card. */
.hero-portrait__plate {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    margin: 0;
    background: none transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    transform-style: preserve-3d;
}

/* Slanted “coming toward you” — rotateX + rotateY + translateZ + float. */
.hero-book.magical-book {
    transform-style: preserve-3d;
    transform-origin: center center;
    animation: heroBookTiltFloat 5.5s ease-in-out infinite;
}

@keyframes heroBookTiltFloat {
    0%, 100% {
        transform: rotateX(5deg) rotateY(-11deg) rotateZ(-2deg) translateZ(32px) translateY(0) scale(1.02);
    }

    50% {
        transform: rotateX(5deg) rotateY(-11deg) rotateZ(-2deg) translateZ(48px) translateY(-8px) scale(1.03);
    }
}

@keyframes heroBookTiltFloatMobile {
    0%, 100% {
        transform: rotateX(3deg) rotateY(-6deg) translateZ(12px) translateY(0) scale(1.01);
    }

    50% {
        transform: rotateX(3deg) rotateY(-6deg) translateZ(20px) translateY(-5px) scale(1.02);
    }
}

.hero-caption {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6b5a7a;
    font-weight: 600;
}

.magical-book {
    position: relative;
    animation: bookFloat 4s ease-in-out infinite;
}

/* Hero cover: 16×9 — gradient rim only; inner radius matches outer so it’s one surface, not “box + photo”. */
.hero-book {
    width: min(108%, 920px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.hero-book .book-cover {
    /* Thin rim; squarer corners (smaller radius) so frame + art feel less “pill”. */
    --hero-frame: clamp(5px, 0.95vw, 9px);
    --hero-r-outer: clamp(12px, 2vw, 20px);
    /* Wider *bitmap* only (img transform); does not change padding / gradient ring width. */
    --hero-img-scale-x: 1.24;
    display: grid !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: none;
    min-width: 0;
    margin: 0 auto;
    padding: var(--hero-frame) !important;
    aspect-ratio: 16 / 9;
    border-radius: var(--hero-r-outer);
    overflow: hidden;
    position: relative;
    z-index: 3;
    background: linear-gradient(
        125deg,
        var(--kids-coral) 0%,
        var(--kids-sun) 18%,
        var(--kids-lemon) 38%,
        var(--kids-mint) 58%,
        var(--kids-lilac) 78%,
        var(--kids-pink) 100%
    );
    background-size: 220% 220%;
    animation: heroCoverGradient 14s ease-in-out infinite;
    /* Outer float only — no inset “tray” that reads as a second box */
    box-shadow:
        0 24px 56px rgba(255, 107, 107, 0.22),
        0 12px 32px rgba(139, 92, 246, 0.12);
    align-items: stretch;
    justify-items: stretch;
}

@keyframes heroCoverGradient {
    0%, 100% {
        background-position: 0% 40%;
    }

    50% {
        background-position: 100% 60%;
    }
}

/* Decorative “pages” layer isn’t needed in the hero; hide it. */
.hero-book .book-pages {
    display: none;
}

/* Art flush to inner curve; scaleX widens the picture pixels only (clipped by .book-cover). */
.hero-book .book-cover img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 0;
    min-height: 100%;
    object-fit: fill;
    object-position: center;
    display: block;
    align-self: stretch;
    justify-self: stretch;
    border-radius: max(0px, calc(var(--hero-r-outer) - var(--hero-frame)));
    box-shadow: none;
    transform: scaleX(var(--hero-img-scale-x));
    transform-origin: center center;
}

@media (max-width: 768px) {
    .hero-book {
        width: 100%;
    }
}

.book-cover {
    width: 400px;
    height: 300px;
    background: linear-gradient(145deg, #ede9fe, var(--brand-blush), var(--brand-gold-bright));
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(58, 36, 68, 0.18), 0 0 0 1px rgba(201, 162, 39, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.book-cover img {
    width: 100%;
    height: 100%;
}

.book-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
}

.book-author {
    font-size: 0.9rem;
    color: #666;
}

.book-pages {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: white;
    border-radius: 8px;
    z-index: 1;
}

@keyframes bookFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Titles */
.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(45deg, var(--kids-coral), var(--kids-sun));
    border-radius: 2px;
}

.section-title--left {
    text-align: left;
}

.section-title--left:after {
    left: 0;
    transform: none;
}

.section-title--on-dark {
    color: #fef3c7;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.section-title--on-dark:after {
    background: linear-gradient(90deg, transparent, var(--brand-gold-bright), var(--brand-gold), var(--brand-gold-bright), transparent);
    box-shadow: 0 0 20px rgba(249, 250, 196, 0.25);
}

.section-lead {
    text-align: center;
    font-size: 1.1rem;
    max-width: 36rem;
    margin: -2rem auto 2.75rem;
    line-height: 1.55;
    color: #5c4d6a;
}

.section-lead--on-dark {
    color: rgba(245, 240, 255, 0.85);
    margin-top: -1.5rem;
}

.section-lead--playful {
    color: #444;
    font-weight: 600;
}

.wave-bridge {
    color: #ffe4ec;
    line-height: 0;
    display: block;
    margin-top: -1px;
}

.section-wave {
    display: block;
    width: 100%;
    height: clamp(36px, 6vw, 64px);
}

/* Featured Book Section */
.featured-book {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(201, 162, 39, 0.12);
    border-bottom: 1px solid rgba(201, 162, 39, 0.1);
}

/* Featured band: sunny rainbow paper — bold & kid-friendly in light mode */
.featured-book--playful {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 245, 250, 0.92) 100%),
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(255, 235, 120, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 30%, rgba(201, 201, 255, 0.45) 0%, transparent 50%),
        radial-gradient(ellipse 60% 45% at 50% 100%, rgba(168, 237, 234, 0.4) 0%, transparent 55%),
        linear-gradient(145deg, #fff9fb 0%, #fff3e0 35%, #f3e5ff 70%, #e8faf9 100%);
    border-top: 6px solid var(--kids-sun);
    border-bottom: 3px solid rgba(168, 237, 234, 0.65);
    position: relative;
    overflow: hidden;
}

.featured-book--playful::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Ctext x='10' y='35' font-size='22'%3E✨%3C/text%3E%3Ctext x='45' y='65' font-size='18'%3E⭐%3C/text%3E%3C/svg%3E") repeat;
    opacity: 0.09;
    pointer-events: none;
}

.featured-book--playful .container {
    position: relative;
    z-index: 1;
}

.featured-book--playful .book-showcase {
    gap: clamp(2rem, 4vw, 3.5rem);
    grid-template-columns: 0.95fr 1.05fr;
}

.featured-book--playful .book-details h3 {
    color: #2d2a32;
}

.featured-book--playful .book-description {
    color: #444;
}

.featured-book--playful .book-title-large {
    color: #333;
}

.featured-book--playful .book-author-large {
    color: #666;
}

.featured-book--playful .book-price {
    color: var(--kids-coral);
}

.featured-book--playful .book-cover-large {
    background: linear-gradient(145deg, #fff 0%, #fff7fb 100%);
    border: 4px solid #fff;
    box-shadow:
        0 8px 0 rgba(255, 107, 107, 0.15),
        0 20px 40px rgba(255, 154, 158, 0.25),
        0 0 0 3px rgba(255, 193, 132, 0.35);
}

.featured-book--playful .feature {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 243, 250, 0.9));
    border: 2px dashed rgba(255, 107, 107, 0.35);
    color: #444;
    border-radius: 12px;
}

.featured-book--playful .carousel-btn {
    background: #fff;
    color: var(--kids-coral);
    border: 2px solid var(--kids-coral);
    box-shadow: 0 6px 18px rgba(255, 107, 107, 0.2);
}

.featured-book--playful .carousel-btn:hover {
    background: linear-gradient(45deg, var(--kids-coral), var(--kids-sun));
    color: #fff;
    border-color: transparent;
}

.featured-book--playful .carousel-dot {
    background: rgba(255, 107, 107, 0.25);
}

.featured-book--playful .carousel-dot.active {
    background: linear-gradient(45deg, var(--kids-coral), var(--kids-sun));
    transform: scale(1.25);
}

.featured-book--playful .view-all-books .btn-outline {
    color: var(--kids-coral);
    border-color: var(--kids-sun);
    background: rgba(255, 255, 255, 0.85);
    font-weight: 700;
}

.featured-book--playful .view-all-books .btn-outline:hover {
    background: linear-gradient(45deg, var(--kids-lilac), var(--kids-mint));
    border-color: transparent;
    color: #333;
}

.book-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 600px; /* Force consistent size to stop arrows from jumping */
}

.book-image {
    display: flex;
    justify-content: center;
}

.book-cover-large {
    width: min(100%, 320px);
    min-height: 440px;
    height: auto;
    background: linear-gradient(145deg, #ff9a9e, #fecfef, #c9c9ff);
    border-radius: 18px;
    box-shadow: 0 16px 44px rgba(255, 107, 107, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    text-align: center;
    padding: 0 !important;
    position: relative;
    overflow: hidden;
}

/* One full “book front” tile: crop wide spreads to the art side (no empty white half-page) */
.cover-art {
    width: 100%;
    flex: 1 1 auto;
    min-height: 280px;
    position: relative;
    margin-bottom: 14px;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    display: grid;
    align-items: stretch;
    justify-items: stretch;
}

.cover-art img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: fill; /* Revert to fill for light mode carousel */
    object-position: center;
    display: block;
    min-height: 280px;
}

.cloud-painting {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #87ceeb, #e0f6ff);
    border-radius: 10px;
    overflow: hidden;
}

.cloud-art-1,
.cloud-art-2,
.cloud-art-3 {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    animation: cloudDrift 6s ease-in-out infinite;
}

.cloud-art-1 {
    width: 60px;
    height: 30px;
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.cloud-art-2 {
    width: 80px;
    height: 40px;
    top: 40px;
    right: 30px;
    animation-delay: 2s;
}

.cloud-art-3 {
    width: 50px;
    height: 25px;
    top: 60px;
    left: 50px;
    animation-delay: 4s;
}

.paintbrush {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    animation: brushMove 3s ease-in-out infinite;
}

@keyframes cloudDrift {

    0%,
    100% {
        transform: translateX(0px);
    }

    50% {
        transform: translateX(10px);
    }
}

@keyframes brushMove {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.book-title-large {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.book-author-large {
    font-size: 1rem;
    color: #666;
}

.book-details h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

.book-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 1.5rem;
}

.book-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature {
    background: rgba(255, 107, 107, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ff6b6b;
    font-weight: 500;
}

.book-price {
    font-size: 2rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 1.5rem;
}

.book-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Books Collection */
.books-collection {
    padding: 80px 0;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.book-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
}

.book-cover-small {
    width: 150px;
    height: 200px;
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    border-radius: 10px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cloud-painting-small {
    position: relative;
    width: 80%;
    height: 60%;
    background: linear-gradient(to bottom, #87ceeb, #e0f6ff);
    border-radius: 8px;
}

.cloud-small-1,
.cloud-small-2 {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
}

.cloud-small-1 {
    width: 30px;
    height: 15px;
    top: 10px;
    left: 10px;
}

.cloud-small-2 {
    width: 40px;
    height: 20px;
    top: 20px;
    right: 10px;
}

.coming-soon {
    opacity: 0.7;
}

.coming-soon-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.book-card h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.book-price-small {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

/* About Section */
.about {
    padding: 80px 0;
    background: #faf6f0;
    border-top: 1px solid rgba(201, 162, 39, 0.12);
}

.about--editorial {
    background: linear-gradient(180deg, #faf7f2 0%, #f3ecfc 100%);
}

.about-editorial-grid {
    display: grid;
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.about-sidebar {
    position: sticky;
    top: 7rem;
    padding-top: 0.5rem;
}

.about-crest {
    display: block;
    font-size: 1.75rem;
    color: var(--brand-gold);
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 0 18px rgba(201, 162, 39, 0.35);
}

.about-pullquote {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-style: italic;
    font-weight: 600;
    color: var(--brand-plum);
    line-height: 1.35;
    margin-bottom: 1.25rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

.author-illustration {
    text-align: center;
}

.author-avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.author-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #333;
}

/* Contact Section */
.contact {
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    font-size: 1rem;
    color: #666;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--kids-pink) 0%, var(--kids-blush) 25%, var(--kids-lilac) 50%, var(--kids-mint) 75%, var(--kids-pink) 100%);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    color: #333;
    padding: 40px 0 20px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 252, 248, 0.78);
    backdrop-filter: blur(12px);
    z-index: 1;
}

.footer-content,
.footer-bottom {
    position: relative;
    z-index: 2;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
}

.footer-logo p {
    color: #6b5a7a;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: #ff6b6b;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid rgba(255, 107, 107, 0.3);
    color: #666;
    font-weight: 500;
}

/* Cart Styles */
.cart-icon {
    position: fixed;
    top: 30px;
    right: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    padding: 12px 16px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    z-index: 1001;
    font-weight: 600;
    transition: transform 0.3s ease;
    display: block !important;
    visibility: visible !important;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    backdrop-filter: blur(5px);
}

.cart-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.cart-header h3 {
    font-family: var(--font-display);
    color: #333;
    margin: 0;
}

.close-cart {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-cart:hover {
    color: #ff6b6b;
}

.cart-items {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    font-family: var(--font-display);
    color: #333;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.item-info p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f8f8;
    border-radius: 20px;
    padding: 5px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    font-size: 16px;
}

.qty-btn:hover {
    transform: scale(1.1);
}

.qty-btn:active {
    transform: scale(0.95);
}

.quantity {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.item-price {
    font-weight: 600;
    color: #ff6b6b;
    font-size: 1.1rem;
    min-width: 60px;
    text-align: right;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: #999;
}

.remove-btn:hover {
    background: #ffebee;
    color: #ff6b6b;
    transform: scale(1.1);
}

.cart-total {
    padding: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-cart p {
    font-size: 1.1rem;
    margin: 0;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #32cd32, #00bfff);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.3);
    z-index: 1003;
    font-weight: 600;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Theme Switch */
.theme-switch-container {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.theme-switch {
    display: inline-block;
    height: 28px;
    position: relative;
    width: 54px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: rgba(0, 0, 0, 0.1);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-radius: 34px;
}

.slider i {
    font-size: 10px;
    color: #ffd700;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    background-color: #fff;
    bottom: 3px;
    content: "";
    height: 22px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 22px;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--brand-plum);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

body.dark-theme .slider {
    background-color: #4a4a4a;
}

/* Dark Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    padding: 12px 16px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    z-index: 1001;
    font-weight: 600;
    transition: transform 0.3s ease;
    font-size: 18px;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Dark Theme Styles */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #e94560 100%);
    color: #e0e0e0;
}

body.dark-theme .magical-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #e94560 100%);
}

body.dark-theme .cloud {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

body.dark-theme .rainbow-1 {
    border-top-color: #ff6b6b;
    border-right-color: #ffa500;
    border-bottom-color: #ffff00;
    border-left-color: #32cd32;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
}

body.dark-theme .rainbow-2 {
    border-top-color: #32cd32;
    border-right-color: #00bfff;
    border-bottom-color: #8a2be2;
    border-left-color: #ff69b4;
    box-shadow: 0 0 30px rgba(50, 205, 50, 0.5);
}

body.dark-theme .sparkle {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

body.dark-theme .header {
    background: linear-gradient(145deg, rgba(32, 26, 52, 0.96) 0%, rgba(18, 14, 32, 0.98) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(201, 162, 39, 0.28);
    top: 1rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(1120px, calc(100% - 2rem));
    border-radius: 25px;
}

body.dark-theme .logo h1 {
    background: linear-gradient(45deg, var(--kids-coral), var(--kids-sun), var(--kids-lemon), #32cd32, #00bfff, #8a2be2);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowText 4s ease-in-out infinite;
}

body.dark-theme .tagline {
    color: #a8a0c4;
}

body.dark-theme .nav-links a {
    color: #e8e4f0;
    font-weight: 600;
}

body.dark-theme .brand-title a {
    color: inherit;
}

body.dark-theme .nav-links a:hover {
    color: #fde68a;
}

body.dark-theme .nav-links a:after {
    background: linear-gradient(90deg, rgba(253, 224, 71, 0.35), rgba(251, 191, 36, 0.55));
}

body.dark-theme .hero-title {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

body.dark-theme .hero-subtitle {
    color: #c0c0c0;
}

body.dark-theme .hero-copy-block {
    background: linear-gradient(145deg, rgba(35, 28, 52, 0.92), rgba(24, 18, 38, 0.88));
    border-color: rgba(201, 162, 39, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark-theme .hero-kicker {
    color: #c4b5fd;
}

body.dark-theme .hero-caption {
    color: #a8a29e;
}

body.dark-theme .wave-bridge {
    color: #2d2640;
}

body.dark-theme .footer {
    background: #1a1a2e;
    border-top-color: rgba(255, 107, 107, 0.2);
}

body.dark-theme .footer-logo h3 {
    color: #ffffff;
}

body.dark-theme .footer-logo p {
    color: #bbbbbb;
}

body.dark-theme .footer-links a {
    color: #cccccc;
}

body.dark-theme .footer-bottom {
    color: #888888;
    border-top-color: rgba(255, 107, 107, 0.1);
}

body.dark-theme .featured-book--playful {
    background: linear-gradient(145deg, #2a2038 0%, #3d2f4d 50%, #254d52 100%);
    border-top-color: var(--kids-sun);
    border-bottom-color: rgba(168, 237, 234, 0.35);
}

body.dark-theme .featured-book--playful .book-details h3,
body.dark-theme .featured-book--playful .book-title-large {
    color: #fff;
}

body.dark-theme .featured-book--playful .book-description,
body.dark-theme .featured-book--playful .book-author-large {
    color: #e7e2f0;
}

body.dark-theme .featured-book--playful .section-lead--playful {
    color: #d8d4e8;
}

body.dark-theme .featured-book--playful .book-cover-large {
    background: linear-gradient(145deg, #3d3550, #2a2438);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

body.dark-theme .featured-book--playful .feature {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 193, 132, 0.35);
    color: #eee;
}

body.dark-theme .featured-book--playful .carousel-btn {
    background: rgba(40, 35, 55, 0.9);
    color: var(--kids-sun);
    border-color: var(--kids-sun);
}

body.dark-theme .featured-book--playful .carousel-dot {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-theme .featured-book--playful .carousel-dot.active {
    background: linear-gradient(45deg, var(--kids-coral), var(--kids-sun));
}

body.dark-theme .featured-book--playful .view-all-books .btn-outline {
    color: var(--kids-lemon);
    border-color: var(--kids-sun);
    background: rgba(0, 0, 0, 0.2);
}

body.dark-theme .about--editorial {
    background: linear-gradient(180deg, #1c1828 0%, #241834 100%);
    border-top-color: rgba(201, 162, 39, 0.15);
}

body.dark-theme .about-pullquote {
    color: #fef3c7;
}

body.dark-theme .about-sidebar-note {
    color: #a8a29e;
}

body.dark-theme .about-copy .section-title {
    color: #fff;
}

body.dark-theme .about-text p {
    color: #d4d4d8;
}

/* Hero — dark: soft dusk tones (no hot magenta/rust); gentle motion. */
body.dark-theme .hero-book .book-cover {
    display: grid !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    padding: var(--hero-frame) !important;
    background: linear-gradient(
        125deg,
        #2f2a42 0%,
        #3a3d58 22%,
        #354a58 42%,
        #3a4550 62%,
        #383a52 82%,
        #2f2a42 100%
    ) !important;
    background-size: 180% 180% !important;
    animation: heroCoverGradient 22s ease-in-out infinite;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
}

body.dark-theme .hero-book .book-cover img {
    object-fit: fill !important;
    box-shadow: none;
}

body.dark-theme .book-cover-large,
body.dark-theme .book-cover-small,
body.dark-theme .cover-art {
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body.dark-theme .book-cover-large img,
body.dark-theme .book-cover-small img,
body.dark-theme .cover-art img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

body.dark-theme .book-cover-large {
    background: #1a1a2e;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 0 !important; /* Ensure no gaps in dark mode */
}

body.dark-theme .book-cover-large img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important; /* Stretch to touch top and bottom */
}

body.dark-theme .book-cover-large .cover-art {
    flex: 1;
    width: 100%;
    height: auto;
}

body.dark-theme .book-cover-large-detail {
    padding: 0 !important;
    background: #1a1a2e;
}

body.dark-theme .book-cover-large-detail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important; /* Touch top and bottom */
}

body.dark-theme .book-cover-small {
    background: linear-gradient(135deg, #2d1b69, #11998e, #38ef7d);
}

body.dark-theme .cloud-painting {
    background: linear-gradient(to bottom, #1e3c72, #2a5298);
}

body.dark-theme .cloud-art-1,
body.dark-theme .cloud-art-2,
body.dark-theme .cloud-art-3 {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

body.dark-theme .book-title-large {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    font-weight: 700;
    padding: 0 1rem;
    margin-top: 0.5rem;
}

body.dark-theme .book-author-large {
    color: #e0e0e0;
    font-size: 0.9rem;
    padding: 0 1rem 1rem;
}

body.dark-theme .book-title {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

body.dark-theme .book-author {
    color: #b0b0b0;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

body.dark-theme .book-details h3 {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

body.dark-theme .book-description {
    color: #d0d0d0;
}

body.dark-theme .book-price {
    color: #fb7185;
    text-shadow: 0 0 12px rgba(244, 114, 182, 0.45);
}

body.dark-theme .featured-book {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
}

body.dark-theme .about {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
}

body.dark-theme .section-title {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

body.dark-theme .about-text p {
    color: #d0d0d0;
}

body.dark-theme .book-card {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .book-card h4 {
    color: #ffffff;
}

body.dark-theme .book-price-small {
    color: #fb7185;
}

body.dark-theme .footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #e94560 100%);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    color: #e0e0e0;
}

body.dark-theme .footer::before {
    background: rgba(0, 0, 0, 0.3);
}

body.dark-theme .footer-links a {
    color: #b0b0b0;
}

body.dark-theme .footer-links a:hover {
    color: var(--brand-gold-bright);
}

body.dark-theme .footer-bottom {
    color: #a0a0a0;
    border-top: 2px solid rgba(212, 175, 55, 0.35);
}

body.dark-theme .cart-modal {
    background: rgba(0, 0, 0, 0.8);
}

body.dark-theme .cart-content {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .cart-header h3 {
    color: #ffffff;
}

body.dark-theme .cart-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .item-info h4 {
    color: #ffffff;
}

body.dark-theme .item-info p {
    color: #b0b0b0;
}

body.dark-theme .item-price {
    color: #ff6b6b;
}

body.dark-theme .total-amount {
    color: #ffffff;
}

body.dark-theme .empty-cart p {
    color: #a0a0a0;
}

body.dark-theme .success-message {
    background: linear-gradient(45deg, #32cd32, #00bfff);
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.4);
}

body.dark-theme .btn-outline {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ddd;
}

body.dark-theme .btn-outline:hover {
    background: #f0f0f0;
    color: #666;
    border-color: #ccc;
}

/* Checkout Page Styles */
.checkout-section {
    padding: 120px 0 80px;
    min-height: 100vh;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.order-summary {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.order-summary h3 {
    font-family: var(--font-display);
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item h4 {
    font-family: var(--font-display);
    color: #333;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.order-item p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.order-item .item-price {
    font-weight: 600;
    color: #ff6b6b;
    font-size: 1.1rem;
}

.order-totals {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.total-final {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #ff6b6b;
}

.checkout-form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.checkout-form h3 {
    font-family: var(--font-display);
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'Quicksand', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}


.coupon-section {
    margin-bottom: 1.5rem;
}

.coupon-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.coupon-section input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'Quicksand', sans-serif;
}

.coupon-section input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Flex container for input + button */
.coupon-input-group {
    display: flex;
    gap: 0.5rem;
    /* space between input and button */
}

/* Make input fill available space */
.coupon-input-group input {
    flex: 1;
    /* input takes remaining space */
}

.checkout-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1rem;
}

/* Success Modal */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.success-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: successPop 0.5s ease-out;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

.success-content h3 {
    font-family: var(--font-display);
    color: #333;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.success-content p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

@keyframes successPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Dark Theme for Checkout */
body.dark-theme .order-summary {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .checkout-form {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .order-summary h3,
body.dark-theme .checkout-form h3 {
    color: #ffffff;
}

body.dark-theme .order-item h4 {
    color: #ffffff;
}

body.dark-theme .order-item p {
    color: #b0b0b0;
}

body.dark-theme .total-final {
    color: #ffffff;
}

body.dark-theme .form-group label {
    color: #ffffff;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea,
body.dark-theme .form-group select {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.dark-theme .form-group input:focus,
body.dark-theme .form-group textarea:focus,
body.dark-theme .form-group select:focus {
    border-color: #ff6b6b;
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme .coupon-section label {
    color: #ffffff;
}

body.dark-theme .coupon-section input,
body.dark-theme .coupon-section textarea {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.dark-theme .coupon-section input:focus,
body.dark-theme .coupon-section textarea:focus {
    border-color: #ff6b6b;
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme .success-content {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .success-content h3 {
    color: #ffffff;
}

body.dark-theme .success-content p {
    color: #d0d0d0;
}

/* Checkout Responsive */
@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Signup/Login Modal Styles */
.btn-signup {
    background: linear-gradient(45deg, #32cd32, #00bfff);
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-weight: 600;
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.3);
}

.signup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.signup-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalPop 0.3s ease-out;
}

.signup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.signup-header h3 {
    font-family: var(--font-display);
    color: #333;
    margin: 0;
    font-size: 1.5rem;
}

.close-signup {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-signup:hover {
    color: #ff6b6b;
}

.signup-form .form-group {
    margin-bottom: 1.5rem;
}

.signup-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.signup-form input[type="email"],
.signup-form input[type="text"],
.signup-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'Quicksand', sans-serif;
}

.signup-form input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.signup-form input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.signup-login {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.signup-login a {
    color: #ff6b6b;
    text-decoration: none;
    font-weight: 600;
}

.signup-login a:hover {
    text-decoration: underline;
}

@keyframes modalPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dark Theme for Signup/Login */
body.dark-theme .signup-content {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .signup-header h3 {
    color: #ffffff;
}

body.dark-theme .signup-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .signup-form label {
    color: #ffffff;
}

body.dark-theme .signup-form input[type="email"],
body.dark-theme .signup-form input[type="text"],
body.dark-theme .signup-form input[type="password"] {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.dark-theme .signup-form input:focus {
    border-color: #ff6b6b;
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme .signup-login {
    color: #b0b0b0;
}

body.dark-theme .signup-login a {
    color: #ff6b6b;
}

/* New Book Cover Styles */
.adventure-painting-small {
    position: relative;
    width: 80%;
    height: 60%;
    background: linear-gradient(to bottom, #ff9a9e, #fecfef, #a8edea);
    border-radius: 8px;
}

.mountain {
    position: absolute;
    background: #8B4513;
    border-radius: 50% 50% 0 0;
}

.mountain-1 {
    width: 40px;
    height: 25px;
    bottom: 10px;
    left: 10px;
    transform: rotate(-10deg);
}

.mountain-2 {
    width: 35px;
    height: 20px;
    bottom: 10px;
    right: 15px;
    transform: rotate(10deg);
}

.star {
    position: absolute;
    font-size: 12px;
    animation: twinkle 2s ease-in-out infinite;
}

.star-1 {
    top: 15px;
    left: 20px;
    animation-delay: 0s;
}

.star-2 {
    top: 25px;
    right: 20px;
    animation-delay: 1s;
}

.dragon-painting-small {
    position: relative;
    width: 80%;
    height: 60%;
    background: linear-gradient(to bottom, #ff6b6b, #ffa500, #ffd700);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dragon {
    position: absolute;
    font-size: 16px;
    animation: dragonFloat 3s ease-in-out infinite;
}

.dragon-1 {
    top: 15px;
    left: 15px;
    animation-delay: 0s;
}

.dragon-2 {
    bottom: 15px;
    right: 15px;
    animation-delay: 1.5s;
}

.fire {
    position: absolute;
    font-size: 12px;
    animation: fireFlicker 1s ease-in-out infinite;
}

.fire-1 {
    top: 20px;
    right: 10px;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes dragonFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-5px) rotate(5deg);
    }
}

@keyframes fireFlicker {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Dark Theme for New Books */
body.dark-theme .adventure-painting-small {
    background: linear-gradient(to bottom, #2d1b69, #11998e, #38ef7d);
}

body.dark-theme .mountain {
    background: #654321;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.5);
}

body.dark-theme .star {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

body.dark-theme .dragon-painting-small {
    background: linear-gradient(to bottom, #8B0000, #FF4500, #FFD700);
}

body.dark-theme .dragon {
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
}

body.dark-theme .fire {
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.8);
}

/* Books Carousel */
.books-carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.carousel-container {
    overflow: hidden;
    padding: 30px 0;
    margin: -30px 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    display: none;
}

.carousel-item.active {
    display: block;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.carousel-btn:hover {
    background: rgba(255, 107, 107, 0.9);
    color: white;
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn::before {
    content: '❯';
    font-size: 22px;
}

.carousel-btn.prev::before {
    content: '❮';
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #ff6b6b;
    transform: scale(1.2);
}

.view-all-books {
    text-align: center;
    margin-top: 30px;
}

/* Book Details Page */
.book-details-section {
    padding: 120px 0 80px;
    min-height: 80vh;
}

.book-detail-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.book-detail-cover {
    display: flex;
    justify-content: center;
}

.book-cover-large-detail {
    width: 350px;
    height: 350px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 !important;
    position: relative;
    overflow: hidden;
}

.book-cover-large-detail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Revert to cover for light mode details */
}

.book-detail-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.book-detail-author {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.book-detail-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 2rem;
}

.book-detail-summary,
.book-detail-about {
    margin-bottom: 2rem;
}

.book-detail-summary h3,
.book-detail-about h3 {
    font-family: var(--font-display);
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.book-detail-summary p,
.book-detail-about p {
    color: #666;
    line-height: 1.6;
    font-size: 1.1rem;
}

.book-detail-features h3 {
    font-family: var(--font-display);
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.feature-tag {
    background: rgba(255, 107, 107, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ff6b6b;
    font-weight: 500;
    text-align: center;
}

.book-detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* All Books List */
.all-books-section {
    padding: 120px 0 80px;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.all-books-header {
    text-align: center;
    margin-bottom: 3rem;
}

.all-books-title {
    font-family: var(--font-display);
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
}

.all-books-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.back-to-home {
    margin-top: 1rem;
}

.all-books-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.book-list-item {
    display: flex;
    gap: 2rem;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.book-list-item:hover {
    transform: translateY(-5px);
}

.book-list-cover {
    cursor: pointer;
    flex-shrink: 0;
}

.book-list-title {
    cursor: pointer;
    transition: color 0.3s ease;
}

.book-list-title:hover {
    color: #ff6b6b;
}

.book-list-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.book-cover-small-list {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.book-cover-small-list img {
    width: 100%;
    height: 100%;
}

.book-list-info {
    flex: 1;
}

.book-list-title {
    font-family: var(--font-display);
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.book-list-author {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.book-list-summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.book-list-details {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.book-list-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff6b6b;
}

.book-list-category {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Unicorn Cover Styles */
.unicorn-painting-small {
    position: relative;
    width: 80%;
    height: 60%;
    background: linear-gradient(to bottom, #ff9a9e, #fecfef, #e0f6ff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unicorn {
    position: absolute;
    font-size: 16px;
    animation: unicornFloat 4s ease-in-out infinite;
}

.unicorn-1 {
    top: 15px;
    left: 15px;
    animation-delay: 0s;
}

.unicorn-2 {
    bottom: 15px;
    right: 15px;
    animation-delay: 2s;
}

@keyframes unicornFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(3deg);
    }
}

/* Cover Art Styles for Details Page */
.cloud-cover {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.adventure-cover {
    background: linear-gradient(135deg, #2d1b69, #11998e, #38ef7d);
}

.dragon-cover {
    background: linear-gradient(135deg, #ff6b6b, #ffa500, #ffd700);
}

.unicorn-cover {
    background: linear-gradient(135deg, #ff9a9e, #fecfef, #e0f6ff);
}

/* Dark Theme for New Elements */
body.dark-theme .all-books-section {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
}

body.dark-theme .all-books-title {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

body.dark-theme .all-books-subtitle {
    color: #d0d0d0;
}

body.dark-theme .book-detail-card {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .book-detail-title {
    color: #ffffff;
}

body.dark-theme .book-detail-summary h3,
body.dark-theme .book-detail-about h3,
body.dark-theme .book-detail-features h3 {
    color: #ffffff;
}

body.dark-theme .book-detail-summary p,
body.dark-theme .book-detail-about p {
    color: #d0d0d0;
}

body.dark-theme .book-list-item {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .book-list-title {
    color: #ffffff;
}

body.dark-theme .book-list-title:hover {
    color: #ff6b6b;
}

body.dark-theme .book-list-author,
body.dark-theme .book-list-summary {
    color: #b0b0b0;
}

body.dark-theme .unicorn-painting-small {
    background: linear-gradient(to bottom, #2d1b69, #11998e, #e0f6ff);
}

body.dark-theme .unicorn {
    text-shadow: 0 0 15px rgba(255, 182, 193, 0.6);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        gap: 0.5rem;
        padding-top: 0;
    }

    .nav-links.open {
        max-height: 300px;
        padding-top: 1rem;
    }

    .nav-links li {
        padding: 0.5rem 0;
    }

    .hero-landing__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-copy-block {
        text-align: center;
    }

    .hero-ornament {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-book.magical-book {
        animation: heroBookTiltFloatMobile 5s ease-in-out infinite;
    }

    .section-title--left {
        text-align: center;
    }

    .section-title--left:after {
        left: 50%;
        transform: translateX(-50%);
    }

    .about-editorial-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-sidebar {
        position: static;
        text-align: center;
        max-width: 28rem;
        margin: 0 auto;
    }

    .about-text {
        text-align: center;
    }

    .featured-book--playful .book-showcase {
        grid-template-columns: 1fr;
    }

    .book-showcase {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .book-list-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .book-list-details,
    .book-list-actions {
        justify-content: center;
    }

    .carousel-controls {
        top: 25%;
    }

    .book-detail-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .book-cover-large-detail {
        width: 100%;
        max-width: 350px;
        height: auto;
        aspect-ratio: 1;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .brand-title {
        font-size: 1.15rem;
    }

    .tagline {
        display: none;
    }
}

/* Reviews Section */
.reviews-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 50%, #f0e8ff 100%);
    position: relative;
    overflow: hidden;
}

.reviews-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffd700" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23stars)"/></svg>');
    opacity: 0.1;
    pointer-events: none;
}

.reviews-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.review-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    border-radius: 20px;
    padding: 2px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.review-stars {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: gold;
    margin-right: 2px;
}

.review-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-style: italic;
    text-align: center;
}

.review-author {
    font-weight: 600;
    color: #7f8c8d;
    text-align: center;
    font-size: 0.9rem;
}

.reviews-summary {
    text-align: center;
    position: relative;
    z-index: 1;
}

.average-rating {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.rating-stars {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: gold;
    margin-right: 2px;
}

.rating-count {
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 500;
}

/* Dark Theme for Reviews */
body.dark-theme .reviews-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

body.dark-theme .reviews-title {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

body.dark-theme .review-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

body.dark-theme .review-text {
    color: #ffffff;
}

body.dark-theme .review-author {
    color: #b0b0b0;
}

body.dark-theme .average-rating {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

body.dark-theme .rating-number {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

body.dark-theme .rating-count {
    color: #b0b0b0;
}

/* Checkout Header */
.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-to-cart {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    background: transparent;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-cart:hover {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Dark Theme for Back to Cart */
body.dark-theme .back-to-cart {
    border-color: #ffd700;
    color: #ffd700;
}

body.dark-theme .back-to-cart:hover {
    background: #ffd700;
    color: #1a1a2e;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Responsive Checkout Header */
@media (max-width: 768px) {
    .checkout-header {
        flex-direction: column;
        text-align: center;
    }

    .back-to-cart {
        align-self: center;
    }
}

/* Stripe Card Element wrapper */
.StripeElement {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Stripe Element Focus */
.StripeElement--focus {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Invalid input */
.StripeElement--invalid {
    border-color: #fa755a !important;
}

/* Dark mode */
body.dark-theme .StripeElement {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.dark-theme .StripeElement--focus {
    border-color: #ff6b6b !important;
    background: rgba(255, 255, 255, 0.15);
}

.card-error-box {
    display: none;
    padding-top: 2px;
    color: #b50000;
    font-weight: 600;
    font-size: 0.95rem;
}

.review-product-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.review-product-image {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reviews Page Styles */
.reviews-page-section {
    padding: 120px 0 80px 0;
    min-height: 80vh;
    position: relative;
}

.reviews-page-header {
    margin-bottom: 4rem;
    margin-top: 2rem;
}

.reviews-book-info {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.reviews-book-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    border-radius: 25px;
    padding: 2px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

.reviews-book-cover {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-cover-large-reviews {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.book-cover-large-reviews:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.05);
}

.book-cover-large-reviews img {
    height: 100%;
    width: 100%;
}

.reviews-book-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reviews-book-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reviews-book-author {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
    font-weight: 500;
}

.reviews-summary-header {
    margin: 1rem 0;
}

.average-rating-large {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.rating-number-large {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.rating-stars-large {
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

.rating-count-large {
    color: #7f8c8d;
    font-size: 1.1rem;
    font-weight: 500;
}

.reviews-page-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.reviews-list-section {
    margin-top: 3rem;
}

.reviews-list-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reviews-list-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-card-detailed {
    background: rgba(255, 255, 255, 0.9);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.review-card-detailed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    border-radius: 20px;
    padding: 2px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

.review-card-detailed:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.review-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.review-author-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
}

.review-author-role {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}

.review-rating-display {
    display: flex;
    align-items: center;
}

.review-stars-detailed {
    font-size: 1.5rem;
}

.review-text-detailed {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #2c3e50;
    font-style: italic;
    padding: 1rem 0;
}

.no-reviews {
    text-align: center;
    font-size: 1.3rem;
    color: #7f8c8d;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Dark Theme for Reviews Page */
body.dark-theme .reviews-page-section {
    background: transparent;
}

body.dark-theme .reviews-book-info {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

body.dark-theme .reviews-book-title {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

body.dark-theme .reviews-book-author {
    color: #b0b0b0;
}

body.dark-theme .rating-number-large {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

body.dark-theme .rating-count-large {
    color: #b0b0b0;
}

body.dark-theme .reviews-list-title {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

body.dark-theme .review-card-detailed {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

body.dark-theme .review-author-name {
    color: #ffffff;
}

body.dark-theme .review-author-role {
    color: #b0b0b0;
}

body.dark-theme .review-text-detailed {
    color: #ffffff;
}

body.dark-theme .no-reviews {
    background: rgba(255, 255, 255, 0.1);
    color: #b0b0b0;
}

/* Responsive Reviews Page */
@media (max-width: 968px) {
    .reviews-page-section {
        padding: 100px 0 60px 0;
    }

    .reviews-book-info {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem;
    }

    .reviews-book-cover {
        justify-content: center;
    }

    .average-rating-large {
        align-items: center;
    }

    .reviews-page-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .reviews-book-title {
        font-size: 2rem;
    }

    .rating-number-large {
        font-size: 2.5rem;
    }

    .review-card-detailed {
        padding: 1.5rem;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Review Input Page */
.star-rating {
    display: flex;
    gap: 8px;
    font-size: 32px;
    cursor: pointer;
}

.star {
    color: #ccc;
    transition: color 0.2s ease;
}

.star.selected {
    color: #ffc107;
    /* gold */
}

.rating-message {
    color: #dc3545;
    margin-top: 5px;
    font-size: 14px;
}

.rating-card-container {
    margin-bottom: 20px;
    margin-top: 10px;
}

.rating-cards {
    display: flex;
    justify-content: center;
    /* centers all cards horizontally */
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.rating-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    width: 150px;
    text-align: center;
    background: #fafafa;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.rating-card:hover {
    border-color: #ffcc42;
    background: #fff7e5;
}

.rating-card.selected {
    border-color: #ffc107;
    background: #ffe9b5;
}

.rating-card-stars {
    font-size: 1.4rem;
    color: #ffca2c;
    margin-bottom: 4px;
}

body.dark-theme .rating-card {
    border: 1px solid #444;
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    width: 150px;
    text-align: center;
    background: #2a2a2a;
    transition: all 0.2s ease;
    color: #eaeaea;
}

body.dark-theme .rating-card:hover {
    border-color: #ffca2c;
    background: #3a2f15;
    /* dark golden-brown */
    box-shadow: 0 0 6px rgba(255, 200, 80, 0.25);
}

body.dark-theme .rating-card.selected {
    border-color: #ffca2c;
    background: #4a3b1a;
    /* deeper dark gold-brown */
    box-shadow: 0 0 8px rgba(255, 200, 80, 0.3);
    color: #fff;
}

body.dark-theme .rating-card-stars {
    color: #ffca2c;
    /* gold */
}

.review-header-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    margin-top: 10px;
}


.review-product-image {
    height: 130px;
    width: auto;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    padding: 4px;
}

.review-product-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
}

.reviewing-label {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.review-product-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    /* prevents breaking layout */
}

/* Dark theme */
body.dark-theme .review-header-box {
    background: #1f1f1f;
    border-left-color: #ffca2c;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

body.dark-theme .reviewing-label {
    color: #c1c1c1;
}

body.dark-theme .review-product-title {
    color: #f7f7f7;
}

/* Carousel wrapper inside container */
.reviews-carousel-wrapper {
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
}

/* Track containing all cards */
.reviews-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

/* Each review card */
.review-card {
    flex: 0 0 calc((100% - 40px) / 3);
    /* 3 cards with 20px gap */
    box-sizing: border-box;
}


/* Responsive */
@media (max-width: 900px) {
    .review-card {
        flex: 0 0 calc((100% - 20px) / 2);
    }

    /* 2 cards */
}

@media (max-width: 600px) {
    .review-card {
        flex: 0 0 100%;
    }

    /* 1 card */
}


.reviews-carousel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviews-viewport {
    overflow: hidden;
    width: 100%;
}

.reviews-container {
    display: flex;
    gap: 16px;
    transition: transform 0.4s ease;
}

.review-card {
    min-width: calc(33.333% - 11px);
    /* 3 visible */
    flex-shrink: 0;
}

.no-reviews-state {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.no-reviews-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.no-reviews-state h3 {
    margin-bottom: 10px;
    font-weight: 600;
}

.no-reviews-state p {
    margin-bottom: 20px;
    color: #666;
}

.dark-theme .no-reviews-state {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.dark-theme .no-reviews-state p {
    color: #bbb;
}

.brand-title a {
    text-decoration: none;
    color: inherit;
}

.brand-title a:hover {
    text-decoration: none;
}

.temp-warning {
    color: #d60000;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 18px;
}

.shipping-loading {
    color: #b0b0b0;
    font-style: italic;
    font-size: 0.9em;
}

@keyframes shippingDots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.shipping-loading::after {
    content: '';
    animation: shippingDots 1.4s infinite;
}