/*
 * Cozy Nest Books - Main Stylesheet
 */

/* 1. CSS Variables
-------------------------------------------------- */
:root {
	--color-primary: #ef4562;
	--color-secondary: #ffbd59;
	--color-text: #111111;
	--color-bg: #fff7f1;
	--color-white: #ffffff;
	--color-border: #eee;
	--color-text-light: #555;
	--color-text-inverted: #ffffff;
	--color-bg-dark: #f9f0e9;

	--font-heading: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	
	--shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
	--shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.08);
	--radius-small: 8px;
	--radius-medium: 12px;
	--radius-large: 16px;
	--radius-pill: 999px;
	
	--container-width: 1140px;
	--gutter: 20px;
}

/* 2. Basic Reset & Base
-------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-text);
	background-color: var(--color-bg);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
video,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

/* 3. Typography
-------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: 1.2;
	margin-top: 0;
	margin-bottom: 0.75em;
	color: var(--color-text);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
	margin-top: 0;
	margin-bottom: 1.25em;
	color: var(--color-text-light);
}

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color 0.2s ease-in-out;
}

a:hover {
	color: #d93a54; /* Darken primary */
	text-decoration: underline;
}

/* 4. Layout & Helpers
-------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.section-padding {
	padding-top: 80px;
	padding-bottom: 80px;
}

.section-bg {
	background-color: var(--color-bg-dark);
}

.section-header {
	text-align: center;
	margin-bottom: 50px;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}
.section-header h2 {
	margin-bottom: 0.5em;
}
.section-header p {
	font-size: 1.1rem;
	color: var(--color-text-light);
}

.icon-inline {
	margin-right: 0.4rem;
	vertical-align: -0.05em; /* Better alignment */
	font-size: 0.9em;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	-webkit-clip-path: inset(50%);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* 5. Header & Navigation
-------------------------------------------------- */
.top-bar {
	background-color: var(--color-primary);
	color: var(--color-text-inverted);
	padding: 0.5rem 0;
	text-align: center;
	font-size: 0.9rem;
	font-weight: 500;
}
.top-bar p {
	margin: 0;
	color: var(--color-text-inverted);
}
.top-bar .icon-inline {
	color: var(--color-secondary);
}

.site-header {
	background-color: var(--color-white);
	border-bottom: 1px solid var(--color-border);
	padding: 1.2rem 0;
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo {
	display: flex;
	align-items: center;
	text-decoration: none;
}
.logo:hover {
	text-decoration: none;
}

.logo-image {
  height: 68px;
  width: auto;
  display: block;
}


.main-nav {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-nav li {
	margin-left: 1.8rem;
}

.main-nav a {
	font-family: var(--font-body);
	font-weight: 500;
	color: var(--color-text);
	text-decoration: none;
	padding: 0.5rem 0.2rem;
	position: relative;
	font-size: 1rem;
}
.main-nav a:hover {
	color: var(--color-primary);
	text-decoration: none;
}
.main-nav a::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--color-primary);
	transform: scaleX(0);
	transition: transform 0.3s ease;
	transform-origin: left;
}
.main-nav a:hover::after,
.main-nav .current-menu-item a::after {
	transform: scaleX(1);
}

/* Mobile Menu Toggle - hidden on desktop */
.mobile-menu-toggle {
	display: none;
	background: transparent;
	border: 0;
	font-size: 1.5rem;
	color: var(--color-text);
	cursor: pointer;
}
.mobile-menu-toggle .icon-close { display: none; }
.mobile-menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.mobile-menu-toggle[aria-expanded="true"] .icon-close { display: block; }


/* 6. Buttons
-------------------------------------------------- */
.btn {
	display: inline-block;
	padding: 0.8rem 1.8rem;
	border: 2px solid transparent;
	border-radius: var(--radius-pill);
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	text-align: center;
}
.btn:hover {
	text-decoration: none;
}
.btn.btn-large {
	padding: 1rem 2.5rem;
	font-size: 1.1rem;
}

.btn-primary {
	background-color: var(--color-primary);
	color: var(--color-white);
	box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
	background-color: #d93a54; /* Darken primary */
	color: var(--color-white);
	transform: translateY(-2px);
	box-shadow: var(--shadow-medium);
}

