/* ===== CSS Variables ===== */
:root {
    /* Primary - Deep Teal/Green for trust & charity */
    --primary: #1E6B5E;
    --primary-dark: #145648;
    --primary-light: #2A9D8F;
    
    /* Accent - Warm Coral/Orange for energy */
    --accent: #E76F51;
    --accent-light: #F4A261;
    --accent-warm: #E9C46A;
    
    /* Backgrounds - Clean white & soft blue-gray */
    --cream: #FFFFFF;
    --paper: #F8F9FA;
    --paper-warm: #FEF9F3;
    --surface: #EDF2F7;
    
    /* Text - Soft dark for readability */
    --text: #1A202C;
    --text-light: #4A5568;
    --text-muted: #718096;
    --white: #ffffff;
    
    /* Status Colors */
    --success: #48BB78;
    --warning: #ECC94B;
    --error: #F56565;
    --info: #4299E1;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--cream);
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 248, 243, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--accent-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.nav-title {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-logo {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(30, 107, 94, 0.3);
}

.nav-logo-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.nav-title h1 {
    font-size: 1.1rem;
    color: var(--primary);
    line-height: 1.2;
    white-space: nowrap;
    margin: 0;
}

.nav-title span {
    font-size: 0.7rem;
    color: var(--primary-light);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--primary);
    font-weight: 500;
    transition: color 0.2s;
}

.cart-link {
    position: relative;
    color: var(--text);
    display: flex;
    align-items: center;
}

.cart-link:hover {
    color: var(--primary);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #d32f2f;
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.nav-link:hover {
    color: var(--primary-dark);
}

.nav-button {
    background: var(--primary);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-button:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 6px -1px rgba(107, 68, 35, 0.2);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--accent-light);
}

.mobile-link {
    padding: 0.75rem 1rem;
    color: var(--primary);
    border-radius: 0.5rem;
}

.mobile-link:hover {
    background: var(--cream);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu.active {
        display: flex;
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(30, 107, 94, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    background: var(--cream);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-warm) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(231, 111, 81, 0.4);
}

/* ===== Hero Section ===== */
.hero {
    padding-top: 8rem;
    padding-bottom: 5rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #E8F4F8 0%, #D4EDDA 50%, #FFF5EB 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.1) 0%, rgba(244, 162, 97, 0.1) 100%);
    pointer-events: none;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 165, 116, 0.2);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.hero-badge svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-title span {
    color: var(--accent);
    display: block;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

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

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-desc {
        font-size: 1.125rem;
    }
}

/* ===== Paper Texture ===== */
.paper-texture {
    background: linear-gradient(135deg, var(--paper) 0%, var(--surface) 100%);
}
}

/* ===== Stats Section ===== */
.stats-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-warm);
    font-family: 'Playfair Display', serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.stat-label {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ===== How It Works ===== */
.how-it-works {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(107, 68, 35, 0.1);
    position: relative;
    transition: all 0.3s;
}

.step-card:hover {
    box-shadow: 0 10px 20px -5px rgba(107, 68, 35, 0.15);
    transform: translateY(-4px);
}

.step-number {
    position: absolute;
    top: -1rem;
    left: -1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
}

.step-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.step-icon svg {
    width: 2rem;
    height: 2rem;
}

.step-icon.blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.step-icon.amber {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.step-icon.rose {
    background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%);
    color: #be123c;
}

.step-card h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Featured Books ===== */
.featured-books {
    padding: 6rem 0;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.book-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(107, 68, 35, 0.1);
    transition: all 0.3s;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(107, 68, 35, 0.15);
}

.book-image {
    height: 12rem;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.book-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.book-placeholder svg {
    width: 4rem;
    height: 4rem;
    color: white;
    opacity: 0.5;
}

.book-info {
    padding: 1.25rem;
}

.book-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.book-title {
    color: var(--primary);
    font-size: 1.125rem;
    margin: 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-author {
    color: #8B5A3C;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.book-link {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.book-link:hover {
    text-decoration: underline;
}

/* ===== Causes ===== */
.causes {
    padding: 6rem 0;
}

.causes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.cause-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(107, 68, 35, 0.1);
    transition: all 0.3s;
}

.cause-card:hover {
    box-shadow: 0 10px 20px -5px rgba(107, 68, 35, 0.15);
}

.cause-icon {
    width: 4rem;
    height: 4rem;
    background: #ffe4e6;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.cause-icon svg {
    width: 2rem;
    height: 2rem;
    color: #e11d48;
}

.cause-card h3 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.cause-card p {
    color: var(--text-light);
}

/* ===== CTA Section ===== */
.cta-section {
    background: var(--primary);
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--accent);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo svg {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--accent);
}

.footer-logo span {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-desc {
    color: rgba(212, 165, 116, 0.8);
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4,
.footer-staff-login h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-links ul,
.footer-contact ul,
.footer-staff-login p {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-staff-link {
    color: rgba(212, 165, 116, 0.8);
    transition: color 0.2s;
}

.footer-links a:hover,
.footer-staff-link:hover {
    color: white;
}

.footer-staff-login p {
    color: rgba(212, 165, 116, 0.8);
}

.footer-bottom {
    border-top: 1px solid var(--primary);
    padding-top: 2rem;
    text-align: center;
    color: rgba(212, 165, 116, 0.6);
}

/* ===== Flash Messages ===== */
.flash-messages {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 1001;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    animation: slideIn 0.3s ease;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
}

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

/* ===== Admin Dashboard Styles ===== */
/* Add padding to account for fixed navbar (approx 70px) */
main {
    padding-top: 80px;
}

.admin-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--accent-light);
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    margin: 0;
    color: var(--primary);
}

.subtitle {
    color: #666;
    margin-top: 0.25rem;
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #e3f2fd;
    border-radius: 12px;
}

.stat-icon.green { background: #e8f5e9; }
.stat-icon.orange { background: #fff3e0; }
.stat-icon.purple { background: #f3e5f5; }
.stat-icon.gold { background: #fff8e1; }
.stat-icon.blue { background: #e3f2fd; }

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Dashboard Panels */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.panel {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.panel-header {
    padding: 1rem 1.5rem;
    background: var(--paper);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--accent-light);
}

.panel-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary);
}

.panel-content {
    padding: 1rem 1.5rem;
}

.alert-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alert-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.alert-list li:last-child {
    border-bottom: none;
}

.alert-category {
    font-weight: 500;
}

.alert-count {
    color: #d32f2f;
    font-weight: 600;
}

.no-alerts {
    color: #388e3c;
    margin: 0;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
}

.sales-table th,
.sales-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.sales-table th {
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.link:hover {
    text-decoration: underline;
}

.no-data {
    color: #666;
    text-align: center;
    margin: 2rem 0;
}

/* ===== Delivery Options (Cart) ===== */
.delivery-options {
    margin: 1rem 0;
}

.delivery-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.delivery-option {
    display: block;
    margin-bottom: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--accent-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.delivery-option:hover {
    border-color: var(--accent);
}

.delivery-option input[type="radio"] {
    display: none;
}

.delivery-option:has(input:checked) {
    border-color: var(--primary);
    background: #f5efe6;
}

.option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
}

.option-header svg {
    color: var(--primary);
}

.delivery-price {
    font-weight: 600;
    color: var(--primary);
}

.delivery-price.free {
    color: #2e7d32;
}

.pickup-option {
    background: #f8f9fa;
}

.summary-divider {
    border-top: 1px solid var(--accent-light);
    margin: 1rem 0;
}

.pickup-info {
    margin: 0.75rem 0 0 2.5rem;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}
