/* ==========================================================================
   CPH CSS DESIGN SYSTEM & STYLESHEET
   Harmonious Purple, Lavender, White and Accent Gold Palette
   ========================================================================== */

:root {
    /* Color Palette */
    --color-primary: #521856;       /* Deep Regal Purple */
    --color-primary-rgb: 82, 24, 86;
    --color-primary-light: #803086; /* Bright Violet Purple */
    --color-primary-dark: #2F0732;  /* Dark Plum Purple */
    
    --color-gold: #CBA135;          /* Warm Antique Accent Gold */
    --color-gold-light: #F4E2AC;    /* Soft Glow Gold */
    --color-gold-dark: #97741C;     /* Deep Metallic Gold */
    
    --color-bg-white: #FCFAFD;      /* Soft Whitish Background with a Hint of Violet */
    --color-bg-pure: #FFFFFF;       /* Pure white */
    --color-bg-accent: #F4EFF6;     /* Light Lavender Tint */
    
    --color-text-dark: #221324;     /* Near Black with Violet tint */
    --color-text-muted: #645567;    /* Charcoal Purple for secondary text */
    --color-border: #E8DFEB;        /* Subtle lavender-grey border */
    
    --parchment-bg: #F5EFEB;        /* Sepia antique scroll parchment color */
    --parchment-border: #E5D9D0;
    --parchment-text: #4E3B30;
    
    /* System & Shadows */
    --shadow-sm: 0 2px 8px rgba(82, 24, 86, 0.05);
    --shadow-md: 0 8px 24px rgba(82, 24, 86, 0.08);
    --shadow-lg: 0 16px 40px rgba(82, 24, 86, 0.15);
    --shadow-gold: 0 0 20px rgba(203, 161, 53, 0.3);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --font-heading: 'Cinzel', Georgia, serif;
    --font-body: 'Outfit', system-ui, sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* Dark Mode Overrides */
body[data-theme="dark"] {
    --color-bg-white: #0E0510;
    --color-bg-pure: #160B1A;
    --color-bg-accent: #221326;
    
    --color-text-dark: #FAFAFC;
    --color-text-muted: #B3A4B7;
    --color-border: #38243C;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    
    /* Scroll parchment remains warm/antique even in dark mode for skeuomorphic reading */
    --parchment-bg: #EFE6DC;
    --parchment-border: #D5C2B1;
    --parchment-text: #3D2D23;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky header */
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-white);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button,
a,
[role="button"],
.book-card-img-container,
.order-item-meta {
    touch-action: manipulation;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   BUTTONS & TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
}

.section-header {
    margin-bottom: 50px;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-gold);
    display: inline-block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 38px;
    color: var(--color-primary);
    margin-bottom: 16px;
}

body[data-theme="dark"] .section-title {
    color: var(--color-bg-white);
}

.section-desc {
    font-size: 17px;
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 auto;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
    box-shadow: 0 4px 14px rgba(82, 24, 86, 0.25);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 24, 86, 0.35);
}

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

body[data-theme="dark"] .btn-secondary {
    color: var(--color-gold);
    border-color: var(--color-gold);
}

.btn-secondary:hover {
    background-color: rgba(82, 24, 86, 0.05);
    transform: translateY(-2px);
}

body[data-theme="dark"] .btn-secondary:hover {
    background-color: rgba(203, 161, 53, 0.1);
}

.btn-full {
    width: 100%;
    padding: 14px;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(252, 250, 253, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body[data-theme="dark"] .main-header {
    background-color: rgba(14, 5, 16, 0.85);
}

.main-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.1;
    letter-spacing: 0.5px;
}

body[data-theme="dark"] .logo-title {
    color: var(--color-bg-white);
}

.logo-sub {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--color-gold);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-dark);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-gold);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: 600;
}

body[data-theme="dark"] .nav-link.active {
    color: var(--color-gold);
}

.nav-order-btn {
    color: var(--color-primary) !important;
    font-weight: 600 !important;
    border: 1px solid var(--color-primary);
    padding: 6px 16px !important;
    border-radius: var(--radius-full);
}

body[data-theme="dark"] .nav-order-btn {
    color: var(--color-gold) !important;
    border-color: var(--color-gold);
}

.nav-order-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-pure) !important;
}

body[data-theme="dark"] .nav-order-btn:hover {
    background-color: var(--color-gold);
    color: var(--color-text-dark) !important;
}

.nav-order-btn::after {
    display: none !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle[hidden] {
    display: none !important;
}

.header-signin-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    padding: 8px 4px;
    white-space: nowrap;
}

.header-signin-link:hover {
    color: var(--color-gold-dark);
}

/* ── User Avatar & Dropdown ── */
.user-nav-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    transition: background 0.18s;
    font-family: inherit;
}

.user-avatar-btn:hover {
    background: rgba(74,28,110,0.07);
}

.user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a1c6e 0%, #7b2d8b 100%);
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    border: 2px solid #d4af37;
}

.user-avatar-name {
    display: none !important;
}

.user-avatar-caret {
    display: none !important;
}

.user-dropdown {
    display: none !important;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(74,28,110,0.16);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
    z-index: 1000;
    border: 1px solid rgba(74,28,110,0.08);
}

.user-nav-wrap:not(.open) .user-dropdown {
    display: none !important;
}

.user-dropdown[hidden] {
    display: none !important;
}

.user-nav-wrap.open .user-dropdown {
    display: none !important;
}

.user-nav-wrap .user-dropdown.account-dropdown {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.user-nav-wrap.open .user-dropdown.account-dropdown {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 12px 16px 10px;
    border-bottom: 1px solid #f0e8f5;
    margin-bottom: 4px;
}

.user-dropdown-fullname {
    font-size: 14px;
    font-weight: 700;
    color: #2c1810;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-email {
    font-size: 12px;
    color: #9a8a7a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #2c1810;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-weight: 500;
}

.user-dropdown-item:hover {
    background: #f5f0fb;
    color: #4a1c6e;
}

.user-dropdown-item svg {
    flex-shrink: 0;
    color: #7a6a5a;
}

.user-dropdown-item:hover svg {
    color: #4a1c6e;
}

.user-dropdown-divider {
    border: none;
    border-top: 1px solid #f0e8f5;
    margin: 4px 0;
}

.user-dropdown-item.signout {
    color: #c0392b;
}

.user-dropdown-item.signout:hover {
    background: #fdecea;
    color: #c0392b;
}

.user-dropdown-item.signout svg {
    color: #c0392b;
}

@media (max-width: 768px) {
    .user-nav-wrap { display: none !important; }
    .user-avatar-name { display: none !important; }
    .user-avatar-caret { display: none !important; }
}

.header-order-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 18px !important;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-primary);
    background-color: var(--color-primary);
    color: var(--color-bg-pure) !important;
    font-size: 14px;
    font-weight: 700 !important;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(82, 24, 86, 0.16);
}

.header-order-action:hover {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary-light);
    transform: translateY(-1px);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-dark);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: var(--color-bg-accent);
}

body[data-theme="dark"] .theme-toggle:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--color-text-dark);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.mobile-nav-quick-actions {
    display: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(82, 24, 86, 0.04) 0%, rgba(203, 161, 53, 0.04) 100%);
}