.btn-secondary {
	background-color: var(--color-secondary);
	color: var(--color-text);
}
.btn-secondary:hover {
	background-color: #f0ac44; /* Darken secondary */
	color: var(--color-text);
	transform: translateY(-2px);
}

.btn-outline {
	background-color: transparent;
	color: var(--color-primary);
	border-color: var(--color-primary);
}
.btn-outline:hover {
	background-color: var(--color-primary);
	color: var(--color-white);
}

/* 7. Homepage Sections
-------------------------------------------------- */

/* --- 7.1 Hero --- */
.hero {
	background-color: var(--color-bg);
	padding: 60px 0;
}
.hero-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 50px;
	align-items: center;
}
.hero-text h1 {
	font-size: 3.2rem;
	line-height: 1.15;
	margin-bottom: 0.6em;
}
.hero-subheading {
	font-size: 1.2rem;
	color: var(--color-text-light);
	margin-bottom: 1.5em;
}
.hero-buttons {
	display: flex;
	gap: 15px;
	margin-top: 1.5rem;
}
.hero-note {
	font-size: 0.9rem;
	color: var(--color-text-light);
	margin-top: 1.5rem;
	margin-bottom: 0;
}
.hero-video {
	border-radius: var(--radius-large);
	overflow: hidden;
	box-shadow: var(--shadow-medium);
	line-height: 0; /* Fixes gap under video */
}
.hero-video-element {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius-large);
	display: block;
}

/* --- 7.2 Featured Books --- */
.book-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}
.book-card {
	background-color: var(--color-white);
	border-radius: var(--radius-medium);
	box-shadow: var(--shadow-soft);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.book-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-medium);
}

.book-cover {
	height: 360px;              /* adjust to taste */
	overflow: hidden;
	border-radius: var(--radius-medium) var(--radius-medium) 0 0;
}

.book-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;          /* keeps a nice crop */
	display: block;
}

.book-card-content {
	padding: 25px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
.book-card h3 {
	font-size: 1.4rem;
	margin-bottom: 0.25em;
}
.book-meta {
	font-size: 0.9rem;
	color: var(--color-primary);
	font-weight: 500;
	margin-bottom: 0.75em;
}
.book-desc {
	font-size: 0.95rem;
	margin-bottom: 1.5em;
	flex-grow: 1;
}
.book-card .btn-outline {
	margin-top: auto; /* Pushes button to bottom */
}

/* See your child become the hero
-------------------------------------------------- */

.transform-section {
    padding-top: 70px;
    padding-bottom: 70px;
}

.transform-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.transform-visual {
    display: flex;
    justify-content: center;
}

.transform-frame {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        rgba(239, 69, 98, 0.14),
        rgba(255, 189, 89, 0.16)
    );
    box-shadow: var(--shadow-medium);
}


.transform-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.transform-slide.is-active {
    opacity: 1;
}

/* Right column copy */

.transform-copy {
    max-width: 460px;
}

.transform-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.4rem;
}

.transform-title {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.transform-text {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 1.2rem;
}

.transform-points {
    margin: 0 0 1.6rem 0;
    padding-left: 1.2rem;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.transform-points li {
    margin-bottom: 0.3rem;
}

/* Responsive */

@media (max-width: 900px) {
    .transform-grid {
        grid-template-columns: 1fr;
    }
    .transform-copy {
        order: -1;
        text-align: center;
        max-width: none;
    }
    .transform-points {
        text-align: left;
        display: inline-block;
    }
}


/* --- 7.3 How It Works --- */
.steps-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}
.step {
	text-align: center;
}
.step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: var(--color-primary);
	color: var(--color-white);
	font-size: 1.8rem;
	font-weight: 700;
	margin: 0 auto 20px auto;
}
.step h3 {
	font-size: 1.4rem;
	margin-bottom: 0.5em;
}
.step p {
	font-size: 0.95rem;
}

