/* assets/css/index.css - Homepage styles
   Fonts: Playfair Display (display) + DM Sans (body)
   Colours: from main.css :root variables
*/


/* Hero section */
.hero-section {
    background: linear-gradient(155deg, #faf8f4 0%, #fff 55%);
    border-bottom: 1px solid var(--line);
    padding: clamp(3.5rem, 7vh, 6rem) 0;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3.5rem;
    align-items: center;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

.hero-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.hero-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.6rem, 4.5vw, 4.5rem);
    font-weight: 400;
    color: var(--navy);
    line-height: 1.12;
    margin-bottom: 1.1rem;
}
.hero-heading em { font-style: italic; color: var(--gold); }
.hero-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 1.75rem;
    line-height: 1.75;
}

/* Hero buttons */
.hero-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn-hero-primary {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: var(--navy); color: #fff;
    font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    padding: 0.7rem 1.8rem; border: none; border-radius: 4px;
    cursor: pointer; text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.btn-hero-primary:hover { background: var(--navy-mid); color: #fff; }
.btn-hero-outline {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: transparent; color: var(--navy);
    font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    padding: 0.65rem 1.6rem; border: 1.5px solid var(--navy); border-radius: 4px;
    cursor: pointer; text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.btn-hero-outline:hover { background: var(--navy); color: #fff; }

/* Hero stats */
.hero-stats { display: flex; align-items: center; gap: 1.5rem; }
.hero-stat-num {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem; font-weight: 600;
    color: var(--navy); line-height: 1;
}
.hero-stat-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted);
}
.hero-stat-divider { width: 1px; height: 32px; background: var(--line); }

/* Carousel */
.hero-carousel-wrap { position: relative; }
.hero-carousel { position: relative; min-height: clamp(380px, 45vh, 520px); }
.hero-slide {
    position: absolute; top: 0; left: 0; width: 100%;
    opacity: 0; pointer-events: none;
    transition: opacity 0.45s ease;
}
.hero-slide.active { opacity: 1; pointer-events: auto; position: relative; }
.hero-slide a {
    display: flex; gap: 1.5rem; align-items: center;
    text-decoration: none;
}
.hero-book-cover {
    width: clamp(200px, 22vw, 320px); min-width: 160px;
    aspect-ratio: 2/3;
    border-radius: 8px; overflow: hidden;
    box-shadow: 4px 8px 28px rgba(26,44,91,0.18);
    background: var(--line); flex-shrink: 0;
}
.hero-book-cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-book-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: var(--muted); background: var(--bg);
}
.hero-book-info { display: flex; flex-direction: column; justify-content: center; padding-top: 0.5rem; }
.hero-book-genre {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--gold); font-weight: 700; margin-bottom: 0.5rem;
}
.hero-book-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem; font-weight: 600; color: var(--navy);
    margin-bottom: 0.3rem; line-height: 1.2;
}
.hero-book-author {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem; color: var(--muted);
    font-style: italic; margin-bottom: 1rem;
}
.hero-book-price {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem; font-weight: 600; color: var(--navy);
}