body[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, rgba(82, 24, 86, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.hero-background-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.circle-decor {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.circle-decor.c1 {
    width: 500px;
    height: 500px;
    background-color: var(--color-primary);
    top: -100px;
    right: -100px;
}

.circle-decor.c2 {
    width: 400px;
    height: 400px;
    background-color: var(--color-gold);
    bottom: -150px;
    left: -100px;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    max-width: 620px;
}

.hero-tagline {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-primary-light);
    background-color: rgba(128, 48, 134, 0.08);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 24px;
}

body[data-theme="dark"] .hero-tagline {
    color: var(--color-gold-light);
    background-color: rgba(203, 161, 53, 0.15);
}

.hero-title {
    font-size: 52px;
    font-weight: 900;
    color: var(--color-primary-dark);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

body[data-theme="dark"] .hero-title {
    color: var(--color-bg-white);
}

.hero-title .highlight {
    color: var(--color-gold);
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: rgba(203, 161, 53, 0.15);
    z-index: -1;
}

.hero-desc {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-ctas {
    display: flex;
    gap: 16px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3D Showcase Book Container */
.book-showcase-container {
    position: relative;
    display: flex;
    gap: 30px;
    padding: 20px;
}

.showcase-card {
    position: relative;
    width: 200px;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: var(--transition-smooth);
    background-color: var(--color-bg-pure);
    overflow: hidden;
}

.showcase-card img {
    border-radius: var(--radius-md);
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.showcase-card:first-child {
    transform: translateY(-20px) rotate(-4deg);
    z-index: 2;
}

.showcase-card:last-child {
    transform: translateY(20px) rotate(4deg);
    z-index: 1;
}

.showcase-card:hover {
    transform: scale(1.08) translateY(-10px) rotate(0deg) !important;
    z-index: 10;
    box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.showcase-badge {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(82, 24, 86, 0.9);
    backdrop-filter: blur(4px);
    color: var(--color-bg-pure);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   STATS SECTION
   ========================================================================== */

.stats-section {
    padding: 60px 0;
    background-color: var(--color-bg-accent);
    border-y: 1px solid var(--color-border);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 10px;
}

.stat-number {
    font-size: 42px;
    color: var(--color-primary);
    font-family: var(--font-heading);
    margin-bottom: 8px;
}

body[data-theme="dark"] .stat-number {
    color: var(--color-gold);
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ==========================================================================
   SPOTLIGHT SECTION
   ========================================================================== */

.spotlight-section {
    padding: 100px 0;
    background-color: var(--color-bg-pure);
}

.spotlight-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
}

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

.book-card-3d {
    position: relative;
    max-width: 320px;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 60px rgba(82, 24, 86, 0.2);
    transition: var(--transition-smooth);
}

.book-card-3d img {
    border-radius: var(--radius-md);
    transform: perspective(1000px) rotateY(-8deg);
    transition: var(--transition-smooth);
    border: 1px solid var(--color-border);
}

.book-card-3d:hover img {
    transform: perspective(1000px) rotateY(0deg);
}

.book-card-3d:hover {
    box-shadow: 0 30px 70px rgba(203, 161, 53, 0.35);
}

.spotlight-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

body[data-theme="dark"] .spotlight-tag {
    color: var(--color-gold);
}

.spotlight-title {
    font-size: 36px;
    color: var(--color-primary-dark);
    margin-bottom: 4px;
}

body[data-theme="dark"] .spotlight-title {
    color: var(--color-bg-white);
}

.spotlight-subtitle {
    font-size: 18px;
    font-style: italic;
    color: var(--color-gold-dark);
    margin-bottom: 24px;
}

body[data-theme="dark"] .spotlight-subtitle {
    color: var(--color-gold-light);
}

.spotlight-description {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 30px;
}

.spotlight-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.meta-item {
    font-size: 14px;
    color: var(--color-text-dark);
}

.spotlight-actions {
    display: flex;
    gap: 16px;
}

/* ==========================================================================
   BOOK CATALOG
   ========================================================================== */

.catalog-section {
    padding: 100px 0;
    background-color: var(--color-bg-accent);
}

.catalog-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 50px;
}

/* Elegant Search bar */
.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 16px 24px 16px 52px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-border);
    background-color: var(--color-bg-pure);
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-text-dark);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(82, 24, 86, 0.15);
}

body[data-theme="dark"] .search-box input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 4px rgba(203, 161, 53, 0.2);
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--color-text-muted);
    pointer-events: none;
}

.clear-search-btn {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--color-text-muted);
    cursor: pointer;
}

/* Filter buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    background-color: var(--color-bg-pure);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary-light);
}

body[data-theme="dark"] .filter-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.filter-btn.active {
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
    border-color: var(--color-primary);
}

body[data-theme="dark"] .filter-btn.active {
    background-color: var(--color-gold);
    color: var(--color-bg-white);
    border-color: var(--color-gold);
}

/* Book Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    transition: var(--transition-smooth);
}

.book-card {
    background-color: var(--color-bg-pure);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
}

.book-card.visible-card {
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
    position: relative;
    pointer-events: auto;
}

.book-card.hidden-card {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
}

.book-card.visible-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(82, 24, 86, 0.2);
}

body[data-theme="dark"] .book-card:hover {
    border-color: rgba(203, 161, 53, 0.3);
}

.book-card-img-container {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background-color: var(--color-bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.book-card-img-container img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.15));
    transition: var(--transition-smooth);
}

.book-card:hover .book-card-img-container img {
    transform: scale(1.05);
}

/* Custom CSS Mockup Cover for books without image files */
.custom-book-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 3/4;
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-book-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5px;
    width: 1px;
    height: 100%;
    background-color: rgba(255,255,255,0.15);
    z-index: 1;
}

.custom-book-placeholder.prayers-theme {
    background: linear-gradient(135deg, #4A123E 0%, #1A0415 100%);
    color: var(--color-gold-light);
}

.custom-book-placeholder.christian-living-theme {
    background: linear-gradient(135deg, #2E5A88 0%, #0F233B 100%);
    color: #E2ECF5;
}

.custom-book-placeholder.educational-theme {
    background: linear-gradient(135deg, #8B5A2B 0%, #3D230D 100%);
    color: #F5EAE1;
}

.inner-cover {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    gap: 16px;
}

.inner-cover h4 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.school-level {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    background-color: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

/* Hover Quick view overlay */
.book-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(82, 24, 86, 0.4);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.book-card:hover .book-card-overlay {
    opacity: 1;
    pointer-events: auto;
}

.btn-quickview {
    background-color: var(--color-bg-pure);
    color: var(--color-primary);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transform: translateY(15px);
    transition: var(--transition-smooth);
}

.book-card:hover .btn-quickview {
    transform: translateY(0);
}

.book-card:focus-within .book-card-overlay {
    opacity: 1;
    pointer-events: auto;
}

.book-card:focus-within .btn-quickview {
    transform: translateY(0);
}

.btn-quickview:hover {
    background-color: var(--color-gold);
    color: var(--color-bg-pure);
}

.book-card-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.book-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
    line-height: 1.3;
}

.book-lang {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.book-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.book-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-primary);
}

body[data-theme="dark"] .book-price {
    color: var(--color-gold-light);
}

.btn-card-order {
    background-color: var(--color-bg-accent);
    color: var(--color-primary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-card-order:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
}

body[data-theme="dark"] .btn-card-order {
    background-color: rgba(203, 161, 53, 0.1);
    color: var(--color-gold);
}

body[data-theme="dark"] .btn-card-order:hover {
    background-color: var(--color-gold);
    color: var(--color-bg-white);
}

.no-results-alert {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.no-results-alert svg {
    margin-bottom: 16px;
    color: var(--color-border);
}

.no-results-alert h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--color-text-dark);
}

.reset-search-btn {
    margin-top: 20px;
}

/* ==========================================================================
   LITURGICAL PREVIEW & HYMN FINDER
   ========================================================================== */

.liturgy-section {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(180deg, var(--color-primary-dark) 0%, #170419 100%);
    color: var(--color-bg-white);
    overflow: hidden;
}

.liturgy-decor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(203, 161, 53, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
    pointer-events: none;
}

.liturgy-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.light-text {
    color: var(--color-gold-light) !important;
}

.light-title {
    color: var(--color-bg-white) !important;
}

.light-desc {
    color: var(--color-border) !important;
}

.resource-selector-tabs {
    display: flex;
    gap: 12px;
    margin: 32px 0 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 12px;
}

.tab-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.tab-btn:hover {
    color: var(--color-bg-white);
}

.tab-btn.active {
    color: var(--color-gold);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-gold);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

.finder-inputs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.input-group.number-group {
    width: 100px;
    flex-grow: 0;
}

.input-group.full-width {
    width: 100%;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gold-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.finder-inputs select,
.finder-inputs input {
    background-color: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--color-bg-white);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: var(--transition-fast);
}

.finder-inputs select:focus,
.finder-inputs input:focus {
    border-color: var(--color-gold);
    background-color: rgba(255,255,255,0.12);
}

.finder-inputs select option {
    background-color: #1A0419;
    color: var(--color-bg-white);
}

.predefined-list {
    margin-top: 16px;
}

.predefined-list span {
    font-size: 13px;
    color: var(--color-border);
    display: block;
    margin-bottom: 8px;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-border);
    padding: 6px 14px;
    font-size: 13px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
}

.chip:hover, .chip.active {
    background-color: var(--color-gold);
    color: var(--color-text-dark);
    border-color: var(--color-gold);
    font-weight: 500;
}

/* Parchment scroll paper layout */
.parchment-scroll {
    position: relative;
    max-width: 440px;
    margin: 0 auto;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.5));
}

