/* =====================================================================
   Digital Christian Bookstore - Design System
   Palette: primary #0A3D62 | secondary #FF6B00 | bg #F8F7F4 | text #1F2937
   Type:    Fraunces (display) + Inter (body)
   ===================================================================== */

:root {
    --primary: #0A3D62;
    --primary-dark: #072C49;
    --primary-light: #12558C;
    --secondary: #FF6B00;
    --secondary-dark: #E55F00;
    --background: #F8F7F4;
    --text: #1F2937;
    --white: #FFFFFF;
    --border: #E8E5DF;
    --muted: #6B7280;
    --success: #0F7B4F;
    --danger: #C0392B;
    --warning: #B7791F;

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(10, 61, 98, .06), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow: 0 8px 24px rgba(10, 61, 98, .08);
    --shadow-lg: 0 20px 45px rgba(10, 61, 98, .14);
    --transition: .28s cubic-bezier(.4, 0, .2, 1);
}

/* ---------------- Base ---------------- */
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .hero-title, .section-title, .page-hero-title, .book-detail-title {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -.015em;
    color: var(--primary);
}

a { color: var(--primary-light); transition: color var(--transition); }
a:hover { color: var(--secondary); }

.btn { font-weight: 600; transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition); }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 6px 16px rgba(10, 61, 98, .22);
}
.btn-primary:hover { background-color: var(--primary-light) !important; box-shadow: 0 10px 22px rgba(10, 61, 98, .28); }
.btn-secondary {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(255, 107, 0, .25);
}
.btn-secondary:hover { background-color: var(--secondary-dark) !important; border-color: var(--secondary-dark) !important; box-shadow: 0 10px 22px rgba(255, 107, 0, .3); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 .2rem rgba(10, 61, 98, .12);
}
.form-label { font-size: .9rem; color: #374151; }

/* ---------------- Checkout decoration ---------------- */
.checkout-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 15%, rgba(255, 176, 103, .28), transparent 13rem),
        linear-gradient(125deg, var(--primary) 0%, #12558C 62%, var(--primary-dark) 100%);
}
.checkout-hero::after {
    content: "✦";
    position: absolute;
    right: max(5vw, calc((100vw - 1140px) / 2));
    top: -.55em;
    color: rgba(255, 255, 255, .09);
    font-family: var(--font-display);
    font-size: clamp(8rem, 17vw, 15rem);
    line-height: 1;
    pointer-events: none;
}
.checkout-hero .container { position: relative; z-index: 1; }
.checkout-panel {
    border: 1px solid rgba(10, 61, 98, .08) !important;
    box-shadow: 0 24px 70px rgba(10, 61, 98, .12) !important;
}
.checkout-panel .form-control {
    min-height: 3.35rem;
    border-color: #dedfdc;
    background-color: #fcfcfb;
}
.checkout-panel .form-control:focus { background-color: #fff; }
.checkout-step {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.checkout-step i {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    border-radius: 50%;
    background: rgba(10, 61, 98, .08);
    color: var(--primary);
    font-size: .95rem;
}
.checkout-summary-accent { border-top: 3px solid var(--secondary) !important; }
.download-progress-box {
    max-width: 430px;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(10, 61, 98, .12);
    border-radius: var(--radius);
    background: #f5f8fa;
}
.auto-download-frame {
    position: absolute;
    width: 1px;
    height: 1px;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

/* ---------------- Header ---------------- */
.site-header {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 6px 20px rgba(10, 61, 98, .08); }

.navbar-brand .brand-mark {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border-radius: 12px; font-size: 1.25rem;
    box-shadow: 0 6px 14px rgba(10, 61, 98, .25);
}
.brand-mark-light { background: linear-gradient(135deg, var(--secondary), #FF8A33) !important; box-shadow: none; }

/* Ministry logo (public/images/logo.png). The file is a circular badge with
   transparent corners, so it sits on a white disc to stay legible on light and
   dark bars alike. */
.brand-logo {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    padding: 3px;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(10, 61, 98, .18);
}
.brand-logo-light { box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.auth-logo {
    display: block; margin-inline: auto;
    width: 76px; height: 76px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    padding: 5px;
    box-shadow: 0 10px 26px rgba(10, 61, 98, .22);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--primary); }
.brand-text small { font-size: .68rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.brand-text.text-white strong { color: #fff; }

.navbar .nav-link {
    font-weight: 500; color: #374151; padding: .5rem .95rem;
    border-radius: 999px; transition: all var(--transition);
}
.navbar .nav-link:hover { color: var(--primary); background: rgba(10, 61, 98, .06); }

.icon-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border); background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1.05rem; cursor: pointer;
    transition: all var(--transition);
}
.icon-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-1px); }

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    background: radial-gradient(1200px 600px at 80% -10%, #12558C 0%, var(--primary) 45%, var(--primary-dark) 100%);
    color: #fff;
    padding: 5.5rem 0 6rem;
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-cross {
    position: absolute; right: 6%; top: 12%;
    font-size: 16rem; color: rgba(255, 255, 255, .045);
    transform: rotate(8deg);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.hero-glow-1 { width: 340px; height: 340px; background: rgba(255, 107, 0, .18); left: -80px; bottom: -120px; }
.hero-glow-2 { width: 260px; height: 260px; background: rgba(255, 255, 255, .07); right: 30%; top: -60px; }

.eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 600;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--secondary); margin-bottom: 1rem;
}

.hero-title {
    color: #fff; font-size: clamp(2.4rem, 5vw, 3.7rem);
    line-height: 1.1; margin-bottom: 1.25rem;
}
.hero-title .text-secondary { color: #FFB067; font-style: italic; }

.hero-lead {
    font-size: 1.1rem; color: rgba(255, 255, 255, .82);
    max-width: 34rem; line-height: 1.75;
}

.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong { font-family: var(--font-display); font-size: 1.7rem; color: #fff; }
.hero-stat span { font-size: .8rem; color: rgba(255, 255, 255, .6); letter-spacing: .05em; text-transform: uppercase; }

.hero-visual { position: relative; min-height: 420px; }
.hero-book-stack { position: relative; height: 420px; }
.hero-book {
    position: absolute; width: 230px; border-radius: 12px; overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .4); border: 4px solid rgba(255, 255, 255, .12);
    background: #fff; animation: float 6s ease-in-out infinite;
}
.hero-book img { width: 100%; height: 340px; object-fit: cover; display: block; }
.hero-book-1 { right: 32%; top: 20px; transform: rotate(-6deg); z-index: 3; }
.hero-book-2 { right: 6%; top: 60px; transform: rotate(5deg); animation-delay: 1.2s; z-index: 2; opacity: .92; }
.hero-book-3 { right: 18%; top: 130px; transform: rotate(-1deg); animation-delay: 2.4s; z-index: 1; opacity: .75; }

.hero-bestseller-visual {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .5rem 0 2rem;
}
.hero-bestseller-cover {
    position: relative;
    display: block;
    width: min(100%, 330px);
    padding: .6rem;
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 16px;
    background: rgba(255, 255, 255, .13);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .4), 0 0 70px rgba(255, 255, 255, .1);
    transform: rotate(2deg);
    transition: transform var(--transition), box-shadow var(--transition);
}
.hero-bestseller-cover:hover {
    color: #fff;
    transform: rotate(0) translateY(-5px);
    box-shadow: 0 38px 82px rgba(0, 0, 0, .48), 0 0 75px rgba(255, 255, 255, .16);
}
.hero-bestseller-cover img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1754 / 2480;
    object-fit: cover;
    border-radius: 10px;
}
.hero-bestseller-badge {
    position: absolute;
    z-index: 1;
    top: 1.1rem;
    left: -1.1rem;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: #FFB323;
    color: #3C2600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .24);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.hero-bestseller-caption {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    max-width: 360px;
    padding: 1rem 1.4rem .2rem;
    text-align: center;
    color: #fff;
}
.hero-bestseller-caption strong { font-family: var(--font-display); font-size: 1.05rem; }
.hero-bestseller-caption span { color: rgba(255, 255, 255, .72); font-size: .85rem; }
.hero-bestseller-visual .hero-verse-card {
    position: relative;
    left: auto;
    bottom: auto;
    align-self: flex-start;
    margin-top: .8rem;
}

@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

.hero-verse-card {
    position: absolute; left: 0; bottom: -10px; z-index: 4;
    background: rgba(255, 255, 255, .97); color: var(--primary);
    border-radius: var(--radius); padding: 1.1rem 1.4rem;
    max-width: 270px; box-shadow: var(--shadow-lg);
}
.hero-verse-card i { color: var(--secondary); font-size: 1.4rem; }
.hero-verse-card p { font-family: var(--font-display); font-size: .98rem; margin: .35rem 0; line-height: 1.5; }
.hero-verse-card span { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ---------------- Sections ---------------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: .75rem; }
.section-title-sm {
    font-family: var(--font-display); font-size: 1.35rem; font-weight: 600;
    color: var(--primary); margin-bottom: 1rem;
    padding-bottom: .6rem; border-bottom: 2px solid var(--border);
}
.section-sub { color: var(--muted); margin-bottom: 0; }

/* ---------------- Book card ---------------- */
.book-card {
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    background: #fff;
    border: 1px solid var(--border) !important;
}
.book-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.book-card-cover { position: relative; overflow: hidden; background: #EDEBE6; aspect-ratio: 4 / 3; }
.book-card-cover a { display: block; height: 100%; }
.book-card-cover img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
.book-card:hover .book-card-cover img { transform: scale(1.07); }

.book-card-tag {
    position: absolute; top: .8rem; left: .8rem;
    background: rgba(10, 61, 98, .92); color: #fff;
    font-size: .68rem; font-weight: 600; letter-spacing: .06em;
    text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px;
}

.book-card-title { font-family: var(--font-display); line-height: 1.3; }
.book-card-title a { color: var(--primary); text-decoration: none; }
.book-card-title a:hover { color: var(--secondary); }
.book-card-author i { color: var(--secondary); }
.book-card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.price-badge {
    display: inline-block; background: rgba(255, 107, 0, .1); color: var(--secondary-dark);
    font-weight: 700; font-size: .95rem; padding: .3rem .8rem; border-radius: 999px;
    border: 1px solid rgba(255, 107, 0, .25); white-space: nowrap;
}
.price-badge-lg { font-size: 1.35rem; padding: .45rem 1.2rem; }

/* ---------------- Feature cards ---------------- */
.feature-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.8rem 1.5rem; text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature-icon {
    width: 62px; height: 62px; margin: 0 auto; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10, 61, 98, .07); color: var(--primary); font-size: 1.6rem;
    transition: all var(--transition);
}
.feature-card:hover .feature-icon { background: var(--secondary); color: #fff; transform: rotate(-6deg); }

/* ---------------- Founder ---------------- */
.founder-section { position: relative; }
.founder-portrait {
    position: relative; width: 190px; height: 190px;
    margin: 0 auto 1.75rem;
}
.founder-portrait img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
    border-radius: 50%; border: 5px solid #fff;
    box-shadow: var(--shadow-lg); position: relative; z-index: 2; display: block;
}
.founder-portrait-ring {
    position: absolute; inset: -10px; border-radius: 50%;
    border: 2px dashed var(--secondary); opacity: .55;
    animation: founder-spin 30s linear infinite;
}
.founder-portrait-badge {
    position: absolute; bottom: 2px; right: 2px; z-index: 3;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--secondary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; border: 3px solid #fff; box-shadow: var(--shadow);
}
@keyframes founder-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.founder-name {
    font-family: var(--font-display); font-weight: 600; color: var(--primary);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: .3rem;
}
.founder-title {
    color: var(--secondary-dark); font-weight: 600; letter-spacing: .05em;
    text-transform: uppercase; font-size: .82rem; margin-bottom: 0;
}

/* ---------------- Verse section ---------------- */
.verse-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff; padding: 5rem 0; position: relative; overflow: hidden;
}
.verse-quote-mark {
    font-family: var(--font-display); font-size: 7rem; line-height: .5;
    color: rgba(255, 255, 255, .12); margin-bottom: 1.5rem;
}
.verse-text {
    font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.5rem);
    line-height: 1.45; max-width: 820px; margin: 0 auto 1.25rem;
    font-style: italic; color: #fff;
}
.verse-ref { font-style: normal; color: #FFB067; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; }
.verse-rule { width: 70px; height: 3px; background: var(--secondary); margin: 2rem auto 0; border-radius: 2px; }

/* ---------------- Categories / CTA ---------------- */
.category-pill {
    display: inline-flex; align-items: center; background: #fff;
    border: 1px solid var(--border); color: var(--primary);
    padding: .55rem 1.2rem; border-radius: 999px; text-decoration: none;
    font-weight: 500; font-size: .93rem; transition: all var(--transition);
}
.category-pill:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }

.cta-section {
    background: radial-gradient(900px 400px at 50% 0%, #12558C 0%, var(--primary) 55%, var(--primary-dark) 100%);
    color: #fff; padding: 4.5rem 0; position: relative; overflow: hidden;
}
.cta-icon { font-size: 3rem; color: rgba(255, 255, 255, .15); display: block; margin-bottom: 1rem; }
.cta-title { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: .8rem; }
.cta-text { color: rgba(255, 255, 255, .78); max-width: 560px; margin: 0 auto 1.8rem; }

/* ---------------- Page hero (inner pages) ---------------- */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff; padding: 3rem 0;
}
.page-hero.checkout-hero { background-color: var(--primary-dark); }
.page-hero-sm { padding: 2rem 0; }
.page-hero-title { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: .4rem; }
.page-hero-sub { color: rgba(255, 255, 255, .75); }
.breadcrumb-light .breadcrumb-item a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.breadcrumb-light .breadcrumb-item.active { color: rgba(255, 255, 255, .95); }
.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .5); }

/* ---------------- Book detail ---------------- */
.book-detail-cover {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg); padding: 2rem; text-align: center;
    box-shadow: var(--shadow);
}
.book-detail-cover img {
    width: 100%; max-height: 480px; object-fit: contain; border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.book-detail-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.15; margin-bottom: .5rem; }