/* --- 7.4 Benefits --- */
.benefits-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
}
.benefit {
	position: relative;
	background-color: var(--color-white);
	padding: 30px 26px;
	border-radius: 24px 40px 30px 38px; /* asymmetric, more playful */
	box-shadow: var(--shadow-soft);
	border: 1.5px solid rgba(239, 69, 98, 0.12); /* soft pink edge */
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Slightly different corner shapes on each card */
.benefit:nth-child(2) {
	border-radius: 38px 26px 40px 28px;
}
.benefit:nth-child(3) {
	border-radius: 30px 38px 24px 40px;
}
.benefit:nth-child(4) {
	border-radius: 40px 32px 30px 24px;
}

/* Playful hover */
.benefit:hover {
	transform: translateY(-4px) rotate(-0.7deg);
	box-shadow: var(--shadow-medium);
}

.benefit:nth-child(even):hover {
	transform: translateY(-4px) rotate(0.7deg);
}

.benefit h3 {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 1.05rem;
}
@media (min-width: 901px) {
	.benefit h3 {
		white-space: nowrap;  /* keep entire title on one line */
		font-size: 1rem;      /* a bit smaller so it fits nicely */
	}
}

.benefit-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: rgba(239, 69, 98, 0.08); /* soft pink bubble */
	color: var(--color-primary);
	font-size: 0.9rem;
	flex-shrink: 0;
}

.benefit p {
	font-size: 0.95rem;
	margin-bottom: 0;
}

/* --- 7.5 Testimonials --- */
.testimonials-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
}
.testimonial {
	background-color: var(--color-white);
	padding: 35px;
	border-radius: var(--radius-medium);
	margin: 0;
}
.testimonial blockquote {
	margin: 0 0 1rem 0;
	padding: 0;
	border: 0;
}
.testimonial blockquote p {
	font-size: 1.1rem;
	font-style: italic;
	color: var(--color-text);
	margin-bottom: 0;
}
.testimonial figcaption {
	font-weight: 600;
	color: var(--color-primary);
}

/* --- 7.6 FAQ Preview --- */
.faq-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}
.faq-item h3 {
	font-size: 1.3rem;
	margin-bottom: 0.5em;
}
.faq-item p {
	font-size: 0.95rem;
	margin-bottom: 0;
}
.faq-link {
	display: block;
	text-align: center;
	margin-top: 40px;
	font-weight: 600;
	font-size: 1.1rem;
}

/* Full FAQ page
-------------------------------------------------- */

.faq-page .faq-hero {
    background: linear-gradient(
        135deg,
        rgba(239, 69, 98, 0.06),
        rgba(255, 189, 89, 0.06)
    );
    padding-top: 70px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(239, 69, 98, 0.08);
}

.faq-page .faq-hero-header h1 {
    font-size: 2.4rem;
    margin-bottom: 0.4em;
}

.faq-page .faq-hero-header p {
    font-size: 1.05rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.faq-page .faq-section {
    padding-top: 50px;
    padding-bottom: 80px;
}

.faq-page .faq-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr);
    gap: 40px;
    align-items: flex-start;
}

/* Sidebar */

.faq-page .faq-side-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.faq-page .faq-side-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faq-page .faq-side-list li + li {
    margin-top: 0.4rem;
}

.faq-page .faq-side-list a {
    font-size: 0.95rem;
    color: var(--color-text-light);
    text-decoration: none;
}

.faq-page .faq-side-list a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Main groups */

.faq-page .faq-main {
    max-width: 720px;
}