.scroll-edge {
    height: 18px;
    background-color: var(--parchment-border);
    border-radius: 6px;
    position: relative;
}

.scroll-edge::after {
    content: '';
    position: absolute;
    left: 5%;
    width: 90%;
    height: 100%;
    background: linear-gradient(90deg, transparent 5%, rgba(0,0,0,0.15) 50%, transparent 95%);
}

.parchment-content {
    background-color: var(--parchment-bg);
    background-image: radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 12px 12px;
    border-left: 2px dashed var(--parchment-border);
    border-right: 2px dashed var(--parchment-border);
    padding: 36px;
    color: var(--parchment-text);
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.reading-header {
    border-bottom: 1px solid rgba(78, 59, 48, 0.15);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.reading-meta {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--color-gold-dark);
    display: block;
    margin-bottom: 6px;
}

.reading-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: #382417;
}

.reading-body {
    font-family: Georgia, serif;
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-line;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Styled scrollbar for the scroll view */
.reading-body::-webkit-scrollbar {
    width: 6px;
}
.reading-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}
.reading-body::-webkit-scrollbar-thumb {
    background: rgba(78, 59, 48, 0.25);
    border-radius: 3px;
}

.parchment-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px dashed rgba(78, 59, 48, 0.15);
}

.btn-parchment-action {
    background: none;
    border: 1px solid rgba(78, 59, 48, 0.2);
    color: var(--parchment-text);
    padding: 6px 12px;
    font-size: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-parchment-action:hover {
    background-color: rgba(78, 59, 48, 0.08);
    border-color: var(--parchment-text);
}

/* ==========================================================================
   LEGACY / TIMELINE
   ========================================================================== */

.timeline-section {
    padding: 100px 0;
    background-color: var(--color-bg-white);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 50px auto 0;
    padding: 20px 0;
}

/* Vertical center line */
.timeline::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--color-border);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--color-gold);
    border: 4px solid var(--color-bg-white);
    top: 30px;
    z-index: 5;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}

.timeline-item:hover .timeline-dot {
    background-color: var(--color-primary);
    transform: scale(1.3);
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

body[data-theme="dark"] .timeline-date {
    color: var(--color-gold);
}

.timeline-content {
    background-color: var(--color-bg-pure);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
}

.timeline-content h3 {
    font-size: 19px;
    margin-bottom: 12px;
    color: var(--color-text-dark);
}

.timeline-content p {
    font-size: 14.5px;
    color: var(--color-text-muted);
}

.journey-section {
    padding: 100px 0;
    background-color: var(--color-bg-white);
}

.journey-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 42px;
    margin: 58px auto 0;
    max-width: 1080px;
}

.journey-timeline::before {
    content: '';
    position: absolute;
    top: 72px;
    left: 8%;
    right: 8%;
    border-top: 2px dashed var(--color-border);
}

.journey-item {
    position: relative;
    text-align: center;
    display: grid;
    grid-template-rows: auto 88px auto;
    justify-items: center;
}

.journey-date {
    min-height: 72px;
}

.journey-date span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.journey-date strong {
    display: block;
    font-family: var(--font-body);
    font-size: 36px;
    line-height: 1;
    font-weight: 500;
    color: rgba(82, 24, 86, 0.62);
}

.journey-marker {
    position: relative;
    width: 1px;
    height: 88px;
    background-color: rgba(82, 24, 86, 0.28);
    z-index: 1;
}

.journey-pin {
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-primary-light);
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--color-bg-white);
}

.journey-icon {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(82, 24, 86, 0.84), rgba(203, 161, 53, 0.82));
    color: var(--color-bg-pure);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--color-bg-white);
    box-shadow: var(--shadow-md);
}

.journey-copy {
    max-width: 260px;
    margin-top: 22px;
}

.journey-copy h3 {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 10px;
}

.journey-copy p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-text-muted);
}

/* ==========================================================================
   MULTI-STEP ORDER INQUIRY FORM
   ========================================================================== */

.order-section {
    padding: 100px 0;
    background-color: var(--color-bg-accent);
}

.order-container {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 40px;
    align-items: start;
}

.order-form-container {
    background-color: var(--color-bg-pure);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    min-width: 0;
}

.order-form-header {
    margin-bottom: 30px;
}

.order-form-header h2 {
    font-size: 28px;
    color: var(--color-primary-dark);
    margin-bottom: 8px;
}

body[data-theme="dark"] .order-form-header h2 {
    color: var(--color-bg-white);
}

.order-form-header p {
    font-size: 15px;
    color: var(--color-text-muted);
}

/* Form Progress Stepper */
.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    flex: 1;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-bg-accent);
    color: var(--color-text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid var(--color-border);
    transition: var(--transition-fast);
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.step-line {
    height: 3px;
    background-color: var(--color-border);
    flex-grow: 1;
    margin-top: -24px;
    z-index: 1;
}

.step-indicator.active .step-num {
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
    border-color: var(--color-primary);
}

body[data-theme="dark"] .step-indicator.active .step-num {
    background-color: var(--color-gold);
    color: var(--color-text-dark);
    border-color: var(--color-gold);
}

.step-indicator.active .step-label {
    color: var(--color-primary);
    font-weight: 700;
}

body[data-theme="dark"] .step-indicator.active .step-label {
    color: var(--color-gold);
}

.step-indicator.completed .step-num {
    background-color: var(--color-gold);
    color: var(--color-bg-white);
    border-color: var(--color-gold);
}

/* Form steps toggle logic */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

.form-step-title {
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--color-text-dark);
    border-bottom: 1.5px solid var(--color-border);
    padding-bottom: 10px;
}

.form-step-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    border-bottom: 1.5px solid var(--color-border);
    padding: 0 0 10px;
    cursor: pointer;
    font-family: var(--font-heading);
    text-align: left;
}