/* Carousel controls */
.carousel-controls { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.carousel-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--line); background: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--navy); font-size: 0.9rem;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.carousel-btn:hover { border-color: var(--navy); background: var(--navy); color: #fff; }
.carousel-dots { display: flex; gap: 0.35rem; flex-wrap: wrap; flex: 1; }
.carousel-dot {
    width: 6px; height: 6px; border-radius: 50%;
    border: none; background: var(--line); cursor: pointer;
    padding: 0; transition: all 0.2s ease;
}
.carousel-dot.active { background: var(--gold); width: 18px; border-radius: 3px; }

/* Genre strip */
.genre-strip {
    display: flex; gap: 1rem; padding: 2.5rem 0;
    flex-wrap: wrap;
}
.genre-pill {
    display: flex; align-items: center; gap: 0.75rem;
    background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 0.85rem 1.25rem;
    flex: 1; min-width: 200px; text-decoration: none; color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.genre-pill:hover { border-color: var(--gold); box-shadow: 0 2px 12px rgba(201,168,76,0.15); color: var(--navy); }
.genre-pill-icon {
    width: 38px; height: 38px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: var(--navy); flex-shrink: 0;
}
.genre-pill-text { flex: 1; min-width: 0; }
.genre-pill-name {
    display: block; font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem; font-weight: 600; color: var(--navy);
}
.genre-pill-count {
    display: block; font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem; color: var(--muted);
}
.genre-pill-arrow { font-size: 0.8rem; color: var(--muted); transition: transform 0.2s, color 0.2s; }
.genre-pill:hover .genre-pill-arrow { color: var(--gold); transform: translateX(3px); }

/* ── Featured sections ── */
.featured-section { padding: 2.5rem 0; }
.featured-header {
    display: flex; justify-content: space-between;
    align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.5rem;
}
.btn-view-all {
    font-family: 'DM Sans', sans-serif; font-size: 0.82rem; font-weight: 600;
    color: var(--navy); border: 1.5px solid var(--navy); border-radius: 4px;
    padding: 0.4rem 1rem; text-decoration: none;
    transition: background 0.2s, color 0.2s;
    display: inline-flex; align-items: center;
}
.btn-view-all:hover { background: var(--navy); color: #fff; }

/* Book card (shared) */
.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1100px) { .books-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 768px)  { .books-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px)  { .books-grid { grid-template-columns: 1fr; } }

.book-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: 12px; overflow: hidden;
    display: flex; flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
}
.book-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.09); transform: translateY(-3px); }
.book-card-cover-link { display: block; text-decoration: none; }
.book-card-cover { aspect-ratio: 2/3; overflow: hidden; background: var(--line); }
.book-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.book-card:hover .book-card-cover img { transform: scale(1.04); }
.book-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: var(--line); background: var(--bg);
}
.book-card-body {
    padding: 1rem; display: flex; flex-direction: column; flex: 1;
}
.book-card-genre {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--gold); font-weight: 700; margin-bottom: 0.3rem;
}
.book-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem; font-weight: 600; color: var(--navy);
    margin-bottom: 0.2rem; line-height: 1.3;
    text-decoration: none;
}
.book-card-title:hover {
    color: var(--navy-mid);
    text-decoration: none;
}
.book-card-author {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem; color: var(--muted);
    font-style: italic; margin-bottom: 0.65rem;
}
.book-card-price {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem; font-weight: 600;
    color: var(--navy); margin-top: auto; margin-bottom: 0.65rem;
}
.book-card a:not(.btn-view-book) {
    text-decoration: none;
    color: inherit;
}
.book-card .btn-view-book { color: #fff; }
.btn-view-book {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--navy); color: #fff;
    font-family: 'DM Sans', sans-serif; font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    padding: 0.55rem 1rem; border-radius: 4px; text-decoration: none;
    transition: background 0.2s; width: 100%;
}
.btn-view-book:hover { background: var(--navy-mid); color: #fff; }

/* Why section */
.why-section {
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 5rem 0;
}
.why-grid {
    display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem;
}
@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .why-grid { grid-template-columns: 1fr; } }

.why-card { text-align: center; padding: 1rem; }
.why-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: #faf6ec; border: 1px solid var(--gold-light);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; font-size: 1.3rem; color: var(--gold);
}
.why-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem; font-weight: 600; color: var(--navy); margin-bottom: 0.5rem;
}
.why-desc { font-family: 'DM Sans', sans-serif; font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

/* CTA Banner */
.cta-banner { background: var(--navy); padding: 4rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.cta-heading {
    font-family: 'Playfair Display', serif;
    font-size: 2rem; font-weight: 400; color: #fff; margin-bottom: 0.35rem;
}
.cta-sub { font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: rgba(255,255,255,0.65); margin: 0; }
.btn-cta-gold {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: var(--gold); color: #fff;
    font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    padding: 0.7rem 1.8rem; border-radius: 4px; text-decoration: none;
    transition: background 0.2s, color 0.2s; white-space: nowrap;
}
.btn-cta-gold:hover { background: var(--gold-light); color: var(--navy); }