.faq-page .faq-group + .faq-group {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.faq-page .faq-group h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

/* Accordion items */

.faq-page .faq-item {
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background-color: var(--color-white);
    padding: 0;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-page .faq-item[open] {
    border-color: rgba(239, 69, 98, 0.45);
    box-shadow: var(--shadow-soft);
}

.faq-page .faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 500;
    position: relative;
    display: flex;
    align-items: center;
}

.faq-page .faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-page .faq-item summary::after {
    content: "+";
    margin-left: auto;
    font-weight: 600;
    color: var(--color-primary);
    transition: transform 0.2s ease;
}

.faq-page .faq-item[open] summary::after {
    content: "–";
    transform: rotate(90deg);
}

.faq-page .faq-answer {
    padding: 0 18px 16px 18px;
    border-top: 1px solid var(--color-border);
}

.faq-page .faq-answer p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Responsive layout */

@media (max-width: 900px) {
    .faq-page .faq-layout {
        grid-template-columns: 1fr;
    }
    .faq-page .faq-side {
        order: -1;
        margin-bottom: 10px;
    }
}



/* --- 7.7 Final CTA --- */
.final-cta {
	background-color: var(--color-bg-dark);
	padding: 60px 0;
}
.final-cta-inner {
	background-color: var(--color-primary);
	border-radius: var(--radius-large);
	padding: 60px;
	display: grid;
	grid-template-columns: 2fr 1fr;
	align-items: center;
	gap: 40px;
}
.final-cta-text h2 {
	color: var(--color-white);
	font-size: 2.4rem;
	margin-bottom: 0.5em;
}
.final-cta-text p {
	color: rgba(255, 255, 255, 0.9);
	font-size: 1.1rem;
	margin-bottom: 0;
}
.final-cta-action {
	text-align: right;
}
.final-cta-action .btn-primary {
	background-color: var(--color-white);
	color: var(--color-primary);
}
.final-cta-action .btn-primary:hover {
	background-color: var(--color-secondary);
	color: var(--color-text);
}

/* 7.8 Footer -------------------------------------------------- */
.site-footer {
	background-color: var(--color-white);
	border-top: 1px solid var(--color-border);
	padding: 30px 0;
	font-size: 0.9rem;
	color: var(--color-text-light);
	margin-top: 40px;
}

.footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	flex-wrap: wrap;
}

.footer-brand {
	display: flex;
	align-items: center;
	gap: 14px;
}

.footer-logo-image {
	height: 58px;
	width: auto;
	display: block;
}

.footer-tagline {
	margin: 0;
	font-size: 0.9rem;
	color: var(--color-text-light);
}

.footer-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.footer-nav a {
	color: var(--color-text-light);
	font-size: 0.9rem;
	text-decoration: none;
}

.footer-nav a:hover {
	color: var(--color-primary);
	text-decoration: underline;
}

.footer-meta {
	text-align: right;
}

.footer-copy {
	margin: 0;
}

.footer-small {
	margin: 4px 0 0;
	font-size: 0.85rem;
}

.footer-heart {
	color: var(--color-primary);
}

/* Footer responsive */
@media (max-width: 800px) {
	.footer-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.footer-meta {
		text-align: left;
	}
}

/* Books page
-------------------------------------------------- */

.books-page .books-hero {
	background: linear-gradient(135deg, rgba(239, 69, 98, 0.06), rgba(255, 189, 89, 0.08));
	padding-top: 70px;
	padding-bottom: 40px;
	border-bottom: 1px solid rgba(239, 69, 98, 0.08);
}

.books-hero-header h1 {
	font-size: 2.4rem;
	margin-bottom: 0.4em;
}

.books-hero-header p {
	font-size: 1.05rem;
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.books-page .featured-books {
	padding-top: 50px; /* slightly tighter than homepage */
}

.books-page .book-grid {
	margin-top: 10px;
}

/* Small tweak on mobile */
@media (max-width: 900px) {
	.books-hero-header h1 {
		font-size: 2rem;
	}
	.books-hero-header p {
		font-size: 0.98rem;
	}
}

/* Book detail and personalisation
-------------------------------------------------- */

.book-detail-page .book-detail-hero {
	background-color: #fef6fb;
	padding-top: 60px;
	padding-bottom: 70px;
}

.book-detail-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 40px;
	align-items: flex-start;
}

.personalisation-panel {
	background-color: var(--color-white);
	border-radius: 24px;
	box-shadow: var(--shadow-soft);
	padding: 28px 28px 32px;
}

.book-detail-title {
	font-size: 2rem;
	margin-bottom: 1.5rem;
}

.photo-upload-card {
	border-radius: 18px;
	border: 1.5px dashed rgba(239, 69, 98, 0.35);
	background-color: #fff1fb;
	padding: 18px 18px 22px;
}

.photo-tips-image {
	display: flex;
	justify-content: center;
	margin-bottom: 16px;
}

.photo-tips-image-inner {
	max-width: 520px;
	width: 100%;
	height: auto;
	border-radius: 24px;
	box-shadow: var(--shadow-soft);
}

.photo-tips-heading {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--color-primary);
	text-align: center;
	margin-bottom: 0.75rem;
}