.form-step-toggle:hover {
    color: var(--color-primary);
}

body[data-theme="dark"] .form-step-toggle:hover {
    color: var(--color-gold);
}

.toggle-chevron {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.form-step-toggle[aria-expanded="false"] .toggle-chevron {
    transform: rotate(-90deg);
}

.book-list-collapsible {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 1;
}

.book-list-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Form Items (Bibles, prayers, hymnals selector) */
.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 12px;
    margin-bottom: 24px;
}

.order-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--color-bg-accent);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    gap: 16px;
    min-width: 0;
}

.order-item-row.selected {
    border-color: var(--color-primary);
    background-color: rgba(82, 24, 86, 0.03);
}

body[data-theme="dark"] .order-item-row.selected {
    border-color: var(--color-gold);
    background-color: rgba(203, 161, 53, 0.05);
}

.order-item-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.order-item-meta {
    flex-grow: 1;
    min-width: 0;
}

.order-item-meta h4 {
    font-size: 14.5px;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 2px;
    overflow-wrap: anywhere;
}

.order-item-meta span {
    font-size: 12.5px;
    color: var(--color-text-muted);
}

.order-item-price {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--color-primary-light);
    white-space: nowrap;
}

body[data-theme="dark"] .order-item-price {
    color: var(--color-gold);
}

.qty-control {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background-color: var(--color-bg-pure);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    border: none;
    background: none;
    width: 28px;
    height: 28px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-dark);
}

.qty-btn:hover {
    background-color: var(--color-bg-accent);
}

.qty-input {
    width: 32px;
    text-align: center;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text-dark);
    outline: none;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.order-summary-panel {
    background-color: var(--color-bg-accent);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14.5px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.summary-row.grand-total {
    font-size: 18px;
    color: var(--color-primary-dark);
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
    margin-top: 8px;
    margin-bottom: 0;
}

body[data-theme="dark"] .summary-row.grand-total {
    color: var(--color-bg-white);
}

/* Input Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--color-border);
    background-color: var(--color-bg-pure);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    font-size: 15px;
    transition: var(--transition-fast);
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(82, 24, 86, 0.1);
}

body[data-theme="dark"] .form-group input:focus,
body[data-theme="dark"] .form-group select:focus,
body[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(203, 161, 53, 0.15);
}

.error-feedback {
    font-size: 12px;
    color: #D32F2F;
    display: none;
}

.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
    border-color: #D32F2F;
    background-color: #FFEBEE;
}

body[data-theme="dark"] .form-group.invalid input {
    background-color: #3B1B1E;
}

.form-group.invalid .error-feedback {
    display: block;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

.btn-submit {
    position: relative;
    min-width: 180px;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-bg-pure);
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Order Process Info Card */
.order-info-card {
    background-color: var(--color-primary-dark);
    color: var(--color-bg-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: var(--shadow-md);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 16px;
}

.info-card-header h4 {
    font-size: 18px;
    color: var(--color-gold-light);
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.process-step {
    display: flex;
    gap: 16px;
}

.p-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--color-gold);
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.process-step h5 {
    font-size: 15px;
    color: var(--color-bg-pure);
    margin-bottom: 4px;
    font-family: var(--font-body);
    font-weight: 600;
}

.process-step p {
    font-size: 13px;
    color: var(--color-border);
    line-height: 1.5;
}

/* ==========================================================================
   BOOK DETAILS DIALOG / MODAL
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 5, 32, 0.6);
    backdrop-filter: blur(8px);
}

.modal-wrapper {
    position: relative;
    width: 100%;
    max-width: 780px;
    background-color: var(--color-bg-pure);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    z-index: 2002;
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal.active .modal-wrapper {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--color-bg-accent);
    border: none;
    font-size: 26px;
    font-weight: 300;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-dark);
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
}

.modal-content {
    padding: 40px;
    overflow-y: auto;
}

/* Modal details content visual */
.modal-details-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 36px;
    align-items: start;
}

.modal-img-area {
    display: flex;
    justify-content: center;
    background-color: var(--color-bg-accent);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}

.modal-img-area img {
    max-height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,0.18));
}

.modal-info-area h3 {
    font-size: 26px;
    color: var(--color-primary-dark);
    margin-bottom: 4px;
}

body[data-theme="dark"] .modal-info-area h3 {
    color: var(--color-bg-white);
}

.modal-subtitle {
    font-size: 15px;
    color: var(--color-gold-dark);
    font-weight: 500;
    margin-bottom: 20px;
}

body[data-theme="dark"] .modal-subtitle {
    color: var(--color-gold-light);
}

.modal-spec-list {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.modal-spec-tag {
    background-color: var(--color-bg-accent);
    color: var(--color-text-muted);
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.modal-desc-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-description {
    font-size: 14.5px;
    color: var(--color-text-muted);
    margin-bottom: 30px;
}

.modal-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.modal-price-label {
    font-size: 14px;
    color: var(--color-text-muted);
}

.modal-price-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-primary);
}