.book-detail-author { color: var(--muted); font-size: 1.05rem; }
.book-detail-author i { color: var(--secondary); }
.book-detail-meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1.25rem 0; }
.meta-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #fff; border: 1px solid var(--border); color: #4B5563;
    font-size: .82rem; font-weight: 500; padding: .35rem .8rem; border-radius: 999px;
}
.meta-chip i { color: var(--primary); }
.book-detail-short { font-size: 1.05rem; line-height: 1.7; }

.trust-list { list-style: none; padding: 0; }
.trust-list li { display: flex; align-items: center; gap: .55rem; color: #4B5563; font-size: .93rem; margin-bottom: .45rem; }
.trust-list i { color: var(--success); }

.book-description p { color: #374151; line-height: 1.85; margin-bottom: 1.1rem; }
.learn-list { list-style: none; padding: 0; margin: 0; }
.learn-list li { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .7rem; color: #374151; }
.learn-list i { color: var(--secondary); font-size: 1.1rem; line-height: 1.4; }

.book-info-table th { color: var(--muted); font-weight: 500; width: 40%; padding: .55rem .5rem .55rem 0; }
.book-info-table td { padding: .55rem 0; color: var(--text); }
.book-info-table tr + tr th, .book-info-table tr + tr td { border-top: 1px dashed var(--border); }

.sample-frame-wrap {
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: #fff; box-shadow: var(--shadow-sm);
}
.sample-frame { width: 100%; height: 620px; border: 0; display: block; }
.sample-lock {
    background: rgba(10, 61, 98, .05); border: 1px dashed var(--primary);
    border-radius: var(--radius); padding: .8rem 1rem; color: var(--primary); font-size: .92rem;
}

/* ---------------- Checkout ---------------- */
.order-summary { position: relative; }
.summary-cover { width: 84px; height: 116px; object-fit: cover; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.payment-method-box {
    background: rgba(10, 61, 98, .04); border: 1px solid rgba(10, 61, 98, .12);
    border-radius: var(--radius); padding: 1rem 1.1rem;
}
.pm-logo {
    width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}

/* ---------------- Payment pages ---------------- */
.payment-page { padding: 4rem 0 5rem; }
.payment-card { max-width: 560px; overflow: hidden; }

.payment-loader { position: relative; width: 96px; height: 96px; margin: 0 auto; }
.payment-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 4px solid rgba(10, 61, 98, .12);
    border-top-color: var(--secondary);
    animation: spin 1s linear infinite;
}
.payment-loader i {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

.payment-status-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255, 107, 0, .1); color: var(--secondary-dark);
    border: 1px solid rgba(255, 107, 0, .3);
    border-radius: 999px; padding: .5rem 1.2rem; font-weight: 600; font-size: .92rem;
    margin-top: 1rem;
}

.txn-box {
    background: var(--background); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .6rem 1.2rem;
}

.success-check { width: 92px; margin: 0 auto; }
.success-check-svg { width: 92px; height: 92px; }
.success-circle { stroke: var(--success); stroke-width: 3; stroke-dasharray: 166; stroke-dashoffset: 166; animation: draw .6s ease-out forwards; }
.success-check-mark { stroke: var(--success); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: draw .35s ease-out .55s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.success-book-box {
    background: var(--background); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.2rem; max-width: 460px;
}
.success-cover { width: 70px; height: 98px; object-fit: cover; box-shadow: var(--shadow-sm); flex-shrink: 0; }

.fail-icon {
    width: 84px; height: 84px; margin: 0 auto; border-radius: 50%;
    background: rgba(192, 57, 43, .1); color: var(--danger);
    display: flex; align-items: center; justify-content: center; font-size: 2rem;
}

/* ---------------- Footer ---------------- */
.site-footer { background: var(--primary-dark); color: rgba(255, 255, 255, .78); margin-top: auto; }
.footer-about { font-size: .93rem; line-height: 1.7; color: rgba(255, 255, 255, .65); }
.footer-heading {
    color: #fff; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; font-size: .8rem; margin-bottom: 1.1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .6rem; font-size: .93rem; color: rgba(255, 255, 255, .65); }
.footer-links a { color: rgba(255, 255, 255, .65); text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: var(--secondary); }
.social-btn {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255, 255, 255, .08); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; transition: all var(--transition);
}
.social-btn:hover { background: var(--secondary); color: #fff; transform: translateY(-3px); }
.newsletter-form .form-control {
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .15);
    color: #fff; border-radius: 10px;
}
.newsletter-form .form-control::placeholder { color: rgba(255, 255, 255, .45); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 1.3rem 0; display: flex; justify-content: space-between;
    align-items: center; gap: 1rem; flex-wrap: wrap;
    font-size: .87rem; color: rgba(255, 255, 255, .5);
}
.footer-bottom a { color: rgba(255, 255, 255, .5); text-decoration: none; }
.footer-bottom a:hover { color: var(--secondary); }

/* ---------------- Misc public ---------------- */
.back-to-top {
    position: fixed; right: 1.2rem; bottom: 1.2rem; width: 46px; height: 46px;
    border: 0; border-radius: 50%; background: var(--primary); color: #fff;
    font-size: 1.1rem; cursor: pointer; opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: all var(--transition);
    box-shadow: var(--shadow); z-index: 1040;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--secondary); }

.empty-state {
    text-align: center; padding: 3.5rem 1.5rem;
    background: #fff; border: 1px dashed var(--border); border-radius: var(--radius-lg);
}
.empty-state i { font-size: 3rem; color: #C9C5BD; }

.book-toolbar { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.pagination-wrap .page-link { color: var(--primary); border: 1px solid var(--border); margin: 0 3px; }
.pagination-wrap .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

.contact-item {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: .9rem 0; border-bottom: 1px solid var(--border);
}
.contact-item:last-child { border-bottom: 0; }
.contact-item i { color: var(--secondary); font-size: 1.15rem; width: 24px; text-align: center; margin-top: .15rem; }

.purchase-cover { width: 60px; height: 84px; object-fit: cover; box-shadow: var(--shadow-sm); }
.about-values { background: #fff; }

/* ---------------- Errors ---------------- */
.error-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--background) 0%, #EDEBE6 100%);
    padding: 2rem;
}
.error-wrap { max-width: 520px; }
.error-icon {
    width: 76px; height: 76px; margin: 0 auto 1.5rem; border-radius: 22px;
    background: var(--primary); color: #fff; font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow);
}
.error-code {
    font-family: var(--font-display); font-size: 5rem; font-weight: 700;
    color: var(--secondary); line-height: 1; margin-bottom: .5rem;
}
.error-content p { max-width: 400px; margin-left: auto; margin-right: auto; }

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin-body { background: #F1F0EC; min-height: 100vh; }

.admin-sidebar {
    width: 250px; min-height: 100vh; background: var(--primary-dark);
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-nav { flex: 1; }
.sidebar-link {
    display: flex; align-items: center; gap: .8rem;
    color: rgba(255, 255, 255, .68); text-decoration: none;
    padding: .7rem .9rem; border-radius: 10px; margin-bottom: 2px;
    font-size: .93rem; font-weight: 500; width: 100%;
    border: 0; background: transparent; text-align: left;
    transition: all var(--transition);
}
.sidebar-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar-link.active { background: var(--secondary); color: #fff; box-shadow: 0 6px 14px rgba(255, 107, 0, .3); }
.sidebar-link-btn { cursor: pointer; }
.sidebar-divider { height: 1px; background: rgba(255, 255, 255, .1); margin: .8rem .5rem; }

.admin-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.admin-topbar {
    background: #fff; border-bottom: 1px solid var(--border);
    padding: .85rem 1rem; position: sticky; top: 0; z-index: 1020;
}
.admin-content { flex: 1; }

.stats-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.15rem 1.25rem; box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.stats-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stats-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.stats-value { font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stats-icon {
    width: 42px; height: 42px; border-radius: 12px; font-size: 1.15rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.admin-cover { width: 46px; height: 62px; object-fit: cover; background: #EEE; }
.rank-badge {
    width: 24px; height: 24px; border-radius: 50%; background: var(--primary);
    color: #fff; font-size: .75rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}

.status-paid { background: rgba(15, 123, 79, .12); color: var(--success); }
.status-pending { background: rgba(183, 121, 31, .14); color: var(--warning); }
.status-failed { background: rgba(192, 57, 43, .12); color: var(--danger); }

.data-table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.data-table td { font-size: .9rem; vertical-align: middle; }

.log-list { max-height: 560px; overflow-y: auto; }
.log-entry { padding: .7rem 0; border-bottom: 1px solid var(--border); }
.log-entry:last-child { border-bottom: 0; }
.log-pre {
    background: #0F172A; color: #A5F3FC; padding: .7rem; border-radius: 8px;
    font-size: .72rem; max-height: 220px; overflow: auto; margin: .4rem 0 0;
    white-space: pre-wrap; word-break: break-word;
}

/* Login screen */
.auth-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1.5rem;
}
.auth-card {
    background: #fff; width: 100%; max-width: 420px;
    border-radius: var(--radius-lg); padding: 2.5rem 2rem;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}

.sidebar-backdrop { display: none; }

/* =====================================================================
   ANIMATIONS
   ===================================================================== */
.fade-in { opacity: 0; transform: translateY(18px); animation: fadeIn .6s ease forwards; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .fade-in { opacity: 1; transform: none; }
}

/* =====================================================================
   RESPONSIVE - mobile first priorities
   ===================================================================== */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed; left: -260px; top: 0; z-index: 1050;
        transition: left var(--transition); height: 100vh;
    }
    .admin-sidebar.open { left: 0; }
    .sidebar-backdrop.show {
        display: block; position: fixed; inset: 0;
        background: rgba(0, 0, 0, .45); z-index: 1045;
    }
}

@media (max-width: 767.98px) {
    .hero { padding: 3.5rem 0 4rem; }
    .hero-visual { min-height: 340px; }
    .hero-bestseller-visual { min-height: 440px; }
    .hero-bestseller-cover { width: min(72vw, 280px); }
    .hero-book-stack { height: 330px; }
    .hero-book { width: 170px; }
    .hero-book img { height: 250px; }
    .hero-book-1 { right: 34%; }
    .hero-verse-card { max-width: 230px; padding: .9rem 1.1rem; }
    .hero-cross { font-size: 9rem; }
    .hero-stats { gap: 1.5rem; }

    .section { padding: 3rem 0; }
    .sample-frame { height: 430px; }
    .payment-page { padding: 2.5rem 0 3.5rem; }
    .book-detail-cover { padding: 1.25rem; }
    .book-toolbar { flex-direction: column; align-items: stretch; }
    .stats-value { font-size: 1.35rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 575.98px) {
    .book-card-cover { aspect-ratio: 3 / 2; }
    .btn-lg { font-size: 1rem; }
    .hero-title { font-size: 2.1rem; }
}