.photo-tip-bad {
	background: radial-gradient(circle at 30% 20%, #ff7b7b, #ff3b3b);
}

.photo-tip-good {
	background: radial-gradient(circle at 30% 20%, #7ddc7c, #26b04b);
}

.photo-upload-area {
	margin-top: 10px;
}

.photo-upload-label {
	text-align: center;
	font-weight: 500;
	margin-bottom: 0.75rem;
}

.photo-dropzone {
	position: relative;
	border-radius: 18px;
	border: 2px dashed rgba(239, 69, 98, 0.85);
	background: linear-gradient(
		135deg,
		rgba(239, 69, 98, 0.12),
		rgba(255, 189, 89, 0.10)
	);
	padding: 22px 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.photo-dropzone-preview {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
}

.photo-dropzone-thumb {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	box-shadow: var(--shadow-soft);
	background: #ffffff;
}

.photo-dropzone-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.photo-dropzone-text {
	text-align: left;
}

.photo-dropzone.has-file {
	border-style: solid;
	border-color: #26b04b;
	background: linear-gradient(
		135deg,
		rgba(38, 176, 75, 0.12),
		rgba(65, 190, 110, 0.15)
	);
	box-shadow: var(--shadow-soft);
}

.btn-generate-avatar {
	margin-top: 14px;
	width: 100%;
}

.photo-dropzone-inner {
	text-align: center;
	max-width: 320px;
}

.photo-dropzone-icon {
	font-size: 2.4rem;
	color: var(--color-primary);
	margin-bottom: 0.6rem;
}

.photo-dropzone-title {
	margin: 0 0 0.3rem;
	font-weight: 600;
	color: var(--color-text);
}

.photo-dropzone-hint {
	margin: 0;
	font-size: 0.85rem;
	color: var(--color-text-light);
}

/* Invisible file input that still catches clicks */
.photo-dropzone .photo-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

/* Drag over state */
.photo-dropzone.is-dragover {
	border-color: var(--color-primary);
	background: linear-gradient(
		135deg,
		rgba(239, 69, 98, 0.18),
		rgba(255, 189, 89, 0.16)
	);
	box-shadow: var(--shadow-medium);
}


.file-input-wrapper {
	display: flex;
	justify-content: center;
	margin-bottom: 0.4rem;
}

.file-input-wrapper input[type="file"] {
	display: none;
}

.file-input-button {
	min-width: 180px;
}

.photo-help-text {
	font-size: 0.8rem;
	text-align: center;
	color: var(--color-text-light);
}

.form-error {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #c53030;
}

/* Form layout */

.book-personalisation-form {
	margin-top: 1.4rem;
}

.form-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 1rem;
}

.form-field {
	display: flex;
	flex-direction: column;
	margin-bottom: 1rem;
}

.form-field label {
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: 0.35rem;
}

.form-field input,
.form-field select,
.form-field textarea {
	border-radius: 12px;
	border: 1px solid var(--color-border);
	padding: 0.6rem 0.75rem;
	font-family: var(--font-body);
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	background-color: #ffffff;
}

.form-field textarea {
	resize: vertical;
	min-height: 80px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
	border-color: rgba(239, 69, 98, 0.8);
	box-shadow: 0 0 0 1px rgba(239, 69, 98, 0.12);
}

.form-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	margin-top: 1rem;
}

.btn-preview {
	flex: 1;
	opacity: 0.6;
	cursor: not-allowed;
}

.form-actions .btn-primary {
	flex: 1;
}

/* Preview side */

.book-preview-panel {
	background-color: #ffeef4;
	border-radius: 24px;
	box-shadow: var(--shadow-soft);
	padding: 28px;
}

.book-preview-kicker {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--color-primary);
	margin-bottom: 0.5rem;
}

.book-preview-title {
	font-size: 1.6rem;
	margin-bottom: 0.1rem;
}

.book-preview-meta {
	font-size: 0.9rem;
	color: var(--color-primary);
	font-weight: 500;
	margin-bottom: 0.9rem;
}

.book-preview-description {
	font-size: 0.95rem;
	margin-bottom: 1rem;
}

.what-personalised {
	margin: 0 0 1.4rem 0;
	padding-left: 1.2rem;
	font-size: 0.9rem;
	color: var(--color-text-light);
}