body[data-theme="dark"] .modal-price-val {
    color: var(--color-gold-light);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-section {
    padding: 100px 0;
    background-color: var(--color-bg-pure);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 36px;
}

.contact-detail-item {
    display: flex;
    gap: 16px;
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-bg-accent);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.contact-detail-item:hover .icon-circle {
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
}

body[data-theme="dark"] .icon-circle {
    background-color: rgba(203, 161, 53, 0.1);
    color: var(--color-gold);
}

body[data-theme="dark"] .contact-detail-item:hover .icon-circle {
    background-color: var(--color-gold);
    color: var(--color-bg-white);
}

.contact-detail-item strong {
    font-size: 16px;
    color: var(--color-text-dark);
    display: block;
    margin-bottom: 4px;
}

.contact-detail-item p {
    font-size: 14.5px;
    color: var(--color-text-muted);
}

.contact-card {
    background-color: var(--color-bg-accent);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

/* Map Mockup styling */
.mock-map {
    height: 200px;
    background-color: #EADDEE;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-theme="dark"] .mock-map {
    background-color: #2D1432;
}

.map-grid {
    position: absolute;
    width: 150%;
    height: 150%;
    background-image: linear-gradient(rgba(82, 24, 86, 0.08) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(82, 24, 86, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    transform: rotate(15deg);
}

.map-pin {
    position: relative;
    z-index: 2;
    animation: bounce 1.5s infinite ease-in-out;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    animation: pulse-ring 1.5s infinite;
    z-index: -1;
}

.map-label {
    position: absolute;
    bottom: 16px;
    background-color: rgba(82, 24, 86, 0.9);
    color: var(--color-bg-pure);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow-sm);
}

.card-contact-form {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-contact-form h4 {
    font-size: 18px;
    color: var(--color-primary-dark);
}

body[data-theme="dark"] .card-contact-form h4 {
    color: var(--color-bg-white);
}

.card-contact-form .form-group input,
.card-contact-form .form-group textarea {
    border-color: var(--color-border);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */

.footer {
    background-color: var(--color-primary-dark);
    color: var(--color-bg-white);
    padding: 80px 0 30px;
    border-top: 2px solid var(--color-gold);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-about {
    font-size: 14px;
    color: var(--color-border);
    line-height: 1.7;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-links-col h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.footer-links-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-col a {
    font-size: 14px;
    color: var(--color-border);
}

.footer-links-col a:hover {
    color: var(--color-gold);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-meta-links {
    display: flex;
    gap: 24px;
}

.footer-meta-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-meta-links a:hover {
    color: var(--color-gold-light);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
    position: fixed;
    top: calc(18px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    z-index: 9999;
}

.toast {
    background-color: var(--color-primary-dark);
    color: var(--color-bg-white);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: slideInTop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    cursor: pointer;
}

/* ==========================================================================
   KEYFRAMES & ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

@keyframes slideInLeft {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInTop {
    from { transform: translateY(-16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero-title {
        font-size: 42px;
    }
}

@media (max-width: 900px) {
    .hero-container,
    .spotlight-grid,
    .liturgy-container,
    .order-container,
    .contact-container,
    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .timeline::after {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 45px;
        padding-right: 0;
        text-align: left !important;
    }
    .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-dot {
        left: 12px !important;
        right: auto !important;
    }

    .journey-timeline {
        grid-template-columns: 1fr;
        gap: 34px;
        max-width: 520px;
    }

    .journey-timeline::before {
        top: 0;
        bottom: 0;
        left: 50%;
        right: auto;
        border-top: 0;
        border-left: 2px dashed var(--color-border);
        transform: translateX(-50%);
    }

    .journey-item {
        grid-template-rows: auto 78px auto;
        background-color: var(--color-bg-pure);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        padding: 24px;
        box-shadow: var(--shadow-sm);
    }

    .journey-copy {
        max-width: 340px;
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
    .hero-tagline {
        margin: 0 auto 24px;
    }
    .hero-ctas {
        justify-content: center;
    }
    .book-showcase-container {
        justify-content: center;
    }
    .showcase-card {
        width: 160px;
    }
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile Menu Drawer style */
    .mobile-menu-toggle {
        display: flex;
    }

    .saved-toggle-btn,
    .cart-toggle-btn,
    .book-save-btn,
    .header-order-action .cart-badge {
        display: none !important;
    }
    
    .navbar {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--color-bg-white);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 30px 24px;
        gap: 20px;
        transform: translateY(-150%);
        transition: var(--transition-smooth);
        box-shadow: var(--shadow-md);
        z-index: 999;
    }

    .mobile-nav-quick-actions {
        display: grid;
        gap: 12px;
        width: 100%;
        border-top: 1px solid var(--color-border);
        padding-top: 18px;
        margin-top: 4px;
    }

    .mobile-account-panel {
        display: grid;
        gap: 10px;
        min-width: 0;
    }

    .mobile-account-panel[hidden] {
        display: none !important;
    }

    .mobile-account-summary {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
        padding: 12px 14px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        background-color: var(--color-bg-pure);
    }

    .mobile-account-copy {
        display: grid;
        min-width: 0;
        line-height: 1.25;
    }

    .mobile-account-copy strong,
    .mobile-account-copy span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-account-copy strong {
        color: var(--color-primary);
        font-size: 15px;
    }

    .mobile-account-copy span {
        color: var(--color-text-muted);
        font-size: 13px;
    }

    .mobile-nav-action-link {
        width: 100%;
        min-height: 46px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        background-color: var(--color-bg-accent);
        color: var(--color-primary);
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        font-family: var(--font-body);
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        text-align: left;
    }

    .mobile-nav-action-link[hidden] {
        display: none !important;
    }

    .mobile-signout-link {
        color: #a8322a;
    }

    .mobile-nav-action-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--color-gold-dark);
    }

    .mobile-nav-count {
        margin-left: auto;
        min-width: 22px;
        height: 22px;
        border-radius: 50%;
        background-color: var(--color-gold);
        color: var(--color-bg-pure);
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 800;
    }
    
    .navbar.active {
        transform: translateY(0);
    }
    
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        min-width: 0;
    }
    .order-items-list {
        padding-right: 0;
        max-height: 420px;
    }
    .order-item-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 10px 12px;
        padding: 12px;
    }
    .order-item-checkbox {
        margin-top: 3px;
    }
    .order-item-meta {
        cursor: pointer;
    }
    .order-item-meta h4 {
        font-size: 14px;
        line-height: 1.3;
    }
    .order-item-meta span {
        display: block;
        font-size: 12px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
    .order-item-price {
        grid-column: 2;
        white-space: normal;
        font-size: 13.5px;
    }
    .qty-control {
        grid-column: 2;
        justify-self: start;
    }
    .qty-btn {
        width: 34px;
        height: 34px;
    }
    .qty-input {
        width: 40px;
        height: 34px;
        font-size: 15px;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
    .order-form-container {
        padding: 24px;
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    .form-step-title {
        font-size: 18px;
        line-height: 1.25;
    }
    .form-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        align-items: stretch;
    }
    .form-navigation > div:empty {
        display: none;
    }
    .form-navigation .btn {
        width: 100%;
        min-width: 0;
        padding-left: 12px;
        padding-right: 12px;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }
    .form-navigation .btn:only-child,
    .form-navigation > div:empty + .btn {
        grid-column: 1 / -1;
    }
    .modal-details-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .modal-content {
        padding: 24px;
    }

    .liturgy-section {
        padding: 72px 0;
    }

    .liturgy-container {
        gap: 32px;
        align-items: stretch;
    }

    .liturgy-left {
        text-align: left;
    }

    .liturgy-left .section-title {
        font-size: 31px;
    }

    .liturgy-left .section-desc {
        max-width: 100%;
        margin: 0;
    }

    .resource-selector-tabs {
        margin: 24px 0 20px;
        padding-bottom: 10px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .resource-selector-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 9px 12px;
        font-size: 14px;
    }

    .finder-inputs {
        flex-direction: column;
        gap: 14px;
    }

    .input-group.number-group {
        width: 100%;
    }

    .finder-inputs select,
    .finder-inputs input {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
    }

    .chips-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .chips-container::-webkit-scrollbar {
        display: none;
    }

    .chip {
        flex: 0 0 auto;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }

    .parchment-scroll {
        width: 100%;
        max-width: 100%;
        filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.36));
    }

    .parchment-content {
        min-height: 360px;
        padding: 28px 24px;
    }

    .reading-title {
        font-size: 20px;
    }

    .reading-body {
        max-height: 240px;
        font-size: 14.5px;
        line-height: 1.7;
    }

    .parchment-actions {
        flex-wrap: wrap;
    }

    .btn-parchment-action {
        flex: 1;
        justify-content: center;
        min-height: 40px;
    }

    .spotlight-section {
        padding: 72px 0;
    }

    .spotlight-title {
        font-size: 28px;
    }

    .spotlight-subtitle {
        font-size: 17px;
    }

    .spotlight-meta {
        flex-wrap: wrap;
        gap: 12px;
    }

    .spotlight-actions {
        flex-wrap: wrap;
    }

    .book-card-overlay {
        opacity: 1;
        pointer-events: none;
        background-color: transparent;
        backdrop-filter: none;
    }

    .btn-quickview {
        pointer-events: auto;
        transform: none;
        min-height: 42px;
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
    .stats-container {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 32px;
    }
    .hero-ctas {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
    .order-section {
        padding: 56px 0;
    }
    .order-form-container {
        padding: 22px 18px;
        border-radius: 18px;
    }
    .order-item-row {
        grid-template-columns: 24px minmax(0, 1fr);
    }
    .order-form-header h2 {
        font-size: 24px;
    }
    .stepper {
        align-items: stretch;
    }
    .step-label {
        font-size: 11px;
        line-height: 1.25;
    }
    .form-step-title {
        font-size: 17px;
    }
    .form-group label {
        font-size: 13px;
        line-height: 1.35;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 14px;
    }
    .stepper {
        flex-direction: column;
        gap: 16px;
    }
    .step-line {
        display: none;
    }

    .journey-date strong {
        font-size: 32px;
    }

    .liturgy-section {
        padding: 58px 0;
    }

    .liturgy-left .section-title {
        font-size: 28px;
    }

    .liturgy-left .section-desc {
        font-size: 15px;
        line-height: 1.55;
    }

    .resource-selector-tabs {
        gap: 8px;
    }

    .tab-btn {
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: var(--radius-full);
        background-color: rgba(255,255,255,0.04);
    }

    .tab-btn.active::after {
        display: none;
    }

    .parchment-content {
        padding: 24px 18px;
        min-height: 330px;
    }

    .scroll-edge {
        height: 14px;
    }

    .reading-meta {
        letter-spacing: 1px;
    }

    .reading-title {
        font-size: 18px;
    }

    .reading-body {
        max-height: 220px;
        padding-right: 4px;
    }

    .container {
        padding: 0 16px;
    }

    .book-showcase-container {
        gap: 16px;
        padding: 12px;
    }

    .showcase-card {
        flex: 1 1 auto;
        max-width: 160px;
        min-width: 0;
    }

    .resource-selector-tabs {
        overflow-x: auto;
    }

    .chips-container {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .spotlight-section {
        padding: 56px 0;
    }

    .spotlight-title {
        font-size: 22px;
    }

    .spotlight-subtitle {
        font-size: 15px;
        margin-bottom: 16px;
    }

    .spotlight-description {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .spotlight-meta {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .spotlight-actions {
        flex-direction: column;
    }

    .book-card-3d img {
        transform: perspective(1000px) rotateY(0deg);
    }
}

@media (max-width: 380px) {
    .order-form-container {
        padding: 20px 16px;
    }

    .form-navigation {
        grid-template-columns: 1fr;
    }

    .form-navigation .btn,
    .form-navigation .btn:only-child,
    .form-navigation > div:empty + .btn {
        grid-column: auto;
    }

    .order-info-card {
        padding: 24px 18px;
    }
}

/* ==========================================================================
   SCROLL PROGRESS BAR, BREADCRUMBS, FAB & SCROLL TO TOP
   ========================================================================== */

/* Page Scroll Progress Indicator */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary-light), var(--color-gold));
    z-index: 10002;
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Subpage Breadcrumb Navigation */
.breadcrumbs-section {
    padding: 100px 0 20px;
    background-color: var(--color-bg-accent);
    border-bottom: 1px solid var(--color-border);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.breadcrumbs a {
    color: var(--color-primary-light);
    transition: var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--color-gold);
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: var(--color-border);
}

.breadcrumbs .current {
    color: var(--color-text-dark);
    font-weight: 600;
}

/* Floating Action Button (FAB) Container & Sub-items */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.fab-main-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
    border: none;
    box-shadow: 0 8px 24px rgba(82, 24, 86, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10;
    position: relative;
}

.fab-main-btn:hover {
    background-color: var(--color-primary-light);
    transform: scale(1.08) rotate(15deg);
    box-shadow: 0 12px 30px rgba(82, 24, 86, 0.5), var(--shadow-gold);
}

body[data-theme="dark"] .fab-main-btn {
    background-color: var(--color-gold);
    color: var(--color-bg-white);
    box-shadow: 0 8px 24px rgba(203, 161, 53, 0.4);
}

body[data-theme="dark"] .fab-main-btn:hover {
    background-color: var(--color-gold-light);
    color: var(--color-text-dark);
}

.fab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--color-gold);
    color: var(--color-bg-pure);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg-pure);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

body[data-theme="dark"] .fab-badge {
    background-color: var(--color-primary-light);
    border-color: var(--color-bg-white);
}

/* Expandable menu of quick links on FAB */
.fab-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    transition: var(--transition-smooth);
    margin-right: 5px;
}

.fab-container.active .fab-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--color-bg-pure);
    border: 1px solid var(--color-border);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-primary-light);
    white-space: nowrap;
    transition: var(--transition-smooth);
}

body[data-theme="dark"] .fab-menu-item {
    background-color: var(--color-bg-accent);
    color: var(--color-gold-light);
}

.fab-menu-item:hover {
    transform: translateX(-8px);
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
    border-color: var(--color-primary);
}

.fab-whatsapp-item {
    color: #128C4A;
}

.fab-whatsapp-item:hover {
    background-color: #128C4A;
    border-color: #128C4A;
    color: #fff;
}

body[data-theme="dark"] .fab-menu-item:hover {
    background-color: var(--color-gold);
    color: var(--color-bg-white);
    border-color: var(--color-gold);
}

.fab-menu-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dedicated separate Scroll Up button */
.scroll-up-btn {
    position: fixed;
    bottom: 105px;
    right: 37px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: var(--color-bg-pure);
    color: var(--color-primary);
    border: 1.5px solid var(--color-border);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7) translateY(20px);
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 1001;
}

.scroll-up-btn.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.scroll-up-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
    border-color: var(--color-primary);
    transform: translateY(-4px);
}

body[data-theme="dark"] .scroll-up-btn {
    background-color: var(--color-bg-accent);
    color: var(--color-gold);
}

body[data-theme="dark"] .scroll-up-btn:hover {
    background-color: var(--color-gold);
    color: var(--color-bg-white);
    border-color: var(--color-gold);
}

/* Category icon or badge inside navbar */
.cart-badge {
    background-color: var(--color-gold);
    color: var(--color-bg-pure);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    margin-left: 6px;
    display: inline-block;
    transition: var(--transition-smooth);
}

body[data-theme="dark"] .cart-badge {
    background-color: var(--color-primary-light);
}

/* Interactive accessories specific icons styling */
.custom-book-placeholder.accessories-theme {
    background: linear-gradient(135deg, #1A0D1F 0%, #3D1F47 100%);
    color: var(--color-gold);
}

/* ==========================================================================
   LITURGY SUBPAGE DETAILS & Skeuomorphic Parchment styling
   ========================================================================== */
.liturgy-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 40px;
}

@media (max-width: 991px) {
    .liturgy-grid {
        grid-template-columns: 1fr;
    }
}

.liturgy-selection-panel {
    background-color: var(--color-bg-pure);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: var(--transition-smooth);
}

.liturgy-selection-panel h4 {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 12px;
}

body[data-theme="dark"] .liturgy-selection-panel h4 {
    color: var(--color-gold);
}

.language-tabs {
    display: flex;
    gap: 10px;
}

.lang-tab-btn {
    flex: 1;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-accent);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-tab-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

body[data-theme="dark"] .lang-tab-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.lang-tab-btn.active {
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
    border-color: var(--color-primary);
}

body[data-theme="dark"] .lang-tab-btn.active {
    background-color: var(--color-gold);
    color: var(--color-bg-pure);
    border-color: var(--color-gold);
}

.liturgy-cats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.liturgy-cat-btn {
    text-align: left;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg-pure);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.liturgy-cat-btn::after {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition-fast);
}

.liturgy-cat-btn:hover {
    background-color: var(--color-bg-accent);
    color: var(--color-primary);
    border-color: rgba(82, 24, 86, 0.2);
    padding-left: 24px;
}

.liturgy-cat-btn:hover::after {
    opacity: 1;
    transform: translateX(0);
}

body[data-theme="dark"] .liturgy-cat-btn:hover {
    color: var(--color-gold-light);
    border-color: rgba(203, 161, 53, 0.2);
}

.liturgy-cat-btn.active {
    background-color: rgba(82, 24, 86, 0.08);
    color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 600;
}