.what-personalised li {
	margin-bottom: 0.4rem;
}

.book-preview-visual {
	margin-top: 1.2rem;
	display: flex;
	justify-content: center;
}

.preview-avatar {
	margin-top: 10px;
	display: flex;
	justify-content: center;
	width: 100%;
}
/* Avatar preview inside the form, under the button */
.book-avatar-preview {
    margin-top: 1.6rem;      /* space below the help text */
    margin-bottom: 1.6rem;   /* space before the first form row */
    display: flex;
    justify-content: center;
}

.book-avatar-preview .preview-avatar {
    margin-top: 0;                 /* override outer margin */
    width: 100%;
    max-width: 260px;
}

/* Book cover on the right-hand panel */
.book-preview-visual {
    margin-top: 1.4rem;
    display: flex;
    justify-content: center;
}

.book-cover-frame {
    width: 100%;
    max-width: 260px;
    border-radius: 24px;
    background-color: #ffeef4;
    padding: 16px;
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-preview-cover-image {
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: var(--shadow-medium);
    object-fit: cover;
}

.preview-avatar-inner {
	width: 100%;
	max-width: 260px;
	aspect-ratio: 3 / 4;           /* vertical rectangle */
	border-radius: 24px;           /* no longer a circle */
	overflow: hidden;
	box-shadow: var(--shadow-medium);
	background: #ffe0ea;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	color: var(--color-text);
	text-align: center;
	padding: 0;
}

.preview-avatar-placeholder {
	padding: 0 10px;
}

.preview-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	width: 100%;
	padding: 0 16px;
	text-align: center;
}

.loading-label {
	font-size: 0.9rem;
	color: var(--color-text-light);
}

.loading-bar {
	width: 100%;
	max-width: 220px;
	height: 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.loading-bar-inner {
	width: 40%;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #ef4562, #ffbd59);
	animation: loadingSlide 1s ease-in-out infinite;
}

/* Indeterminate sliding animation */
@keyframes loadingSlide {
	0% {
		transform: translateX(-100%);
	}
	50% {
		transform: translateX(0%);
	}
	100% {
		transform: translateX(100%);
	}
}

/* remove old arrow and mock if any remain */
.preview-arrow,
.preview-book-mock {
	display: none;
}


/* Responsive book detail */

@media (max-width: 980px) {
	.book-detail-grid {
		grid-template-columns: 1fr;
	}
	/* Personalisation first, preview second on mobile */
	.personalisation-panel {
		order: 1;
	}
	.book-preview-panel {
		order: 2;
	}
}


@media (max-width: 600px) {
	.form-row {
		grid-template-columns: 1fr;
	}
	.form-actions {
		flex-direction: column;
	}
	.book-detail-title {
		font-size: 1.6rem;
	}
}

/* 8. Generic Page (page.php)
-------------------------------------------------- */
.page-wrapper {
	padding: 40px 0;
}
.page-content {
	background-color: var(--color-white);
	padding: 40px 50px;
	border-radius: var(--radius-medium);
	box-shadow: var(--shadow-soft);
	margin: 20px 0;
}
.entry-header {
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--color-border);
	padding-bottom: 1rem;
}
.entry-title {
	font-size: 2.5rem;
}
.entry-content {
	font-size: 1.05rem;
}
.entry-content p,
.entry-content ul,
.entry-content ol {
	margin-bottom: 1.5em;
}
.entry-content ul,
.entry-content ol {
	padding-left: 1.5em;
}
.entry-content a {
	font-weight: 500;
}
.entry-content h2 {
	font-size: 1.8rem;
	margin-top: 2em;
	margin-bottom: 1em;
	border-bottom: 1px solid var(--color-border);
	padding-bottom: 0.5em;
}
.entry-content h3 {
	font-size: 1.4rem;
	margin-top: 1.8em;
	margin-bottom: 0.8em;
}