body[data-theme="dark"] .liturgy-cat-btn.active {
    background-color: rgba(203, 161, 53, 0.1);
    color: var(--color-gold-light);
    border-color: var(--color-gold);
}

.parchment-container {
    background-color: var(--parchment-bg);
    background-image: radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 12px 12px;
    border: 1px solid var(--parchment-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    color: var(--parchment-text);
    position: relative;
    transition: var(--transition-smooth);
}

body[data-theme="dark"] .parchment-container {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    border-color: rgba(78, 59, 48, 0.4);
}

.parchment-controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px dashed rgba(78, 59, 48, 0.15);
    padding-bottom: 16px;
}

.parchment-ctrl-btn {
    background: none;
    border: 1px solid rgba(78, 59, 48, 0.25);
    color: var(--parchment-text) !important;
    padding: 8px 16px;
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.parchment-ctrl-btn svg {
    stroke: var(--parchment-text);
}

.parchment-ctrl-btn:hover {
    background-color: rgba(78, 59, 48, 0.08);
    border-color: var(--parchment-text);
}

.parchment-paper {
    font-family: Georgia, serif;
    line-height: 1.8;
}

.parchment-header {
    border-bottom: 1px solid rgba(78, 59, 48, 0.15);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.parchment-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: #382417 !important; /* Force beautiful readable dark sepia-brown */
    margin-bottom: 8px;
}

.parchment-subtitle {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--color-gold-dark);
    text-transform: uppercase;
}

.parchment-body {
    font-size: 16px;
    color: #4e3b30 !important; /* Force beautiful readable sepia-brown text */
}

.parchment-body p {
    margin-bottom: 16px;
}

.drop-cap {
    font-family: 'Cinzel', serif;
    font-size: 48px;
    line-height: 40px;
    padding-top: 4px;
    padding-right: 8px;
    padding-left: 3px;
    float: left;
    color: #521856;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   13. SHOPPING CART TOGGLE BUTTON & GLASSMORPHIC SLIDE-OUT DRAWER
   -------------------------------------------------------------------------- */
.cart-toggle-btn,
.saved-toggle-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-dark);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.cart-toggle-btn:hover,
.saved-toggle-btn:hover {
    background-color: var(--color-bg-accent);
    color: var(--color-primary);
    transform: translateY(-2px);
}

body[data-theme="dark"] .cart-toggle-btn:hover,
body[data-theme="dark"] .saved-toggle-btn:hover {
    color: var(--color-gold);
}

.cart-count-badge,
.saved-count-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--color-gold);
    color: var(--color-bg-pure);
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    animation: popIn 0.3s ease-out;
}

body[data-theme="dark"] .cart-count-badge,
body[data-theme="dark"] .saved-count-badge {
    background-color: var(--color-primary-light);
    color: var(--color-bg-pure);
}

.book-card-img-container {
    position: relative;
}

.book-save-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(252, 250, 253, 0.88);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.book-save-btn:hover,
.book-save-btn.is-saved {
    background: var(--color-gold);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.modal-actions-stack {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Cart Drawer Structural Wrapper */
.cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.4s;
}

.cart-drawer.active {
    pointer-events: auto;
    visibility: visible;
}

.cart-drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 5, 32, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cart-drawer.active .cart-drawer-overlay {
    opacity: 1;
}

.cart-drawer-container {
    position: absolute;
    top: 0;
    right: -440px;
    width: 440px;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -5px 0 30px rgba(30, 5, 32, 0.15);
    border-left: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.active .cart-drawer-container {
    right: 0;
}

body[data-theme="dark"] .cart-drawer-container {
    background: rgba(35, 10, 38, 0.95);
    border-left-color: rgba(255, 255, 255, 0.08);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body[data-theme="dark"] .cart-drawer-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.cart-drawer-header h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
}

body[data-theme="dark"] .cart-drawer-header h3 {
    color: var(--color-gold);
}

.cart-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.cart-drawer-close:hover {
    background-color: var(--color-bg-accent);
    color: var(--color-text);
}

/* Cart Items Container */
.cart-drawer-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Empty Cart Design */
.cart-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-muted);
    text-align: center;
    padding: 40px;
}

.cart-drawer-empty svg {
    color: var(--color-gold);
    margin-bottom: 16px;
    opacity: 0.8;
}

.cart-drawer-empty p {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Cart Item Rows */
.cart-drawer-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    background-color: var(--color-bg-accent);
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.cart-drawer-item:hover {
    border-color: var(--color-border);
    transform: translateY(-2px);
}

body[data-theme="dark"] .cart-drawer-item {
    background-color: rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] .cart-drawer-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

.cart-item-img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* Skeuomorphic Cover Placeholder inside Drawer */
.cart-item-placeholder {
    width: 60px;
    height: 80px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.cart-item-placeholder.prayers-theme {
    background: linear-gradient(135deg, #521856, #8d2e94);
    color: #fff;
}

.cart-item-placeholder.christian-living-theme {
    background: linear-gradient(135deg, #1B5E20, #4CAF50);
    color: #fff;
}

.cart-item-placeholder.educational-theme {
    background: linear-gradient(135deg, #0D47A1, #2196F3);
    color: #fff;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-format {
    font-size: 11px;
    color: var(--color-text-muted);
}

.cart-item-price-qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    gap: 12px;
}

.cart-item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-gold-dark);
}

body[data-theme="dark"] .cart-item-price {
    color: var(--color-gold);
}

/* Inline Quantity Controller in Drawer */
.cart-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--color-bg-pure);
}

body[data-theme="dark"] .cart-qty-control {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
}

.cart-qty-btn {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.cart-qty-btn:hover {
    background-color: var(--color-bg-accent);
}

.cart-qty-input {
    width: 28px;
    height: 24px;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    background: none;
    color: var(--color-text);
    -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

body[data-theme="dark"] .cart-qty-input {
    border-left-color: rgba(255, 255, 255, 0.1);
    border-right-color: rgba(255, 255, 255, 0.1);
}

.cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.cart-item-remove:hover {
    background-color: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
}

/* Footer Section */
.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg-pure);
    flex-shrink: 0;
}

body[data-theme="dark"] .cart-drawer-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
    background-color: rgba(25, 5, 28, 0.98);
}

.cart-drawer-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--color-text-muted);
}

.cart-drawer-subtotal span:last-child {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text);
}

#cart-drawer-subtotal-price {
    color: var(--color-primary) !important;
}

body[data-theme="dark"] #cart-drawer-subtotal-price {
    color: var(--color-gold) !important;
}

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(82, 24, 86, 0.2);
}

@media (max-width: 768px) {
    .cart-drawer {
        height: 100vh;
        height: 100dvh;
    }

    .cart-drawer-container {
        inset: 0 auto 0 0;
        right: auto;
        left: 100%;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        height: 100dvh;
        border-left: 0;
        border-radius: 0;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        transition: left 0.34s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .cart-drawer.active .cart-drawer-container {
        left: 0;
        right: auto;
    }

    .cart-drawer-header {
        padding: 16px 18px;
        min-height: 64px;
        flex-shrink: 0;
    }

    .cart-drawer-items {
        padding: 16px;
        gap: 12px;
        min-height: 0;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .cart-drawer-item {
        gap: 12px;
        padding: 10px;
        border-radius: var(--radius-sm);
    }

    .cart-item-img,
    .cart-item-placeholder {
        width: 48px;
        height: 64px;
    }

    .cart-item-price-qty {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        margin-top: 4px;
    }

    .cart-item-info h4 {
        font-size: 13px;
        line-height: 1.25;
        -webkit-line-clamp: 2;
    }

    .cart-item-format {
        font-size: 11px;
        line-height: 1.35;
    }

    .cart-item-price {
        font-size: 12.5px;
    }

    .cart-drawer-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        display: grid;
        gap: 8px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -10px 24px rgba(82, 24, 86, 0.08);
    }

    .cart-drawer-subtotal {
        font-size: 13px;
        line-height: 1.25;
    }

    .cart-drawer-subtotal span:last-child {
        font-size: 15px;
    }

    .btn-checkout {
        order: -1;
        min-height: 48px;
        margin-top: 0 !important;
        margin-bottom: 2px;
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .cart-drawer-header h3 {
        font-size: 18px;
    }

    .cart-drawer-items {
        padding: 12px;
    }

    .cart-drawer-footer {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@keyframes popIn {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   14. EXPLORE & AUTH MOCKUP PAGES
   -------------------------------------------------------------------------- */
.explore-hero-section {
    padding: 90px 0;
    background: linear-gradient(135deg, var(--color-bg-white) 0%, var(--color-bg-accent) 100%);
}

.explore-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 56px;
    align-items: center;
}

.explore-copy .hero-title {
    color: var(--color-primary-dark);
    margin-bottom: 24px;
}

.explore-outcomes,
.service-path-grid {
    display: grid;
    gap: 18px;
}

.outcome-card,
.service-path-item {
    background-color: var(--color-bg-pure);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.outcome-card span {
    display: inline-flex;
    color: var(--color-gold-dark);
    font-weight: 800;
    margin-bottom: 10px;
}

.outcome-card h3,
.service-path-item h3 {
    color: var(--color-primary);
    font-size: 20px;
    margin-bottom: 8px;
}

.outcome-card p,
.service-path-item p {
    color: var(--color-text-muted);
}

.service-path-section {
    padding: 90px 0;
    background-color: var(--color-bg-white);
}

.service-path-grid {
    grid-template-columns: repeat(3, 1fr);
}

.embedded-liturgy-section {
    padding-top: 80px;
}

.hymn-prayer-drawer {
    border: 1px solid rgba(203, 161, 53, 0.32);
    border-radius: var(--radius-md);
    padding: 24px;
    background: rgba(255, 255, 255, 0.04);
}

.hymn-prayer-drawer summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    color: var(--color-bg-pure);
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 28px;
}

.hymn-prayer-drawer summary small {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-gold);
    text-transform: uppercase;
}

.popular-liturgy-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-shell {
    min-height: 100vh;
    padding: 32px;
    background: radial-gradient(circle at top left, rgba(203, 161, 53, 0.14), transparent 28%), var(--color-bg-accent);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.auth-logo {
    width: fit-content;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-pure);
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.auth-back-link:hover {
    border-color: var(--color-primary);
    background-color: var(--color-bg-white);
    transform: translateY(-1px);
}

.auth-panel {
    width: min(1080px, 100%);
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    background-color: var(--color-bg-pure);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-panel-reverse {
    grid-template-columns: 430px 1fr;
}

.auth-copy {
    padding: 56px;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: var(--color-bg-pure);
}

.auth-copy h1 {
    font-size: 38px;
    margin-bottom: 18px;
}

.auth-copy p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

.auth-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.auth-preview-list span {
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: var(--radius-full);
    padding: 8px 12px;
    color: var(--color-gold-light);
    font-weight: 700;
    font-size: 13px;
}

.auth-form {
    padding: 48px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form h2 {
    color: var(--color-primary);
    font-size: 30px;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 700;
    color: var(--color-text-dark);
    font-size: 14px;
}

.auth-form input,
.auth-form select {
    width: 100%;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    font: inherit;
    color: var(--color-text-dark);
    background-color: var(--color-bg-white);
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap input {
    width: 100%;
    padding-right: 46px !important;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    line-height: 0;
}

.password-toggle:hover {
    color: var(--color-primary);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.auth-check {
    flex-direction: row !important;
    align-items: center;
    font-weight: 600 !important;
}

.auth-check input {
    width: auto;
}

.auth-row a,
.auth-switch a {
    color: var(--color-primary);
    font-weight: 800;
}

.auth-switch {
    text-align: center;
    color: var(--color-text-muted);
}

.btn-primary-full {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 28px;
    background-color: var(--color-primary);
    color: var(--color-bg-pure);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(82, 24, 86, 0.25);
    transition: var(--transition-smooth);
    margin-top: 4px;
}

.btn-primary-full:hover:not(:disabled) {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 24, 86, 0.35);
}

.btn-primary-full:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

body[data-theme="dark"] .btn-primary-full {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.auth-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    margin-top: 2px;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    box-sizing: border-box;
    transition: var(--transition-smooth);
}

.auth-switch a:hover {
    background-color: rgba(82, 24, 86, 0.06);
    transform: translateY(-2px);
}

body[data-theme="dark"] .auth-switch a {
    color: var(--color-gold);
    border-color: var(--color-gold);
}

body[data-theme="dark"] .auth-switch a:hover {
    background-color: rgba(203, 161, 53, 0.1);
}

/* --------------------------------------------------------------------------
   15. CTA & NEWSLETTER SECTIONS
   -------------------------------------------------------------------------- */
.site-cta-section {
    padding: 76px 0;
    background-color: var(--color-bg-white);
}

.site-cta-section.alt {
    background-color: var(--color-bg-accent);
}

.site-cta-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 36px;
    align-items: center;
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: var(--color-bg-pure);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

.site-cta-panel::after {
    content: '';
    position: absolute;
    right: -70px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(244, 226, 172, 0.22);
}

.site-cta-copy,
.newsletter-card {
    position: relative;
    z-index: 1;
}

.site-cta-kicker {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--color-gold-light);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.6px;
}

.site-cta-copy h2 {
    font-size: 34px;
    margin-bottom: 14px;
}

.site-cta-copy p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    max-width: 650px;
}

.site-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.site-cta-actions .btn-secondary {
    color: var(--color-gold-light);
    border-color: rgba(244, 226, 172, 0.72);
}

.newsletter-card {
    background-color: rgba(255, 255, 255, 0.96);
    color: var(--color-text-dark);
    border-radius: var(--radius-sm);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.newsletter-card h3 {
    color: var(--color-primary);
    font-size: 22px;
    margin-bottom: 8px;
}

.newsletter-card p {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 12px 14px;
    font: inherit;
    color: var(--color-text-dark);
    background-color: var(--color-bg-white);
}

.newsletter-form button {
    padding-left: 18px;
    padding-right: 18px;
}

@media (max-width: 980px) {
    .explore-hero-grid,
    .auth-panel,
    .auth-panel-reverse {
        grid-template-columns: 1fr;
    }

    .service-path-grid {
        grid-template-columns: 1fr;
    }

    .site-cta-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-signin-link {
        display: none;
    }

    .header-actions > *:not(.header-order-action):not(.mobile-menu-toggle):not(.theme-toggle) {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        max-width: 0 !important;
        overflow: hidden !important;
    }

    .header-order-action {
        min-height: 36px;
        padding: 8px 12px !important;
        font-size: 12px;
    }
}

@media (max-width: 560px) {
    .auth-shell {
        padding: 18px;
    }

    .auth-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-copy,
    .auth-form {
        padding: 30px 24px;
    }

    .auth-copy h1 {
        font-size: 30px;
    }

    .site-cta-panel {
        padding: 28px 22px;
    }

    .site-cta-copy h2 {
        font-size: 28px;
    }

    .site-cta-actions,
    .newsletter-form {
        flex-direction: column;
    }
}