/* 9. Responsive
-------------------------------------------------- */
@media (max-width: 1100px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .section-padding { padding-top: 60px; padding-bottom: 60px; }

    .book-grid,
    .steps-grid,
    .benefits-grid,
    .testimonials-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Header */
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-soft);
    }
    .main-nav {
        flex-direction: column;
        padding: 1rem 0;
    }
    .main-nav li {
        margin: 0;
    }
    .main-nav a {
        display: block;
        padding: 0.8rem var(--gutter);
    }
    .main-nav a::after {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .main-navigation.toggled-on {
        display: block;
    }

    /* Hero */
    .hero { padding: 40px 0; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-text { text-align: center; order: 2; }
    .hero-video { order: 1; margin-bottom: 30px; }
    .hero-text h1 { font-size: 2.5rem; }
    .hero-buttons { justify-content: center; }

    /* Page and CTA */
    .final-cta-inner {
        grid-template-columns: 1fr;
        padding: 40px;
        text-align: center;
    }
    .final-cta-action {
        text-align: center;
        margin-top: 20px;
    }

    .page-content {
        padding: 30px 25px;
    }
    .entry-title {
        font-size: 2rem;
    }
}

@media (max-width: 700px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-text h1 { font-size: 2rem; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; }
}


/* Inputs and selects */

body.woocommerce-checkout input[type="text"],
body.woocommerce-checkout input[type="email"],
body.woocommerce-checkout input[type="tel"],
body.woocommerce-checkout input[type="number"],
body.woocommerce-checkout input[type="password"],
body.woocommerce-checkout textarea,
body.woocommerce-checkout select,
body.woocommerce-cart input[type="text"],
body.woocommerce-cart input[type="email"],
body.woocommerce-cart input[type="tel"],
body.woocommerce-cart input[type="number"],
body.woocommerce-cart textarea,
body.woocommerce-cart select {
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 0.65rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background-color: #ffffff;
    box-shadow: none;
}

body.woocommerce-checkout input:focus,
body.woocommerce-checkout textarea:focus,
body.woocommerce-checkout select:focus,
body.woocommerce-cart input:focus,
body.woocommerce-cart textarea:focus,
body.woocommerce-cart select:focus {
    border-color: rgba(239, 69, 98, 0.8);
    box-shadow: 0 0 0 1px rgba(239, 69, 98, 0.15);
    outline: none;
}

/* Table rows inside summary */

.wc-block-components-order-summary,
.wc-block-cart__totals {
    border-radius: 18px;
    border: 1px solid var(--color-border);
    padding: 14px 16px 12px;
}

/* Product line item in summary */

.wc-block-components-order-summary-item {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.wc-block-components-order-summary-item__description {
    font-size: 0.95rem;
}

.wc-block-components-order-summary-item__quantity {
    background-color: rgba(239, 69, 98, 0.08);
    color: var(--color-primary);
}

/* Buttons – match main site buttons */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wc-block-components-button,
.wc-block-cart__submit button,
.wc-block-checkout__place-order button {
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    background-color: var(--color-primary);
    color: #ffffff;
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.85rem 1.9rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow-soft);
    text-decoration: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.wc-block-components-button:hover,
.wc-block-cart__submit button:hover,
.wc-block-checkout__place-order button:hover {
    background-color: #d93a54;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Secondary buttons (links, back to cart) */

.woocommerce a.button.alt,
.wc-block-components-button--secondary {
    background-color: var(--color-secondary);
    color: var(--color-text);
    border-color: transparent;
    box-shadow: none;
}

.woocommerce a.button.alt:hover,
.wc-block-components-button--secondary:hover {
    background-color: #f0ac44;
    color: var(--color-text);
}

/* Error and notice messages */

.woocommerce-error,
.woocommerce-info,
.woocommerce-message,
.wc-block-components-notice-banner {
    border-radius: 12px;
    border: 1px solid rgba(239, 69, 98, 0.25);
    background-color: #fff1f6;
    color: var(--color-text);
}

/* Responsive adjustments */

@media (max-width: 900px) {
    body.woocommerce-cart .site-main,
    body.woocommerce-checkout .site-main {
        padding-top: 30px;
        padding-bottom: 50px;
    }

    .wc-block-checkout__form,
    .wc-block-cart__main,
    .wc-block-checkout__sidebar,
    .wc-block-cart__sidebar {
        padding: 22px 18px 26px;
    }

    body.woocommerce-cart .entry-title,
    body.woocommerce-checkout .entry-title {
        font-size: 2rem;
    }
}
